bb_is_installed

Reports whether bbPress is installed by getting forums.

Description

(boolean) bb_is_installed(); 

Returns (boolean)

True if there are forums, otherwise false.


Usage

  1. if ( !function_exists( 'bb_is_installed' ) ) { 
  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_is_installed(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_is_installed() 
  2. // Maybe grab all the forums and cache them 
  3. global $bbdb; 
  4. $bbdb->suppress_errors(); 
  5. $forums = (array) @bb_get_forums(); 
  6. $bbdb->suppress_errors(false); 
  7.  
  8. if ( !$forums ) { 
  9. return false; 
  10.  
  11. return true;