Changes between Version 2 and Version 3 of Ticket #7020, comment 1
- Timestamp:
- 04/15/2016 10:13:53 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7020, comment 1
v2 v3 1 1 Related: #6669, #bbPress2665. 2 2 3 The `'bp_notifications_get_notifications_for_user'` filter is quite weird indeed. You either have to return a string of the content or `array( 'text' => 'CONTENT', 'link' => 'LINK' )` depending on the `$format`. 3 The `'bp_notifications_get_notifications_for_user'` filter is quite weird indeed. You either have to return a string of the content or `array( 'text' => 'CONTENT', 'link' => 'LINK' )` depending on the `$format`. I think this needs better documentation. 4 4 5 comment:8:ticket:6669 goes into the problem as well.5 If you do that, then the `$component_action_name` is wiped out and no other plugin can do checks. comment:8:ticket:6669 goes into the problem as well. 6 6 7 I think this needs better documentation. 8 9 Since this filter was introduced in BP 1.9, I'm not sure if we can make this filter any better since other plugins are already using it such as bbPress. 10 11 Personally, I would not recommend using this filter. Instead, read the latter half of comment:4:ticket:6669 for an alternative approach to formatting your custom notifications. 12 13 ---- 14 15 If you are trying to use this filter to modify notifications written by other plugins using this filter, then we probably need to add some additional parameters so the action is passed again for better checks: 7 We probably need to add some additional parameters so the action is passed again for better checks: 16 8 17 9 {{{#!php … … 27 19 ); 28 20 }}} 21 22 ---- 23 24 Personally, I would not recommend using this filter. Instead, read the latter half of comment:4:ticket:6669 for an alternative approach to formatting your custom notifications.