[buddypress-trac] [BuddyPress] #5259: Single notifications are deleted instead of being marked as read for plugins

buddypress-trac noreply at wordpress.org
Thu Nov 28 01:32:27 UTC 2013


#5259: Single notifications are deleted instead of being marked as read for
plugins
---------------------------+------------------
 Reporter:  henrywright    |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  2.0
Component:  Notifications  |     Version:
 Severity:  major          |  Resolution:
 Keywords:  dev-feedback   |
---------------------------+------------------

Comment (by henrywright):

 I've decided to do this:

 {{{
 remove_action( 'bp_activity_screen_mentions',
 'bp_activity_remove_screen_notifications'
 // do the same for the rest of the notification types );

 function mark_all_notifications_read() {
     bp_core_mark_notifications_by_type( bp_loggedin_user_id(), 'activity',
 'new_at_mention' );
     // do the same for the rest of the notification types
 }
 add_action( 'bp_after_notifications_loop', 'mark_all_notifications_read'
 );
 }}}

 Then put {{{do_action( 'bp_after_notifications_loop' );}}} in
 notifications-loop.php.

 All single notifications would be cleared merely by visiting {{{/members
 /my-username/notifications/}}}

 To my knowledge, this approach wouldn't require plugin authors to update
 their code.

 Hoping my ideas are helpful but you can probably see flaws in my thoughts
 that I can't so any feedback would be great.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5259#comment:10>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list