#5266 closed defect (bug) (fixed)
Replace older notification functions with new bp-notifications functions
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | 1.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar & Notifications | Keywords: | has-patch |
Cc: |
Description (last modified by )
Stemming from ticket:5259#comment:6, we should use the new bp-notifications functions instead of the older ones in bp-member-notifications.php.
The attached patch also replaces the recently-introduced notification wrapper functions (bp_core_mark_notifications_by_X()
) functions for the native ones (bp_notifications_mark_notifications_by_X()
) that were specifically written for the new component.
Attachments (7)
Change History (22)
#1
@
11 years ago
- Description modified (diff)
- Summary changed from Replace bp_core_mark_notifications_by_X() functions with native bp-notification functions to Replace older notification functions with new bp-notifications functions
#3
@
11 years ago
Agree with Boone. Deprecation seems fine, and we should use _deprecated_function()
where applicable.
Attaching a patch with how I'd like to see us abstract notifications out for each component, using Friends as an example.
#4
@
11 years ago
Ray, your patch breaks notifications for all components. :)
bp_notifications_add_notification()
does not share the same argument pattern as bp_core_add_notification()
. Notifications uses an arguments array, Core uses individual arguments.
#5
@
11 years ago
New patch cleans up code and also moves friendship-accepted activity into the same action that notifications get moved to.
@
11 years ago
Commit worthy patch. Includes the best of both friends patches, plus some surrounding clean-up
The swap-outs look good to me.
Re deprecation: If we're going to deprecate
bp_core_delete_notifications_from_user()
etc as noted in the docblocks, we should actually move them to a deprecated functions file, and use_deprecated_function()
. This should be more effective if we actually want plugin authors to move away from their use.