[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 03:09:59 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 r-a-y):

 I've moved my thoughts into another ticket - #5259 - which should be
 appropriate changes for 1.9.

 > I think we can use an action-based API that hooks notifications code
 into actions that only fire when Notifications is active.

 > Also worth noting that the BP_Component->notification_callback variable
 only exists because Notifications were coupled with the Core component.
 Now that it's external, we can start to rethink how Notifications can
 stand on its own, and use that variable as a fallback.

 These are good starting points that we can hopefully iterate on in the
 future.

 ----

 We've kind of deviated from the initial issue in this ticket.  Sorry
 henrywright!

 I think we've agreed that this is a wontfix so plugins will need to update
 their code.

 About your code snippet, you could probably improve
 `mark_all_notifications_read()` by using
 `bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(),
 false, false )` instead of having to gather all the different notification
 types and clearing them that way.

 Adding some do_actions in the notification templates sound like a good
 idea.

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


More information about the buddypress-trac mailing list