Make WordPress Core

Changeset 47635


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

Query: Ensure that only a single post can be returned on date/time based queries.

Props: sstoqnov, peterwilsoncc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r47557 r47635  
    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.