From eec4c743fa2867fdc22611fece6d561f7740ad54 Mon Sep 17 00:00:00 2001 From: gziolo Date: Thu, 4 Jun 2020 06:07:13 +0000 Subject: [PATCH] Blocks: Update default value for some fields in WP_Block_Type Related to the issue with default values for the blocks registered on the server. By using null for some fields we can treat them as undefined on the client. See: WordPress/gutenberg#22849. Props aduth. Fixes #48529. Built from https://develop.svn.wordpress.org/trunk@47907 git-svn-id: http://core.svn.wordpress.org/trunk@47681 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-block-type.php | 22 +++++++++++----------- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wp-includes/class-wp-block-type.php b/wp-includes/class-wp-block-type.php index bd1109fb8f..ba0b59b8ad 100644 --- a/wp-includes/class-wp-block-type.php +++ b/wp-includes/class-wp-block-type.php @@ -32,9 +32,9 @@ class WP_Block_Type { /** * @since 5.5.0 - * @var string + * @var string|null */ - public $category = ''; + public $category = null; /** * @since 5.5.0 @@ -44,9 +44,9 @@ class WP_Block_Type { /** * @since 5.5.0 - * @var string + * @var string|null */ - public $icon = ''; + public $icon = null; /** * @since 5.5.0 @@ -104,25 +104,25 @@ class WP_Block_Type { * Block type editor script handle. * * @since 5.0.0 - * @var string + * @var string|null */ - public $editor_script = ''; + public $editor_script = null; /** * Block type front end script handle. * * @since 5.0.0 - * @var string + * @var string|null */ - public $script = ''; + public $script = null; /** * Block type editor style handle. * * @since 5.0.0 - * @var string + * @var string|null */ - public $editor_style = ''; + public $editor_style = null; /** * Block type front end style handle. @@ -130,7 +130,7 @@ class WP_Block_Type { * @since 5.0.0 * @var string */ - public $style = ''; + public $style = null; /** * Constructor. diff --git a/wp-includes/version.php b/wp-includes/version.php index 3ff723458e..dfa72a9464 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47906'; +$wp_version = '5.5-alpha-47907'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.