Changeset 6343 for trunk/bp-core/admin/bp-core-functions.php
- Timestamp:
- 09/19/2012 06:52:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-functions.php
r6342 r6343 131 131 * @since BuddyPress (1.5) 132 132 * 133 * @global BuddyPress $bp The one true BuddyPress instance134 133 * @uses bp_current_user_can() to check current user permissions before showing the notices 135 134 * @uses bp_is_root_blog() 136 135 */ 137 136 function bp_core_print_admin_notices() { 138 global $bp;137 $bp = buddypress(); 139 138 140 139 // Only the super admin should see messages … … 171 170 * @since BuddyPress (1.5) 172 171 * 173 * @global BuddyPress $bp The one true BuddyPress instance174 172 * @param string $notice The notice you are adding to the queue 175 173 */ 176 174 function bp_core_add_admin_notice( $notice ) { 177 global $bp;175 $bp = buddypress(); 178 176 179 177 if ( empty( $bp->admin->notices ) ) { … … 197 195 */ 198 196 function bp_core_activation_notice() { 199 global $wp_rewrite, $wpdb, $bp; 197 global $wp_rewrite, $wpdb; 198 199 $bp = buddypress(); 200 200 201 201 // Only the super admin gets warnings … … 242 242 243 243 // Only components with 'has_directory' require a WP page to function 244 foreach( $bp->loaded_components as $component_id => $is_active) {244 foreach( array_keys( $bp->loaded_components ) as $component_id ) { 245 245 if ( !empty( $bp->{$component_id}->has_directory ) ) { 246 246 $wp_page_components[] = array( … … 296 296 297 297 if ( !empty( $dupes ) ) { 298 foreach( $dupes as $dupe_component => $dupe_id) {298 foreach( array_keys( $dupes ) as $dupe_component ) { 299 299 $dupe_names[] = $bp->pages->{$dupe_component}->title; 300 300 }
Note: See TracChangeset
for help on using the changeset viewer.