Skip to:
Content

BuddyPress.org

Changeset 10467


Ignore:
Timestamp:
01/25/2016 09:58:35 PM (9 years ago)
Author:
boonebgorges
Message:

Pass $user_id and $activity params to 'bp_activity_at_name_do_notifications' filter.

These params make it easier to disable at-mention notifications for specific
users.

See #6842.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-filters.php

    r10417 r10467  
    344344         *
    345345         * @since 1.6.0
     346         * @since 2.5.0 Introduced `$user_id` and `$activity` parameters.
    346347         *
    347348         * @param bool  $value     Whether or not BuddyPress should send a notification to the mentioned users.
    348349         * @param array $usernames Array of users potentially notified.
     350         * @param int   $user_id   ID of the current user being notified.
     351         * @param BP_Activity_Activity $activity Activity object.
    349352         */
    350         if ( apply_filters( 'bp_activity_at_name_do_notifications', true, $usernames ) ) {
     353        if ( apply_filters( 'bp_activity_at_name_do_notifications', true, $usernames, $user_id, $activity ) ) {
    351354            bp_activity_at_message_notification( $activity->id, $user_id );
    352355        }
Note: See TracChangeset for help on using the changeset viewer.