Changeset 3947
- Timestamp:
- 01/27/2011 06:42:12 AM (14 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r3917 r3947 27 27 */ 28 28 function bp_core_set_uri_globals() { 29 global $bp, $bp_pages; 30 global $bp_unfiltered_uri, $bp_unfiltered_uri_offset; 29 global $bp, $bp_unfiltered_uri, $bp_unfiltered_uri_offset; 31 30 global $current_blog; 32 31 … … 43 42 44 43 // Fetch all the WP page names for each component 45 if ( empty( $bp _pages ) )46 $bp _pages = bp_core_get_page_names();44 if ( empty( $bp->pages ) ) 45 $bp->pages = bp_core_get_page_names(); 47 46 48 47 // Ajax or not? … … 119 118 120 119 // Find a match within registered BuddyPress controlled WP pages (check members first) 121 foreach ( (array)$bp _pages as $page_key => $bp_page ) {120 foreach ( (array)$bp->pages as $page_key => $bp_page ) { 122 121 if ( in_array( $bp_page->name, (array)$bp_uri ) ) { 123 122 // Match found, now match the slug to make sure. -
trunk/bp-core/bp-core-loader.php
r3944 r3947 35 35 36 36 function _setup_globals() { 37 global $bp, $bp_pages; 37 global $bp; 38 39 /** Database **********************************************************/ 38 40 39 41 // Get the base database prefix 40 $bp->table_prefix = bp_core_get_table_prefix(); 42 if ( empty( $bp->table_prefix ) ) 43 $bp->table_prefix = bp_core_get_table_prefix(); 41 44 42 45 // The domain for the root of the site where the main blog resides 43 $bp->root_domain = bp_core_get_root_domain(); 46 if ( empty( $bp->root_domain ) ) 47 $bp->root_domain = bp_core_get_root_domain(); 48 49 // Fetches all of the core BuddyPress settings in one fell swoop 50 if ( empty( $bp->site_options ) ) 51 $bp->site_options = bp_core_get_site_options(); 44 52 45 53 // The names of the core WordPress pages used to display BuddyPress content 46 $bp->pages = $bp_pages; 54 if ( empty( $bp->pages ) ) 55 $bp->pages = bp_core_get_page_names(); 47 56 48 /** Component and Action ********************************************** ****/57 /** Component and Action **********************************************/ 49 58 50 59 // Used for overriding the 2nd level navigation menu so it can be used to … … 63 72 } 64 73 65 // Fetches all of the core BuddyPress settings in one fell swoop66 $bp->site_options = bp_core_get_site_options();67 68 74 // Sets up the array container for the component navigation rendered 69 75 // by bp_get_nav() … … 78 84 $bp->active_components = array(); 79 85 80 /** Basic current user data ******************************************* ****/86 /** Basic current user data *******************************************/ 81 87 82 88 // Logged in user is the 'current_user' … … 86 92 $bp->loggedin_user->id = $current_user->ID; 87 93 88 /** Avatars *********************************************************** ****/94 /** Avatars ***********************************************************/ 89 95 90 96 // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar -
trunk/bp-core/bp-core-wpabstraction.php
r3859 r3947 14 14 */ 15 15 if ( !is_multisite() ) { 16 global $wpdb; 17 16 18 $wpdb->base_prefix = $wpdb->prefix; 17 19 $wpdb->blogid = 1; -
trunk/bp-core/deprecated/1.3.php
r3917 r3947 301 301 */ 302 302 function bp_core_add_root_component( $slug ) { 303 global $bp , $bp_pages;303 global $bp; 304 304 305 305 _deprecated_function( __FUNCTION__, '1.3', 'wp_insert_post()' ); 306 if ( empty( $bp _pages ) )307 $bp _pages = bp_core_get_page_names();306 if ( empty( $bp->pages ) ) 307 $bp->pages = bp_core_get_page_names(); 308 308 309 309 $match = false; 310 310 311 311 // Check if the slug is registered in the $bp->pages global 312 foreach ( (array)$bp _pages as $key => $page ) {312 foreach ( (array)$bp->pages as $key => $page ) { 313 313 if ( $key == $slug || $page->slug == $slug ) 314 314 $match = true;
Note: See TracChangeset
for help on using the changeset viewer.