Core Function
View Source on Trac ↗ wp_get_typography_value_and_unit()
wp_get_typography_value_and_unit( mixed $raw_value, mixed $options = array() ) Checks a string for a unit and value and returns an array
Parameters 2 required
| Name / Type | Description |
|---|---|
| (string | | int | float) $raw_value Raw size value from theme.json. Required |
| array | $options { Optional. An associative array of options. Default is empty array. Required |
Return Value
((array)
(array | null) An array consisting of `'value'` and `'unit'` properties on success.
`null` on failure.
Function Information
Since Version
6.1.0
Source File
wp-includes/block-supports/typography.php
Advertisement