Changeset 56083 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 06/28/2023 03:47:17 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-theme-json.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r56058 r56083 1005 1005 * @since 5.8.0 1006 1006 * @since 5.9.0 Removed the `$type` parameter, added the `$types` and `$origins` parameters. 1007 * @since 6.3.0 Add fallback layout styles for Post Template when block gap support isn't available. 1007 1008 * 1008 1009 * @param string[] $types Types of styles to load. Will load all by default. It accepts: … … 1071 1072 $stylesheet .= $this->get_block_classes( $style_nodes ); 1072 1073 } elseif ( in_array( 'base-layout-styles', $types, true ) ) { 1073 $root_selector = static::ROOT_BLOCK_SELECTOR; 1074 $columns_selector = '.wp-block-columns'; 1074 $root_selector = static::ROOT_BLOCK_SELECTOR; 1075 $columns_selector = '.wp-block-columns'; 1076 $post_template_selector = '.wp-block-post-template'; 1075 1077 if ( ! empty( $options['scope'] ) ) { 1076 $root_selector = static::scope_selector( $options['scope'], $root_selector ); 1077 $columns_selector = static::scope_selector( $options['scope'], $columns_selector ); 1078 $root_selector = static::scope_selector( $options['scope'], $root_selector ); 1079 $columns_selector = static::scope_selector( $options['scope'], $columns_selector ); 1080 $post_template_selector = static::scope_selector( $options['scope'], $post_template_selector ); 1078 1081 } 1079 1082 if ( ! empty( $options['root_selector'] ) ) { … … 1092 1095 'name' => 'core/columns', 1093 1096 ), 1097 array( 1098 'path' => array( 'styles', 'blocks', 'core/post-template' ), 1099 'selector' => $post_template_selector, 1100 'name' => 'core/post-template', 1101 ), 1094 1102 ); 1095 1103 … … 1296 1304 if ( null !== $block_gap_value && false !== $block_gap_value && '' !== $block_gap_value ) { 1297 1305 foreach ( $layout_definitions as $layout_definition_key => $layout_definition ) { 1298 // Allow outputting fallback gap styles for flex layout typewhen block gap support isn't available.1299 if ( ! $has_block_gap_support && 'flex' !== $layout_definition_key ) {1306 // Allow outputting fallback gap styles for flex and grid layout types when block gap support isn't available. 1307 if ( ! $has_block_gap_support && 'flex' !== $layout_definition_key && 'grid' !== $layout_definition_key ) { 1300 1308 continue; 1301 1309 }
Note: See TracChangeset
for help on using the changeset viewer.