Filters the number of found posts for the query.
$found_postsint$queryWP_Querywp-includes/class-wp-query.php:3735WP_Query::set_found_posts() * * @since 2.1.0 * * @param int $found_posts The number of posts found. * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->found_posts = (int) apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); if ( ! empty( $limits ) ) { $this->max_num_pages = (int) ceil( $this->found_posts / $query_vars['posts_per_page'] ); } }Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.