Changeset 6581 for trunk/bp-forums/bp-forums-loader.php
- Timestamp:
- 12/10/2012 08:25:00 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-loader.php
r6342 r6581 35 35 * 36 36 * @since BuddyPress (1.5) 37 * @global BuddyPress $bp The one true BuddyPress instance38 37 */ 39 38 function setup_globals() { 40 global $bp;39 $bp = buddypress(); 41 40 42 41 // Define the parent forum ID … … 80 79 ); 81 80 82 // Admin area83 if ( is_admin() )84 $includes[] = 'admin';85 86 81 // bbPress stand-alone 87 82 if ( !defined( 'BB_PATH' ) ) … … 93 88 /** 94 89 * Setup BuddyBar navigation 95 *96 * @global BuddyPress $bp The one true BuddyPress instance97 90 */ 98 91 function setup_nav() { 99 global $bp;100 92 101 93 // Stop if forums haven't been set up yet … … 151 143 ); 152 144 153 // Favorite forums items. Disabled until future release.154 /*155 $sub_nav[] = array(156 'name' => __( 'Favorites', 'buddypress' ),157 'slug' => 'favorites',158 'parent_url' => $forums_link,159 'parent_slug' => $this->slug,160 'screen_function' => 'bp_member_forums_screen_favorites',161 'position' => 60,162 'item_css_id' => 'favorites'163 );164 */165 166 145 parent::setup_nav( $main_nav, $sub_nav ); 167 146 } … … 169 148 /** 170 149 * Set up the Toolbar 171 *172 * @global BuddyPress $bp The one true BuddyPress instance173 150 */ 174 151 function setup_admin_bar() { 175 global $bp;176 152 177 153 // Prevent debug notices … … 186 162 // Add the "My Account" sub menus 187 163 $wp_admin_nav[] = array( 188 'parent' => $bp->my_account_menu_id,164 'parent' => buddypress()->my_account_menu_id, 189 165 'id' => 'my-account-' . $this->id, 190 166 'title' => __( 'Forums', 'buddypress' ), … … 222 198 /** 223 199 * Sets up the title for pages and <title> 224 *225 * @global BuddyPress $bp The one true BuddyPress instance226 200 */ 227 201 function setup_title() { 228 global $bp;202 $bp = buddypress(); 229 203 230 204 // Adjust title based on view … … 247 221 248 222 function bp_setup_forums() { 249 global $bp; 250 251 $bp->forums = new BP_Forums_Component(); 223 buddypress()->forums = new BP_Forums_Component(); 252 224 } 253 225 add_action( 'bp_setup_components', 'bp_setup_forums', 6 );
Note: See TracChangeset
for help on using the changeset viewer.