equal
deleted
inserted
replaced
91 } |
91 } |
92 |
92 |
93 $block_style_name = $style_properties['name']; |
93 $block_style_name = $style_properties['name']; |
94 $block_names = is_string( $block_name ) ? array( $block_name ) : $block_name; |
94 $block_names = is_string( $block_name ) ? array( $block_name ) : $block_name; |
95 |
95 |
|
96 // Ensure there is a label defined. |
|
97 if ( empty( $style_properties['label'] ) ) { |
|
98 $style_properties['label'] = $block_style_name; |
|
99 } |
|
100 |
96 foreach ( $block_names as $name ) { |
101 foreach ( $block_names as $name ) { |
97 if ( ! isset( $this->registered_block_styles[ $name ] ) ) { |
102 if ( ! isset( $this->registered_block_styles[ $name ] ) ) { |
98 $this->registered_block_styles[ $name ] = array(); |
103 $this->registered_block_styles[ $name ] = array(); |
99 } |
104 } |
100 $this->registered_block_styles[ $name ][ $block_style_name ] = $style_properties; |
105 $this->registered_block_styles[ $name ][ $block_style_name ] = $style_properties; |