Users: Use `do_action_ref_array()` for `pre_get_users` and `pre_get_terms` actions.

This brings some consistency with the other similar actions:

* `pre_get_comments`
* `pre_get_networks`
* `pre_get_posts`
* `pre_get_sites`
* `pre_user_query`

Follow-up to [29363] and [37572].

Props andy, adamsilverstein, hellofromTonya, desrosj, SergeyBiryukov.
Fixes #50961.
Built from https://develop.svn.wordpress.org/trunk@49637


git-svn-id: http://core.svn.wordpress.org/trunk@49375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-11-17 20:09:05 +00:00
parent bcb9027236
commit cce65c9baf
3 changed files with 8 additions and 10 deletions

View File

@ -321,9 +321,9 @@ class WP_Term_Query {
*
* @since 4.6.0
*
* @param WP_Term_Query $this Current instance of WP_Term_Query.
* @param WP_Term_Query $this Current instance of WP_Term_Query (passed by reference).
*/
do_action( 'pre_get_terms', $this );
do_action_ref_array( 'pre_get_terms', array( &$this ) );
$taxonomies = (array) $args['taxonomy'];

View File

@ -219,15 +219,14 @@ class WP_User_Query {
/**
* Fires before the WP_User_Query has been parsed.
*
* The passed WP_User_Query object contains the query variables, not
* yet passed into SQL.
* The passed WP_User_Query object contains the query variables,
* not yet passed into SQL.
*
* @since 4.0.0
*
* @param WP_User_Query $this The current WP_User_Query instance,
* passed by reference.
* @param WP_User_Query $this Current instance of WP_User_Query (passed by reference).
*/
do_action( 'pre_get_users', $this );
do_action_ref_array( 'pre_get_users', array( &$this ) );
// Ensure that query vars are filled after 'pre_get_users'.
$qv =& $this->query_vars;
@ -576,8 +575,7 @@ class WP_User_Query {
*
* @since 3.1.0
*
* @param WP_User_Query $this The current WP_User_Query instance,
* passed by reference.
* @param WP_User_Query $this Current instance of WP_User_Query (passed by reference).
*/
do_action_ref_array( 'pre_user_query', array( &$this ) );
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta4-49636';
$wp_version = '5.6-beta4-49637';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.