Changeset 53076 for trunk/src/wp-includes/block-supports/typography.php
- Timestamp:
- 04/05/2022 12:06:48 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/typography.php
r52302 r53076 82 82 } 83 83 84 $skip_typography_serialization = _wp_array_get( $typography_supports, array( '__experimentalSkipSerialization' ), false ); 85 if ( $skip_typography_serialization ) { 84 if ( wp_should_skip_block_supports_serialization( $block_type, 'typography' ) ) { 86 85 return array(); 87 86 } … … 100 99 $has_text_transform_support = _wp_array_get( $typography_supports, array( '__experimentalTextTransform' ), false ); 101 100 102 if ( $has_font_size_support ) {101 if ( $has_font_size_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontSize' ) ) { 103 102 $has_named_font_size = array_key_exists( 'fontSize', $block_attributes ); 104 103 $has_custom_font_size = isset( $block_attributes['style']['typography']['fontSize'] ); … … 111 110 } 112 111 113 if ( $has_font_family_support ) {112 if ( $has_font_family_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontFamily' ) ) { 114 113 $has_named_font_family = array_key_exists( 'fontFamily', $block_attributes ); 115 114 $has_custom_font_family = isset( $block_attributes['style']['typography']['fontFamily'] ); … … 130 129 } 131 130 132 if ( $has_font_style_support ) {131 if ( $has_font_style_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontStyle' ) ) { 133 132 $font_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'fontStyle', 'font-style' ); 134 133 if ( $font_style ) { … … 137 136 } 138 137 139 if ( $has_font_weight_support ) {138 if ( $has_font_weight_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontWeight' ) ) { 140 139 $font_weight = wp_typography_get_css_variable_inline_style( $block_attributes, 'fontWeight', 'font-weight' ); 141 140 if ( $font_weight ) { … … 144 143 } 145 144 146 if ( $has_line_height_support ) {145 if ( $has_line_height_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'lineHeight' ) ) { 147 146 $has_line_height = isset( $block_attributes['style']['typography']['lineHeight'] ); 148 147 if ( $has_line_height ) { … … 151 150 } 152 151 153 if ( $has_text_decoration_support ) {152 if ( $has_text_decoration_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'textDecoration' ) ) { 154 153 $text_decoration_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'textDecoration', 'text-decoration' ); 155 154 if ( $text_decoration_style ) { … … 158 157 } 159 158 160 if ( $has_text_transform_support ) {159 if ( $has_text_transform_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'textTransform' ) ) { 161 160 $text_transform_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'textTransform', 'text-transform' ); 162 161 if ( $text_transform_style ) { … … 165 164 } 166 165 167 if ( $has_letter_spacing_support ) {166 if ( $has_letter_spacing_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'letterSpacing' ) ) { 168 167 $letter_spacing_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'letterSpacing', 'letter-spacing' ); 169 168 if ( $letter_spacing_style ) {
Note: See TracChangeset
for help on using the changeset viewer.