Changeset 1013 for sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions-codex.php
- Timestamp:
- 12/01/2014 07:58:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions-codex.php
r1012 r1013 443 443 public function map_meta_caps( $caps = array(), $cap = '', $user_id = 0 ) { 444 444 445 // Should we bail446 if ( $this->bail() ) {447 return $caps;448 }449 450 445 // What cap are we switching 451 446 switch ( $cap ) { … … 455 450 case 'delete_page' : 456 451 case 'delete_codex_tags' : 457 $caps = array( 'do_not_allow' ); 452 if ( ! $this->is_user_trusted() ) { 453 $caps = array( 'do_not_allow' ); 454 } 458 455 break; 459 456 … … 462 459 case 'assign_codex_tags' : 463 460 case 'manage_codex_tags' : 464 $caps = array( ' editor' );461 $caps = array( 'manage_categories' ); 465 462 break; 466 463 } … … 483 480 484 481 // Should we bail 485 if ( $this-> bail() ) {482 if ( $this->is_user_trusted() ) { 486 483 return; 487 484 } … … 525 522 526 523 /** 527 * Checks if no further action needs to be taken524 * Checks if user is trusted in the codex 528 525 * 529 526 * @author jjj … … 531 528 * @return boolean True if should bail, false if should proceed 532 529 */ 533 private function bail() {530 private function is_user_trusted() { 534 531 535 532 // Bail if user is an admin … … 547 544 } 548 545 new Codex_Hacks(); 549
Note: See TracChangeset
for help on using the changeset viewer.