Changeset 4831 for trunk/includes/users/capabilities.php
- Timestamp:
- 03/29/2013 07:38:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/users/capabilities.php
r4797 r4831 149 149 $user = get_userdata( $user_id ); 150 150 $role = false; 151 $all_roles = apply_filters( 'editable_roles', $wp_roles->roles );152 151 153 152 // User has roles so lets 154 153 if ( ! empty( $user->roles ) ) { 155 $roles = array_intersect( array_values( $user->roles ), array_keys( $all_roles ) ); 154 155 // Apply the WordPress 'editable_roles' filter to let plugins ride along 156 $all_roles = apply_filters( 'editable_roles', $wp_roles->roles ); 157 158 // Look for an intersection of user roles to available blog roles 159 $roles = array_intersect( array_values( $user->roles ), array_keys( $all_roles ) ); 156 160 157 161 // If there's a role in the array, use the first one
Note: See TracChangeset
for help on using the changeset viewer.