bp_is_current_item

Check against the current_item.

Description

bp_is_current_item( (string) $item = '' ); 

Parameters (1)

0. $item — Optional. (string) => ''
The item being checked.

Usage

  1. if ( !function_exists( 'bp_is_current_item' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template.php'; 
  3.  
  4. // The item being checked. 
  5. $item = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_is_current_item($item); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-template.php  
  1. function bp_is_current_item( $item = '' ) { 
  2. $retval = ( $item === bp_current_item() ); 
  3.  
  4. /** 
  5. * Filters whether or not an item is the current item. 
  6. * @since 2.1.0 
  7. * @param bool $retval Whether or not an item is the current item. 
  8. * @param string $item The item being checked. 
  9. */ 
  10. return (bool) apply_filters( 'bp_is_current_item', $retval, $item );