Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/bp-core/classes/class-bb-topics-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@ public function bb_migrate_topic_ajax() {
$item_type = isset( $_POST['item_type'] ) ? sanitize_text_field( wp_unslash( $_POST['item_type'] ) ) : '';
$new_topic_id = 'migrate' === $migrate_type ? absint( sanitize_text_field( wp_unslash( $_POST['new_topic_id'] ) ) ) : 0;

$result = array();
if ( 'migrate' === $migrate_type && $new_topic_id ) {
$result = $this->bb_migrate_topic(
array(
Expand Down
2 changes: 1 addition & 1 deletion src/bp-groups/bp-groups-activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function groups_record_activity( $args = '' ) {
'id' => $activity->id,
'action' => ! empty( $args['action'] ) ? $args['action'] : $activity->action,
'post_title' => ! empty( $args['post_title'] ) ? $args['post_title'] : $activity->post_title,
'title_required' => ! empty( $args['title_required'] ) ? $args['title_required'] : $activity->title_required,
'title_required' => ! empty( $args['title_required'] ) ? $args['title_required'] : ( $activity->title_required ?? false ),
'content' => ! empty( $args['content'] ) ? $args['content'] : '',
'component' => $activity->component,
'type' => $activity->type,
Expand Down
2 changes: 1 addition & 1 deletion src/bp-notifications/bp-notifications-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ function bb_notification_avatar() {
if ( 'notification' === $object ) {
bb_get_default_notification_avatar( 'thumb', $notification );
// Get the small icon for the notification which will print beside the avatar.
echo wp_kses_post( bb_notification_small_icon( $component_action, true, $notification ) );
echo wp_kses_post( bb_notification_small_icon( $component_action, true, $notification ) ?? '' );
} else {
if ( 'group' === $object ) {
$group = new BP_Groups_Group( $item_id );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ function widget( $args, $instance ) {
return;
}

// If no progress data available (e.g. no applicable fields), bail to avoid undefined key warnings.
if ( empty( $user_progress ) || ! isset( $user_progress['completion_percentage'] ) ) {
return;
}

// Hide the widget if "Hide widget once progress hits 100%" selected and progress is 100%
if ( 100 === (int) $user_progress['completion_percentage'] && ! empty( $instance['profile_hide_widget'] ) ) {
return;
Expand Down