Changeset 57948 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 04/09/2024 07:18:41 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r57885 r57948 1389 1389 * @since 6.1.0 1390 1390 * @since 6.3.0 Reduced specificity for layout margin rules. 1391 * @since 6.5.1 Only output rules referencing content and wide sizes when values exist. 1391 1392 * 1392 1393 * @param array $block_metadata Metadata about the block to get styles for. … … 1549 1550 ) { 1550 1551 foreach ( $base_style_rule['rules'] as $css_property => $css_value ) { 1552 // Skip rules that reference content size or wide size if they are not defined in the theme.json. 1553 if ( 1554 is_string( $css_value ) && 1555 ( str_contains( $css_value, '--global--content-size' ) || str_contains( $css_value, '--global--wide-size' ) ) && 1556 ! isset( $this->theme_json['settings']['layout']['contentSize'] ) && 1557 ! isset( $this->theme_json['settings']['layout']['wideSize'] ) 1558 ) { 1559 continue; 1560 } 1561 1551 1562 if ( static::is_safe_css_declaration( $css_property, $css_value ) ) { 1552 1563 $declarations[] = array(
Note: See TracChangeset
for help on using the changeset viewer.