Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2016 07:18:01 PM (8 years ago)
Author:
r-a-y
Message:

Notifications: Introduce two new parameters to the 'bp_notifications_get_notifications_for_user' filter.

This commit:

  • Adds $component_action_name and $component_name as the 6th and 7th parameters to the filter.
  • Updates the DocBlock for the filter.

In the DocBlock, we are deprecating the first parameter, which is the
component action name. It is recommended to do notification action name
checks against the 6th parameter from now on.

The reason why we are deprecating the first parameter is due to potential
plugin conflicts. If a plugin is doing a specific check on the notification
action and changes the return value for the filter, then no other plugin
can do checks for that same notification action. Also see #6669.

Fixes #7020.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-template.php

    r10715 r10725  
    480480
    481481            /** This filter is documented in bp-notifications/bp-notifications-functions.php */
    482             $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1 ) );
     482            $description = apply_filters_ref_array( 'bp_notifications_get_notifications_for_user', array( $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->component_action, $notification->component_name ) );
    483483        }
    484484
Note: See TracChangeset for help on using the changeset viewer.