From 61f5cc459e93d427b968f03c73cc5556fab6a956 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 10 Jan 2015 21:59:22 +0000 Subject: [PATCH] In `Custom_Background`: * In [28481], `$admin_header_callback` and `$admin_image_div_callback` were set to `private` based on their erroneous `@param` value * `$admin_header_callback` and `$admin_image_div_callback` are used as hook callbacks - as such, they must be `public` * In [28521] and [28524], magic methods were added for back-compat * Currently, there are 2 properties marked `private`, `$page` and `$updated` - `$page` is never used and `$updated` was added by me in [30186] during 4.1 Set `$admin_header_callback` and `$admin_image_div_callback` to `public`. Remove the `$page` property - it duplicated the `$page` local var and is referenced/used nowhere. Remove the magic methods - they were beyond overkill and rendered moot by the above changes. See #30891. Built from https://develop.svn.wordpress.org/trunk@31133 git-svn-id: http://core.svn.wordpress.org/trunk@31114 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-background.php | 69 +--------------------------------- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 68 deletions(-) diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index cbc96bc396..71835763ec 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -20,27 +20,16 @@ class Custom_Background { * * @var callback * @since 3.0.0 - * @access private */ - private $admin_header_callback; + public $admin_header_callback; /** * Callback for header div. * * @var callback * @since 3.0.0 - * @access private */ - private $admin_image_div_callback; - - /** - * Holds the page menu hook. - * - * @var string - * @since 3.0.0 - * @access private - */ - private $page = ''; + public $admin_image_div_callback; /** * @var bool @@ -66,58 +55,6 @@ class Custom_Background { add_action( 'wp_ajax_set-background-image', array( $this, 'wp_set_background_image' ) ); } - /** - * Make private properties readable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param string $name Property name. - * @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 ); - } - /** * Set up the hooks for the Custom Background admin page. * @@ -129,8 +66,6 @@ class Custom_Background { return; } - $this->page = $page; - add_action( "load-$page", array( $this, 'admin_load' ) ); add_action( "load-$page", array( $this, 'take_action' ), 49 ); add_action( "load-$page", array( $this, 'handle_upload' ), 49 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5f16dd63ff..fb08cd31d5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31132'; +$wp_version = '4.2-alpha-31133'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.