found_sites_query filter-hookWP 4.6.0

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

WP_Site_Query::set_found_sites()
found_sites_query
wp-includes/class-wp-site-query.php 736
$found_sites_query = apply_filters( 'found_sites_query', 'SELECT FOUND_ROWS()', $this );

Where the hook is used in WordPress

Usage not found.