Changeset 54119 for trunk/src/wp-includes/class-wp-user-query.php
- Timestamp:
- 09/11/2022 01:11:33 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-user-query.php
r53655 r54119 141 141 * @since 5.9.0 Added 'capability', 'capability__in', and 'capability__not_in' parameters. 142 142 * 143 * @global wpdb $wpdbWordPress database abstraction object.144 * @global int $blog_id143 * @global wpdb $wpdb WordPress database abstraction object. 144 * @global WP_Roles $wp_roles WordPress role management object. 145 145 * 146 146 * @param string|array $query { … … 257 257 */ 258 258 public function prepare_query( $query = array() ) { 259 global $wpdb ;259 global $wpdb, $wp_roles; 260 260 261 261 if ( empty( $this->query_vars ) || ! empty( $query ) ) { … … 449 449 450 450 if ( ! empty( $qv['capability'] ) || ! empty( $qv['capability__in'] ) || ! empty( $qv['capability__not_in'] ) ) { 451 global $wp_roles;452 453 451 $wp_roles->for_site( $blog_id ); 454 452 $available_roles = $wp_roles->roles;
Note: See TracChangeset
for help on using the changeset viewer.