Skip to:
Content

BuddyPress.org

Changes between Version 2 and Version 3 of Ticket #7020, comment 1


Ignore:
Timestamp:
04/15/2016 10:13:53 PM (9 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7020, comment 1

    v2 v3  
    11Related: #6669, #bbPress2665.
    22
    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`.
     3The `'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.
    44
    5 comment:8:ticket:6669 goes into the problem as well.
     5If 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.
    66
    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:
     7We probably need to add some additional parameters so the action is passed again for better checks:
    168
    179{{{#!php
     
    2719);
    2820}}}
     21
     22----
     23
     24Personally, 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.