wp/wp-includes/class-wp-block-styles-registry.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-includes/class-wp-block-styles-registry.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/class-wp-block-styles-registry.php	Fri Sep 05 18:52:52 2025 +0200
@@ -93,6 +93,11 @@
 		$block_style_name = $style_properties['name'];
 		$block_names      = is_string( $block_name ) ? array( $block_name ) : $block_name;
 
+		// Ensure there is a label defined.
+		if ( empty( $style_properties['label'] ) ) {
+			$style_properties['label'] = $block_style_name;
+		}
+
 		foreach ( $block_names as $name ) {
 			if ( ! isset( $this->registered_block_styles[ $name ] ) ) {
 				$this->registered_block_styles[ $name ] = array();