Wordpress/tests
Adam Silverstein 4589c03036 Users: Add a `users_pre_query` filter to short circuit WP_User_Query results.
Add a new filter `users_pre_query` - filters the users array before the query takes place. Return a non-null value to bypass WordPress's default user queries. Similar to the `posts_pre_query` filter for WP_Query added in #36687. This filter lets you short circuit the WP_User_Query MySQL query to return your own results.

Developers should note that filtering functions that require pagination information are encouraged to set the `total_users` property of the WP_User_Query object, passed to the filter by reference. If WP_User_Query does not perform a database query, it will not have enough information to generate these values itself.

Props tlovett1, birgire, boonebgorges, spacedmonkey.
Fixes #44169.


git-svn-id: https://develop.svn.wordpress.org/trunk@44373 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-29 16:05:50 +00:00
..
phpunit Users: Add a `users_pre_query` filter to short circuit WP_User_Query results. 2018-12-29 16:05:50 +00:00
qunit REST API: Preserve unknown, respect `null` in server-side block rendering. 2018-12-17 17:59:44 +00:00