Skip to:
Content

BuddyPress.org

Changeset 13256


Ignore:
Timestamp:
03/05/2022 03:10:42 AM (3 years ago)
Author:
imath
Message:

Provide context to bp_is_user_spammer & bp_is_user_deleted filters

These two filters now include a second parameter to pass the WP_User object.

Props dd32

Fixes #8645 (branch 10.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/10.0/src/bp-members/bp-members-functions.php

    r13240 r13256  
    943943     * @since 1.6.0
    944944     *
    945      * @param bool $is_spammer Whether or not user is marked as spammer.
    946      */
    947     return apply_filters( 'bp_is_user_spammer', (bool) $is_spammer );
     945     * @param bool     $is_spammer Whether or not user is marked as spammer.
     946     * @param \WP_User $user       The user to which we are acting on.
     947     */
     948    return apply_filters( 'bp_is_user_spammer', (bool) $is_spammer, $user );
    948949}
    949950
     
    10111012     * @since 1.6.0
    10121013     *
    1013      * @param bool $is_deleted Whether or not user is marked as deleted.
    1014      */
    1015     return apply_filters( 'bp_is_user_deleted', (bool) $is_deleted );
     1014     * @param bool     $is_deleted Whether or not user is marked as deleted.
     1015     * @param \WP_User $user       The user to which we are acting on.
     1016     */
     1017    return apply_filters( 'bp_is_user_deleted', (bool) $is_deleted, $user );
    10161018}
    10171019
Note: See TracChangeset for help on using the changeset viewer.