bp_get_theme_package_id

Get the current theme package ID.

Description

(string) bp_get_theme_package_id( (string) $default = 'legacy' ); 

Returns (string)

ID of the theme package.

Parameters (1)

0. $default — Optional. (string) => 'legacy'
Fallback value if not found in the database. Default: legacy..

Usage

  1. if ( !function_exists( 'bp_get_theme_package_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // Optional. Fallback value if not found in the database. 
  5. // Default: 'legacy'. 
  6. $default = 'legacy'; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = bp_get_theme_package_id($default); 
  10.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_get_theme_package_id( $default = 'legacy' ) { 
  2.  
  3. /** 
  4. * Filters the current theme package ID. 
  5. * @since 1.7.0 
  6. * @param string $value The current theme package ID. 
  7. */ 
  8. return apply_filters( 'bp_get_theme_package_id', bp_get_option( '_bp_theme_package_id', $default ) );