Ticket #3341: 3341.2.patch
File 3341.2.patch, 1.6 KB (added by , 4 years ago) |
---|
-
src/includes/extend/buddypress/notifications.php
62 62 function bbp_format_buddypress_notifications( $content, $item_id, $secondary_item_id, $action_item_count, $format, $component_action_name, $component_name, $id ) { 63 63 64 64 // Bail if not the notification action we are looking for 65 if ( 'bbp_new_reply' !== $component_action_name) {65 if ( 0 !== strpos( $component_action_name, 'bbp_new_reply' ) ) { 66 66 return $content; 67 67 } 68 68 … … 86 86 // Multiple 87 87 if ( $action_item_count > 1 ) { 88 88 $filter = 'bbp_multiple_new_subscription_notification'; 89 $text = sprintf( esc_html__( 'You have % d new replies', 'bbpress' ), $action_item_count);89 $text = sprintf( esc_html__( 'You have %1$d new replies to %2$s', 'bbpress' ), $action_item_count, $topic_title ); 90 90 91 91 // Single 92 92 } else { … … 148 148 'user_id' => $topic_author_id, 149 149 'item_id' => $reply_id, 150 150 'component_name' => bbp_get_component_name(), 151 'component_action' => 'bbp_new_reply ',151 'component_action' => 'bbp_new_reply_' . $topic_id, 152 152 'date_notified' => get_post( $reply_id )->post_date, 153 153 ); 154 154 … … 211 211 $component = bbp_get_component_name(); 212 212 213 213 // Attempt to clear notifications for this topic 214 $marked = bp_notifications_mark_notifications_by_ item_id( $user_id, $topic_id, $component, 'bbp_new_reply');214 $marked = bp_notifications_mark_notifications_by_type( $user_id, $component, 'bbp_new_reply_' . $topic_id ); 215 215 216 216 // Get all reply IDs for the topic 217 217 $replies = bbp_get_all_child_ids( $topic_id, $post_type );