pre_get_users
Fires before the WP_User_Query has been parsed.
The passed WP_User_Query object contains the query variables, not yet passed into SQL.
Usage
add_action( 'pre_get_users', 'wp_kama_pre_get_users_action' ); /** * Function for `pre_get_users` action-hook. * * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). * * @return void */ function wp_kama_pre_get_users_action( $query ){ // action... }
- $query(WP_User_Query)
- Current instance of WP_User_Query (passed by reference).
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-user-query.php 283
do_action_ref_array( 'pre_get_users', array( &$this ) );