Changeset 7347 for trunk/bp-activity/bp-activity-loader.php
- Timestamp:
- 08/12/2013 10:30:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-loader.php
r7277 r7347 53 53 // Load Akismet support if Akismet is configured 54 54 $akismet_key = bp_get_option( 'wordpress_api_key' ); 55 if ( defined( 'AKISMET_VERSION' ) && ( !empty( $akismet_key ) || defined( 'WPCOM_API_KEY' ) ) && apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) 55 if ( defined( 'AKISMET_VERSION' ) && ( !empty( $akismet_key ) || defined( 'WPCOM_API_KEY' ) ) && apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) { 56 56 $includes[] = 'akismet'; 57 58 if ( is_admin() ) 57 } 58 59 if ( is_admin() ) { 59 60 $includes[] = 'admin'; 61 } 60 62 61 63 parent::includes( $includes ); … … 69 71 * 70 72 * @since BuddyPress (1.5) 71 *72 * @global object $bp BuddyPress global settings73 73 */ 74 74 public function setup_globals( $args = array() ) { 75 global $bp;75 $bp = buddypress(); 76 76 77 77 // Define a slug, if necessary … … 87 87 // All globals for activity component. 88 88 // Note that global_tables is included in this array. 89 $ globals = array(89 $args = array( 90 90 'slug' => BP_ACTIVITY_SLUG, 91 91 'root_slug' => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG, … … 96 96 ); 97 97 98 parent::setup_globals( $ globals );98 parent::setup_globals( $args ); 99 99 } 100 100 … … 111 111 */ 112 112 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 113 114 $sub_nav = array();115 113 116 114 // Add 'Activity' to the main navigation … … 218 216 */ 219 217 public function setup_admin_bar( $wp_admin_nav = array() ) { 220 global $bp; 221 222 // Prevent debug notices 223 $wp_admin_nav = array(); 218 $bp = buddypress(); 224 219 225 220 // Menus for logged in user … … 309 304 */ 310 305 function setup_title() { 311 global $bp;306 $bp = buddypress(); 312 307 313 308 // Adjust title based on view … … 342 337 343 338 function bp_setup_activity() { 344 global $bp; 345 346 $bp->activity = new BP_Activity_Component(); 339 buddypress()->activity = new BP_Activity_Component(); 347 340 } 348 341 add_action( 'bp_setup_components', 'bp_setup_activity', 6 );
Note: See TracChangeset
for help on using the changeset viewer.