Make WordPress Core


Ignore:
Timestamp:
01/08/2015 05:43:54 AM (10 years ago)
Author:
wonderboymusic
Message:

Access Modifiers:

  • In WP_Plugin_Install_List_Table, use public instead of var
  • In WP_User, ->data is accessed directly on an instance if the constructor receives it: make it public
  • In WP_Locale, every property is exported to a global and is already public via var, half of the properties are accessed directly already, make them all public
  • In WP_Rewrite, several properties are accessed publicly in functions via the $wp_rewrite global, make those props public.
  • In WP_Rewrite, the property ->comment_feed_structure was misspelled as ->comments_feed_structure

See #30799.

File:
1 edited

Legend:

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

    r30982 r31078  
    421421     *
    422422     * @since 1.5.0
     423     * @var string
     424     */
     425    public $permalink_structure;
     426
     427    /**
     428     * Whether to add trailing slashes.
     429     *
     430     * @since 2.2.0
     431     * @var bool
     432     */
     433    public $use_trailing_slashes;
     434
     435    /**
     436     * Base for the author permalink structure (example.com/$author_base/authorname).
     437     *
     438     * @since 1.5.0
    423439     * @access private
    424440     * @var string
    425441     */
    426     var $permalink_structure;
    427 
    428     /**
    429      * Whether to add trailing slashes.
    430      *
    431      * @since 2.2.0
    432      * @access private
    433      * @var bool
    434      */
    435     var $use_trailing_slashes;
    436 
    437     /**
    438      * Base for the author permalink structure (example.com/$author_base/authorname).
     442    var $author_base = 'author';
     443
     444    /**
     445     * Permalink structure for author archives.
    439446     *
    440447     * @since 1.5.0
     
    442449     * @var string
    443450     */
    444     var $author_base = 'author';
    445 
    446     /**
    447      * Permalink structure for author archives.
     451    var $author_structure;
     452
     453    /**
     454     * Permalink structure for date archives.
    448455     *
    449456     * @since 1.5.0
     
    451458     * @var string
    452459     */
    453     var $author_structure;
    454 
    455     /**
    456      * Permalink structure for date archives.
     460    var $date_structure;
     461
     462    /**
     463     * Permalink structure for pages.
    457464     *
    458465     * @since 1.5.0
     
    460467     * @var string
    461468     */
    462     var $date_structure;
    463 
    464     /**
    465      * Permalink structure for pages.
     469    var $page_structure;
     470
     471    /**
     472     * Base of the search permalink structure (example.com/$search_base/query).
    466473     *
    467474     * @since 1.5.0
     
    469476     * @var string
    470477     */
    471     var $page_structure;
    472 
    473     /**
    474      * Base of the search permalink structure (example.com/$search_base/query).
     478    var $search_base = 'search';
     479
     480    /**
     481     * Permalink structure for searches.
    475482     *
    476483     * @since 1.5.0
     
    478485     * @var string
    479486     */
    480     var $search_base = 'search';
    481 
    482     /**
    483      * Permalink structure for searches.
     487    var $search_structure;
     488
     489    /**
     490     * Comments permalink base.
    484491     *
    485492     * @since 1.5.0
     
    487494     * @var string
    488495     */
    489     var $search_structure;
    490 
    491     /**
    492      * Comments permalink base.
     496    var $comments_base = 'comments';
     497
     498    /**
     499     * Pagination permalink base.
     500     *
     501     * @since 3.1.0
     502     * @var string
     503     */
     504    public $pagination_base = 'page';
     505
     506    /**
     507     * Feed permalink base.
    493508     *
    494509     * @since 1.5.0
     
    496511     * @var string
    497512     */
    498     var $comments_base = 'comments';
    499 
    500     /**
    501      * Pagination permalink base.
    502      *
    503      * @since 3.1.0
     513    var $feed_base = 'feed';
     514
     515    /**
     516     * Comments feed permalink structure.
     517     *
     518     * @since 1.5.0
    504519     * @access private
    505520     * @var string
    506521     */
    507     var $pagination_base = 'page';
    508 
    509     /**
    510      * Feed permalink base.
    511      *
    512      * @since 1.5.0
    513      * @access private
    514      * @var string
    515      */
    516     var $feed_base = 'feed';
    517 
    518     /**
    519      * Comments feed permalink structure.
    520      *
    521      * @since 1.5.0
    522      * @access private
    523      * @var string
    524      */
    525     var $comments_feed_structure;
     522    var $comment_feed_structure;
    526523
    527524    /**
     
    543540     * @see WP_Rewrite::init()
    544541     * @since 1.5.0
    545      * @access private
    546542     * @var string
    547543     */
    548     var $front;
     544    public $front;
    549545
    550546    /**
     
    558554     * @see WP_Rewrite::using_index_permalinks()
    559555     * @since 1.5.0
    560      * @access private
    561556     * @var string
    562557     */
    563     var $root = '';
     558    public $root = '';
    564559
    565560    /**
     
    747742     *
    748743     * @since 1.5.0
    749      * @access private
    750744     * @var array
    751745     */
    752     var $feeds = array( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
     746    public $feeds = array( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
    753747
    754748    /**
Note: See TracChangeset for help on using the changeset viewer.