bb_theme_basename

The BuddyPress bb theme basename function.

Description

bb_theme_basename( $file ); 

Parameters (1)

0. $file
The file.

Usage

  1. if ( !function_exists( 'bb_theme_basename' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-core.php'; 
  3.  
  4. // The file. 
  5. $file = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_theme_basename($file); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_theme_basename( $file ) 
  2. global $bb; 
  3. $directories = array(); 
  4. foreach ( $bb->theme_locations as $_name => $_data ) { 
  5. $directories[$_name] = $_data['dir']; 
  6. $file = bb_basename( $file, $directories ); 
  7. $file = preg_replace( '|/+.*|', '', $file ); 
  8. return $file;