Doug Stewart avatar Doug Stewart committed b713e03

Change the way we bootstrap BuddyPress and remove a few comments from bbPress functions.

Comments (0)

Files changed (2)

 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' );


 	// This theme comes bundled with bbPress template files
 	add_theme_support( 'bbpress' );
-/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
 add_action( 'after_setup_theme', 'lblg_bbp_setup' );
 	// Right to left
 	if ( is_rtl() ) {
-		// TwentyTen
 		wp_enqueue_style( 'twentyten',     get_template_directory_uri() . '/bbpress/style.css', '',          20100503, 'screen' );
 		wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/bbpress/rtl.css',   'twentyten', 20100503, 'screen' );
-		// bbPress specific
 		wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/bbpress/css/bbpress-rtl.css', 'twentyten-rtl', 20100503, 'screen' );
 	// Left to right
 	wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );
 add_filter( 'wp_enqueue_scripts', 'lblg_bbp_topic_script_localization' );
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.