Changeset 1673
- Timestamp:
- 06/18/2015 06:20:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/trusted-deputy-capabilities.php
r1671 r1673 28 28 */ 29 29 function allow_trusted_deputy_capabilities( $required_capabilities, $requested_capability, $user_id, $args ) { 30 global $trusted_deputies; 30 31 $allow_capability = true; 31 32 32 if ( ! user_is_trusted_deputy( $user_id) ) {33 if ( ! in_array( $user_id, $trusted_deputies ) ) { 33 34 $allow_capability = false; 34 35 } else if ( in_array( 'do_not_allow', $required_capabilities ) ) { … … 45 46 } 46 47 add_filter( 'map_meta_cap', __NAMESPACE__ . '\allow_trusted_deputy_capabilities', 10, 4 ); 47 48 /**49 * Determine if the given user is a trusted Deputy50 *51 * @param int $user_id52 *53 * @return bool54 */55 function user_is_trusted_deputy( $user_id ) {56 $trusted_deputies = array(57 642041, // brandondove58 385876, // kcristiano59 14470969, // trusteddeputy60 499931, // karenalma61 );62 63 return in_array( $user_id, $trusted_deputies );64 }65 48 66 49 /**
Note: See TracChangeset
for help on using the changeset viewer.