Changeset 55133 for trunk/src/wp-includes/block-supports/typography.php
- Timestamp:
- 01/24/2023 08:38:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/typography.php
r54823 r55133 454 454 * @since 6.1.0 455 455 * @since 6.1.1 Adjusted rules for min and max font sizes. 456 * @since 6.2.0 Added 'settings.typography.fluid.minFontSize' support. 456 457 * 457 458 * @param array $preset { … … 480 481 481 482 // Checks if fluid font sizes are activated. 482 $typography_settings = wp_get_global_settings( array( 'typography' ) ); 483 $should_use_fluid_typography = isset( $typography_settings['fluid'] ) && true === $typography_settings['fluid'] ? true : $should_use_fluid_typography; 483 $typography_settings = wp_get_global_settings( array( 'typography' ) ); 484 if ( 485 isset( $typography_settings['fluid'] ) && 486 ( true === $typography_settings['fluid'] || is_array( $typography_settings['fluid'] ) ) 487 ) { 488 $should_use_fluid_typography = true; 489 } 484 490 485 491 if ( ! $should_use_fluid_typography ) { 486 492 return $preset['size']; 487 493 } 494 495 $fluid_settings = isset( $typography_settings['fluid'] ) && is_array( $typography_settings['fluid'] ) 496 ? $typography_settings['fluid'] 497 : array(); 488 498 489 499 // Defaults. … … 492 502 $default_minimum_font_size_factor = 0.75; 493 503 $default_scale_factor = 1; 494 $default_minimum_font_size_limit = '14px'; 504 $has_min_font_size = isset( $fluid_settings['minFontSize'] ) && ! empty( wp_get_typography_value_and_unit( $fluid_settings['minFontSize'] ) ); 505 $default_minimum_font_size_limit = $has_min_font_size ? $fluid_settings['minFontSize'] : '14px'; 495 506 496 507 // Font sizes.
Note: See TracChangeset
for help on using the changeset viewer.