Some classes with `__get()` method also need `__set()`.
See #27881, #22234. Built from https://develop.svn.wordpress.org/trunk@28521 git-svn-id: http://core.svn.wordpress.org/trunk@28347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2e9ce6fc87
commit
821246b4ae
|
@ -69,6 +69,19 @@ class Custom_Background {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up the hooks for the Custom Background admin page.
|
* Set up the hooks for the Custom Background admin page.
|
||||||
*
|
*
|
||||||
|
|
|
@ -91,6 +91,18 @@ class Custom_Image_Header {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up the hooks for the Custom Header admin page.
|
* Set up the hooks for the Custom Header admin page.
|
||||||
*
|
*
|
||||||
|
|
|
@ -55,6 +55,18 @@ class WP_Filesystem_Base {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the path on the remote filesystem of ABSPATH.
|
* Return the path on the remote filesystem of ABSPATH.
|
||||||
*
|
*
|
||||||
|
|
|
@ -106,6 +106,18 @@ class WP_List_Table {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make private/protected methods readable for backwards compatibility
|
* Make private/protected methods readable for backwards compatibility
|
||||||
*
|
*
|
||||||
|
|
|
@ -268,7 +268,7 @@ class WP_Object_Cache {
|
||||||
* @access private
|
* @access private
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
public $cache = array();
|
private $cache = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The amount of times the cache data was already stored in the cache.
|
* The amount of times the cache data was already stored in the cache.
|
||||||
|
@ -317,6 +317,18 @@ class WP_Object_Cache {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds data to the cache if it doesn't already exist.
|
* Adds data to the cache if it doesn't already exist.
|
||||||
*
|
*
|
||||||
|
|
|
@ -40,6 +40,18 @@ class WP_Ajax_Response {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append to XML response based on given arguments.
|
* Append to XML response based on given arguments.
|
||||||
*
|
*
|
||||||
|
|
|
@ -75,6 +75,18 @@ class WP_Error {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve all error codes.
|
* Retrieve all error codes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -50,6 +50,18 @@ class Walker {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the list before the elements are added.
|
* Starts the list before the elements are added.
|
||||||
*
|
*
|
||||||
|
|
|
@ -673,6 +673,18 @@ class WP_MatchesMapRegex {
|
||||||
return $this->$name;
|
return $this->$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make private properties setable for backwards compatibility
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __set( $name, $value ) {
|
||||||
|
return $this->$name = $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make private/protected methods readable for backwards compatibility
|
* Make private/protected methods readable for backwards compatibility
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue