Make WordPress Core


Ignore:
Timestamp:
10/17/2020 04:24:35 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Use explicit visibility for class property declarations.

Using var or only static to declare a class property is PHP 4 code.

This updates the codebase to use explicit visibility modifiers introduced in PHP 5.

Props jrf.
Fixes #51557. See #22234.

File:
1 edited

Legend:

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

    r49131 r49184  
    4646     * @var string
    4747     */
    48     var $author_base = 'author';
     48    public $author_base = 'author';
    4949
    5050    /**
     
    5454     * @var string
    5555     */
    56     var $author_structure;
     56    public $author_structure;
    5757
    5858    /**
     
    6262     * @var string
    6363     */
    64     var $date_structure;
     64    public $date_structure;
    6565
    6666    /**
     
    7070     * @var string
    7171     */
    72     var $page_structure;
     72    public $page_structure;
    7373
    7474    /**
     
    7878     * @var string
    7979     */
    80     var $search_base = 'search';
     80    public $search_base = 'search';
    8181
    8282    /**
     
    8686     * @var string
    8787     */
    88     var $search_structure;
     88    public $search_structure;
    8989
    9090    /**
     
    9494     * @var string
    9595     */
    96     var $comments_base = 'comments';
     96    public $comments_base = 'comments';
    9797
    9898    /**
     
    110110     * @var string
    111111     */
    112     var $comments_pagination_base = 'comment-page';
     112    public $comments_pagination_base = 'comment-page';
    113113
    114114    /**
     
    118118     * @var string
    119119     */
    120     var $feed_base = 'feed';
     120    public $feed_base = 'feed';
    121121
    122122    /**
     
    126126     * @var string
    127127     */
    128     var $comment_feed_structure;
     128    public $comment_feed_structure;
    129129
    130130    /**
     
    134134     * @var string
    135135     */
    136     var $feed_structure;
     136    public $feed_structure;
    137137
    138138    /**
     
    179179     * @var string
    180180     */
    181     var $matches = '';
     181    public $matches = '';
    182182
    183183    /**
     
    187187     * @var array
    188188     */
    189     var $rules;
     189    public $rules;
    190190
    191191    /**
     
    197197     * @var array
    198198     */
    199     var $extra_rules = array();
     199    public $extra_rules = array();
    200200
    201201    /**
     
    207207     * @var array
    208208     */
    209     var $extra_rules_top = array();
     209    public $extra_rules_top = array();
    210210
    211211    /**
     
    218218     * @var array
    219219     */
    220     var $non_wp_rules = array();
     220    public $non_wp_rules = array();
    221221
    222222    /**
     
    226226     * @var array
    227227     */
    228     var $extra_permastructs = array();
     228    public $extra_permastructs = array();
    229229
    230230    /**
     
    234234     * @var array
    235235     */
    236     var $endpoints;
     236    public $endpoints;
    237237
    238238    /**
     
    278278     * @var array
    279279     */
    280     var $rewritecode = array(
     280    public $rewritecode = array(
    281281        '%year%',
    282282        '%monthnum%',
     
    299299     * @var array
    300300     */
    301     var $rewritereplace = array(
     301    public $rewritereplace = array(
    302302        '([0-9]{4})',
    303303        '([0-9]{1,2})',
     
    319319     * @var array
    320320     */
    321     var $queryreplace = array(
     321    public $queryreplace = array(
    322322        'year=',
    323323        'monthnum=',
Note: See TracChangeset for help on using the changeset viewer.