wphooks.info - found_posts

found_posts

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-includes/class-wp-query.php:
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
		}

		/**
		 * Filters the number of found posts for the query.
		 *
		 * @since 2.1.0
		 *
		 * @param int      $found_posts The number of posts found.
		 * @param WP_Query $this        The WP_Query instance (passed by reference).
		 */
		$this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );

		if ( ! empty( $limits ) ) {
			$this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] );
		}
	}

	/**
	 * Set up the next post and iterate current post index.
	 *