diff --git src/bp-activity/bp-activity-cssjs.php src/bp-activity/bp-activity-cssjs.php
index 26748b440..40989577c 100644
|
|
|
function bp_activity_mentions_script() { |
| 22 | 22 | |
| 23 | 23 | // Special handling for New/Edit screens in wp-admin. |
| 24 | 24 | if ( is_admin() ) { |
| | 25 | $current_screen = null; |
| | 26 | if ( function_exists( 'get_current_screen' ) ) { |
| | 27 | $current_screen = get_current_screen(); |
| | 28 | } |
| | 29 | |
| 25 | 30 | if ( |
| 26 | | ! get_current_screen() || |
| 27 | | ! in_array( get_current_screen()->base, array( 'page', 'post' ) ) || |
| 28 | | ! post_type_supports( get_current_screen()->post_type, 'editor' ) ) { |
| | 31 | ! $current_screen || |
| | 32 | ( isset( $current_screen->is_block_editor ) && $current_screen->is_block_editor ) || |
| | 33 | ! in_array( $current_screen->base, array( 'page', 'post' ) ) || |
| | 34 | ! post_type_supports( $current_screen->post_type, 'editor' ) ) { |
| 29 | 35 | return; |
| 30 | 36 | } |
| 31 | 37 | } |
diff --git src/bp-templates/bp-nouveau/includes/activity/widgets.php src/bp-templates/bp-nouveau/includes/activity/widgets.php
index 7097519d9..206c2d7bc 100644
|
|
|
|
| 3 | 3 | * BP Nouveau Activity widgets |
| 4 | 4 | * |
| 5 | 5 | * @since 3.0.0 |
| 6 | | * @version 3.1.0 |
| | 6 | * @version 8.0.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | // Exit if accessed directly. |
| … |
… |
class BP_Latest_Activities extends WP_Widget { |
| 80 | 80 | */ |
| 81 | 81 | $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); |
| 82 | 82 | |
| 83 | | // Check instance for custom max number of activities to display |
| | 83 | // Check instance for custom max number of activities to display. |
| 84 | 84 | if ( ! empty( $instance['max'] ) ) { |
| 85 | 85 | $max = (int) $instance['max']; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | | // Check instance for custom activity types |
| | 88 | // Check instance for custom activity types. |
| 89 | 89 | if ( ! empty( $instance['type'] ) ) { |
| 90 | | $type = maybe_unserialize( $instance['type'] ); |
| | 90 | $type = maybe_unserialize( $instance['type'] ); |
| | 91 | if ( ! is_array( $type ) ) { |
| | 92 | $type = (array) maybe_unserialize( $type ); |
| | 93 | } |
| | 94 | |
| 91 | 95 | $classes = array_map( 'sanitize_html_class', array_merge( $type, array( 'bp-latest-activities' ) ) ); |
| 92 | 96 | |
| 93 | 97 | // Add classes to the container |
| … |
… |
class BP_Latest_Activities extends WP_Widget { |
| 181 | 185 | $type = array( 'activity_update' ); |
| 182 | 186 | if ( ! empty( $instance['type'] ) ) { |
| 183 | 187 | $type = maybe_unserialize( $instance['type'] ); |
| | 188 | if ( ! is_array( $type ) ) { |
| | 189 | $type = (array) maybe_unserialize( $type ); |
| | 190 | } |
| 184 | 191 | } |
| 185 | 192 | ?> |
| 186 | 193 | <p> |