wphooks.info - found_posts_query

found_posts_query

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/class-wp-query.php:
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
		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 {
			$this->found_posts = count( $this->posts );
		}

		/**
		 * Filters the number of found posts for the query.
		 *
		 * @since 2.1.0
		 *