Changeset 50703 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 04/13/2021 08:02:33 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r50629 r50703 2304 2304 foreach ( $block_styles as $block_name => $styles ) { 2305 2305 foreach ( $styles as $style_properties ) { 2306 $block_style = array( 2307 'name' => $style_properties['name'], 2308 'label' => $style_properties['label'], 2309 ); 2310 if ( isset( $style_properties['is_default'] ) ) { 2311 $block_style['isDefault'] = $style_properties['is_default']; 2312 } 2306 2313 $register_script_lines[] = sprintf( 2307 2314 ' wp.blocks.registerBlockStyle( \'%s\', %s );', 2308 2315 $block_name, 2309 wp_json_encode( 2310 array( 2311 'name' => $style_properties['name'], 2312 'label' => $style_properties['label'], 2313 ) 2314 ) 2316 wp_json_encode( $block_style ) 2315 2317 ); 2316 2318 }
Note: See TracChangeset
for help on using the changeset viewer.