Make WordPress Core

Changeset 28521


Ignore:
Timestamp:
05/19/2014 06:31:00 AM (12 years ago)
Author:
wonderboymusic
Message:

Some classes with __get() method also need __set().

See #27881, #22234.

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r28481 r28521  
    6969                return $this->$name;
    7070        }
     71
     72        /**
     73         * Make private properties setable for backwards compatibility
     74         *
     75         * @since 4.0.0
     76         * @param string $name
     77         * @param string $value
     78         * @return mixed
     79         */
     80        public function __set( $name, $value ) {
     81                return $this->$name = $value;
     82        }
     83
    7184
    7285        /**
  • trunk/src/wp-admin/custom-header.php

    r28483 r28521  
    9090        public function __get( $name ) {
    9191                return $this->$name;
     92        }
     93
     94        /**
     95         * Make private properties setable for backwards compatibility
     96         *
     97         * @since 4.0.0
     98         * @param string $name
     99         * @param string $value
     100         * @return mixed
     101         */
     102        public function __set( $name, $value ) {
     103                return $this->$name = $value;
    92104        }
    93105
  • trunk/src/wp-admin/includes/class-wp-filesystem-base.php

    r28487 r28521  
    5454        public function __get( $name ) {
    5555                return $this->$name;
     56        }
     57
     58        /**
     59         * Make private properties setable for backwards compatibility
     60         *
     61         * @since 4.0.0
     62         * @param string $name
     63         * @param string $value
     64         * @return mixed
     65         */
     66        public function __set( $name, $value ) {
     67                return $this->$name = $value;
    5668        }
    5769
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r28500 r28521  
    105105        public function __get( $name ) {
    106106                return $this->$name;
     107        }
     108
     109        /**
     110         * Make private properties setable for backwards compatibility
     111         *
     112         * @since 4.0.0
     113         * @param string $name
     114         * @param string $value
     115         * @return mixed
     116         */
     117        public function __set( $name, $value ) {
     118                return $this->$name = $value;
    107119        }
    108120
  • trunk/src/wp-includes/cache.php

    r28520 r28521  
    269269         * @since 2.0.0
    270270         */
    271         public $cache = array();
     271        private $cache = array();
    272272
    273273        /**
     
    316316        public function __get( $name ) {
    317317                return $this->$name;
     318        }
     319
     320        /**
     321         * Make private properties setable for backwards compatibility
     322         *
     323         * @since 4.0.0
     324         * @param string $name
     325         * @param string $value
     326         * @return mixed
     327         */
     328        public function __set( $name, $value ) {
     329                return $this->$name = $value;
    318330        }
    319331
  • trunk/src/wp-includes/class-wp-ajax-response.php

    r28508 r28521  
    3939        public function __get( $name ) {
    4040                return $this->$name;
     41        }
     42
     43        /**
     44         * Make private properties setable for backwards compatibility
     45         *
     46         * @since 4.0.0
     47         * @param string $name
     48         * @param string $value
     49         * @return mixed
     50         */
     51        public function __set( $name, $value ) {
     52                return $this->$name = $value;
    4153        }
    4254
  • trunk/src/wp-includes/class-wp-error.php

    r28511 r28521  
    7474        public function __get( $name ) {
    7575                return $this->$name;
     76        }
     77
     78        /**
     79         * Make private properties setable for backwards compatibility
     80         *
     81         * @since 4.0.0
     82         * @param string $name
     83         * @param string $value
     84         * @return mixed
     85         */
     86        public function __set( $name, $value ) {
     87                return $this->$name = $value;
    7688        }
    7789
  • trunk/src/wp-includes/class-wp-walker.php

    r28514 r28521  
    4949        public function __get( $name ) {
    5050                return $this->$name;
     51        }
     52
     53        /**
     54         * Make private properties setable for backwards compatibility
     55         *
     56         * @since 4.0.0
     57         * @param string $name
     58         * @param string $value
     59         * @return mixed
     60         */
     61        public function __set( $name, $value ) {
     62                return $this->$name = $value;
    5163        }
    5264
  • trunk/src/wp-includes/class-wp.php

    r28516 r28521  
    675675
    676676        /**
     677         * Make private properties setable for backwards compatibility
     678         *
     679         * @since 4.0.0
     680         * @param string $name
     681         * @param string $value
     682         * @return mixed
     683         */
     684        public function __set( $name, $value ) {
     685                return $this->$name = $value;
     686        }
     687
     688        /**
    677689         * Make private/protected methods readable for backwards compatibility
    678690         *
Note: See TracChangeset for help on using the changeset viewer.