wp_get_typography_font_size_value ( $preset, $should_use_fluid_typography = false )

  • (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.
  • (string|null) Font-size value or null if a size is not passed in $preset.
Defined at:
Change Log:
  • 6: .
  • 6: .
  • 6: .
  • 6: .


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.

Related Functions

wp_get_typography_value_and_unit, wp_typography_get_preset_inline_style_value, wp_get_computed_fluid_typography_value, wp_migrate_old_typography_shape, wp_register_typography_support

Top Google Results

User discussions

wpseek mobile