found_posts_query хук-фильтрWP 2.1.0

Filters the query to run for retrieving the found posts.

Использование

add_filter( 'found_posts_query', 'wp_kama_found_posts_query_filter', 10, 2 );

/**
 * Function for `found_posts_query` filter-hook.
 * 
 * @param string   $found_posts_query The query to run to find the found posts.
 * @param WP_Query $query             The WP_Query instance (passed by reference).
 *
 * @return string
 */
function wp_kama_found_posts_query_filter( $found_posts_query, $query ){

	// filter...
	return $found_posts_query;
}
$found_posts_query(строка)
The query to run to find the found posts.
$query(WP_Query)
The WP_Query instance (passed by reference).

Список изменений

С версии 2.1.0 Введена.

Где вызывается хук

WP_Query::set_found_posts()
found_posts_query
wp-includes/class-wp-query.php 3379
$found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );

Где используется хук в WordPress

Использование не найдено.