From f75e5a023ce47f174ccd3d5101a68a4e98093675 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Mar 2014 02:54:15 +0000 Subject: [PATCH] WP_Query: allow split_the_query = false to avoid a split. see #26937. Built from https://develop.svn.wordpress.org/trunk@27633 git-svn-id: http://core.svn.wordpress.org/trunk@27476 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index 25436d96fb..2adf7d2168 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -3221,6 +3221,9 @@ class WP_Query { } $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 ); + if ( $split_the_query && isset( $q['split_the_query'] ) && empty( $q['split_the_query'] ) ) { + $split_the_query = false; + } /** * Filter whether to split the query.