Make WordPress Core

Changeset 46479


Ignore:
Timestamp:
10/14/2019 03:50:43 PM (5 years ago)
Author:
whyisjake
Message:

Query: Remove the static query property.

Prevent unauthenticated views of publicly queryables content types.

Props aaroncampbell, whyisjake, nickdaugherty, xknown.

Location:
branches/5.2
Files:
3 edited

Legend:

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

    r45286 r46479  
    539539            'attachment_id',
    540540            'name',
    541             'static',
    542541            'pagename',
    543542            'page_id',
     
    803802            // post is being queried.
    804803            $this->is_single = true;
    805         } elseif ( '' != $qv['static'] || '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
     804        } elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
    806805            $this->is_page   = true;
    807806            $this->is_single = false;
  • branches/5.2/src/wp-includes/class-wp.php

    r44048 r46479  
    1515     * @var string[]
    1616     */
    17     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' );
     17    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' );
    1818
    1919    /**
  • branches/5.2/tests/phpunit/tests/query/vars.php

    r43571 r46479  
    5252                'feed',
    5353                'author_name',
    54                 'static',
    5554                'pagename',
    5655                'page_id',
Note: See TracChangeset for help on using the changeset viewer.