mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Coding Standards: Use WP_User_Query::get_results()
instead of a private property.
This resolves an issue where the private property `WP_User_Query::$results` is accessed directly in `WP_REST_Users_Controller::get_items()` instead of via the `::get_results()` method. Follow-up to [38832]. Props justlevine. See #52217. Built from https://develop.svn.wordpress.org/trunk@59357 git-svn-id: http://core.svn.wordpress.org/trunk@58743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
67e72c6e74
commit
f1ea02c64e
@ -349,7 +349,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
||||
|
||||
$users = array();
|
||||
|
||||
foreach ( $query->results as $user ) {
|
||||
foreach ( $query->get_results() as $user ) {
|
||||
$data = $this->prepare_item_for_response( $user, $request );
|
||||
$users[] = $this->prepare_response_for_collection( $data );
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59356';
|
||||
$wp_version = '6.8-alpha-59357';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user