Changeset 1011
- Timestamp:
- 11/29/2014 08:47:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions-codex.php
r1010 r1011 394 394 395 395 // Should we bail 396 if ( $this->bail() ) 396 if ( $this->bail() ) { 397 397 return; 398 } 398 399 399 400 global $current_user, $wp_roles; 400 401 401 402 // Sanity check on current_user 402 if ( empty( $current_user ) ) 403 if ( empty( $current_user ) ) { 403 404 return; 405 } 404 406 405 407 // Set some defaults … … 414 416 415 417 // Bail if role is already 'editor' 416 if ( $user_role === $default_role ) 418 if ( $user_role === $default_role ) { 417 419 return; 420 } 418 421 419 422 // Get editable roles … … 535 538 } 536 539 537 // Bail if you are an admin,538 if ( current_user_can( 'manage_options') ) {540 // Bail if user is an admin 541 if ( in_array( 'administrator', wp_get_current_user()->roles ) ) { 539 542 return true; 540 543 } … … 544 547 } 545 548 new Codex_Hacks(); 549
Note: See TracChangeset
for help on using the changeset viewer.