bbp_get_component_name

Return bbPress's component name/ID ('forums' by default).

Description

(string) bbp_get_component_name(); 

This is used primarily for Notifications integration.

Returns (string)


Usage

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

Defined (1)

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

/includes/extend/buddypress/functions.php  
  1. function bbp_get_component_name() { 
  2.  
  3. // Use existing ID 
  4. if ( !empty(bbpress)->extend->buddypress->id ) ) { 
  5. $retval =bbpress)->extend->buddypress->id; 
  6.  
  7. // Use default 
  8. } else { 
  9. $retval = 'forums'; 
  10.  
  11. return apply_filters( 'bbp_get_component_name', $retval );