From cce65c9bafdeadf1c662b95f8f75f630782d55b5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Nov 2020 20:09:05 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-term-query.php | 4 ++-- wp-includes/class-wp-user-query.php | 12 +++++------- wp-includes/version.php | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index a78f2e2794..b5cb03f55f 100644 --- a/wp-includes/class-wp-term-query.php +++ b/wp-includes/class-wp-term-query.php @@ -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']; diff --git a/wp-includes/class-wp-user-query.php b/wp-includes/class-wp-user-query.php index 967c6b6b05..f5eac1b7e4 100644 --- a/wp-includes/class-wp-user-query.php +++ b/wp-includes/class-wp-user-query.php @@ -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 ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6913e35c24..512c07f437 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.