From 6723459a79f80200a04774412d3e59165fed1797 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 2 Aug 2014 20:45:07 +0000 Subject: [PATCH] Add an action, `pre_get_users`, in `WP_User_Query::prepare_query()`. Props rmccue. Fixes #29084. git-svn-id: https://develop.svn.wordpress.org/trunk@29363 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index ccc3980664..40f7cf799a 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -523,6 +523,19 @@ 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. + * + * @since 4.0.0 + * + * @param WP_User_Query $this The current WP_User_Query instance, + * passed by reference. + */ + do_action( 'pre_get_users', $this ); + $qv =& $this->query_vars; if ( is_array( $qv['fields'] ) ) {