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