Changeset 22354 for trunk/wp-includes/capabilities.php
- Timestamp:
- 10/31/2012 11:18:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r22248 r22354 207 207 */ 208 208 function add_cap( $role, $cap, $grant = true ) { 209 if ( ! isset( $this->roles[$role] ) ) 210 return; 211 209 212 $this->roles[$role]['capabilities'][$cap] = $grant; 210 213 if ( $this->use_db ) … … 222 225 */ 223 226 function remove_cap( $role, $cap ) { 227 if ( ! isset( $this->roles[$role] ) ) 228 return; 229 224 230 unset( $this->roles[$role]['capabilities'][$cap] ); 225 231 if ( $this->use_db )
Note: See TracChangeset
for help on using the changeset viewer.