Changeset 6343 for trunk/bp-core/bp-core-admin.php
- Timestamp:
- 09/19/2012 06:52:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-admin.php
r6342 r6343 83 83 */ 84 84 private function setup_globals() { 85 global $bp; 86 87 // Admin url 88 $this->admin_dir = trailingslashit( $bp->plugin_dir . 'bp-core/admin' ); 89 90 // Admin url 91 $this->admin_url = trailingslashit( $bp->plugin_url . 'bp-core/admin' ); 92 93 // Admin images URL 94 $this->images_url = trailingslashit( $this->admin_url . 'images' ); 95 96 // Admin css URL 97 $this->css_url = trailingslashit( $this->admin_url . 'css' ); 98 99 // Admin css URL 100 $this->js_url = trailingslashit( $this->admin_url . 'js' ); 85 $bp = buddypress(); 86 $this->admin_dir = trailingslashit( $bp->plugin_dir . 'bp-core/admin' ); // Admin path 87 $this->admin_url = trailingslashit( $bp->plugin_url . 'bp-core/admin' ); // Admin url 88 $this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL 89 $this->css_url = trailingslashit( $this->admin_url . 'css' ); // Admin css URL 90 $this->js_url = trailingslashit( $this->admin_url . 'js' ); // Admin css URL 101 91 } 102 92 … … 150 140 add_action( bp_core_admin_hook(), array( $this, 'admin_menus' ), 5 ); 151 141 152 // Add notice if not using a BuddyPress theme142 // Add notice if an update is needed 153 143 add_action( 'admin_notices', array( $this, 'admin_notices' ) ); 154 144 add_action( 'network_admin_notices', array( $this, 'admin_notices' ) ); … … 186 176 if ( bp_get_maintenance_mode() ) { 187 177 188 if ( !current_user_can( 'manage_options' ) ) 178 if ( !current_user_can( 'manage_options' ) ) { 189 179 return; 190 191 if ( bp_get_maintenance_mode() == 'install' ) 180 } 181 182 if ( bp_get_maintenance_mode() == 'install' ) { 192 183 $status = __( 'BuddyPress Setup', 'buddypress' ); 193 else184 } else { 194 185 $status = __( 'Update BuddyPress', 'buddypress' ); 186 } 195 187 196 188 if ( bp_get_wizard() ) { … … 206 198 207 199 // Bail if user cannot moderate 208 if ( ! bp_current_user_can( 'manage_options' ) ) 200 if ( ! bp_current_user_can( 'manage_options' ) ) { 209 201 return; 202 } 210 203 211 204 $hooks = array(); … … 477 470 // Update text 478 471 case 'update' : 479 $msg = sprintf( __( 'BuddyPress has been updated! Please run the <a href="%s">update wizard</a>.', 'buddypress' ), $url);472 $msg = sprintf( __( 'BuddyPress has been updated! Please run the <a href="%s">update wizard</a>.', 'buddypress' ), esc_url( $url ) ); 480 473 break; 481 474 482 475 // First install text 483 476 case 'install' : default : 484 $msg = sprintf( __( 'BuddyPress was successfully activated! Please run the <a href="%s">installation wizard</a>.', 'buddypress' ), $url);477 $msg = sprintf( __( 'BuddyPress was successfully activated! Please run the <a href="%s">installation wizard</a>.', 'buddypress' ), esc_url( $url ) ); 485 478 break; 486 479 } ?> … … 501 494 */ 502 495 function bp_admin() { 503 global $bp; 504 505 $bp->admin = new BP_Admin(); 496 buddypress()->admin = new BP_Admin(); 506 497 }
Note: See TracChangeset
for help on using the changeset viewer.