bp_core_allow_default_theme

On multiblog installations you must first allow themes to be activated and show up on the theme selection screen.

Description

bp_core_allow_default_theme( $themes ); 

This function will let the BuddyPress bundled themes show up on the root blog selection screen and bypass this step. It also means that the themes won't show for selection on other blogs.

Parameters (1)

0. $themes
The themes.

Usage

  1. if ( !function_exists( 'bp_core_allow_default_theme' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/1.7.php'; 
  3.  
  4. // The themes. 
  5. $themes = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_allow_default_theme($themes); 
  9.  

Defined (1)

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

/bp-core/deprecated/1.7.php  
  1. function bp_core_allow_default_theme( $themes ) { 
  2. _deprecated_function( __FUNCTION__, '1.7' ); 
  3.  
  4. if ( !bp_current_user_can( 'bp_moderate' ) ) 
  5. return $themes; 
  6.  
  7. if ( bp_get_root_blog_id() != get_current_blog_id() ) 
  8. return $themes; 
  9.  
  10. if ( isset( $themes['bp-default'] ) ) 
  11. return $themes; 
  12.  
  13. $themes['bp-default'] = true; 
  14.  
  15. return $themes;