Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: split_the_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
3577            * Splitting the query will cause it to fetch just the IDs of the found posts
3578            * (and then individually fetch each post by ID), rather than fetching every
3579            * complete row at once. One massive result vs. many small results.
3580            *
3581            * @since 3.4.0
3582            *
3583            * @param bool     $split_the_query Whether or not to split the query.
3584            * @param WP_Query $this            The WP_Query instance.
3585            */
3586           $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this );
3587
3588           if ( $split_the_query ) {
3589                // First get the IDs and then fill in the objects
3590
3591                $this->request = "SELECT $found_rows $distinct $wpdb->posts.ID FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
3592
3593                /**
3594                 * Filter the Post IDs SQL request before sending.
3595                 *