bp_registration_should_init

Checks if we should init our settings and code.

Description

bp_registration_should_init( (string) $bp = '', (string) $bbp = '' ); 

Parameters (2)

0. $bp — Optional. (string) => ''
BuddyPress instance, if available.
1. $bbp — Optional. (string) => ''
BbPress instance, if available.

Usage

  1. if ( !function_exists( 'bp_registration_should_init' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/loader.php'; 
  3.  
  4. // BuddyPress instance, if available. 
  5. $bp = ''; 
  6.  
  7. // bbPress instance, if available. 
  8. $bbp = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_registration_should_init($bp, $bbp); 
  12.  

Defined (1)

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

/loader.php  
  1. function bp_registration_should_init( $bp = '', $bbp = '' ) { 
  2. if ( 
  3. ( is_object( $bp ) && version_compare( $bp->version, '1.7.0', '>=' ) ) || 
  4. ( is_object( $bbp ) && version_compare( $bbp->version, '2.0.0', '>=' ) ) 
  5. ) { 
  6. return true; 
  7.  
  8. return false;