bp_is_item_admin()

Is the logged-in user an admin for the current item?

Description

Return

(bool) True if the current user is an admin for the current item, otherwise false.

Source

File: bp-core/bp-core-template.php

1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
function bp_is_item_admin() {
    $bp     = buddypress();
    $retval = false;
 
    if ( isset( $bp->is_item_admin ) ) {
        $retval = $bp->is_item_admin;
    }
 
    /**
     * Filters whether or not the logged-in user is an admin for the current item.
     *
     * @since BuddyPress 2.1.0
     *
     * @param bool $retval Whether or not the logged-in user is an admin.
     */
    return (bool) apply_filters( 'bp_is_item_admin', $retval );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.