mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-11 10:59:07 +01:00
Query: Ensure that only a single post can be returned on date/time based queries.
Props: sstoqnov, peterwilsoncc. Built from https://develop.svn.wordpress.org/trunk@47635 git-svn-id: http://core.svn.wordpress.org/trunk@47410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f7b4147bea
commit
3ee9488292
@ -811,10 +811,6 @@ class WP_Query {
|
|||||||
$this->is_single = true;
|
$this->is_single = true;
|
||||||
} elseif ( $qv['p'] ) {
|
} elseif ( $qv['p'] ) {
|
||||||
$this->is_single = true;
|
$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'] ) ) {
|
} elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
|
||||||
$this->is_page = true;
|
$this->is_page = true;
|
||||||
$this->is_single = false;
|
$this->is_single = false;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-47634';
|
$wp_version = '5.5-alpha-47635';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user