apply_filters( 'found_users_query', string $sql, WP_User_Query $query )
- Since
- 3.2.0, 5.1.0
Filters SELECT FOUND_ROWS() query for the current WP_User_Query instance.
Compatibility
- WordPress
- since 5.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$sqlstring- The SELECT FOUND_ROWS() query for the current WP_User_Query.
$queryWP_User_Query- The current WP_User_Query instance.
Where this hook fires · 1
wp-includes/class-wp-user-query.php:859WP_User_Query::query()
Source code
* * @global wpdb $wpdb WordPress database abstraction object. * * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. * @param WP_User_Query $query The current WP_User_Query instance. */ $found_users_query = apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()', $this ); $this->total_users = (int) $wpdb->get_var( $found_users_query ); } if ( $qv['cache_results'] ) { $cache_value = array(Changelog
Introduced in 3.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.1.0
Added the
$this parameter.from the docblock3.2.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.