WordPress как на ладони
wordpress jino
фильтр не описан

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

Filters the query to run for retrieving the found posts.

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

add_filter( 'found_posts_query', 'filter_function_name_385', 10, 2 );
function filter_function_name_385( $found_posts, $this ){
	// filter...

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

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

WP_Query::set_found_posts() остальные хуки:

Код хука

Фрагмент из: wp-includes/class-wp-query.php VER 4.9.7
...
		global $wpdb;
		// Bail if posts is an empty array. Continue if posts is an empty string,
		// null, or false to accommodate caching plugins that fill posts later.
		if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) )
			return;

		if ( ! empty( $limits ) ) {
			/**
			 * Filters the query to run for retrieving the found posts.
			 *
			 * @since 2.1.0
			 *
			 * @param string   $found_posts The query to run to find the found posts.
			 * @param WP_Query $this        The WP_Query instance (passed by reference).
			 */
			$this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
		} else {
			if ( is_array( $this->posts ) ) {
				$this->found_posts = count( $this->posts );
			} else {
				if ( null === $this->posts ) {  
					$this->found_posts = 0;
				} else {
					$this->found_posts = 1;
				}
			}
		}

		/**
		 * Filters the number of found posts for the query.
		 *
...