Changeset 7347 for trunk/bp-friends/bp-friends-loader.php
- Timestamp:
- 08/12/2013 10:30:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-loader.php
r7277 r7347 31 31 */ 32 32 public function includes( $includes = array() ) { 33 // Files to include34 33 $includes = array( 35 34 'actions', … … 53 52 * 54 53 * @since BuddyPress (1.5) 55 * @global BuddyPress $bp The one true BuddyPress instance56 54 */ 57 55 public function setup_globals( $args = array() ) { 58 global $bp;56 $bp = buddypress(); 59 57 60 58 define ( 'BP_FRIENDS_DB_VERSION', '1800' ); … … 72 70 // All globals for the friends component. 73 71 // Note that global_tables is included in this array. 74 $ globals = array(72 $args = array( 75 73 'slug' => BP_FRIENDS_SLUG, 76 74 'has_directory' => false, … … 80 78 ); 81 79 82 parent::setup_globals( $ globals );80 parent::setup_globals( $args ); 83 81 } 84 82 85 83 /** 86 84 * Setup BuddyBar navigation 87 *88 * @global BuddyPress $bp The one true BuddyPress instance89 85 */ 90 86 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 91 global $bp; 92 93 $sub_nav = array(); 87 $bp = buddypress(); 94 88 95 89 // Add 'Friends' to the main navigation … … 140 134 /** 141 135 * Set up the Toolbar 142 *143 * @global BuddyPress $bp The one true BuddyPress instance144 136 */ 145 137 public function setup_admin_bar( $wp_admin_nav = array() ) { 146 global $bp; 147 148 // Prevent debug notices 149 $wp_admin_nav = array(); 138 $bp = buddypress(); 150 139 151 140 // Menus for logged in user … … 196 185 /** 197 186 * Sets up the title for pages and <title> 198 *199 * @global BuddyPress $bp The one true BuddyPress instance200 187 */ 201 188 function setup_title() { 202 global $bp;189 $bp = buddypress(); 203 190 204 191 // Adjust title … … 221 208 222 209 function bp_setup_friends() { 223 global $bp; 224 $bp->friends = new BP_Friends_Component(); 210 buddypress()->friends = new BP_Friends_Component(); 225 211 } 226 212 add_action( 'bp_setup_components', 'bp_setup_friends', 6 );
Note: See TracChangeset
for help on using the changeset viewer.