Changeset 51102
- Timestamp:
- 06/08/2021 05:35:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r51089 r51102 209 209 */ 210 210 $metadata = apply_filters( 'block_type_metadata', $metadata ); 211 212 /** 213 * Add `style` and `editor_style` for core blocks if missing. 214 * 215 * @since 5.8.0 216 */ 217 if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) { 218 $block_name = str_replace( 'core/', '', $metadata['name'] ); 219 220 if ( ! isset( $metadata['style'] ) ) { 221 $metadata['style'] = "wp-block-$block_name"; 222 } 223 if ( ! isset( $metadata['editor_style'] ) ) { 224 $metadata['editor_style'] = "wp-block-$block_name-editor"; 225 } 226 } 211 227 212 228 $settings = array();
Note: See TracChangeset
for help on using the changeset viewer.