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

buddypress-trac noreply at wordpress.org
Wed Nov 27 20:45:04 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:  1.9
Component:  Notifications  |     Version:
 Severity:  major          |  Resolution:
 Keywords:  dev-feedback   |
---------------------------+------------------

Comment (by johnjamesjacoby):

 > I understand this was done because the notifications component can be
 turned off, but both sets of functions were introduced in 1.9 and both do
 the same thing. This also confuses those looking at the codebase.

 I agree that it's not ideal, but I think it's necessary to maintain the
 backwards compatibility of allowing the component to be disabled without
 third party components white-screening from functions-not-existing
 problems.

 I also agree that the core components should include the same
 `bp_is_active( 'notifications' )` checks that we use for other components,
 and rather than litter them through-out the entire codebase, I think we
 can use an action-based API that hooks notifications code into actions
 that only fire when Notifications is active.

 Something like:
 * `bp_add_notifications`
 * `bp_delete_notifications`
 * `bp_mark_notifications`

 These actions would be hooked to mid-level execution point (maybe
 `bp_template_redirect` ?) so they can occur within a single pageload,
 effectively bypassing the count updating problem noted in a different
 ticket.

 We're all in agreement that there are improvements we can make to this
 code -- I'm not convinced there is anything major looming over us to the
 point of delaying 1.9 though.

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


More information about the buddypress-trac mailing list