From ad6dd738b2bdbf468c50bfbbf89042e754a247dc Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 11 Jan 2015 22:03:59 +0000 Subject: [PATCH] In `WP_Filesystem_Base`, make the only `private` member, `$cache`, `public` and remove magic methods. `$cache` was always `public` until [28487], has been essentially `public` via a magic method since. See #30891. git-svn-id: https://develop.svn.wordpress.org/trunk@31145 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-filesystem-base.php | 57 +------------------ 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-base.php b/src/wp-admin/includes/class-wp-filesystem-base.php index 9b8ddb041b..8e7328c102 100644 --- a/src/wp-admin/includes/class-wp-filesystem-base.php +++ b/src/wp-admin/includes/class-wp-filesystem-base.php @@ -24,11 +24,10 @@ class WP_Filesystem_Base { /** * Cached list of local filepaths to mapped remote filepaths. * - * @access private * @since 2.7.0 * @var array */ - private $cache = array(); + public $cache = array(); /** * The Access method of the current connection, Set automatically. @@ -39,58 +38,6 @@ class WP_Filesystem_Base { */ public $method = ''; - /** - * Make private properties readable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param string $name Property to get. - * @return mixed Property. - */ - public function __get( $name ) { - return $this->$name; - } - - /** - * Make private properties settable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param string $name Property to set. - * @param mixed $value Property value. - * @return mixed Newly-set property. - */ - public function __set( $name, $value ) { - return $this->$name = $value; - } - - /** - * Make private properties checkable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param string $name Property to check if set. - * @return bool Whether the property is set. - */ - public function __isset( $name ) { - return isset( $this->$name ); - } - - /** - * Make private properties un-settable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param string $name Property to unset. - */ - public function __unset( $name ) { - unset( $this->$name ); - } - /** * Return the path on the remote filesystem of ABSPATH. * @@ -280,7 +227,6 @@ class WP_Filesystem_Base { * * Expects Windows sanitized path. * - * @access private * @since 2.7.0 * * @param string $folder The folder to locate. @@ -439,7 +385,6 @@ class WP_Filesystem_Base { /** * Determine if the string provided contains binary characters. * - * @access private * @since 2.7.0 * * @param string $text String to test against.