Skip to content

Commit

Permalink
Blocks: Update default value for some fields in WP_Block_Type
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gziolo committed Jun 4, 2020
1 parent b50e87d commit eec4c74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions wp-includes/class-wp-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -104,33 +104,33 @@ 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.
*
* @since 5.0.0
* @var string
*/
public $style = '';
public $style = null;

/**
* Constructor.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eec4c74

Please sign in to comment.