[buddypress-trac] [BuddyPress] #5148: Make notifications a separate component

buddypress-trac noreply at wordpress.org
Fri Aug 30 20:35:55 UTC 2013


#5148: Make notifications a separate component
----------------------------------+------------------------------
 Reporter:  johnjamesjacoby       |       Owner:  johnjamesjacoby
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  2.0
Component:  Notifications         |     Version:
 Severity:  normal                |  Resolution:
 Keywords:  needs-patch needs-ui  |
----------------------------------+------------------------------

Comment (by r-a-y):

 I know this is slated for 2.0, but I wanted to get some groundwork done to
 improve the `BP_Core_Notification` class methods.

 `class.01.patch` does the following:

 * Adds missing static method - `delete()` - as referenced in
 `bp_core_delete_notification()`. (Can't believe no one has ever reported
 this!)
 * Adds static method - `get()`.  We don't currently have a flexible get
 method like the activity and groups components, so this covers that.  For
 a use-case on flexibility, see `bp_activity_at_message_notification()` in
 the patch.  I also deprecated a bunch of `get_*()` static methods in favor
 of this.
 * Adds '_before_' and '_after_' hooks in the `save()` method.
 * Adds static method - `get_where_sql()`.  The `WHERE` sql is shared
 between both `get()` and `delete()` methods, so I created a helper method
 for this.
 * Removed references to the `$bp` global and replaced with the
 `buddypress()` singeleton.

 Feedback welcome.

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


More information about the buddypress-trac mailing list