bp_is_directory()

Is this a component directory page?


Description Description


Return Return

(bool) True if the current page is a component directory, otherwise false.


Top ↑

Source Source

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

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

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

	/**
	 * Filters whether or not user is on a component directory page.
	 *
	 * @since 2.1.0
	 *
	 * @param bool $retval Whether or not user is on a component directory page.
	 */
	return (bool) apply_filters( 'bp_is_directory', $retval );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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