Astra_Builder_Base_Configuration::prepare_typography_options( string $section_id, array $required_condition = array(), array $divider_setup = array() )
Prepare Advance Typography configuration.
Description
Parameters
- $section_id
-
(string) (Required) section id.
- $required_condition
-
(array) (Optional) Required Condition.
Default value: array()
- $divider_setup
-
(array) (Optional) Required divider setup.
Default value: array()
Return
(array)
Source
File: inc/customizer/configurations/builder/class-astra-builder-base-configuration.php
public static function prepare_typography_options( $section_id, $required_condition = array() ) { $parent = ASTRA_THEME_SETTINGS . '[' . $section_id . '-typography]'; if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { $_configs = array( array( 'name' => $parent, 'default' => astra_get_option( $section_id . '-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Text Font', 'astra' ), 'section' => $section_id, 'transport' => 'postMessage', 'priority' => 16, 'context' => empty( $required_condition ) ? Astra_Builder_Helper::$design_tab : $required_condition, ), /** * Option: Font Size */ array( 'name' => 'font-size-' . $section_id, 'type' => 'sub-control', 'parent' => $parent, 'section' => $section_id, 'control' => 'ast-responsive', 'default' => astra_get_option( 'font-size-' . $section_id ), 'transport' => 'postMessage', 'priority' => 14, 'title' => __( 'Size', 'astra' ), 'input_attrs' => array( 'min' => 0, ), 'units' => array( 'px' => 'px', 'em' => 'em', ), ), ); } else { $_configs = array( /** * Option: Font Size */ array( 'name' => ASTRA_THEME_SETTINGS . '[font-size-' . $section_id . ']', 'type' => 'control', 'section' => $section_id, 'control' => 'ast-responsive', 'default' => astra_get_option( 'font-size-' . $section_id ), 'transport' => 'postMessage', 'priority' => 16, 'title' => __( 'Font Size', 'astra' ), 'input_attrs' => array( 'min' => 0, ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'units' => array( 'px' => 'px', 'em' => 'em', ), 'context' => empty( $required_condition ) ? Astra_Builder_Helper::$design_tab : $required_condition, ), ); } return $_configs; }
Expand full source code Collapse full source code View on Trac