1. Doug Stewart
  2. elbee-elgee

Source

elbee-elgee / functions.php

Diff from to

File functions.php

 require_once( LBLG_FUNCTIONS_DIR . 'custom.php' );
 
 // BuddyPress-related code, only loaded if BP is active
-if( function_exists( 'bp_init' ) )
+function lblg_require_buddypress(){
 	require_once( LBLG_FUNCTIONS_DIR . 'buddypress.php' );
+}
+add_action( 'bp_init', 'lblg_require_buddypress' );
 
 // bbPress-related code, only loaded if bbP is active
-if( function_exists( 'bbp_get_current_user_id' ) )
+if( function_exists( 'is_bbpress' ) )
 	require_once( LBLG_FUNCTIONS_DIR . 'bbpress.php' );