pre_user_query
Fires after the WP_User_Query has been parsed, and before the query is executed.
The passed WP_User_Query object contains SQL parts formed from parsing the given query.
Usage
add_action( 'pre_user_query', 'wp_kama_pre_user_query_action' ); /** * Function for `pre_user_query` action-hook. * * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). * * @return void */ function wp_kama_pre_user_query_action( $query ){ // action... }
- $query(WP_User_Query)
- Current instance of WP_User_Query (passed by reference).
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-user-query.php 772
do_action_ref_array( 'pre_user_query', array( &$this ) );