mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Query: Remove the static query property.
Prevent unauthenticated views of publicly queryables content types. Props aaroncampbell, whyisjake, nickdaugherty, xknown. git-svn-id: https://develop.svn.wordpress.org/trunk@46474 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -538,7 +538,6 @@ class WP_Query {
|
||||
'attachment',
|
||||
'attachment_id',
|
||||
'name',
|
||||
'static',
|
||||
'pagename',
|
||||
'page_id',
|
||||
'second',
|
||||
@@ -805,7 +804,7 @@ class WP_Query {
|
||||
// If year, month, day, hour, minute, and second are set, a single
|
||||
// post is being queried.
|
||||
$this->is_single = true;
|
||||
} elseif ( '' != $qv['static'] || '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
|
||||
} elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
|
||||
$this->is_page = true;
|
||||
$this->is_single = false;
|
||||
} else {
|
||||
|
||||
@@ -14,7 +14,7 @@ class WP {
|
||||
* @since 2.0.0
|
||||
* @var string[]
|
||||
*/
|
||||
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
|
||||
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
|
||||
|
||||
/**
|
||||
* Private query variables.
|
||||
|
||||
@@ -51,7 +51,6 @@ class Tests_Query_Vars extends WP_UnitTestCase {
|
||||
'tag',
|
||||
'feed',
|
||||
'author_name',
|
||||
'static',
|
||||
'pagename',
|
||||
'page_id',
|
||||
'error',
|
||||
|
||||
Reference in New Issue
Block a user