bp_registration_bbpress_allowed_areas

Check if on an allowed bbPress component.

Description

(boolean) bp_registration_bbpress_allowed_areas(); 

Returns (boolean)

True if an allowed component, false otherwise.


Usage

  1. if ( !function_exists( 'bp_registration_bbpress_allowed_areas' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/includes/core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_registration_bbpress_allowed_areas(); 
  7.  

Defined (1)

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

/includes/core.php  
  1. function bp_registration_bbpress_allowed_areas() { 
  2.  
  3. $allowed = false; 
  4.  
  5. /** 
  6. * At time of this comment, bbp_is_user_home and bbp_is_user_home_edit are one after 
  7. * another in the same file. If one doesn't exist, both don't, and vice versa. Both will 
  8. * exist if one does. 
  9. */ 
  10. if ( function_exists( 'bbp_is_user_home' ) ) { 
  11. if ( bbp_is_user_home() || bbp_is_user_home_edit() ) { 
  12. $allowed = true; 
  13.  
  14. /** 
  15. * Filter for user-set custom areas of bbPress. 
  16. * @since 4.3.0 
  17. * @param bool $allowed Current allowed value. 
  18. */ 
  19. return apply_filters( 'bprwg_bbpress_allowed_areas', $allowed ); 
  20.