found_sites_query
Filters the query used to retrieve found site count.
Использование
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(строка)
- SQL query.
По умолчанию: 'SELECT FOUND_ROWS()' - $site_query(WP_Site_Query)
- The WP_Site_Query instance.
Список изменений
С версии 4.6.0 | Введена. |
Где вызывается хук
found_sites_query
wp-includes/class-wp-site-query.php 736
$found_sites_query = apply_filters( 'found_sites_query', 'SELECT FOUND_ROWS()', $this );