Make WordPress Core


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

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

See #27881, #22234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.