bp_is_item_mod()

Is the logged-in user a mod for the current item?

Description

Return

(bool) True if the current user is a mod for the current item, otherwise false.

Source

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

function bp_is_item_mod() {
	$bp     = buddypress();
	$retval = false;

	if ( isset( $bp->is_item_mod ) ) {
		$retval = $bp->is_item_mod;
	}

	/**
	 * Filters whether or not the logged-in user is a mod for the current item.
	 *
	 * @since BuddyPress 2.1.0
	 *
	 * @param bool $retval Whether or not the logged-in user is a mod.
	 */
	return (bool) apply_filters( 'bp_is_item_mod', $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.