bp_is_directory

Is this a component directory page?.

Description

bp_is_directory(); 

Usage

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

Defined (1)

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

/bp-core/bp-core-template.php  
  1. function bp_is_directory() { 
  2. $bp =buddypress); 
  3. $retval = false; 
  4.  
  5. if ( isset( $bp->is_directory ) ) { 
  6. $retval = $bp->is_directory; 
  7.  
  8. /** 
  9. * Filters whether or not user is on a component directory page. 
  10. * @since 2.1.0 
  11. * @param bool $retval Whether or not user is on a component directory page. 
  12. */ 
  13. return (bool) apply_filters( 'bp_is_directory', $retval );