Astra_Update_Body_Font::get_input_schema()
Get input schema.
Description
Return
(array)
Source
File: inc/abilities/customizer/globals/typography/class-astra-update-body-font.php
public function get_input_schema() {
return array(
'type' => 'object',
'properties' => array(
'font_family' => array(
'type' => 'string',
'description' => 'Font family name (e.g., "Inter", "Roboto", "Arial")',
),
'font_weight' => array(
'type' => 'string',
'description' => 'Font weight (e.g., "400", "500", "700")',
),
'font_size' => array(
'type' => 'object',
'description' => 'Font size object with separate numeric values and unit strings. Parse user input: "20px" becomes desktop:"20", desktop-unit:"px". Example: {"desktop": "16", "tablet": "16", "mobile": "16", "desktop-unit": "px", "tablet-unit": "px", "mobile-unit": "px"}',
'properties' => array(
'desktop' => array(
'type' => 'string',
'description' => 'Numeric value as string (e.g., "16" not "16px")',
),
'tablet' => array(
'type' => 'string',
'description' => 'Numeric value as string',
),
'mobile' => array(
'type' => 'string',
'description' => 'Numeric value as string',
),
'desktop-unit' => array(
'type' => 'string',
'description' => 'Unit only: px, em, rem, or vw',
'enum' => array( 'px', 'em', 'rem', 'vw' ),
),
'tablet-unit' => array(
'type' => 'string',
'description' => 'Unit only: px, em, rem, or vw',
'enum' => array( 'px', 'em', 'rem', 'vw' ),
),
'mobile-unit' => array(
'type' => 'string',
'description' => 'Unit only: px, em, rem, or vw',
'enum' => array( 'px', 'em', 'rem', 'vw' ),
),
),
),
'line_height' => array(
'type' => 'string',
'description' => 'Line height value',
),
'text_transform' => array(
'type' => 'string',
'description' => 'Text transform (uppercase, lowercase, capitalize, none)',
'enum' => array( 'uppercase', 'lowercase', 'capitalize', 'none', '' ),
),
'letter_spacing' => array(
'type' => 'string',
'description' => 'Letter spacing value',
),
),
);
}
Expand full source code Collapse full source code View on Trac