Changeset 61210 for trunk/src/wp-includes/class-wp-user.php
- Timestamp:
- 11/11/2025 12:51:01 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-user.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-user.php
r61037 r61210 516 516 $wp_roles = wp_roles(); 517 517 518 // Filter out caps that are notrole names and assign to $this->roles.518 // Select caps that are role names and assign to $this->roles. 519 519 if ( is_array( $this->caps ) ) { 520 $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) ); 520 $this->roles = array(); 521 522 foreach ( $this->caps as $key => $value ) { 523 if ( $wp_roles->is_role( $key ) ) { 524 $this->roles[] = $key; 525 } 526 } 521 527 } 522 528
Note: See TracChangeset
for help on using the changeset viewer.