Changeset 8572 for trunk/wp-includes/capabilities.php
- Timestamp:
- 08/06/2008 08:31:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r7701 r8572 29 29 $this->role_objects = array(); 30 30 $this->role_names = array(); 31 foreach ( $this->roles as $role => $data) {31 foreach ( (array) $this->roles as $role => $data) { 32 32 $this->role_objects[$role] = new WP_Role($role, $this->roles[$role]['capabilities']); 33 33 $this->role_names[$role] = $this->roles[$role]['name']; … … 208 208 209 209 function set_role($role) { 210 foreach( $this->roles as $oldrole)210 foreach( (array) $this->roles as $oldrole) 211 211 unset($this->caps[$oldrole]); 212 212 if ( !empty($role) ) { … … 266 266 // Must have ALL requested caps 267 267 $capabilities = apply_filters('user_has_cap', $this->allcaps, $caps, $args); 268 foreach ( $caps as $cap) {268 foreach ( (array) $caps as $cap) { 269 269 //echo "Checking cap $cap<br />"; 270 270 if(empty($capabilities[$cap]) || !$capabilities[$cap])
Note: See TracChangeset
for help on using the changeset viewer.