From a6706a1d802a74dd1a108ccf79ebed41510ec88a Mon Sep 17 00:00:00 2001 From: whyisjake Date: Wed, 29 Apr 2020 15:50:16 +0000 Subject: [PATCH] Query: Ensure that only a single post can be returned on date/time based queries. Brings the changes in [47635] to the 5.4 branch. Props: sstoqnov, peterwilsoncc. Built from https://develop.svn.wordpress.org/branches/5.4@47641 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47416 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-query.php | 4 ---- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 540201552c..bd04e91fe9 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -811,10 +811,6 @@ class WP_Query { $this->is_single = true; } elseif ( $qv['p'] ) { $this->is_single = true; - } elseif ( ( '' !== $qv['hour'] ) && ( '' !== $qv['minute'] ) && ( '' !== $qv['second'] ) && ( '' != $qv['year'] ) && ( '' != $qv['monthnum'] ) && ( '' != $qv['day'] ) ) { - // If year, month, day, hour, minute, and second are set, - // a single post is being queried. - $this->is_single = true; } elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) { $this->is_page = true; $this->is_single = false; diff --git a/wp-includes/version.php b/wp-includes/version.php index e212206b67..201c09f9d9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4.1-RC1-47640'; +$wp_version = '5.4.1-RC1-47641'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.