wp_get_typography_font_size_value
wp_get_typography_font_size_value ( $preset, $should_use_fluid_typography = false )
Parameters:- (array) preset { Required. fontSizes preset value as seen in theme.json. @type string $name Name of the font size preset. @type string $slug Kebab-case, unique identifier for the font size preset. @type string|int|float $size CSS font-size value, including units if applicable. }
- (bool) should_use_fluid_typography An override to switch fluid typography "on". Can be used for unit testing. Default is false.
Returns:- (string|null) Font-size value or null if a size is not passed in $preset.
Defined at:Change Log: - Introduced in WordPress: 6.1.0
- Deprecated in WordPress: —
Description
Returns a font-size value based on a given font-size preset.Takes into account fluid typography parameters and attempts to return a CSS
formula depending on available, valid values.