found_posts_query
Filters the query to run for retrieving the found posts.
Usage
add_filter( 'found_posts_query', 'wp_kama_found_posts_query_filter' );
/**
* Function for `found_posts_query` filter-hook.
*
* @param string $found_posts_query The query to run to find the found posts.
*
* @return string
*/
function wp_kama_found_posts_query_filter( $found_posts_query ){
// filter...
return $found_posts_query;
}
- $found_posts_query(string)
- The query to run to find the found posts.
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
found_posts_query
wp-includes/class-wp-query.php 3696
$found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );