bp_is_current_item( string $item = '' )

Check against the current_item.

Description

Parameters

$item

(Optional) The item being checked.

Default value: ''

Return

(bool) True if $item is the current item.

Source

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

1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
function bp_is_current_item( $item = '' ) {
    $retval = ( $item === bp_current_item() );
 
    /**
     * Filters whether or not an item is the current item.
     *
     * @since BuddyPress 2.1.0
     *
     * @param bool   $retval Whether or not an item is the current item.
     * @param string $item   The item being checked.
     */
    return (bool) apply_filters( 'bp_is_current_item', $retval, $item );
}

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.