diff --git a/wp-includes/class-wp-block-styles-registry.php b/wp-includes/class-wp-block-styles-registry.php index 67d6998fc5..272e400f8c 100644 --- a/wp-includes/class-wp-block-styles-registry.php +++ b/wp-includes/class-wp-block-styles-registry.php @@ -62,6 +62,15 @@ final class WP_Block_Styles_Registry { return false; } + if ( str_contains( $style_properties['name'], ' ' ) ) { + _doing_it_wrong( + __METHOD__, + __( 'Block style name must not contain any spaces.' ), + '5.9.0' + ); + return false; + } + $block_style_name = $style_properties['name']; if ( ! isset( $this->registered_block_styles[ $block_name ] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index dcec740d67..1cf6a10481 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52260'; +$wp_version = '5.9-alpha-52261'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.