Skip to:
Content

BuddyPress.org

Changeset 13255


Ignore:
Timestamp:
03/05/2022 03:03:31 AM (19 months 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

See #8645 (trunk)

File:
1 edited

Legend:

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

    r13239 r13255  
    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.