diff --git a/wp-includes/class-wp-block-bindings-registry.php b/wp-includes/class-wp-block-bindings-registry.php index 175ce6a8cf..dc065356c5 100644 --- a/wp-includes/class-wp-block-bindings-registry.php +++ b/wp-includes/class-wp-block-bindings-registry.php @@ -257,13 +257,11 @@ final class WP_Block_Bindings_Registry { } /** - * Unserialize magic method. + * Wakeup magic method. * - * @since 6.9.0 - * - * @param array $data Data to unserialize. + * @since 6.5.0 */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + public function __wakeup() { if ( ! $this->sources ) { return; } @@ -277,15 +275,6 @@ final class WP_Block_Bindings_Registry { } } - /** - * Wakeup magic method. - * - * @since 6.5.0 - */ - public function __wakeup() { - $this->__unserialize( array() ); - } - /** * Utility method to retrieve the main instance of the class. * diff --git a/wp-includes/class-wp-block-bindings-source.php b/wp-includes/class-wp-block-bindings-source.php index ceaf041d48..b71f020e28 100644 --- a/wp-includes/class-wp-block-bindings-source.php +++ b/wp-includes/class-wp-block-bindings-source.php @@ -98,23 +98,12 @@ final class WP_Block_Bindings_Source { return apply_filters( 'block_bindings_source_value', $value, $this->name, $source_args, $block_instance, $attribute_name ); } - /** - * Unserialize magic method. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. - */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound - throw new \LogicException( __CLASS__ . ' should never be unserialized' ); - } - /** * Wakeup magic method. * * @since 6.5.0 */ public function __wakeup() { - $this->__unserialize( array() ); + throw new \LogicException( __CLASS__ . ' should never be unserialized' ); } } diff --git a/wp-includes/class-wp-block-patterns-registry.php b/wp-includes/class-wp-block-patterns-registry.php index 26e0af5a55..2afa8a853f 100644 --- a/wp-includes/class-wp-block-patterns-registry.php +++ b/wp-includes/class-wp-block-patterns-registry.php @@ -245,14 +245,7 @@ final class WP_Block_Patterns_Registry { return isset( $this->registered_patterns[ $pattern_name ] ); } - /** - * Unserialize magic method. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. - */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + public function __wakeup() { if ( ! $this->registered_patterns ) { return; } @@ -267,15 +260,6 @@ final class WP_Block_Patterns_Registry { $this->registered_patterns_outside_init = array(); } - /** - * Wakeup magic method. - * - * @since 6.4.0 - */ - public function __wakeup() { - $this->__unserialize( array() ); - } - /** * Utility method to retrieve the main instance of the class. * diff --git a/wp-includes/class-wp-block-type-registry.php b/wp-includes/class-wp-block-type-registry.php index d0a3e0cd13..49e7bd60ae 100644 --- a/wp-includes/class-wp-block-type-registry.php +++ b/wp-includes/class-wp-block-type-registry.php @@ -168,14 +168,7 @@ final class WP_Block_Type_Registry { return isset( $this->registered_block_types[ $name ] ); } - /** - * Unserialize magic method. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. - */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + public function __wakeup() { if ( ! $this->registered_block_types ) { return; } @@ -189,15 +182,6 @@ final class WP_Block_Type_Registry { } } - /** - * Wakeup magic method. - * - * @since 6.4.0 - */ - public function __wakeup() { - $this->__unserialize( array() ); - } - /** * Utility method to retrieve the main instance of the class. * diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index e022502f3c..49020d5e96 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -783,12 +783,8 @@ final class WP_Theme implements ArrayAccess { * Perform reinitialization tasks. * * Prevents a callback from being injected during unserialization of an object. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + public function __wakeup() { if ( $this->parent && ! $this->parent instanceof self ) { throw new UnexpectedValueException(); } @@ -803,15 +799,6 @@ final class WP_Theme implements ArrayAccess { $this->headers_sanitized = array(); } - /** - * Wakeup magic method. - * - * @since 6.4.0 - */ - public function __wakeup() { - $this->__unserialize( array() ); - } - /** * Adds theme data to cache. * diff --git a/wp-includes/html-api/class-wp-html-open-elements.php b/wp-includes/html-api/class-wp-html-open-elements.php index 0e60538abe..210492ab9a 100644 --- a/wp-includes/html-api/class-wp-html-open-elements.php +++ b/wp-includes/html-api/class-wp-html-open-elements.php @@ -841,23 +841,12 @@ class WP_HTML_Open_Elements { } } - /** - * Unserialize magic method. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. - */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound - throw new \LogicException( __CLASS__ . ' should never be unserialized' ); - } - /** * Wakeup magic method. * * @since 6.6.0 */ public function __wakeup() { - $this->__unserialize( array() ); + throw new \LogicException( __CLASS__ . ' should never be unserialized' ); } } diff --git a/wp-includes/html-api/class-wp-html-token.php b/wp-includes/html-api/class-wp-html-token.php index fd175851de..d5e51ac290 100644 --- a/wp-includes/html-api/class-wp-html-token.php +++ b/wp-includes/html-api/class-wp-html-token.php @@ -115,23 +115,12 @@ class WP_HTML_Token { } } - /** - * Unserialize magic method. - * - * @since 6.9.0 - * - * @param array $data Data to unserialize. - */ - public function __unserialize( $data ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound - throw new \LogicException( __CLASS__ . ' should never be unserialized' ); - } - /** * Wakeup magic method. * * @since 6.4.2 */ public function __wakeup() { - $this->__unserialize( array() ); + throw new \LogicException( __CLASS__ . ' should never be unserialized' ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index e3ee23a8ec..6ef72792f6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60803'; +$wp_version = '6.9-alpha-60804'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.