Changeset 55946 for trunk/src/wp-includes/block-supports/typography.php
- Timestamp:
- 06/20/2023 05:26:47 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/typography.php
r55133 r55946 369 369 * 370 370 * @since 6.1.0 371 * @since 6.3.0 Checks for unsupported min/max viewport values that cause invalid clamp values. 371 372 * @access private 372 373 * … … 434 435 ); 435 436 437 // Protects against unsupported units in min and max viewport widths. 438 if ( ! $minimum_viewport_width || ! $maximum_viewport_width ) { 439 return null; 440 } 441 436 442 /* 437 443 * Build CSS rule. … … 455 461 * @since 6.1.1 Adjusted rules for min and max font sizes. 456 462 * @since 6.2.0 Added 'settings.typography.fluid.minFontSize' support. 463 * @since 6.3.0 Using layout.wideSize as max viewport width. 457 464 * 458 465 * @param array $preset { … … 481 488 482 489 // Checks if fluid font sizes are activated. 483 $typography_settings = wp_get_global_settings( array( 'typography' ) ); 490 $global_settings = wp_get_global_settings(); 491 $typography_settings = isset( $global_settings['typography'] ) ? $global_settings['typography'] : array(); 492 $layout_settings = isset( $global_settings['layout'] ) ? $global_settings['layout'] : array(); 493 484 494 if ( 485 495 isset( $typography_settings['fluid'] ) && … … 498 508 499 509 // Defaults. 500 $default_maximum_viewport_width = '1600px';510 $default_maximum_viewport_width = isset( $layout_settings['wideSize'] ) ? $layout_settings['wideSize'] : '1600px'; 501 511 $default_minimum_viewport_width = '768px'; 502 512 $default_minimum_font_size_factor = 0.75;
Note: See TracChangeset
for help on using the changeset viewer.