Make WordPress Core

Changeset 47641 for branches/5.4


Ignore:
Timestamp:
04/29/2020 03:47:45 PM (5 years ago)
Author:
whyisjake
Message:

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.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/src/wp-includes/class-wp-query.php

    r47402 r47641  
    812812        } elseif ( $qv['p'] ) {
    813813            $this->is_single = true;
    814         } elseif ( ( '' !== $qv['hour'] ) && ( '' !== $qv['minute'] ) && ( '' !== $qv['second'] ) && ( '' != $qv['year'] ) && ( '' != $qv['monthnum'] ) && ( '' != $qv['day'] ) ) {
    815             // If year, month, day, hour, minute, and second are set,
    816             // a single post is being queried.
    817             $this->is_single = true;
    818814        } elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
    819815            $this->is_page   = true;
Note: See TracChangeset for help on using the changeset viewer.