found_sites_query
Filters the query used to retrieve found site count.
Usage
add_filter( 'found_sites_query', 'wp_kama_found_sites_query_filter', 10, 2 ); /** * Function for `found_sites_query` filter-hook. * * @param string $found_sites_query SQL query. * @param WP_Site_Query $site_query The `WP_Site_Query` instance. * * @return string */ function wp_kama_found_sites_query_filter( $found_sites_query, $site_query ){ // filter... return $found_sites_query; }
- $found_sites_query(string)
- SQL query.
Default: 'SELECT FOUND_ROWS()' - $site_query(WP_Site_Query)
- The WP_Site_Query instance.
Changelog
Since 4.6.0 | Introduced. |
Where the hook is called
found_sites_query
wp-includes/class-wp-site-query.php 745
$found_sites_query = apply_filters( 'found_sites_query', 'SELECT FOUND_ROWS()', $this );