WPDev.one
Core Function
View Source on Trac ↗

wp_get_typography_font_size_value()

wp_get_typography_font_size_value( mixed $preset, mixed $settings = array() )

Returns a font-size value based on a given font-size preset.

Parameters 2 required

Name / Type Description
array

$preset { Required. fontSizes preset value as seen in theme.json.

Required
mixed

(bool | array) $settings Optional Theme JSON settings array that overrides any global theme settings. Default is false.

Required

Return Value

((string)
| null) Font-size value or null if a size is not passed in $preset.

Function Information

Since Version
6.1.0
Source File
wp-includes/block-supports/typography.php
Advertisement