Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: found_posts_query

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3024           if ( ! empty( $limits ) ) {
3025                /**
3026                 * Filters the query to run for retrieving the found posts.
3027                 *
3028                 * @since 2.1.0
3029                 *
3030                 * @param string   $found_posts The query to run to find the found posts.
3031                 * @param WP_Query $this        The WP_Query instance (passed by reference).
3032                 */
3033                $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
3034           } else {
3035                $this->found_posts = count( $this->posts );
3036           }
3037
3038           /**
3039            * Filters the number of found posts for the query.
3040            *
3041            * @since 2.1.0
3042            *