bp_is_item_admin()

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


Return Return

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


Source Source

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

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 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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.