wp_get_typography_font_size_value
wp_get_typography_font_size_value ( $preset, $settings = array() )
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|array) settings Optional Theme JSON settings array that overrides any global theme settings. 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.