From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../class-astra-breadcrumbs-typo-configs.php | 179 +++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php (limited to 'inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php') diff --git a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php new file mode 100644 index 0000000..2afd280 --- /dev/null +++ b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php @@ -0,0 +1,179 @@ + ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'default' => astra_get_option( 'section-breadcrumb-typo' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Content Font', 'astra' ), + 'section' => 'section-breadcrumb', + 'transport' => 'postMessage', + 'priority' => 73, + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]', + 'operator' => '!=', + 'value' => 'none', + ), + ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Font Family + */ + array( + 'name' => 'breadcrumb-font-family', + 'default' => astra_get_option( 'breadcrumb-font-family' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'section' => 'section-breadcrumb', + 'control' => 'ast-font', + 'font_type' => 'ast-font-family', + 'title' => __( 'Family', 'astra' ), + 'connect' => 'breadcrumb-font-weight', + 'priority' => 5, + ), + + /** + * Option: Font Size + */ + array( + 'name' => 'breadcrumb-font-size', + 'control' => 'ast-responsive', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'section' => 'section-breadcrumb', + 'default' => astra_get_option( 'breadcrumb-font-size' ), + 'transport' => 'postMessage', + 'title' => __( 'Size', 'astra' ), + 'priority' => 10, + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Font Weight + */ + array( + 'name' => 'breadcrumb-font-weight', + 'control' => 'ast-font', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'section' => 'section-breadcrumb', + 'font_type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'breadcrumb-font-weight' ), + 'title' => __( 'Weight', 'astra' ), + 'connect' => 'breadcrumb-font-family', + 'priority' => 15, + ), + + /** + * Option: Text Transform + */ + array( + 'name' => 'breadcrumb-text-transform', + 'control' => 'ast-select', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'section' => 'section-breadcrumb', + 'default' => astra_get_option( 'breadcrumb-text-transform' ), + 'title' => __( 'Text Transform', 'astra' ), + 'transport' => 'postMessage', + 'priority' => 20, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Line Height + */ + array( + 'name' => 'breadcrumb-line-height', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'default' => astra_get_option( 'breadcrumb-line-height' ), + 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]', + 'section' => 'section-breadcrumb', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Line Height', 'astra' ), + 'suffix' => 'em', + 'priority' => 25, + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Breadcrumbs_Typo_Configs(); -- cgit v1.2.3-60-g2f50