bb_get_themes

The BuddyPress bb get themes function.

Description

bb_get_themes(); 

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_get_themes() 
  2. $r = array(); 
  3. global $bb; 
  4. foreach ( $bb->theme_locations as $_name => $_data ) { 
  5. if ( $themes_dir = @dir( $_data['dir'] ) ) { 
  6. while( ( $theme_dir = $themes_dir->read() ) !== false ) { 
  7. if ( is_file( $_data['dir'] . $theme_dir . '/style.css' ) && is_readable( $_data['dir'] . $theme_dir . '/style.css' ) && '.' != $theme_dir{0} ) { 
  8. $r[$_name . '#' . $theme_dir] = $_name . '#' . $theme_dir; 
  9. ksort( $r ); 
  10. return $r;