From 5a49e9f4bf06babfa3550dbec1b4de67c6e9b33d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Mar 2014 02:53:44 +0000 Subject: [PATCH] WP_Query: allow split_the_query = false to avoid a split. see #26937. git-svn-id: https://develop.svn.wordpress.org/trunk@27633 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 25436d96fb..2adf7d2168 100644 --- a/src/wp-includes/query.php +++ b/src/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.