diff --git a/wp-includes/version.php b/wp-includes/version.php index a68f515d45..39357b3e56 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31134'; +$wp_version = '4.2-alpha-31135'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-diff.php b/wp-includes/wp-diff.php index 77efd45533..aa6ada8c35 100644 --- a/wp-includes/wp-diff.php +++ b/wp-includes/wp-diff.php @@ -68,6 +68,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { */ protected $_show_split_view = true; + protected $compat_fields = array( '_show_split_view', 'inline_diff_renderer', '_diff_threshold' ); + /** * Constructor - Call parent constructor with params array. * @@ -465,7 +467,9 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { * @return mixed Property. */ public function __get( $name ) { - return $this->$name; + if ( in_array( $name, $this->compat_fields ) ) { + return $this->$name; + } } /** @@ -479,7 +483,9 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { * @return mixed Newly-set property. */ public function __set( $name, $value ) { - return $this->$name = $value; + if ( in_array( $name, $this->compat_fields ) ) { + return $this->$name = $value; + } } /** @@ -492,7 +498,9 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { * @return bool Whether the property is set. */ public function __isset( $name ) { - return isset( $this->$name ); + if ( in_array( $name, $this->compat_fields ) ) { + return isset( $this->$name ); + } } /** @@ -504,21 +512,9 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { * @param string $name Property to unset. */ public function __unset( $name ) { - unset( $this->$name ); - } - - /** - * Make private/protected methods readable for backwards compatibility. - * - * @since 4.0.0 - * @access public - * - * @param callable $name Method to call. - * @param array $arguments Arguments to pass when calling. - * @return mixed|bool Return value of the callback, false otherwise. - */ - public function __call( $name, $arguments ) { - return call_user_func_array( array( $this, $name ), $arguments ); + if ( in_array( $name, $this->compat_fields ) ) { + unset( $this->$name ); + } } }