From 69c17f9c1942fd0d6a5ea941636e87723b8a6fe2 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 16:19:29 -0500 Subject: dos2unix on all .php files, begin paring down admin page and site branding. --- .../class-astra-customizer-button-configs.php | 968 +++++++------- .../class-astra-existing-button-configs.php | 904 ++++++------- .../class-astra-customizer-config-base.php | 200 +-- .../class-astra-advanced-footer-colors-configs.php | 358 ++--- .../class-astra-body-colors-configs.php | 198 +-- .../class-astra-footer-colors-configs.php | 204 +-- .../layout/class-astra-blog-layout-configs.php | 346 ++--- .../class-astra-blog-single-layout-configs.php | 312 ++--- .../layout/class-astra-footer-layout-configs.php | 964 +++++++------- .../layout/class-astra-header-layout-configs.php | 1368 ++++++++++---------- .../layout/class-astra-sidebar-layout-configs.php | 310 ++--- .../class-astra-site-container-layout-configs.php | 314 ++--- .../layout/class-astra-site-identity-configs.php | 990 +++++++------- .../layout/class-astra-site-layout-configs.php | 138 +- .../class-astra-archive-typo-configs.php | 394 +++--- .../typography/class-astra-body-typo-configs.php | 554 ++++---- .../class-astra-content-typo-configs.php | 544 ++++---- .../typography/class-astra-header-typo-configs.php | 460 +++---- .../typography/class-astra-single-typo-configs.php | 272 ++-- 19 files changed, 4899 insertions(+), 4899 deletions(-) (limited to 'inc/customizer/configurations') diff --git a/inc/customizer/configurations/buttons/class-astra-customizer-button-configs.php b/inc/customizer/configurations/buttons/class-astra-customizer-button-configs.php index b153ee6..7c49a4d 100644 --- a/inc/customizer/configurations/buttons/class-astra-customizer-button-configs.php +++ b/inc/customizer/configurations/buttons/class-astra-customizer-button-configs.php @@ -1,484 +1,484 @@ - ASTRA_THEME_SETTINGS . '[theme-button-color-group]', - 'default' => astra_get_option( 'theme-button-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => __( 'Text Color', 'astra' ), - 'section' => 'section-buttons', - 'transport' => 'postMessage', - 'priority' => 18, - ), - - /** - * Group: Theme Button background colors Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', - 'default' => astra_get_option( 'theme-button-bg-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => __( 'Background Color', 'astra' ), - 'section' => 'section-buttons', - 'transport' => 'postMessage', - 'priority' => 18.5, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Button Color - */ - array( - 'name' => 'button-color', - 'default' => astra_get_option( 'button-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-color-group]', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'title' => __( 'Normal', 'astra' ), - ), - - /** - * Option: Button Hover Color - */ - array( - 'name' => 'button-h-color', - 'default' => astra_get_option( 'button-h-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-color-group]', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'title' => __( 'Hover', 'astra' ), - 'priority' => 39, - ), - - /** - * Option: Button Background Color - */ - array( - 'name' => 'button-bg-color', - 'default' => astra_get_option( 'button-bg-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'title' => __( 'Normal', 'astra' ), - ), - - /** - * Option: Button Background Hover Color - */ - array( - 'name' => 'button-bg-h-color', - 'default' => astra_get_option( 'button-bg-h-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'title' => __( 'Hover', 'astra' ), - 'priority' => 40, - ), - - /** - * Option: Global Button Border Size - */ - array( - 'type' => 'control', - 'section' => 'section-buttons', - 'control' => 'ast-border', - 'name' => ASTRA_THEME_SETTINGS . '[theme-button-border-group-border-size]', - 'transport' => 'postMessage', - 'linked_choices' => true, - 'priority' => 19, - 'default' => astra_get_option( 'theme-button-border-group-border-size' ), - 'title' => __( 'Border Width', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - /** - * Group: Theme Button Border Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', - 'default' => astra_get_option( 'theme-button-border-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => __( 'Border Color', 'astra' ), - 'section' => 'section-buttons', - 'transport' => 'postMessage', - 'priority' => 19, - ), - - /** - * Option: Global Button Border Color - */ - array( - 'name' => 'theme-button-border-group-border-color', - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', - 'default' => astra_get_option( 'theme-button-border-group-border-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 19, - 'title' => __( 'Border Color', 'astra' ), - ), - - /** - * Option: Global Button Border Hover Color - */ - array( - 'name' => 'theme-button-border-group-border-h-color', - 'default' => astra_get_option( 'theme-button-border-group-border-h-color' ), - 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'section' => 'section-buttons', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 19, - 'title' => __( 'Border Hover Color', 'astra' ), - ), - - /** - * Option: Global Button Radius - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[button-radius]', - 'default' => astra_get_option( 'button-radius' ), - 'type' => 'control', - 'section' => 'section-buttons', - 'control' => 'ast-slider', - 'priority' => 19, - 'suffix' => 'px', - 'title' => __( 'Border Radius', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 200, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Theme Button Padding - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[theme-button-padding]', - 'default' => astra_get_option( 'theme-button-padding' ), - 'type' => 'control', - 'control' => 'ast-responsive-spacing', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), - 'section' => 'section-buttons', - 'title' => __( 'Padding', 'astra' ), - 'linked_choices' => true, - 'transport' => 'postMessage', - 'unit_choices' => array( 'px', 'em', '%' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - 'priority' => 35, - 'connected' => false, - ), - - ); - - if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) { - - $_trans_config = array( - /** - * Option: Transparent Header Button Colors Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-divider]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-transparent-header', - 'title' => __( 'Header Button', 'astra' ), - 'settings' => array(), - 'priority' => 40, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - ), - ), - /** - * Group: Transparent Header Button Colors Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', - 'default' => astra_get_option( 'transparent-header-button-color-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Colors', 'astra' ), - 'section' => 'section-transparent-header', - 'transport' => 'postMessage', - 'priority' => 40, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - ), - ), - /** - * Group: Transparent Header Button Border Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', - 'default' => astra_get_option( 'transparent-header-button-border-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Border', 'astra' ), - 'section' => 'section-transparent-header', - 'transport' => 'postMessage', - 'priority' => 40, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - ), - ), - - /** - * Option: Button Text Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-text-color', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-text-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', - 'section' => 'section-transparent-header', - 'tab' => __( 'Normal', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Text Color', 'astra' ), - ), - - /** - * Option: Button Text Hover Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-text-h-color', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-text-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', - 'section' => 'section-transparent-header', - 'tab' => __( 'Hover', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Text Color', 'astra' ), - ), - - /** - * Option: Button Background Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-back-color', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-back-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', - 'section' => 'section-transparent-header', - 'tab' => __( 'Normal', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Background Color', 'astra' ), - ), - - /** - * Option: Button Button Hover Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-back-h-color', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-back-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', - 'section' => 'section-transparent-header', - 'tab' => __( 'Hover', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Background Color', 'astra' ), - ), - - // Option: Custom Menu Button Border. - array( - 'type' => 'control', - 'control' => 'ast-responsive-spacing', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-trans-section-button-padding]', - 'section' => 'section-transparent-header', - 'transport' => 'postMessage', - 'linked_choices' => true, - 'priority' => 40, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - ), - 'default' => astra_get_option( 'header-main-rt-trans-section-button-padding' ), - 'title' => __( 'Padding', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - /** - * Option: Button Border Size - */ - array( - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', - 'section' => 'section-transparent-header', - 'control' => 'ast-border', - 'name' => 'header-main-rt-trans-section-button-border-size', - 'transport' => 'postMessage', - 'linked_choices' => true, - 'priority' => 10, - 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-size' ), - 'title' => __( 'Width', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - /** - * Option: Button Border Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-border-color', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', - 'section' => 'section-transparent-header', - 'transport' => 'postMessage', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 12, - 'title' => __( 'Color', 'astra' ), - ), - - /** - * Option: Button Border Hover Color - */ - array( - 'name' => 'header-main-rt-trans-section-button-border-h-color', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 14, - 'title' => __( 'Hover Color', 'astra' ), - ), - - /** - * Option: Button Border Radius - */ - array( - 'name' => 'header-main-rt-trans-section-button-border-radius', - 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-radius' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', - 'section' => 'section-transparent-header', - 'control' => 'ast-slider', - 'suffix' => 'px', - 'transport' => 'postMessage', - 'priority' => 16, - 'title' => __( 'Border Radius', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 100, - ), - ), - ); - $_configs = array_merge( $_configs, $_trans_config ); - - } - - return array_merge( $configurations, $_configs ); - } - } -} - -/** - * Kicking this off by calling 'get_instance()' method - */ -new Astra_Customizer_Button_Configs(); + ASTRA_THEME_SETTINGS . '[theme-button-color-group]', + 'default' => astra_get_option( 'theme-button-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Text Color', 'astra' ), + 'section' => 'section-buttons', + 'transport' => 'postMessage', + 'priority' => 18, + ), + + /** + * Group: Theme Button background colors Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', + 'default' => astra_get_option( 'theme-button-bg-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Background Color', 'astra' ), + 'section' => 'section-buttons', + 'transport' => 'postMessage', + 'priority' => 18.5, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Button Color + */ + array( + 'name' => 'button-color', + 'default' => astra_get_option( 'button-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-color-group]', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Button Hover Color + */ + array( + 'name' => 'button-h-color', + 'default' => astra_get_option( 'button-h-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-color-group]', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'title' => __( 'Hover', 'astra' ), + 'priority' => 39, + ), + + /** + * Option: Button Background Color + */ + array( + 'name' => 'button-bg-color', + 'default' => astra_get_option( 'button-bg-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Button Background Hover Color + */ + array( + 'name' => 'button-bg-h-color', + 'default' => astra_get_option( 'button-bg-h-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-bg-color-group]', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'title' => __( 'Hover', 'astra' ), + 'priority' => 40, + ), + + /** + * Option: Global Button Border Size + */ + array( + 'type' => 'control', + 'section' => 'section-buttons', + 'control' => 'ast-border', + 'name' => ASTRA_THEME_SETTINGS . '[theme-button-border-group-border-size]', + 'transport' => 'postMessage', + 'linked_choices' => true, + 'priority' => 19, + 'default' => astra_get_option( 'theme-button-border-group-border-size' ), + 'title' => __( 'Border Width', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + /** + * Group: Theme Button Border Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', + 'default' => astra_get_option( 'theme-button-border-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Border Color', 'astra' ), + 'section' => 'section-buttons', + 'transport' => 'postMessage', + 'priority' => 19, + ), + + /** + * Option: Global Button Border Color + */ + array( + 'name' => 'theme-button-border-group-border-color', + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', + 'default' => astra_get_option( 'theme-button-border-group-border-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 19, + 'title' => __( 'Border Color', 'astra' ), + ), + + /** + * Option: Global Button Border Hover Color + */ + array( + 'name' => 'theme-button-border-group-border-h-color', + 'default' => astra_get_option( 'theme-button-border-group-border-h-color' ), + 'parent' => ASTRA_THEME_SETTINGS . '[theme-button-border-color-group]', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'section' => 'section-buttons', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 19, + 'title' => __( 'Border Hover Color', 'astra' ), + ), + + /** + * Option: Global Button Radius + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[button-radius]', + 'default' => astra_get_option( 'button-radius' ), + 'type' => 'control', + 'section' => 'section-buttons', + 'control' => 'ast-slider', + 'priority' => 19, + 'suffix' => 'px', + 'title' => __( 'Border Radius', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 200, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Theme Button Padding + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[theme-button-padding]', + 'default' => astra_get_option( 'theme-button-padding' ), + 'type' => 'control', + 'control' => 'ast-responsive-spacing', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), + 'section' => 'section-buttons', + 'title' => __( 'Padding', 'astra' ), + 'linked_choices' => true, + 'transport' => 'postMessage', + 'unit_choices' => array( 'px', 'em', '%' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + 'priority' => 35, + 'connected' => false, + ), + + ); + + if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) { + + $_trans_config = array( + /** + * Option: Transparent Header Button Colors Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-divider]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-transparent-header', + 'title' => __( 'Header Button', 'astra' ), + 'settings' => array(), + 'priority' => 40, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + ), + ), + /** + * Group: Transparent Header Button Colors Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', + 'default' => astra_get_option( 'transparent-header-button-color-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Colors', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 40, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + ), + ), + /** + * Group: Transparent Header Button Border Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', + 'default' => astra_get_option( 'transparent-header-button-border-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Border', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 40, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + ), + ), + + /** + * Option: Button Text Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-text-color', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-text-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Text Color', 'astra' ), + ), + + /** + * Option: Button Text Hover Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-text-h-color', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-text-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Text Color', 'astra' ), + ), + + /** + * Option: Button Background Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-back-color', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-back-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Background Color', 'astra' ), + ), + + /** + * Option: Button Button Hover Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-back-h-color', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-back-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-color-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Background Color', 'astra' ), + ), + + // Option: Custom Menu Button Border. + array( + 'type' => 'control', + 'control' => 'ast-responsive-spacing', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-trans-section-button-padding]', + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'linked_choices' => true, + 'priority' => 40, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + ), + 'default' => astra_get_option( 'header-main-rt-trans-section-button-padding' ), + 'title' => __( 'Padding', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + /** + * Option: Button Border Size + */ + array( + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', + 'section' => 'section-transparent-header', + 'control' => 'ast-border', + 'name' => 'header-main-rt-trans-section-button-border-size', + 'transport' => 'postMessage', + 'linked_choices' => true, + 'priority' => 10, + 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-size' ), + 'title' => __( 'Width', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + /** + * Option: Button Border Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-border-color', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 12, + 'title' => __( 'Color', 'astra' ), + ), + + /** + * Option: Button Border Hover Color + */ + array( + 'name' => 'header-main-rt-trans-section-button-border-h-color', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 14, + 'title' => __( 'Hover Color', 'astra' ), + ), + + /** + * Option: Button Border Radius + */ + array( + 'name' => 'header-main-rt-trans-section-button-border-radius', + 'default' => astra_get_option( 'header-main-rt-trans-section-button-border-radius' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-button-border-group]', + 'section' => 'section-transparent-header', + 'control' => 'ast-slider', + 'suffix' => 'px', + 'transport' => 'postMessage', + 'priority' => 16, + 'title' => __( 'Border Radius', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 100, + ), + ), + ); + $_configs = array_merge( $_configs, $_trans_config ); + + } + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Customizer_Button_Configs(); diff --git a/inc/customizer/configurations/buttons/class-astra-existing-button-configs.php b/inc/customizer/configurations/buttons/class-astra-existing-button-configs.php index 707420a..15d5a81 100644 --- a/inc/customizer/configurations/buttons/class-astra-existing-button-configs.php +++ b/inc/customizer/configurations/buttons/class-astra-existing-button-configs.php @@ -1,452 +1,452 @@ - ASTRA_THEME_SETTINGS . '[primary-header-button-color-divider]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-primary-menu', - 'title' => __( 'Header Button', 'astra' ), - 'settings' => array(), - 'priority' => 17, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '==', - 'value' => 'button', - ), - ), - - ), - /** - * Group: Primary Header Button Colors Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', - 'default' => astra_get_option( 'primary-header-button-color-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Colors', 'astra' ), - 'section' => 'section-primary-menu', - 'transport' => 'postMessage', - 'priority' => 18, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '==', - 'value' => 'button', - ), - ), - ), - /** - * Group: Primary Header Button Border Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', - 'default' => astra_get_option( 'primary-header-button-border-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Border', 'astra' ), - 'section' => 'section-primary-menu', - 'transport' => 'postMessage', - 'priority' => 19, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '==', - 'value' => 'button', - ), - ), - ), - - /** - * Option: Button Text Color - */ - array( - 'name' => 'header-main-rt-section-button-text-color', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-rt-section-button-text-color' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', - 'section' => 'section-primary-menu', - 'tab' => __( 'Normal', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Text Color', 'astra' ), - ), - - /** - * Option: Button Text Hover Color - */ - array( - 'name' => 'header-main-rt-section-button-text-h-color', - 'default' => astra_get_option( 'header-main-rt-section-button-text-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', - 'section' => 'section-primary-menu', - 'tab' => __( 'Hover', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Text Color', 'astra' ), - ), - - /** - * Option: Button Background Color - */ - array( - 'name' => 'header-main-rt-section-button-back-color', - 'default' => astra_get_option( 'header-main-rt-section-button-back-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', - 'section' => 'section-primary-menu', - 'tab' => __( 'Normal', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Background Color', 'astra' ), - ), - - /** - * Option: Button Button Hover Color - */ - array( - 'name' => 'header-main-rt-section-button-back-h-color', - 'default' => astra_get_option( 'header-main-rt-section-button-back-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', - 'section' => 'section-primary-menu', - 'tab' => __( 'Hover', 'astra' ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 10, - 'title' => __( 'Background Color', 'astra' ), - ), - - /** - * Option: Primary Header Button Typography - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'default' => astra_get_option( 'primary-header-button-text-typography' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Typography', 'astra' ), - 'section' => 'section-primary-menu', - 'transport' => 'postMessage', - 'priority' => 20, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '==', - 'value' => 'button', - ), - ), - ), - - /** - * Option: Primary Header Button Font Family - */ - array( - 'name' => 'primary-header-button-font-family', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'control' => 'ast-font', - 'font_type' => 'ast-font-family', - 'title' => __( 'Family', 'astra' ), - 'default' => astra_get_option( 'primary-header-button-font-family' ), - 'connect' => ASTRA_THEME_SETTINGS . '[primary-header-button-font-weight]', - 'priority' => 1, - ), - - /** - * Option: Primary Header Button Font Size - */ - array( - 'name' => 'primary-header-button-font-size', - 'transport' => 'postMessage', - 'title' => __( 'Size', 'astra' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'primary-header-button-font-size' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Primary Header Button Font Weight - */ - array( - 'name' => 'primary-header-button-font-weight', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'control' => 'ast-font', - 'font_type' => 'ast-font-weight', - 'title' => __( 'Weight', 'astra' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), - 'default' => astra_get_option( 'primary-header-button-font-weight' ), - 'connect' => 'primary-header-button-font-family', - 'priority' => 2, - ), - - /** - * Option: Primary Header Button Text Transform - */ - array( - 'name' => 'primary-header-button-text-transform', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'primary-header-button-text-transform' ), - 'title' => __( 'Text Transform', 'astra' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'control' => 'ast-select', - 'priority' => 3, - 'choices' => array( - '' => __( 'Inherit', 'astra' ), - 'none' => __( 'None', 'astra' ), - 'capitalize' => __( 'Capitalize', 'astra' ), - 'uppercase' => __( 'Uppercase', 'astra' ), - 'lowercase' => __( 'Lowercase', 'astra' ), - ), - ), - - /** - * Option: Primary Header Button Line Height - */ - array( - 'name' => 'primary-header-button-line-height', - 'control' => 'ast-slider', - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'default' => astra_get_option( 'primary-header-button-line-height' ), - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'title' => __( 'Line Height', 'astra' ), - 'suffix' => 'em', - 'priority' => 4, - 'input_attrs' => array( - 'min' => 1, - 'step' => 0.01, - 'max' => 5, - ), - ), - - /** - * Option: Primary Header Button Letter Spacing - */ - array( - 'name' => 'primary-header-button-letter-spacing', - 'control' => 'ast-slider', - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'default' => astra_get_option( 'primary-header-button-letter-spacing' ), - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', - 'section' => 'section-primary-menu', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'title' => __( 'Letter Spacing', 'astra' ), - 'suffix' => 'px', - 'priority' => 5, - 'input_attrs' => array( - 'min' => 1, - 'step' => 1, - 'max' => 100, - ), - ), - - // Option: Custom Menu Button Border. - array( - 'type' => 'control', - 'control' => 'ast-responsive-spacing', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-padding]', - 'section' => 'section-primary-menu', - 'transport' => 'postMessage', - 'linked_choices' => true, - 'priority' => 21, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'custom-button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '==', - 'value' => 'button', - ), - ), - 'default' => astra_get_option( 'header-main-rt-section-button-padding' ), - 'title' => __( 'Padding', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - /** - * Option: Button Border Size - */ - array( - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', - 'section' => 'section-primary-menu', - 'control' => 'ast-border', - 'name' => 'header-main-rt-section-button-border-size', - 'transport' => 'postMessage', - 'linked_choices' => true, - 'priority' => 10, - 'default' => astra_get_option( 'header-main-rt-section-button-border-size' ), - 'title' => __( 'Width', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - /** - * Option: Button Border Color - */ - array( - 'name' => 'header-main-rt-section-button-border-color', - 'default' => astra_get_option( 'header-main-rt-section-button-border-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', - 'section' => 'section-primary-menu', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 12, - 'title' => __( 'Color', 'astra' ), - ), - - /** - * Option: Button Border Hover Color - */ - array( - 'name' => 'header-main-rt-section-button-border-h-color', - 'default' => astra_get_option( 'header-main-rt-section-button-border-h-color' ), - 'transport' => 'postMessage', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', - 'section' => 'section-primary-menu', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'priority' => 14, - 'title' => __( 'Hover Color', 'astra' ), - ), - - /** - * Option: Button Border Radius - */ - array( - 'name' => 'header-main-rt-section-button-border-radius', - 'default' => astra_get_option( 'header-main-rt-section-button-border-radius' ), - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', - 'section' => 'section-primary-menu', - 'control' => 'ast-slider', - 'suffix' => 'px', - 'transport' => 'postMessage', - 'priority' => 16, - 'title' => __( 'Border Radius', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 100, - ), - ), - ); - - return array_merge( $configurations, $_configs ); - } - } -} - -/** - * Kicking this off by calling 'get_instance()' method - */ -new Astra_Existing_Button_Configs(); + ASTRA_THEME_SETTINGS . '[primary-header-button-color-divider]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-primary-menu', + 'title' => __( 'Header Button', 'astra' ), + 'settings' => array(), + 'priority' => 17, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '==', + 'value' => 'button', + ), + ), + + ), + /** + * Group: Primary Header Button Colors Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', + 'default' => astra_get_option( 'primary-header-button-color-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Colors', 'astra' ), + 'section' => 'section-primary-menu', + 'transport' => 'postMessage', + 'priority' => 18, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '==', + 'value' => 'button', + ), + ), + ), + /** + * Group: Primary Header Button Border Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', + 'default' => astra_get_option( 'primary-header-button-border-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Border', 'astra' ), + 'section' => 'section-primary-menu', + 'transport' => 'postMessage', + 'priority' => 19, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '==', + 'value' => 'button', + ), + ), + ), + + /** + * Option: Button Text Color + */ + array( + 'name' => 'header-main-rt-section-button-text-color', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-rt-section-button-text-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', + 'section' => 'section-primary-menu', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Text Color', 'astra' ), + ), + + /** + * Option: Button Text Hover Color + */ + array( + 'name' => 'header-main-rt-section-button-text-h-color', + 'default' => astra_get_option( 'header-main-rt-section-button-text-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', + 'section' => 'section-primary-menu', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Text Color', 'astra' ), + ), + + /** + * Option: Button Background Color + */ + array( + 'name' => 'header-main-rt-section-button-back-color', + 'default' => astra_get_option( 'header-main-rt-section-button-back-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', + 'section' => 'section-primary-menu', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Background Color', 'astra' ), + ), + + /** + * Option: Button Button Hover Color + */ + array( + 'name' => 'header-main-rt-section-button-back-h-color', + 'default' => astra_get_option( 'header-main-rt-section-button-back-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-color-group]', + 'section' => 'section-primary-menu', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 10, + 'title' => __( 'Background Color', 'astra' ), + ), + + /** + * Option: Primary Header Button Typography + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'default' => astra_get_option( 'primary-header-button-text-typography' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Typography', 'astra' ), + 'section' => 'section-primary-menu', + 'transport' => 'postMessage', + 'priority' => 20, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '==', + 'value' => 'button', + ), + ), + ), + + /** + * Option: Primary Header Button Font Family + */ + array( + 'name' => 'primary-header-button-font-family', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'control' => 'ast-font', + 'font_type' => 'ast-font-family', + 'title' => __( 'Family', 'astra' ), + 'default' => astra_get_option( 'primary-header-button-font-family' ), + 'connect' => ASTRA_THEME_SETTINGS . '[primary-header-button-font-weight]', + 'priority' => 1, + ), + + /** + * Option: Primary Header Button Font Size + */ + array( + 'name' => 'primary-header-button-font-size', + 'transport' => 'postMessage', + 'title' => __( 'Size', 'astra' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'primary-header-button-font-size' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Primary Header Button Font Weight + */ + array( + 'name' => 'primary-header-button-font-weight', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'control' => 'ast-font', + 'font_type' => 'ast-font-weight', + 'title' => __( 'Weight', 'astra' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'primary-header-button-font-weight' ), + 'connect' => 'primary-header-button-font-family', + 'priority' => 2, + ), + + /** + * Option: Primary Header Button Text Transform + */ + array( + 'name' => 'primary-header-button-text-transform', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'primary-header-button-text-transform' ), + 'title' => __( 'Text Transform', 'astra' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'control' => 'ast-select', + 'priority' => 3, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Primary Header Button Line Height + */ + array( + 'name' => 'primary-header-button-line-height', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'default' => astra_get_option( 'primary-header-button-line-height' ), + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Line Height', 'astra' ), + 'suffix' => 'em', + 'priority' => 4, + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Primary Header Button Letter Spacing + */ + array( + 'name' => 'primary-header-button-letter-spacing', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'default' => astra_get_option( 'primary-header-button-letter-spacing' ), + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-text-typography]', + 'section' => 'section-primary-menu', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Letter Spacing', 'astra' ), + 'suffix' => 'px', + 'priority' => 5, + 'input_attrs' => array( + 'min' => 1, + 'step' => 1, + 'max' => 100, + ), + ), + + // Option: Custom Menu Button Border. + array( + 'type' => 'control', + 'control' => 'ast-responsive-spacing', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-padding]', + 'section' => 'section-primary-menu', + 'transport' => 'postMessage', + 'linked_choices' => true, + 'priority' => 21, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'custom-button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '==', + 'value' => 'button', + ), + ), + 'default' => astra_get_option( 'header-main-rt-section-button-padding' ), + 'title' => __( 'Padding', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + /** + * Option: Button Border Size + */ + array( + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', + 'section' => 'section-primary-menu', + 'control' => 'ast-border', + 'name' => 'header-main-rt-section-button-border-size', + 'transport' => 'postMessage', + 'linked_choices' => true, + 'priority' => 10, + 'default' => astra_get_option( 'header-main-rt-section-button-border-size' ), + 'title' => __( 'Width', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + /** + * Option: Button Border Color + */ + array( + 'name' => 'header-main-rt-section-button-border-color', + 'default' => astra_get_option( 'header-main-rt-section-button-border-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', + 'section' => 'section-primary-menu', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 12, + 'title' => __( 'Color', 'astra' ), + ), + + /** + * Option: Button Border Hover Color + */ + array( + 'name' => 'header-main-rt-section-button-border-h-color', + 'default' => astra_get_option( 'header-main-rt-section-button-border-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', + 'section' => 'section-primary-menu', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 14, + 'title' => __( 'Hover Color', 'astra' ), + ), + + /** + * Option: Button Border Radius + */ + array( + 'name' => 'header-main-rt-section-button-border-radius', + 'default' => astra_get_option( 'header-main-rt-section-button-border-radius' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-button-border-group]', + 'section' => 'section-primary-menu', + 'control' => 'ast-slider', + 'suffix' => 'px', + 'transport' => 'postMessage', + 'priority' => 16, + 'title' => __( 'Border Radius', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 100, + ), + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Existing_Button_Configs(); diff --git a/inc/customizer/configurations/class-astra-customizer-config-base.php b/inc/customizer/configurations/class-astra-customizer-config-base.php index 47a4688..862ad90 100644 --- a/inc/customizer/configurations/class-astra-customizer-config-base.php +++ b/inc/customizer/configurations/class-astra-customizer-config-base.php @@ -1,100 +1,100 @@ -'; - $content .= wp_kses_post( astra_get_prop( $args, 'description' ) ); - - // Links. - if ( astra_get_prop( $args, 'links' ) ) { - $content .= ''; - } - - $content .= ''; - - return $content; - } - - } -} - -/** - * Kicking this off by calling 'get_instance()' method - */ -new Astra_Customizer_Config_Base(); +'; + $content .= wp_kses_post( astra_get_prop( $args, 'description' ) ); + + // Links. + if ( astra_get_prop( $args, 'links' ) ) { + $content .= ''; + } + + $content .= ''; + + return $content; + } + + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Customizer_Config_Base(); diff --git a/inc/customizer/configurations/colors-background/class-astra-advanced-footer-colors-configs.php b/inc/customizer/configurations/colors-background/class-astra-advanced-footer-colors-configs.php index c216adb..f6ba1dc 100644 --- a/inc/customizer/configurations/colors-background/class-astra-advanced-footer-colors-configs.php +++ b/inc/customizer/configurations/colors-background/class-astra-advanced-footer-colors-configs.php @@ -1,179 +1,179 @@ - ASTRA_THEME_SETTINGS . '[footer-widget-background-group]', - 'default' => astra_get_option( 'footer-widget-background-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Background Color', 'astra' ), - 'section' => 'section-footer-adv', - 'transport' => 'postMessage', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'priority' => 47, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'operator' => '!=', - 'value' => 'disabled', - ), - - ), - ), - - /** - * Option: Footer Bar Content Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', - 'default' => astra_get_option( 'footer-widget-content-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Content Colors', 'astra' ), - 'section' => 'section-footer-adv', - 'transport' => 'postMessage', - 'priority' => 48, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - ), - - /** - * Option: Footer Bar Content Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', - 'default' => astra_get_option( 'footer-widget-link-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => __( 'Link Color', 'astra' ), - 'section' => 'section-footer-adv', - 'transport' => 'postMessage', - 'priority' => 48, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'operator' => '!=', - 'value' => 'disabled', - ), - - ), - ), - - /** - * Option: Widget Title Color - */ - array( - 'name' => 'footer-adv-wgt-title-color', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', - 'section' => 'section-footer-adv', - 'control' => 'ast-color', - 'title' => __( 'Title Color', 'astra' ), - 'default' => astra_get_option( 'footer-adv-wgt-title-color' ), - ), - - /** - * Option: Text Color - */ - array( - 'name' => 'footer-adv-text-color', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', - 'section' => 'section-footer-adv', - 'control' => 'ast-color', - 'title' => __( 'Text Color', 'astra' ), - 'default' => astra_get_option( 'footer-adv-text-color' ), - ), - - /** - * Option: Link Color - */ - array( - 'name' => 'footer-adv-link-color', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', - 'section' => 'section-footer-adv', - 'control' => 'ast-color', - 'title' => __( 'Normal', 'astra' ), - 'default' => astra_get_option( 'footer-adv-link-color' ), - ), - - /** - * Option: Link Hover Color - */ - array( - 'name' => 'footer-adv-link-h-color', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', - 'section' => 'section-footer-adv', - 'control' => 'ast-color', - 'title' => __( 'Hover', 'astra' ), - 'default' => astra_get_option( 'footer-adv-link-h-color' ), - ), - - /** - * Option: Footer widget Background - */ - array( - 'name' => 'footer-adv-bg-obj', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-background-group]', - 'section' => 'section-footer-adv', - 'control' => 'ast-background', - 'default' => astra_get_option( 'footer-adv-bg-obj' ), - 'label' => __( 'Background', 'astra' ), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Advanced_Footer_Colors_Configs(); - - + ASTRA_THEME_SETTINGS . '[footer-widget-background-group]', + 'default' => astra_get_option( 'footer-widget-background-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Background Color', 'astra' ), + 'section' => 'section-footer-adv', + 'transport' => 'postMessage', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'priority' => 47, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'operator' => '!=', + 'value' => 'disabled', + ), + + ), + ), + + /** + * Option: Footer Bar Content Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', + 'default' => astra_get_option( 'footer-widget-content-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Content Colors', 'astra' ), + 'section' => 'section-footer-adv', + 'transport' => 'postMessage', + 'priority' => 48, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + ), + + /** + * Option: Footer Bar Content Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', + 'default' => astra_get_option( 'footer-widget-link-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Link Color', 'astra' ), + 'section' => 'section-footer-adv', + 'transport' => 'postMessage', + 'priority' => 48, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'operator' => '!=', + 'value' => 'disabled', + ), + + ), + ), + + /** + * Option: Widget Title Color + */ + array( + 'name' => 'footer-adv-wgt-title-color', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', + 'section' => 'section-footer-adv', + 'control' => 'ast-color', + 'title' => __( 'Title Color', 'astra' ), + 'default' => astra_get_option( 'footer-adv-wgt-title-color' ), + ), + + /** + * Option: Text Color + */ + array( + 'name' => 'footer-adv-text-color', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-content-group]', + 'section' => 'section-footer-adv', + 'control' => 'ast-color', + 'title' => __( 'Text Color', 'astra' ), + 'default' => astra_get_option( 'footer-adv-text-color' ), + ), + + /** + * Option: Link Color + */ + array( + 'name' => 'footer-adv-link-color', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', + 'section' => 'section-footer-adv', + 'control' => 'ast-color', + 'title' => __( 'Normal', 'astra' ), + 'default' => astra_get_option( 'footer-adv-link-color' ), + ), + + /** + * Option: Link Hover Color + */ + array( + 'name' => 'footer-adv-link-h-color', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-link-color-group]', + 'section' => 'section-footer-adv', + 'control' => 'ast-color', + 'title' => __( 'Hover', 'astra' ), + 'default' => astra_get_option( 'footer-adv-link-h-color' ), + ), + + /** + * Option: Footer widget Background + */ + array( + 'name' => 'footer-adv-bg-obj', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[footer-widget-background-group]', + 'section' => 'section-footer-adv', + 'control' => 'ast-background', + 'default' => astra_get_option( 'footer-adv-bg-obj' ), + 'label' => __( 'Background', 'astra' ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Advanced_Footer_Colors_Configs(); + + diff --git a/inc/customizer/configurations/colors-background/class-astra-body-colors-configs.php b/inc/customizer/configurations/colors-background/class-astra-body-colors-configs.php index b332f3c..67be0c6 100644 --- a/inc/customizer/configurations/colors-background/class-astra-body-colors-configs.php +++ b/inc/customizer/configurations/colors-background/class-astra-body-colors-configs.php @@ -1,99 +1,99 @@ - ASTRA_THEME_SETTINGS . '[text-color]', - 'default' => astra_get_option( 'text-color' ), - 'type' => 'control', - 'control' => 'ast-color', - 'section' => $_section, - 'priority' => 5, - 'title' => __( 'Text Color', 'astra' ), - ), - - /** - * Option: Theme Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[theme-color]', - 'type' => 'control', - 'control' => 'ast-color', - 'section' => $_section, - 'default' => astra_get_option( 'theme-color' ), - 'priority' => 5, - 'title' => __( 'Theme Color', 'astra' ), - ), - - /** - * Option: Link Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[link-color]', - 'section' => $_section, - 'type' => 'control', - 'control' => 'ast-color', - 'default' => astra_get_option( 'link-color' ), - 'priority' => 5, - 'title' => __( 'Link Color', 'astra' ), - ), - - /** - * Option: Link Hover Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[link-h-color]', - 'section' => $_section, - 'default' => astra_get_option( 'link-h-color' ), - 'type' => 'control', - 'control' => 'ast-color', - 'priority' => 15, - 'title' => __( 'Link Hover Color', 'astra' ), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Body_Colors_Configs(); - - + ASTRA_THEME_SETTINGS . '[text-color]', + 'default' => astra_get_option( 'text-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'section' => $_section, + 'priority' => 5, + 'title' => __( 'Text Color', 'astra' ), + ), + + /** + * Option: Theme Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[theme-color]', + 'type' => 'control', + 'control' => 'ast-color', + 'section' => $_section, + 'default' => astra_get_option( 'theme-color' ), + 'priority' => 5, + 'title' => __( 'Theme Color', 'astra' ), + ), + + /** + * Option: Link Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[link-color]', + 'section' => $_section, + 'type' => 'control', + 'control' => 'ast-color', + 'default' => astra_get_option( 'link-color' ), + 'priority' => 5, + 'title' => __( 'Link Color', 'astra' ), + ), + + /** + * Option: Link Hover Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[link-h-color]', + 'section' => $_section, + 'default' => astra_get_option( 'link-h-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'priority' => 15, + 'title' => __( 'Link Hover Color', 'astra' ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Body_Colors_Configs(); + + diff --git a/inc/customizer/configurations/colors-background/class-astra-footer-colors-configs.php b/inc/customizer/configurations/colors-background/class-astra-footer-colors-configs.php index 9c0cf7f..bca23ba 100644 --- a/inc/customizer/configurations/colors-background/class-astra-footer-colors-configs.php +++ b/inc/customizer/configurations/colors-background/class-astra-footer-colors-configs.php @@ -1,102 +1,102 @@ - 'footer-color', - 'type' => 'sub-control', - 'priority' => 5, - 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]', - 'section' => 'section-footer-small', - 'control' => 'ast-color', - 'title' => __( 'Text Color', 'astra' ), - 'default' => astra_get_option( 'footer-color' ), - ), - - /** - * Option: Link Color - */ - array( - 'name' => 'footer-link-color', - 'type' => 'sub-control', - 'priority' => 6, - 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', - 'section' => 'section-footer-small', - 'control' => 'ast-color', - 'default' => astra_get_option( 'footer-link-color' ), - 'title' => __( 'Normal', 'astra' ), - ), - - /** - * Option: Link Hover Color - */ - array( - 'name' => 'footer-link-h-color', - 'type' => 'sub-control', - 'priority' => 5, - 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', - 'section' => 'section-footer-small', - 'control' => 'ast-color', - 'title' => __( 'Hover', 'astra' ), - 'default' => astra_get_option( 'section-footer-small' ), - ), - - /** - * Option: Footer Background - */ - array( - 'name' => 'footer-bg-obj', - 'type' => 'sub-control', - 'priority' => 7, - 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]', - 'section' => 'section-footer-small', - 'transport' => 'postMessage', - 'control' => 'ast-background', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_background_obj' ), - 'default' => astra_get_option( 'footer-bg-obj' ), - 'label' => __( 'Background', 'astra' ), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Footer_Colors_Configs(); - - + 'footer-color', + 'type' => 'sub-control', + 'priority' => 5, + 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]', + 'section' => 'section-footer-small', + 'control' => 'ast-color', + 'title' => __( 'Text Color', 'astra' ), + 'default' => astra_get_option( 'footer-color' ), + ), + + /** + * Option: Link Color + */ + array( + 'name' => 'footer-link-color', + 'type' => 'sub-control', + 'priority' => 6, + 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', + 'section' => 'section-footer-small', + 'control' => 'ast-color', + 'default' => astra_get_option( 'footer-link-color' ), + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Link Hover Color + */ + array( + 'name' => 'footer-link-h-color', + 'type' => 'sub-control', + 'priority' => 5, + 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', + 'section' => 'section-footer-small', + 'control' => 'ast-color', + 'title' => __( 'Hover', 'astra' ), + 'default' => astra_get_option( 'section-footer-small' ), + ), + + /** + * Option: Footer Background + */ + array( + 'name' => 'footer-bg-obj', + 'type' => 'sub-control', + 'priority' => 7, + 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]', + 'section' => 'section-footer-small', + 'transport' => 'postMessage', + 'control' => 'ast-background', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_background_obj' ), + 'default' => astra_get_option( 'footer-bg-obj' ), + 'label' => __( 'Background', 'astra' ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Footer_Colors_Configs(); + + diff --git a/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php b/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php index 854604e..8a88f54 100644 --- a/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php @@ -1,173 +1,173 @@ - ASTRA_THEME_SETTINGS . '[blog-width]', - 'default' => astra_get_option( 'blog-width' ), - 'type' => 'control', - 'control' => 'ast-selector', - 'section' => 'section-blog', - 'priority' => 50, - 'transport' => 'postMessage', - 'title' => __( 'Content Width', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'custom' => __( 'Custom', 'astra' ), - ), - 'responsive' => false, - 'renderAs' => 'text', - ), - - /** - * Option: Enter Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-max-width]', - 'type' => 'control', - 'control' => 'ast-slider', - 'section' => 'section-blog', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'blog-max-width' ), - 'priority' => 50, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[blog-width]', - 'operator' => '===', - 'value' => 'custom', - ), - ), - 'title' => __( 'Custom Width', 'astra' ), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 768, - 'step' => 1, - 'max' => 1920, - ), - ), - - /** - * Option: Blog Post Content - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-post-content]', - 'section' => 'section-blog', - 'title' => __( 'Post Content', 'astra' ), - 'default' => astra_get_option( 'blog-post-content' ), - 'type' => 'control', - 'control' => 'ast-selector', - 'priority' => 75, - 'choices' => array( - 'full-content' => __( 'Full Content', 'astra' ), - 'excerpt' => __( 'Excerpt', 'astra' ), - ), - 'responsive' => false, - 'renderAs' => 'text', - ), - - /** - * Option: Display Post Structure - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', - 'default' => astra_get_option( 'blog-post-structure' ), - 'type' => 'control', - 'control' => 'ast-sortable', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), - 'section' => 'section-blog', - 'priority' => 50, - 'title' => __( 'Post Structure', 'astra' ), - 'divider' => array( 'ast_class' => 'ast-top-divider' ), - 'choices' => array( - 'image' => __( 'Featured Image', 'astra' ), - 'title-meta' => __( 'Title & Blog Meta', 'astra' ), - ), - ), - - ); - - if ( ! defined( 'ASTRA_EXT_VER' ) ) { - $_configs[] = array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-meta]', - 'type' => 'control', - 'control' => 'ast-sortable', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), - 'section' => 'section-blog', - 'default' => astra_get_option( 'blog-meta' ), - 'priority' => 50, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', - 'operator' => 'contains', - 'value' => 'title-meta', - ), - ), - 'title' => __( 'Meta', 'astra' ), - 'choices' => array( - 'comments' => __( 'Comments', 'astra' ), - 'category' => __( 'Category', 'astra' ), - 'author' => __( 'Author', 'astra' ), - 'date' => __( 'Publish Date', 'astra' ), - 'tag' => __( 'Tag', 'astra' ), - ), - ); - } - - if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { - - $_configs[] = array( - 'name' => 'section-blog-ast-context-tabs', - 'section' => 'section-blog', - 'type' => 'control', - 'control' => 'ast-builder-header-control', - 'priority' => 0, - 'description' => '', - ); - - } - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - - } - } -} - - -new Astra_Blog_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[blog-width]', + 'default' => astra_get_option( 'blog-width' ), + 'type' => 'control', + 'control' => 'ast-selector', + 'section' => 'section-blog', + 'priority' => 50, + 'transport' => 'postMessage', + 'title' => __( 'Content Width', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'custom' => __( 'Custom', 'astra' ), + ), + 'responsive' => false, + 'renderAs' => 'text', + ), + + /** + * Option: Enter Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-max-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-blog', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'blog-max-width' ), + 'priority' => 50, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[blog-width]', + 'operator' => '===', + 'value' => 'custom', + ), + ), + 'title' => __( 'Custom Width', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 768, + 'step' => 1, + 'max' => 1920, + ), + ), + + /** + * Option: Blog Post Content + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-post-content]', + 'section' => 'section-blog', + 'title' => __( 'Post Content', 'astra' ), + 'default' => astra_get_option( 'blog-post-content' ), + 'type' => 'control', + 'control' => 'ast-selector', + 'priority' => 75, + 'choices' => array( + 'full-content' => __( 'Full Content', 'astra' ), + 'excerpt' => __( 'Excerpt', 'astra' ), + ), + 'responsive' => false, + 'renderAs' => 'text', + ), + + /** + * Option: Display Post Structure + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', + 'default' => astra_get_option( 'blog-post-structure' ), + 'type' => 'control', + 'control' => 'ast-sortable', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), + 'section' => 'section-blog', + 'priority' => 50, + 'title' => __( 'Post Structure', 'astra' ), + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + 'choices' => array( + 'image' => __( 'Featured Image', 'astra' ), + 'title-meta' => __( 'Title & Blog Meta', 'astra' ), + ), + ), + + ); + + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + $_configs[] = array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-meta]', + 'type' => 'control', + 'control' => 'ast-sortable', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), + 'section' => 'section-blog', + 'default' => astra_get_option( 'blog-meta' ), + 'priority' => 50, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', + 'operator' => 'contains', + 'value' => 'title-meta', + ), + ), + 'title' => __( 'Meta', 'astra' ), + 'choices' => array( + 'comments' => __( 'Comments', 'astra' ), + 'category' => __( 'Category', 'astra' ), + 'author' => __( 'Author', 'astra' ), + 'date' => __( 'Publish Date', 'astra' ), + 'tag' => __( 'Tag', 'astra' ), + ), + ); + } + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + + $_configs[] = array( + 'name' => 'section-blog-ast-context-tabs', + 'section' => 'section-blog', + 'type' => 'control', + 'control' => 'ast-builder-header-control', + 'priority' => 0, + 'description' => '', + ); + + } + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + + } + } +} + + +new Astra_Blog_Layout_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php b/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php index 7437479..9f8938e 100644 --- a/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php @@ -1,156 +1,156 @@ - ASTRA_THEME_SETTINGS . '[blog-single-width]', - 'type' => 'control', - 'control' => 'ast-selector', - 'section' => 'section-blog-single', - 'default' => astra_get_option( 'blog-single-width' ), - 'priority' => 5, - 'title' => __( 'Content Width', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'custom' => __( 'Custom', 'astra' ), - ), - 'transport' => 'postMessage', - 'responsive' => false, - 'renderAs' => 'text', - ), - - /** - * Option: Enter Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-single-max-width]', - 'type' => 'control', - 'control' => 'ast-slider', - 'section' => 'section-blog-single', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'blog-single-max-width' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-width]', - 'operator' => '===', - 'value' => 'custom', - ), - ), - 'priority' => 5, - 'title' => __( 'Custom Width', 'astra' ), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 768, - 'step' => 1, - 'max' => 1920, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - - /** - * Option: Display Post Structure - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]', - 'type' => 'control', - 'control' => 'ast-sortable', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), - 'section' => 'section-blog-single', - 'default' => astra_get_option( 'blog-single-post-structure' ), - 'priority' => 5, - 'title' => __( 'Structure', 'astra' ), - 'choices' => array( - 'single-image' => __( 'Featured Image', 'astra' ), - 'single-title-meta' => __( 'Title & Blog Meta', 'astra' ), - ), - ), - - ); - - if ( ! defined( 'ASTRA_EXT_VER' ) ) { - $_configs[] = array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-single-meta]', - 'type' => 'control', - 'control' => 'ast-sortable', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), - 'default' => astra_get_option( 'blog-single-meta' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]', - 'operator' => 'contains', - 'value' => 'single-title-meta', - ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'section' => 'section-blog-single', - 'priority' => 5, - 'title' => __( 'Meta', 'astra' ), - 'choices' => array( - 'comments' => __( 'Comments', 'astra' ), - 'category' => __( 'Category', 'astra' ), - 'author' => __( 'Author', 'astra' ), - 'date' => __( 'Publish Date', 'astra' ), - 'tag' => __( 'Tag', 'astra' ), - ), - ); - } - - if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { - - $_configs[] = array( - 'name' => 'section-blog-single-ast-context-tabs', - 'section' => 'section-blog-single', - 'type' => 'control', - 'control' => 'ast-builder-header-control', - 'priority' => 0, - 'description' => '', - ); - - } - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - - } - } -} - - -new Astra_Blog_Single_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[blog-single-width]', + 'type' => 'control', + 'control' => 'ast-selector', + 'section' => 'section-blog-single', + 'default' => astra_get_option( 'blog-single-width' ), + 'priority' => 5, + 'title' => __( 'Content Width', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'custom' => __( 'Custom', 'astra' ), + ), + 'transport' => 'postMessage', + 'responsive' => false, + 'renderAs' => 'text', + ), + + /** + * Option: Enter Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-single-max-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-blog-single', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'blog-single-max-width' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-width]', + 'operator' => '===', + 'value' => 'custom', + ), + ), + 'priority' => 5, + 'title' => __( 'Custom Width', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 768, + 'step' => 1, + 'max' => 1920, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + + /** + * Option: Display Post Structure + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]', + 'type' => 'control', + 'control' => 'ast-sortable', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), + 'section' => 'section-blog-single', + 'default' => astra_get_option( 'blog-single-post-structure' ), + 'priority' => 5, + 'title' => __( 'Structure', 'astra' ), + 'choices' => array( + 'single-image' => __( 'Featured Image', 'astra' ), + 'single-title-meta' => __( 'Title & Blog Meta', 'astra' ), + ), + ), + + ); + + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + $_configs[] = array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-single-meta]', + 'type' => 'control', + 'control' => 'ast-sortable', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), + 'default' => astra_get_option( 'blog-single-meta' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]', + 'operator' => 'contains', + 'value' => 'single-title-meta', + ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'section' => 'section-blog-single', + 'priority' => 5, + 'title' => __( 'Meta', 'astra' ), + 'choices' => array( + 'comments' => __( 'Comments', 'astra' ), + 'category' => __( 'Category', 'astra' ), + 'author' => __( 'Author', 'astra' ), + 'date' => __( 'Publish Date', 'astra' ), + 'tag' => __( 'Tag', 'astra' ), + ), + ); + } + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + + $_configs[] = array( + 'name' => 'section-blog-single-ast-context-tabs', + 'section' => 'section-blog-single', + 'type' => 'control', + 'control' => 'ast-builder-header-control', + 'priority' => 0, + 'description' => '', + ); + + } + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + + } + } +} + + +new Astra_Blog_Single_Layout_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php b/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php index 68eba96..79da36a 100644 --- a/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php @@ -1,482 +1,482 @@ - ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'type' => 'control', - 'control' => 'ast-radio-image', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), - 'default' => astra_get_option( 'footer-sml-layout' ), - 'section' => 'section-footer-small', - 'priority' => 5, - 'title' => __( 'Layout', 'astra' ), - 'choices' => array( - 'disabled' => array( - 'label' => __( 'Disabled', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ), - ), - 'footer-sml-layout-1' => array( - 'label' => __( 'Footer Bar Layout 1', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-1' ), - ), - 'footer-sml-layout-2' => array( - 'label' => __( 'Footer Bar Layout 2', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-2' ), - ), - ), - 'partial' => array( - 'selector' => '.ast-small-footer', - 'container_inclusive' => false, - ), - ), - - /** - * Section: Section 1 - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]', - 'control' => 'ast-selector', - 'default' => astra_get_option( 'footer-sml-section-1' ), - 'type' => 'control', - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'section' => 'section-footer-small', - 'priority' => 15, - 'title' => __( 'Section 1', 'astra' ), - 'divider' => array( 'ast_class' => 'ast-top-divider' ), - 'choices' => array( - '' => __( 'None', 'astra' ), - 'custom' => __( 'Text', 'astra' ), - 'widget' => __( 'Widget', 'astra' ), - 'menu' => __( 'Footer Menu', 'astra' ), - ), - 'partial' => array( - 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-1-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-1 .footer-primary-navigation .nav-menu', - 'container_inclusive' => false, - ), - 'responsive' => false, - 'renderAs' => 'text', - ), - /** - * Option: Section 1 Custom Text - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1-credit]', - 'default' => astra_get_option( 'footer-sml-section-1-credit' ), - 'type' => 'control', - 'control' => 'textarea', - 'transport' => 'postMessage', - 'section' => 'section-footer-small', - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]', - 'operator' => '==', - 'value' => array( 'custom' ), - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'priority' => 20, - 'title' => __( 'Section 1 Custom Text', 'astra' ), - 'choices' => array( - '' => __( 'None', 'astra' ), - 'custom' => __( 'Custom Text', 'astra' ), - 'widget' => __( 'Widget', 'astra' ), - 'menu' => __( 'Footer Menu', 'astra' ), - ), - 'partial' => array( - 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-1:has(> .ast-footer-site-title)', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_1_credit', - ), - ), - - /** - * Option: Section 2 - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]', - 'type' => 'control', - 'control' => 'ast-selector', - 'default' => astra_get_option( 'footer-sml-section-2' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'section' => 'section-footer-small', - 'priority' => 25, - 'title' => __( 'Section 2', 'astra' ), - 'choices' => array( - '' => __( 'None', 'astra' ), - 'custom' => __( 'Text', 'astra' ), - 'widget' => __( 'Widget', 'astra' ), - 'menu' => __( 'Footer Menu', 'astra' ), - ), - 'partial' => array( - 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-2-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-2 .footer-primary-navigation .nav-menu', - 'container_inclusive' => false, - ), - 'responsive' => false, - 'renderAs' => 'text', - ), - - /** - * Option: Section 2 Custom Text - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2-credit]', - 'type' => 'control', - 'control' => 'textarea', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'footer-sml-section-2-credit' ), - 'section' => 'section-footer-small', - 'priority' => 30, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]', - 'operator' => '==', - 'value' => 'custom', - ), - ), - 'title' => __( 'Section 2 Custom Text', 'astra' ), - 'partial' => array( - 'selector' => '.ast-small-footer-section-2', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_2_credit', - ), - 'partial' => array( - 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-2:has(> .ast-footer-site-title)', - 'container_inclusive' => false, - ), - ), - - /** - * Option: Footer Top Border - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]', - 'type' => 'control', - 'control' => 'ast-slider', - 'default' => astra_get_option( 'footer-sml-divider' ), - 'section' => 'section-footer-small', - 'priority' => 40, - 'suffix' => 'px', - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'title' => __( 'Border Size', 'astra' ), - 'transport' => 'postMessage', - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 600, - ), - ), - - /** - * Option: Footer Top Border Color - */ - - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider-color]', - 'section' => 'section-footer-small', - 'default' => astra_get_option( 'footer-sml-divider-color', '#7a7a7a' ), - 'type' => 'control', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]', - 'operator' => '>=', - 'value' => 1, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'priority' => 45, - 'title' => __( 'Border Color', 'astra' ), - 'transport' => 'postMessage', - ), - - /** - * Option: Footer Bar Content Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]', - 'default' => astra_get_option( 'footer-bar-background-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Background Color', 'astra' ), - 'section' => 'section-footer-small', - 'transport' => 'postMessage', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'priority' => 47, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - ), - - /** - * Option: Footer Bar Content Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]', - 'default' => astra_get_option( 'footer-bar-content-group' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Content Colors', 'astra' ), - 'section' => 'section-footer-small', - 'transport' => 'postMessage', - 'priority' => 47, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - ), - - /** - * Option: Footer Bar Content Group - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', - 'default' => astra_get_option( 'footer-bar-link-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => __( 'Link Color', 'astra' ), - 'section' => 'section-footer-small', - 'transport' => 'postMessage', - 'priority' => 47, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - ), - - /** - * Option: Header Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-layout-width]', - 'type' => 'control', - 'control' => 'ast-selector', - 'default' => astra_get_option( 'footer-layout-width' ), - 'section' => 'section-footer-small', - 'divider' => array( 'ast_class' => 'ast-top-divider ast-bottom-divider' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', - 'operator' => '!=', - 'value' => 'ast-box-layout', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', - 'operator' => '!=', - 'value' => 'ast-fluid-width-layout', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'priority' => 35, - 'title' => __( 'Width', 'astra' ), - 'choices' => array( - 'full' => __( 'Full Width', 'astra' ), - 'content' => __( 'Content Width', 'astra' ), - ), - 'responsive' => false, - 'renderAs' => 'text', - ), - - /** - * Option: Footer Top Border - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-width]', - 'type' => 'control', - 'control' => 'ast-slider', - 'transport' => 'postMessage', - 'section' => 'section-footer-adv', - 'default' => astra_get_option( 'footer-adv-border-width' ), - 'priority' => 40, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'suffix' => 'px', - 'title' => __( 'Top Border Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 600, - ), - ), - - /** - * Option: Footer Top Border Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-color]', - 'section' => 'section-footer-adv', - 'title' => __( 'Top Border Color', 'astra' ), - 'type' => 'control', - 'transport' => 'postMessage', - 'control' => 'ast-color', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'default' => astra_get_option( 'footer-adv-border-color' ), - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'operator' => '!=', - 'value' => 'disabled', - ), - ), - 'priority' => 45, - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - // Learn More link if Astra Pro is not activated. - if ( ! defined( 'ASTRA_EXT_VER' ) || ( defined( 'ASTRA_EXT_VER' ) && false === Astra_Ext_Extension::is_active( 'advanced-footer' ) ) ) { - - $config = array( - - /** - * Option: Footer Widgets Layout Layout - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[footer-adv]', - 'type' => 'control', - 'priority' => 0, - 'control' => 'ast-radio-image', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), - 'default' => astra_get_option( 'footer-adv' ), - 'title' => __( 'Layout', 'astra' ), - 'section' => 'section-footer-adv', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'choices' => array( - 'disabled' => array( - 'label' => __( 'Disable', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ), - ), - 'layout-4' => array( - 'label' => __( 'Layout 4', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-4' ), - ), - ), - 'partial' => array( - 'selector' => '.footer-adv .ast-container', - 'container_inclusive' => false, - ), - ), - - /** - * Option: Learn More about Footer Widget - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-footer-widget-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-footer-adv', - 'priority' => 999, - 'label' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - ), - - ); - - $configurations = array_merge( $configurations, $config ); - } - - return $configurations; - - } - } -} - - -new Astra_Footer_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'type' => 'control', + 'control' => 'ast-radio-image', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), + 'default' => astra_get_option( 'footer-sml-layout' ), + 'section' => 'section-footer-small', + 'priority' => 5, + 'title' => __( 'Layout', 'astra' ), + 'choices' => array( + 'disabled' => array( + 'label' => __( 'Disabled', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ), + ), + 'footer-sml-layout-1' => array( + 'label' => __( 'Footer Bar Layout 1', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-1' ), + ), + 'footer-sml-layout-2' => array( + 'label' => __( 'Footer Bar Layout 2', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-2' ), + ), + ), + 'partial' => array( + 'selector' => '.ast-small-footer', + 'container_inclusive' => false, + ), + ), + + /** + * Section: Section 1 + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]', + 'control' => 'ast-selector', + 'default' => astra_get_option( 'footer-sml-section-1' ), + 'type' => 'control', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'section' => 'section-footer-small', + 'priority' => 15, + 'title' => __( 'Section 1', 'astra' ), + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + 'choices' => array( + '' => __( 'None', 'astra' ), + 'custom' => __( 'Text', 'astra' ), + 'widget' => __( 'Widget', 'astra' ), + 'menu' => __( 'Footer Menu', 'astra' ), + ), + 'partial' => array( + 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-1-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-1 .footer-primary-navigation .nav-menu', + 'container_inclusive' => false, + ), + 'responsive' => false, + 'renderAs' => 'text', + ), + /** + * Option: Section 1 Custom Text + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1-credit]', + 'default' => astra_get_option( 'footer-sml-section-1-credit' ), + 'type' => 'control', + 'control' => 'textarea', + 'transport' => 'postMessage', + 'section' => 'section-footer-small', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]', + 'operator' => '==', + 'value' => array( 'custom' ), + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'priority' => 20, + 'title' => __( 'Section 1 Custom Text', 'astra' ), + 'choices' => array( + '' => __( 'None', 'astra' ), + 'custom' => __( 'Custom Text', 'astra' ), + 'widget' => __( 'Widget', 'astra' ), + 'menu' => __( 'Footer Menu', 'astra' ), + ), + 'partial' => array( + 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-1:has(> .ast-footer-site-title)', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_1_credit', + ), + ), + + /** + * Option: Section 2 + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]', + 'type' => 'control', + 'control' => 'ast-selector', + 'default' => astra_get_option( 'footer-sml-section-2' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'section' => 'section-footer-small', + 'priority' => 25, + 'title' => __( 'Section 2', 'astra' ), + 'choices' => array( + '' => __( 'None', 'astra' ), + 'custom' => __( 'Text', 'astra' ), + 'widget' => __( 'Widget', 'astra' ), + 'menu' => __( 'Footer Menu', 'astra' ), + ), + 'partial' => array( + 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-2-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-2 .footer-primary-navigation .nav-menu', + 'container_inclusive' => false, + ), + 'responsive' => false, + 'renderAs' => 'text', + ), + + /** + * Option: Section 2 Custom Text + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2-credit]', + 'type' => 'control', + 'control' => 'textarea', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'footer-sml-section-2-credit' ), + 'section' => 'section-footer-small', + 'priority' => 30, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]', + 'operator' => '==', + 'value' => 'custom', + ), + ), + 'title' => __( 'Section 2 Custom Text', 'astra' ), + 'partial' => array( + 'selector' => '.ast-small-footer-section-2', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_2_credit', + ), + 'partial' => array( + 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-2:has(> .ast-footer-site-title)', + 'container_inclusive' => false, + ), + ), + + /** + * Option: Footer Top Border + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'footer-sml-divider' ), + 'section' => 'section-footer-small', + 'priority' => 40, + 'suffix' => 'px', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'title' => __( 'Border Size', 'astra' ), + 'transport' => 'postMessage', + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 600, + ), + ), + + /** + * Option: Footer Top Border Color + */ + + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider-color]', + 'section' => 'section-footer-small', + 'default' => astra_get_option( 'footer-sml-divider-color', '#7a7a7a' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]', + 'operator' => '>=', + 'value' => 1, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'priority' => 45, + 'title' => __( 'Border Color', 'astra' ), + 'transport' => 'postMessage', + ), + + /** + * Option: Footer Bar Content Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]', + 'default' => astra_get_option( 'footer-bar-background-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Background Color', 'astra' ), + 'section' => 'section-footer-small', + 'transport' => 'postMessage', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'priority' => 47, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + ), + + /** + * Option: Footer Bar Content Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]', + 'default' => astra_get_option( 'footer-bar-content-group' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Content Colors', 'astra' ), + 'section' => 'section-footer-small', + 'transport' => 'postMessage', + 'priority' => 47, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + ), + + /** + * Option: Footer Bar Content Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]', + 'default' => astra_get_option( 'footer-bar-link-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Link Color', 'astra' ), + 'section' => 'section-footer-small', + 'transport' => 'postMessage', + 'priority' => 47, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + ), + + /** + * Option: Header Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-layout-width]', + 'type' => 'control', + 'control' => 'ast-selector', + 'default' => astra_get_option( 'footer-layout-width' ), + 'section' => 'section-footer-small', + 'divider' => array( 'ast_class' => 'ast-top-divider ast-bottom-divider' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', + 'operator' => '!=', + 'value' => 'ast-box-layout', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', + 'operator' => '!=', + 'value' => 'ast-fluid-width-layout', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'priority' => 35, + 'title' => __( 'Width', 'astra' ), + 'choices' => array( + 'full' => __( 'Full Width', 'astra' ), + 'content' => __( 'Content Width', 'astra' ), + ), + 'responsive' => false, + 'renderAs' => 'text', + ), + + /** + * Option: Footer Top Border + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'section' => 'section-footer-adv', + 'default' => astra_get_option( 'footer-adv-border-width' ), + 'priority' => 40, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'suffix' => 'px', + 'title' => __( 'Top Border Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 600, + ), + ), + + /** + * Option: Footer Top Border Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-color]', + 'section' => 'section-footer-adv', + 'title' => __( 'Top Border Color', 'astra' ), + 'type' => 'control', + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'default' => astra_get_option( 'footer-adv-border-color' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'operator' => '!=', + 'value' => 'disabled', + ), + ), + 'priority' => 45, + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + // Learn More link if Astra Pro is not activated. + if ( ! defined( 'ASTRA_EXT_VER' ) || ( defined( 'ASTRA_EXT_VER' ) && false === Astra_Ext_Extension::is_active( 'advanced-footer' ) ) ) { + + $config = array( + + /** + * Option: Footer Widgets Layout Layout + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[footer-adv]', + 'type' => 'control', + 'priority' => 0, + 'control' => 'ast-radio-image', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), + 'default' => astra_get_option( 'footer-adv' ), + 'title' => __( 'Layout', 'astra' ), + 'section' => 'section-footer-adv', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'choices' => array( + 'disabled' => array( + 'label' => __( 'Disable', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ), + ), + 'layout-4' => array( + 'label' => __( 'Layout 4', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-4' ), + ), + ), + 'partial' => array( + 'selector' => '.footer-adv .ast-container', + 'container_inclusive' => false, + ), + ), + + /** + * Option: Learn More about Footer Widget + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-footer-widget-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-footer-adv', + 'priority' => 999, + 'label' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + ), + + ); + + $configurations = array_merge( $configurations, $config ); + } + + return $configurations; + + } + } +} + + +new Astra_Footer_Layout_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-header-layout-configs.php b/inc/customizer/configurations/layout/class-astra-header-layout-configs.php index 29d25df..8c6549e 100644 --- a/inc/customizer/configurations/layout/class-astra-header-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-header-layout-configs.php @@ -1,684 +1,684 @@ - ASTRA_THEME_SETTINGS . '[header-layouts]', - 'default' => astra_get_option( 'header-layouts' ), - 'section' => 'section-header', - 'priority' => 4, - 'title' => __( 'Layout', 'astra' ), - 'type' => 'control', - 'control' => 'ast-radio-image', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), - 'choices' => array( - 'header-main-layout-1' => array( - 'label' => __( 'Logo Left', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-1' ), - ), - 'header-main-layout-2' => array( - 'label' => __( 'Logo Center', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-2' ), - ), - 'header-main-layout-3' => array( - 'label' => __( 'Logo Right', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-3' ), - ), - ), - ), - - /** - * Option: Header Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-layout-width]', - 'default' => astra_get_option( 'header-main-layout-width' ), - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-header', - 'priority' => 4, - 'title' => __( 'Width', 'astra' ), - 'choices' => array( - 'full' => __( 'Full Width', 'astra' ), - 'content' => __( 'Content Width', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Bottom Border Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep]', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-sep' ), - 'type' => 'control', - 'control' => 'number', - 'section' => 'section-header', - 'priority' => 4, - 'title' => __( 'Bottom Border Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 600, - ), - ), - - /** - * Option: Bottom Border Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep-color]', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-sep-color' ), - 'type' => 'control', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-sep]', - 'operator' => '>=', - 'value' => 1, - ), - ), - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'section' => 'section-header', - 'priority' => 4, - 'title' => __( 'Bottom Border Color', 'astra' ), - ), - - array( - 'name' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', - 'default' => astra_get_option( 'disable-primary-nav' ), - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'section' => 'section-primary-menu', - 'title' => __( 'Disable Menu', 'astra' ), - 'priority' => 5, - 'partial' => array( - 'selector' => '.main-header-bar .main-navigation', - 'container_inclusive' => false, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'default' => astra_get_option( 'header-main-rt-section' ), - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-primary-menu', - 'priority' => 7, - 'title' => __( 'Last Item in Menu', 'astra' ), - 'choices' => apply_filters( - 'astra_header_section_elements', - array( - 'none' => __( 'None', 'astra' ), - 'search' => __( 'Search', 'astra' ), - 'button' => __( 'Button', 'astra' ), - 'text-html' => __( 'Text / HTML', 'astra' ), - 'widget' => __( 'Widget', 'astra' ), - ), - 'primary-header' - ), - 'partial' => array( - 'selector' => '.main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.search-custom-menu-item .ast-search-icon .astra-search-icon, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.woocommerce-custom-menu-item, .main-header-bar .ast-masthead-custom-menu-items.widget-custom-menu-item .ast-header-widget-area .widget.ast-no-widget-row, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.edd-custom-menu-item', - 'container_inclusive' => false, - ), - ), - - /** - * Option: Button Text - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-text]', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-rt-section-button-text' ), - 'type' => 'control', - 'control' => 'text', - 'section' => 'section-primary-menu', - 'partial' => array( - 'selector' => '.button-custom-menu-item', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_button_text', - ), - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '===', - 'value' => 'button', - ), - ), - 'priority' => 10, - 'title' => __( 'Button Text', 'astra' ), - ), - - /** - * Option: Button Link - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-link-option]', - 'default' => astra_get_option( 'header-main-rt-section-button-link-option' ), - 'type' => 'control', - 'control' => 'ast-link', - 'section' => 'section-primary-menu', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '===', - 'value' => 'button', - ), - ), - 'priority' => 10, - 'title' => __( 'Button Link', 'astra' ), - ), - - /** - * Option: Button Style - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'default' => astra_get_option( 'header-main-rt-section-button-style' ), - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-primary-menu', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '===', - 'value' => 'button', - ), - ), - 'priority' => 10, - 'choices' => array( - 'theme-button' => __( 'Theme Button', 'astra' ), - 'custom-button' => __( 'Header Button', 'astra' ), - ), - 'title' => __( 'Button Style', 'astra' ), - ), - - /** - * Option: Theme Button Style edit link - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-button-style-link]', - 'default' => astra_get_option( 'header-button-style-link' ), - 'type' => 'control', - 'control' => 'ast-customizer-link', - 'section' => 'section-primary-menu', - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '===', - 'value' => 'button', - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', - 'operator' => '===', - 'value' => 'theme-button', - ), - ), - 'priority' => 10, - 'link_type' => 'section', - 'linked' => 'section-buttons', - 'link_text' => __( 'Customize Button Style.', 'astra' ), - ), - - /** - * Option: Right Section Text / HTML - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-html]', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-rt-section-html' ), - 'type' => 'control', - 'control' => 'textarea', - 'section' => 'section-primary-menu', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '===', - 'value' => 'text-html', - ), - ), - 'priority' => 10, - 'partial' => array( - 'selector' => '.main-header-bar .ast-masthead-custom-menu-items .ast-custom-html', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_html', - ), - 'title' => __( 'Custom Menu Text / HTML', 'astra' ), - ), - - array( - 'name' => 'primary-header-sub-menu-label-divider', - 'type' => 'control', - 'control' => 'ast-heading', - 'priority' => 30, - 'title' => __( 'Sub Menu', 'astra' ), - 'section' => 'section-primary-menu', - 'settings' => array(), - ), - - /** - * Option: Submenu Container Animation - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-submenu-container-animation]', - 'default' => astra_get_option( 'header-main-submenu-container-animation' ), - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-primary-menu', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', - 'operator' => '!=', - 'value' => true, - ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'priority' => 30, - 'title' => __( 'Submenu Animation', 'astra' ), - 'choices' => array( - '' => __( 'None', 'astra' ), - 'slide-down' => __( 'Slide Down', 'astra' ), - 'slide-up' => __( 'Slide Up', 'astra' ), - 'fade' => __( 'Fade', 'astra' ), - ), - ), - - // Option: Primary Menu Border. - array( - 'type' => 'control', - 'control' => 'ast-border', - 'transport' => 'postMessage', - 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-border]', - 'section' => 'section-primary-menu', - 'linked_choices' => true, - 'priority' => 30, - 'default' => astra_get_option( 'primary-submenu-border' ), - 'title' => __( 'Container Border', 'astra' ), - 'choices' => array( - 'top' => __( 'Top', 'astra' ), - 'right' => __( 'Right', 'astra' ), - 'bottom' => __( 'Bottom', 'astra' ), - 'left' => __( 'Left', 'astra' ), - ), - ), - - // Option: Submenu Container Border Color. - array( - 'type' => 'control', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'transport' => 'postMessage', - 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-b-color]', - 'default' => astra_get_option( 'primary-submenu-b-color' ), - 'title' => __( 'Border Color', 'astra' ), - 'section' => 'section-primary-menu', - 'priority' => 30, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - array( - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'transport' => 'postMessage', - 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]', - 'section' => 'section-primary-menu', - 'priority' => 30, - 'default' => astra_get_option( 'primary-submenu-item-border' ), - 'title' => __( 'Submenu Divider', 'astra' ), - ), - - // Option: Submenu item Border Color. - array( - 'type' => 'control', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'transport' => 'postMessage', - 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-b-color]', - 'default' => astra_get_option( 'primary-submenu-item-b-color' ), - 'title' => __( 'Divider Color', 'astra' ), - 'section' => 'section-primary-menu', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]', - 'operator' => '==', - 'value' => true, - ), - ), - 'priority' => 30, - ), - - /** - * Option: Mobile Menu Label Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label-divider]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-header', - 'priority' => 35, - 'title' => __( 'Mobile Header', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Mobile Menu Alignment - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-align]', - 'default' => astra_get_option( 'header-main-menu-align' ), - 'type' => 'control', - 'control' => 'ast-radio-image', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), - 'choices' => array( - 'inline' => array( - 'label' => __( 'Inline', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-inline' ), - ), - 'stack' => array( - 'label' => __( 'Stack', 'astra' ), - 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-stack' ), - ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'section' => 'section-header', - 'priority' => 40, - 'title' => __( 'Layout', 'astra' ), - ), - - /** - * Option: Hide Last item in Menu on mobile device - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]', - 'default' => astra_get_option( 'hide-custom-menu-mobile' ), - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => 'in', - 'value' => array( 'button', 'text-html' ), - ), - ), - 'section' => 'section-primary-menu', - 'title' => __( 'Hide Last Item in Menu on Mobile', 'astra' ), - 'priority' => 7, - 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), - ), - - /** - * Option: Display outside menu - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-display-outside-menu]', - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]', - 'operator' => '!=', - 'value' => '1', - ), - ), - 'default' => astra_get_option( 'header-display-outside-menu' ), - 'section' => 'section-primary-menu', - 'title' => __( 'Take Last Item Outside Menu', 'astra' ), - 'priority' => 7, - ), - - array( - 'name' => 'primary-menu-label-divider', - 'type' => 'control', - 'control' => 'ast-heading', - 'priority' => 39, - 'title' => __( 'Mobile Menu', 'astra' ), - 'section' => 'section-primary-menu', - 'settings' => array(), - ), - - /** - * Option: Mobile Header Breakpoint - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-breakpoint]', - 'default' => astra_get_option( 'mobile-header-breakpoint' ), - 'type' => 'control', - 'control' => 'ast-slider', - 'section' => 'section-primary-menu', - 'priority' => 40, - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'title' => __( 'Menu Breakpoint', 'astra' ), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 0, - 'step' => 10, - 'max' => 6000, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Notice to add # link to parent menu when Link option selected in Dropdown Target. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target-link-notice]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-header', - 'priority' => 41, - 'title' => '', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]', - 'operator' => '==', - 'value' => 'link', - ), - ), - 'help' => __( 'The parent menu should have a # link for the submenu to open on a link.', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Mobile Menu Label. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label]', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-main-menu-label' ), - 'section' => 'section-primary-menu', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => array( - 'relation' => 'AND', - ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab, - array( - 'relation' => 'OR', - array( - 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', - 'operator' => '!=', - 'value' => array( 'none' ), - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', - 'operator' => '!=', - 'value' => array( '1' ), - ), - ), - ), - 'priority' => 40, - 'title' => __( 'Menu Label', 'astra' ), - 'type' => 'control', - 'control' => 'text', - 'partial' => array( - 'selector' => '.ast-button-wrap', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Customizer_Partials::mobile_toggle_menu', - ), - ), - - /** - * Option: Toggle Button Style - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]', - 'default' => astra_get_option( 'mobile-header-toggle-btn-style' ), - 'section' => 'section-primary-menu', - 'title' => __( 'Toggle Button Style', 'astra' ), - 'type' => 'control', - 'control' => 'ast-select', - 'priority' => 42, - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', - 'operator' => '!=', - 'value' => true, - ), - ), - 'choices' => array( - 'fill' => __( 'Fill', 'astra' ), - 'outline' => __( 'Outline', 'astra' ), - 'minimal' => __( 'Minimal', 'astra' ), - ), - ), - - /** - * Option: Toggle Button Color - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style-color]', - 'default' => astra_get_option( 'mobile-header-toggle-btn-style-color' ), - 'type' => 'control', - 'control' => 'ast-color', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[mobile-menu-style]', - 'operator' => '!=', - 'value' => 'no-toggle', - ), - ), - 'title' => __( 'Toggle Button Color', 'astra' ), - 'section' => 'section-primary-menu', - 'transport' => 'postMessage', - 'priority' => 42, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Border Radius - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-border-radius]', - 'default' => astra_get_option( 'mobile-header-toggle-btn-border-radius' ), - 'type' => 'control', - 'control' => 'ast-slider', - 'section' => 'section-primary-menu', - 'title' => __( 'Border Radius', 'astra' ), - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]', - 'operator' => '!=', - 'value' => 'minimal', - ), - ), - 'priority' => 42, - 'suffix' => 'px', - 'transport' => 'postMessage', - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 100, - ), - ), - - /** - * Option: Toggle on click of button or link. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]', - 'default' => astra_get_option( 'mobile-header-toggle-target' ), - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-primary-menu', - 'priority' => 42, - 'title' => __( 'Dropdown Target', 'astra' ), - 'suffix' => '', - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'choices' => array( - 'icon' => __( 'Icon', 'astra' ), - 'link' => __( 'Link', 'astra' ), - ), - ), - - ); - - $configurations = array_merge( $configurations, $_configs ); - - // Learn More link if Astra Pro is not activated. - if ( ! defined( 'ASTRA_EXT_VER' ) ) { - - $config = array( - - /** - * Option: Learn More about Mobile Header - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-header', - 'priority' => 999, - 'title' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - ); - - $configurations = array_merge( $configurations, $config ); - } - - return $configurations; - } - } -} - - -new Astra_Header_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[header-layouts]', + 'default' => astra_get_option( 'header-layouts' ), + 'section' => 'section-header', + 'priority' => 4, + 'title' => __( 'Layout', 'astra' ), + 'type' => 'control', + 'control' => 'ast-radio-image', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), + 'choices' => array( + 'header-main-layout-1' => array( + 'label' => __( 'Logo Left', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-1' ), + ), + 'header-main-layout-2' => array( + 'label' => __( 'Logo Center', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-2' ), + ), + 'header-main-layout-3' => array( + 'label' => __( 'Logo Right', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-3' ), + ), + ), + ), + + /** + * Option: Header Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-layout-width]', + 'default' => astra_get_option( 'header-main-layout-width' ), + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-header', + 'priority' => 4, + 'title' => __( 'Width', 'astra' ), + 'choices' => array( + 'full' => __( 'Full Width', 'astra' ), + 'content' => __( 'Content Width', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Bottom Border Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep]', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-sep' ), + 'type' => 'control', + 'control' => 'number', + 'section' => 'section-header', + 'priority' => 4, + 'title' => __( 'Bottom Border Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 600, + ), + ), + + /** + * Option: Bottom Border Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep-color]', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-sep-color' ), + 'type' => 'control', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-sep]', + 'operator' => '>=', + 'value' => 1, + ), + ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-header', + 'priority' => 4, + 'title' => __( 'Bottom Border Color', 'astra' ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', + 'default' => astra_get_option( 'disable-primary-nav' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'section' => 'section-primary-menu', + 'title' => __( 'Disable Menu', 'astra' ), + 'priority' => 5, + 'partial' => array( + 'selector' => '.main-header-bar .main-navigation', + 'container_inclusive' => false, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'default' => astra_get_option( 'header-main-rt-section' ), + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-primary-menu', + 'priority' => 7, + 'title' => __( 'Last Item in Menu', 'astra' ), + 'choices' => apply_filters( + 'astra_header_section_elements', + array( + 'none' => __( 'None', 'astra' ), + 'search' => __( 'Search', 'astra' ), + 'button' => __( 'Button', 'astra' ), + 'text-html' => __( 'Text / HTML', 'astra' ), + 'widget' => __( 'Widget', 'astra' ), + ), + 'primary-header' + ), + 'partial' => array( + 'selector' => '.main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.search-custom-menu-item .ast-search-icon .astra-search-icon, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.woocommerce-custom-menu-item, .main-header-bar .ast-masthead-custom-menu-items.widget-custom-menu-item .ast-header-widget-area .widget.ast-no-widget-row, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.edd-custom-menu-item', + 'container_inclusive' => false, + ), + ), + + /** + * Option: Button Text + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-text]', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-rt-section-button-text' ), + 'type' => 'control', + 'control' => 'text', + 'section' => 'section-primary-menu', + 'partial' => array( + 'selector' => '.button-custom-menu-item', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_button_text', + ), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '===', + 'value' => 'button', + ), + ), + 'priority' => 10, + 'title' => __( 'Button Text', 'astra' ), + ), + + /** + * Option: Button Link + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-link-option]', + 'default' => astra_get_option( 'header-main-rt-section-button-link-option' ), + 'type' => 'control', + 'control' => 'ast-link', + 'section' => 'section-primary-menu', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '===', + 'value' => 'button', + ), + ), + 'priority' => 10, + 'title' => __( 'Button Link', 'astra' ), + ), + + /** + * Option: Button Style + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'default' => astra_get_option( 'header-main-rt-section-button-style' ), + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-primary-menu', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '===', + 'value' => 'button', + ), + ), + 'priority' => 10, + 'choices' => array( + 'theme-button' => __( 'Theme Button', 'astra' ), + 'custom-button' => __( 'Header Button', 'astra' ), + ), + 'title' => __( 'Button Style', 'astra' ), + ), + + /** + * Option: Theme Button Style edit link + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-button-style-link]', + 'default' => astra_get_option( 'header-button-style-link' ), + 'type' => 'control', + 'control' => 'ast-customizer-link', + 'section' => 'section-primary-menu', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '===', + 'value' => 'button', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]', + 'operator' => '===', + 'value' => 'theme-button', + ), + ), + 'priority' => 10, + 'link_type' => 'section', + 'linked' => 'section-buttons', + 'link_text' => __( 'Customize Button Style.', 'astra' ), + ), + + /** + * Option: Right Section Text / HTML + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-html]', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-rt-section-html' ), + 'type' => 'control', + 'control' => 'textarea', + 'section' => 'section-primary-menu', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '===', + 'value' => 'text-html', + ), + ), + 'priority' => 10, + 'partial' => array( + 'selector' => '.main-header-bar .ast-masthead-custom-menu-items .ast-custom-html', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_html', + ), + 'title' => __( 'Custom Menu Text / HTML', 'astra' ), + ), + + array( + 'name' => 'primary-header-sub-menu-label-divider', + 'type' => 'control', + 'control' => 'ast-heading', + 'priority' => 30, + 'title' => __( 'Sub Menu', 'astra' ), + 'section' => 'section-primary-menu', + 'settings' => array(), + ), + + /** + * Option: Submenu Container Animation + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-submenu-container-animation]', + 'default' => astra_get_option( 'header-main-submenu-container-animation' ), + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-primary-menu', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', + 'operator' => '!=', + 'value' => true, + ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'priority' => 30, + 'title' => __( 'Submenu Animation', 'astra' ), + 'choices' => array( + '' => __( 'None', 'astra' ), + 'slide-down' => __( 'Slide Down', 'astra' ), + 'slide-up' => __( 'Slide Up', 'astra' ), + 'fade' => __( 'Fade', 'astra' ), + ), + ), + + // Option: Primary Menu Border. + array( + 'type' => 'control', + 'control' => 'ast-border', + 'transport' => 'postMessage', + 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-border]', + 'section' => 'section-primary-menu', + 'linked_choices' => true, + 'priority' => 30, + 'default' => astra_get_option( 'primary-submenu-border' ), + 'title' => __( 'Container Border', 'astra' ), + 'choices' => array( + 'top' => __( 'Top', 'astra' ), + 'right' => __( 'Right', 'astra' ), + 'bottom' => __( 'Bottom', 'astra' ), + 'left' => __( 'Left', 'astra' ), + ), + ), + + // Option: Submenu Container Border Color. + array( + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'transport' => 'postMessage', + 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-b-color]', + 'default' => astra_get_option( 'primary-submenu-b-color' ), + 'title' => __( 'Border Color', 'astra' ), + 'section' => 'section-primary-menu', + 'priority' => 30, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + array( + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'transport' => 'postMessage', + 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]', + 'section' => 'section-primary-menu', + 'priority' => 30, + 'default' => astra_get_option( 'primary-submenu-item-border' ), + 'title' => __( 'Submenu Divider', 'astra' ), + ), + + // Option: Submenu item Border Color. + array( + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'transport' => 'postMessage', + 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-b-color]', + 'default' => astra_get_option( 'primary-submenu-item-b-color' ), + 'title' => __( 'Divider Color', 'astra' ), + 'section' => 'section-primary-menu', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]', + 'operator' => '==', + 'value' => true, + ), + ), + 'priority' => 30, + ), + + /** + * Option: Mobile Menu Label Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label-divider]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-header', + 'priority' => 35, + 'title' => __( 'Mobile Header', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Mobile Menu Alignment + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-align]', + 'default' => astra_get_option( 'header-main-menu-align' ), + 'type' => 'control', + 'control' => 'ast-radio-image', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), + 'choices' => array( + 'inline' => array( + 'label' => __( 'Inline', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-inline' ), + ), + 'stack' => array( + 'label' => __( 'Stack', 'astra' ), + 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-stack' ), + ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'section' => 'section-header', + 'priority' => 40, + 'title' => __( 'Layout', 'astra' ), + ), + + /** + * Option: Hide Last item in Menu on mobile device + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]', + 'default' => astra_get_option( 'hide-custom-menu-mobile' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => 'in', + 'value' => array( 'button', 'text-html' ), + ), + ), + 'section' => 'section-primary-menu', + 'title' => __( 'Hide Last Item in Menu on Mobile', 'astra' ), + 'priority' => 7, + 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), + ), + + /** + * Option: Display outside menu + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-display-outside-menu]', + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]', + 'operator' => '!=', + 'value' => '1', + ), + ), + 'default' => astra_get_option( 'header-display-outside-menu' ), + 'section' => 'section-primary-menu', + 'title' => __( 'Take Last Item Outside Menu', 'astra' ), + 'priority' => 7, + ), + + array( + 'name' => 'primary-menu-label-divider', + 'type' => 'control', + 'control' => 'ast-heading', + 'priority' => 39, + 'title' => __( 'Mobile Menu', 'astra' ), + 'section' => 'section-primary-menu', + 'settings' => array(), + ), + + /** + * Option: Mobile Header Breakpoint + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-breakpoint]', + 'default' => astra_get_option( 'mobile-header-breakpoint' ), + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-primary-menu', + 'priority' => 40, + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Menu Breakpoint', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 0, + 'step' => 10, + 'max' => 6000, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Notice to add # link to parent menu when Link option selected in Dropdown Target. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target-link-notice]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-header', + 'priority' => 41, + 'title' => '', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]', + 'operator' => '==', + 'value' => 'link', + ), + ), + 'help' => __( 'The parent menu should have a # link for the submenu to open on a link.', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Mobile Menu Label. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label]', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-main-menu-label' ), + 'section' => 'section-primary-menu', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => array( + 'relation' => 'AND', + ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]', + 'operator' => '!=', + 'value' => array( 'none' ), + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', + 'operator' => '!=', + 'value' => array( '1' ), + ), + ), + ), + 'priority' => 40, + 'title' => __( 'Menu Label', 'astra' ), + 'type' => 'control', + 'control' => 'text', + 'partial' => array( + 'selector' => '.ast-button-wrap', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::mobile_toggle_menu', + ), + ), + + /** + * Option: Toggle Button Style + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]', + 'default' => astra_get_option( 'mobile-header-toggle-btn-style' ), + 'section' => 'section-primary-menu', + 'title' => __( 'Toggle Button Style', 'astra' ), + 'type' => 'control', + 'control' => 'ast-select', + 'priority' => 42, + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]', + 'operator' => '!=', + 'value' => true, + ), + ), + 'choices' => array( + 'fill' => __( 'Fill', 'astra' ), + 'outline' => __( 'Outline', 'astra' ), + 'minimal' => __( 'Minimal', 'astra' ), + ), + ), + + /** + * Option: Toggle Button Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style-color]', + 'default' => astra_get_option( 'mobile-header-toggle-btn-style-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[mobile-menu-style]', + 'operator' => '!=', + 'value' => 'no-toggle', + ), + ), + 'title' => __( 'Toggle Button Color', 'astra' ), + 'section' => 'section-primary-menu', + 'transport' => 'postMessage', + 'priority' => 42, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Border Radius + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-border-radius]', + 'default' => astra_get_option( 'mobile-header-toggle-btn-border-radius' ), + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-primary-menu', + 'title' => __( 'Border Radius', 'astra' ), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]', + 'operator' => '!=', + 'value' => 'minimal', + ), + ), + 'priority' => 42, + 'suffix' => 'px', + 'transport' => 'postMessage', + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 100, + ), + ), + + /** + * Option: Toggle on click of button or link. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]', + 'default' => astra_get_option( 'mobile-header-toggle-target' ), + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-primary-menu', + 'priority' => 42, + 'title' => __( 'Dropdown Target', 'astra' ), + 'suffix' => '', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'choices' => array( + 'icon' => __( 'Icon', 'astra' ), + 'link' => __( 'Link', 'astra' ), + ), + ), + + ); + + $configurations = array_merge( $configurations, $_configs ); + + // Learn More link if Astra Pro is not activated. + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + + $config = array( + + /** + * Option: Learn More about Mobile Header + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-header', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + ); + + $configurations = array_merge( $configurations, $config ); + } + + return $configurations; + } + } +} + + +new Astra_Header_Layout_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php b/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php index 279675d..14a303b 100644 --- a/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php @@ -1,155 +1,155 @@ - ASTRA_THEME_SETTINGS . '[site-sidebar-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-sidebars', - 'default' => astra_get_option( 'site-sidebar-layout' ), - 'priority' => 5, - 'title' => __( 'Default Layout', 'astra' ), - 'choices' => array( - 'no-sidebar' => __( 'No Sidebar', 'astra' ), - 'left-sidebar' => __( 'Left Sidebar', 'astra' ), - 'right-sidebar' => __( 'Right Sidebar', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Page - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[single-page-sidebar-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-sidebars', - 'default' => astra_get_option( 'single-page-sidebar-layout' ), - 'priority' => 5, - 'title' => __( 'Pages', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'no-sidebar' => __( 'No Sidebar', 'astra' ), - 'left-sidebar' => __( 'Left Sidebar', 'astra' ), - 'right-sidebar' => __( 'Right Sidebar', 'astra' ), - ), - ), - - /** - * Option: Blog Post - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[single-post-sidebar-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'default' => astra_get_option( 'single-post-sidebar-layout' ), - 'section' => 'section-sidebars', - 'priority' => 5, - 'title' => __( 'Blog Posts', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'no-sidebar' => __( 'No Sidebar', 'astra' ), - 'left-sidebar' => __( 'Left Sidebar', 'astra' ), - 'right-sidebar' => __( 'Right Sidebar', 'astra' ), - ), - ), - - /** - * Option: Blog Post Archive - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[archive-post-sidebar-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'default' => astra_get_option( 'archive-post-sidebar-layout' ), - 'section' => 'section-sidebars', - 'priority' => 5, - 'title' => __( 'Archives', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'no-sidebar' => __( 'No Sidebar', 'astra' ), - 'left-sidebar' => __( 'Left Sidebar', 'astra' ), - 'right-sidebar' => __( 'Right Sidebar', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Primary Content Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width]', - 'type' => 'control', - 'control' => 'ast-slider', - 'default' => astra_get_option( 'site-sidebar-width' ), - 'section' => 'section-sidebars', - 'priority' => 15, - 'title' => __( 'Sidebar Width', 'astra' ), - 'suffix' => '%', - 'transport' => 'postMessage', - 'input_attrs' => array( - 'min' => 15, - 'step' => 1, - 'max' => 50, - ), - ), - - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-sidebars', - 'priority' => 15, - 'title' => '', - 'help' => __( 'Sidebar width will apply only when one of the above sidebar is set.', 'astra' ), - 'settings' => array(), - ), - ); - - return array_merge( $configurations, $_configs ); - } - } -} - - -new Astra_Sidebar_Layout_Configs(); - - - - - + ASTRA_THEME_SETTINGS . '[site-sidebar-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-sidebars', + 'default' => astra_get_option( 'site-sidebar-layout' ), + 'priority' => 5, + 'title' => __( 'Default Layout', 'astra' ), + 'choices' => array( + 'no-sidebar' => __( 'No Sidebar', 'astra' ), + 'left-sidebar' => __( 'Left Sidebar', 'astra' ), + 'right-sidebar' => __( 'Right Sidebar', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Page + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[single-page-sidebar-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-sidebars', + 'default' => astra_get_option( 'single-page-sidebar-layout' ), + 'priority' => 5, + 'title' => __( 'Pages', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'no-sidebar' => __( 'No Sidebar', 'astra' ), + 'left-sidebar' => __( 'Left Sidebar', 'astra' ), + 'right-sidebar' => __( 'Right Sidebar', 'astra' ), + ), + ), + + /** + * Option: Blog Post + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[single-post-sidebar-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'default' => astra_get_option( 'single-post-sidebar-layout' ), + 'section' => 'section-sidebars', + 'priority' => 5, + 'title' => __( 'Blog Posts', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'no-sidebar' => __( 'No Sidebar', 'astra' ), + 'left-sidebar' => __( 'Left Sidebar', 'astra' ), + 'right-sidebar' => __( 'Right Sidebar', 'astra' ), + ), + ), + + /** + * Option: Blog Post Archive + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[archive-post-sidebar-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'default' => astra_get_option( 'archive-post-sidebar-layout' ), + 'section' => 'section-sidebars', + 'priority' => 5, + 'title' => __( 'Archives', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'no-sidebar' => __( 'No Sidebar', 'astra' ), + 'left-sidebar' => __( 'Left Sidebar', 'astra' ), + 'right-sidebar' => __( 'Right Sidebar', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Primary Content Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'site-sidebar-width' ), + 'section' => 'section-sidebars', + 'priority' => 15, + 'title' => __( 'Sidebar Width', 'astra' ), + 'suffix' => '%', + 'transport' => 'postMessage', + 'input_attrs' => array( + 'min' => 15, + 'step' => 1, + 'max' => 50, + ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-sidebars', + 'priority' => 15, + 'title' => '', + 'help' => __( 'Sidebar width will apply only when one of the above sidebar is set.', 'astra' ), + 'settings' => array(), + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + + +new Astra_Sidebar_Layout_Configs(); + + + + + diff --git a/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php b/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php index e930c89..cb38b95 100644 --- a/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php @@ -1,157 +1,157 @@ - ASTRA_THEME_SETTINGS . '[site-content-layout]', - 'type' => 'control', - 'default' => astra_get_option( 'site-content-layout' ), - 'control' => 'ast-select', - 'section' => 'section-container-layout', - 'priority' => 50, - 'title' => __( 'Layout', 'astra' ), - 'choices' => array( - 'boxed-container' => __( 'Boxed', 'astra' ), - 'content-boxed-container' => __( 'Content Boxed', 'astra' ), - 'plain-container' => __( 'Full Width / Contained', 'astra' ), - 'page-builder' => __( 'Full Width / Stretched', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Single Page Content Layout - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[single-page-content-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'default' => astra_get_option( 'single-page-content-layout' ), - 'section' => 'section-container-layout', - 'title' => __( 'Page Layout', 'astra' ), - 'priority' => 55, - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'boxed-container' => __( 'Boxed', 'astra' ), - 'content-boxed-container' => __( 'Content Boxed', 'astra' ), - 'plain-container' => __( 'Full Width / Contained', 'astra' ), - 'page-builder' => __( 'Full Width / Stretched', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - array( - 'name' => ASTRA_THEME_SETTINGS . '[single-post-content-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'default' => astra_get_option( 'single-post-content-layout' ), - 'section' => 'section-container-layout', - 'priority' => 60, - 'title' => __( 'Blog Post Layout', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'boxed-container' => __( 'Boxed', 'astra' ), - 'content-boxed-container' => __( 'Content Boxed', 'astra' ), - 'plain-container' => __( 'Full Width / Contained', 'astra' ), - 'page-builder' => __( 'Full Width / Stretched', 'astra' ), - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Archive Post Content Layout - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[archive-post-content-layout]', - 'type' => 'control', - 'control' => 'ast-select', - 'default' => astra_get_option( 'archive-post-content-layout' ), - 'section' => 'section-container-layout', - 'priority' => 65, - 'title' => __( 'Archives Layout', 'astra' ), - 'choices' => array( - 'default' => __( 'Default', 'astra' ), - 'boxed-container' => __( 'Boxed', 'astra' ), - 'content-boxed-container' => __( 'Content Boxed', 'astra' ), - 'plain-container' => __( 'Full Width / Contained', 'astra' ), - 'page-builder' => __( 'Full Width / Stretched', 'astra' ), - ), - ), - - /** - * Option: Body Background - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-layout-outside-bg-obj-responsive]', - 'type' => 'control', - 'control' => 'ast-responsive-background', - 'default' => astra_get_option( 'site-layout-outside-bg-obj-responsive' ), - 'section' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) ) ? 'section-colors-body' : 'section-colors-background', - 'transport' => 'postMessage', - 'priority' => 25, - 'title' => __( 'Background', 'astra' ), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - // Learn More link if Astra Pro is not activated. - if ( ! defined( 'ASTRA_EXT_VER' ) ) { - - $config = array( - - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-container-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-container-layout', - 'priority' => 999, - 'title' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - ); - - $configurations = array_merge( $configurations, $config ); - } - - return $configurations; - } - } -} - -new Astra_Site_Container_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[site-content-layout]', + 'type' => 'control', + 'default' => astra_get_option( 'site-content-layout' ), + 'control' => 'ast-select', + 'section' => 'section-container-layout', + 'priority' => 50, + 'title' => __( 'Layout', 'astra' ), + 'choices' => array( + 'boxed-container' => __( 'Boxed', 'astra' ), + 'content-boxed-container' => __( 'Content Boxed', 'astra' ), + 'plain-container' => __( 'Full Width / Contained', 'astra' ), + 'page-builder' => __( 'Full Width / Stretched', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Single Page Content Layout + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[single-page-content-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'default' => astra_get_option( 'single-page-content-layout' ), + 'section' => 'section-container-layout', + 'title' => __( 'Page Layout', 'astra' ), + 'priority' => 55, + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'boxed-container' => __( 'Boxed', 'astra' ), + 'content-boxed-container' => __( 'Content Boxed', 'astra' ), + 'plain-container' => __( 'Full Width / Contained', 'astra' ), + 'page-builder' => __( 'Full Width / Stretched', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[single-post-content-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'default' => astra_get_option( 'single-post-content-layout' ), + 'section' => 'section-container-layout', + 'priority' => 60, + 'title' => __( 'Blog Post Layout', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'boxed-container' => __( 'Boxed', 'astra' ), + 'content-boxed-container' => __( 'Content Boxed', 'astra' ), + 'plain-container' => __( 'Full Width / Contained', 'astra' ), + 'page-builder' => __( 'Full Width / Stretched', 'astra' ), + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Archive Post Content Layout + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[archive-post-content-layout]', + 'type' => 'control', + 'control' => 'ast-select', + 'default' => astra_get_option( 'archive-post-content-layout' ), + 'section' => 'section-container-layout', + 'priority' => 65, + 'title' => __( 'Archives Layout', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'boxed-container' => __( 'Boxed', 'astra' ), + 'content-boxed-container' => __( 'Content Boxed', 'astra' ), + 'plain-container' => __( 'Full Width / Contained', 'astra' ), + 'page-builder' => __( 'Full Width / Stretched', 'astra' ), + ), + ), + + /** + * Option: Body Background + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-layout-outside-bg-obj-responsive]', + 'type' => 'control', + 'control' => 'ast-responsive-background', + 'default' => astra_get_option( 'site-layout-outside-bg-obj-responsive' ), + 'section' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) ) ? 'section-colors-body' : 'section-colors-background', + 'transport' => 'postMessage', + 'priority' => 25, + 'title' => __( 'Background', 'astra' ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + // Learn More link if Astra Pro is not activated. + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + + $config = array( + + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-container-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-container-layout', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + ); + + $configurations = array_merge( $configurations, $config ); + } + + return $configurations; + } + } +} + +new Astra_Site_Container_Layout_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-site-identity-configs.php b/inc/customizer/configurations/layout/class-astra-site-identity-configs.php index d01af50..c046a97 100644 --- a/inc/customizer/configurations/layout/class-astra-site-identity-configs.php +++ b/inc/customizer/configurations/layout/class-astra-site-identity-configs.php @@ -1,495 +1,495 @@ - ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => $_section, - 'priority' => 1, - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', - 'operator' => '==', - 'value' => true, - ), - ), - 'active_callback' => array( $this, 'is_transparent_header_enabled' ), - 'help' => $this->get_help_text_notice( 'transparent-header' ), - ), - - /** - * Option: Transparent Header Section - Link. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo-link]', - 'type' => 'control', - 'control' => 'ast-customizer-link', - 'section' => $_section, - 'priority' => 1, - 'link_type' => 'control', - 'linked' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]', - 'context' => array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', - 'operator' => '==', - 'value' => true, - ), - ), - 'link_text' => '' . __( 'Customize Transparent Header.', 'astra' ) . '', - 'active_callback' => array( $this, 'is_transparent_header_enabled' ), - ), - - - /** - * Option: Different retina logo - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[different-retina-logo]', - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'section' => $_section, - 'title' => __( 'Different Logo For Retina Devices?', 'astra' ), - 'default' => astra_get_option( 'different-retina-logo' ), - 'priority' => 5, - 'transport' => 'postMessage', - 'divider' => array( 'ast_class' => 'ast-top-divider' ), - 'context' => array( - array( - 'setting' => 'custom_logo', - 'operator' => '!=', - 'value' => '', - ), - Astra_Builder_Helper::$general_tab_config, - ), - 'partial' => array( - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - - /** - * Option: Retina logo selector - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-header-retina-logo]', - 'default' => astra_get_option( 'ast-header-retina-logo' ), - 'type' => 'control', - 'control' => 'image', - 'sanitize_callback' => 'esc_url_raw', - 'section' => 'title_tagline', - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[different-retina-logo]', - 'operator' => '!=', - 'value' => 0, - ), - Astra_Builder_Helper::$general_tab_config, - ), - 'priority' => 6, - 'title' => __( 'Retina Logo', 'astra' ), - 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), - 'transport' => 'postMessage', - 'partial' => array( - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - - /** - * Option: Inherit Desktop logo - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]', - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'default' => astra_get_option( 'different-mobile-logo' ), - 'section' => 'title_tagline', - 'title' => __( 'Different Logo For Mobile Devices?', 'astra' ), - 'priority' => 5, - 'context' => array( - array( - 'setting' => 'custom_logo', - 'operator' => '!=', - 'value' => '', - ), - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => 'ast_selected_device', - 'operator' => 'in', - 'value' => array( 'tablet', 'mobile' ), - ), - ), - 'transport' => 'postMessage', - 'partial' => array( - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - - /** - * Option: Mobile header logo - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-logo]', - 'default' => astra_get_option( 'mobile-header-logo' ), - 'type' => 'control', - 'control' => 'image', - 'sanitize_callback' => 'esc_url_raw', - 'section' => 'title_tagline', - 'priority' => 5.5, - 'title' => __( 'Mobile Logo (optional)', 'astra' ), - 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => array( - array( - 'setting' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]', - 'operator' => '==', - 'value' => '1', - ), - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => 'ast_selected_device', - 'operator' => 'in', - 'value' => array( 'tablet', 'mobile' ), - ), - ), - ), - - /** - * Option: Logo Width - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-header-responsive-logo-width]', - 'type' => 'control', - 'control' => 'ast-responsive-slider', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), - 'section' => $_section, - 'transport' => 'postMessage', - 'default' => astra_get_option( 'ast-header-responsive-logo-width' ), - 'priority' => 7, - 'title' => __( 'Logo Width', 'astra' ), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 0, - 'step' => 1, - 'max' => 600, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), - ), - - /** - * Option: Display Title - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'type' => 'control', - 'control' => 'ast-responsive-toggle-control', - 'default' => astra_get_option( 'display-site-title-responsive' ), - 'section' => 'title_tagline', - 'title' => __( 'Display Site Title', 'astra' ), - 'priority' => 7, - 'transport' => 'postMessage', - 'partial' => array( - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - - /** - * Option: Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-site-title-tagline-divider]', - 'type' => 'control', - 'section' => $_section, - 'control' => 'ast-divider', - 'priority' => 13, - 'settings' => array(), - 'context' => array( Astra_Builder_Helper::$general_tab_config ), - ), - - /** - * Option: Display Tagline - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'type' => 'control', - 'control' => 'ast-responsive-toggle-control', - 'default' => astra_get_option( 'display-site-tagline-responsive' ), - 'section' => 'title_tagline', - 'priority' => 11, - 'title' => __( 'Display Site Tagline', 'astra' ), - 'transport' => 'postMessage', - 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), - 'partial' => array( - - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - - /** - * Option: Logo inline title. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[logo-title-inline]', - 'default' => astra_get_option( 'logo-title-inline' ), - 'type' => 'control', - 'context' => array( Astra_Builder_Helper::$general_tab_config ), - 'control' => 'ast-toggle-control', - 'divider' => array( 'ast_class' => 'ast-top-divider' ), - 'section' => $_section, - 'title' => __( 'Inline Logo & Site Title', 'astra' ), - 'priority' => 8, - 'transport' => 'postMessage', - 'partial' => array( - 'selector' => '.site-branding', - 'container_inclusive' => false, - 'render_callback' => 'Astra_Builder_Header::site_identity', - ), - ), - ); - - /** - * We adding this control only to maintain backwards. Remove this condition after 2-3 updates of add-on. - * Moving Site Title color & Tagline color option into theme. - * - * @since 3.5.0 - */ - $load_site_tagline_color_controls = true; - if ( is_astra_addon_3_5_0_version() ) { - $load_site_tagline_color_controls = false; - } - - if ( $load_site_tagline_color_controls ) { - $_configs = array_merge( - $_configs, - array( - // Color Group control for site title colors. - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', - 'default' => astra_get_option( 'site-identity-title-color-group' ), - 'type' => 'control', - 'control' => 'ast-color-group', - 'title' => Astra_Builder_Helper::$is_header_footer_builder_active ? __( 'Title Color', 'astra' ) : __( 'Colors', 'astra' ), - 'section' => $_section, - 'responsive' => false, - 'transport' => 'postMessage', - 'priority' => 8, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', - ), - - // Option: Site Title Color. - array( - 'name' => 'header-color-site-title', - 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', - 'section' => 'title_tagline', - 'type' => 'sub-control', - 'control' => 'ast-color', - 'priority' => 5, - 'default' => astra_get_option( 'header-color-site-title' ), - 'transport' => 'postMessage', - 'title' => __( 'Normal', 'astra' ), - 'context' => Astra_Builder_Helper::$design_tab, - ), - - // Option: Site Title Hover Color. - array( - 'name' => 'header-color-h-site-title', - 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', - 'section' => 'title_tagline', - 'type' => 'sub-control', - 'control' => 'ast-color', - 'priority' => 10, - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-color-h-site-title' ), - 'title' => __( 'Hover', 'astra' ), - 'context' => Astra_Builder_Helper::$design_tab, - ), - - // Option: Site Tagline Color. - array( - 'name' => ASTRA_THEME_SETTINGS . '[header-color-site-tagline]', - 'type' => 'control', - 'control' => 'ast-color', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'header-color-site-tagline' ), - 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline', 'astra' ) : __( 'Color', 'astra' ), - 'section' => 'title_tagline', - 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 8 : 12, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', - ), - ) - ); - } - - if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { - - $_configs = array_merge( - $_configs, - array( - /** - * Notice - Transparent meta header enabled on page. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-meta-enabled]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-header-builder-layout', - 'priority' => 1, - 'active_callback' => array( $this, 'is_transparent_header_enabled' ), - 'help' => $this->get_help_text_notice( 'transparent-meta' ), - ), - - /** - * Notice Link - Transparent meta header enabled on page. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-meta-link]', - 'type' => 'control', - 'control' => 'ast-customizer-link', - 'section' => 'section-header-builder-layout', - 'priority' => 1, - 'link_type' => 'section', - 'linked' => 'section-transparent-header', - 'link_text' => '' . __( 'Customize Transparent Header.', 'astra' ) . '', - 'active_callback' => array( $this, 'is_transparent_header_enabled' ), - ), - ) - ); - } - - if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { - - $new_configs = array( - - /** - * Option: Header Site Title. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-title-typography]', - 'default' => astra_get_option( 'site-title-typography' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Title Font', 'astra' ) : __( 'Typography', 'astra' ), - 'section' => $_section, - 'transport' => 'postMessage', - 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', - ), - - /** - * Options: Site Tagline. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', - 'default' => astra_get_option( 'site-tagline-typography' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline Font', 'astra' ) : __( 'Typography', 'astra' ), - 'section' => $_section, - 'transport' => 'postMessage', - 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 11, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', - ), - ); - - $_configs = array_merge( $_configs, $new_configs ); - } - - $configurations = array_merge( $configurations, $_configs ); - return $configurations; - - } - - /** - * Check if transparent header is enabled on the page being previewed. - * - * @since 2.4.5 - * @return boolean True - If Transparent Header is enabled, False if not. - */ - public function is_transparent_header_enabled() { - $status = Astra_Ext_Transparent_Header_Markup::is_transparent_header(); - return ( true === $status ? true : false ); - } - - /** - * Help notice message to be displayed when the page that is being previewed has Logo set from Transparent Header. - * - * @since 2.4.5 - * @param String $context Type of notice message to be returned. - * @return String HTML Markup for the help notice. - */ - private function get_help_text_notice( $context ) { - - switch ( $context ) { - case 'transparent-header': - $notice = '

The Logo on this page is set from the Transparent Header Section. Please click the link below to customize Transparent Header Logo.

'; - break; - case 'transparent-meta': - $notice = '

The header on this page is set from the Transparent Header.

Please click the link below to customize Transparent Header

'; - break; - default: - $notice = ''; - } - return $notice; - } - } -} - - -new Astra_Site_Identity_Configs(); + ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => $_section, + 'priority' => 1, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'active_callback' => array( $this, 'is_transparent_header_enabled' ), + 'help' => $this->get_help_text_notice( 'transparent-header' ), + ), + + /** + * Option: Transparent Header Section - Link. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo-link]', + 'type' => 'control', + 'control' => 'ast-customizer-link', + 'section' => $_section, + 'priority' => 1, + 'link_type' => 'control', + 'linked' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'link_text' => '' . __( 'Customize Transparent Header.', 'astra' ) . '', + 'active_callback' => array( $this, 'is_transparent_header_enabled' ), + ), + + + /** + * Option: Different retina logo + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[different-retina-logo]', + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'section' => $_section, + 'title' => __( 'Different Logo For Retina Devices?', 'astra' ), + 'default' => astra_get_option( 'different-retina-logo' ), + 'priority' => 5, + 'transport' => 'postMessage', + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + 'context' => array( + array( + 'setting' => 'custom_logo', + 'operator' => '!=', + 'value' => '', + ), + Astra_Builder_Helper::$general_tab_config, + ), + 'partial' => array( + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + + /** + * Option: Retina logo selector + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-header-retina-logo]', + 'default' => astra_get_option( 'ast-header-retina-logo' ), + 'type' => 'control', + 'control' => 'image', + 'sanitize_callback' => 'esc_url_raw', + 'section' => 'title_tagline', + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-retina-logo]', + 'operator' => '!=', + 'value' => 0, + ), + Astra_Builder_Helper::$general_tab_config, + ), + 'priority' => 6, + 'title' => __( 'Retina Logo', 'astra' ), + 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), + 'transport' => 'postMessage', + 'partial' => array( + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + + /** + * Option: Inherit Desktop logo + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]', + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'default' => astra_get_option( 'different-mobile-logo' ), + 'section' => 'title_tagline', + 'title' => __( 'Different Logo For Mobile Devices?', 'astra' ), + 'priority' => 5, + 'context' => array( + array( + 'setting' => 'custom_logo', + 'operator' => '!=', + 'value' => '', + ), + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => 'ast_selected_device', + 'operator' => 'in', + 'value' => array( 'tablet', 'mobile' ), + ), + ), + 'transport' => 'postMessage', + 'partial' => array( + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + + /** + * Option: Mobile header logo + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-logo]', + 'default' => astra_get_option( 'mobile-header-logo' ), + 'type' => 'control', + 'control' => 'image', + 'sanitize_callback' => 'esc_url_raw', + 'section' => 'title_tagline', + 'priority' => 5.5, + 'title' => __( 'Mobile Logo (optional)', 'astra' ), + 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]', + 'operator' => '==', + 'value' => '1', + ), + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => 'ast_selected_device', + 'operator' => 'in', + 'value' => array( 'tablet', 'mobile' ), + ), + ), + ), + + /** + * Option: Logo Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-header-responsive-logo-width]', + 'type' => 'control', + 'control' => 'ast-responsive-slider', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'default' => astra_get_option( 'ast-header-responsive-logo-width' ), + 'priority' => 7, + 'title' => __( 'Logo Width', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 600, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), + ), + + /** + * Option: Display Title + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'type' => 'control', + 'control' => 'ast-responsive-toggle-control', + 'default' => astra_get_option( 'display-site-title-responsive' ), + 'section' => 'title_tagline', + 'title' => __( 'Display Site Title', 'astra' ), + 'priority' => 7, + 'transport' => 'postMessage', + 'partial' => array( + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + + /** + * Option: Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-site-title-tagline-divider]', + 'type' => 'control', + 'section' => $_section, + 'control' => 'ast-divider', + 'priority' => 13, + 'settings' => array(), + 'context' => array( Astra_Builder_Helper::$general_tab_config ), + ), + + /** + * Option: Display Tagline + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'type' => 'control', + 'control' => 'ast-responsive-toggle-control', + 'default' => astra_get_option( 'display-site-tagline-responsive' ), + 'section' => 'title_tagline', + 'priority' => 11, + 'title' => __( 'Display Site Tagline', 'astra' ), + 'transport' => 'postMessage', + 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), + 'partial' => array( + + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + + /** + * Option: Logo inline title. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[logo-title-inline]', + 'default' => astra_get_option( 'logo-title-inline' ), + 'type' => 'control', + 'context' => array( Astra_Builder_Helper::$general_tab_config ), + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + 'section' => $_section, + 'title' => __( 'Inline Logo & Site Title', 'astra' ), + 'priority' => 8, + 'transport' => 'postMessage', + 'partial' => array( + 'selector' => '.site-branding', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Builder_Header::site_identity', + ), + ), + ); + + /** + * We adding this control only to maintain backwards. Remove this condition after 2-3 updates of add-on. + * Moving Site Title color & Tagline color option into theme. + * + * @since 3.5.0 + */ + $load_site_tagline_color_controls = true; + if ( is_astra_addon_3_5_0_version() ) { + $load_site_tagline_color_controls = false; + } + + if ( $load_site_tagline_color_controls ) { + $_configs = array_merge( + $_configs, + array( + // Color Group control for site title colors. + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', + 'default' => astra_get_option( 'site-identity-title-color-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => Astra_Builder_Helper::$is_header_footer_builder_active ? __( 'Title Color', 'astra' ) : __( 'Colors', 'astra' ), + 'section' => $_section, + 'responsive' => false, + 'transport' => 'postMessage', + 'priority' => 8, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', + ), + + // Option: Site Title Color. + array( + 'name' => 'header-color-site-title', + 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', + 'section' => 'title_tagline', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'priority' => 5, + 'default' => astra_get_option( 'header-color-site-title' ), + 'transport' => 'postMessage', + 'title' => __( 'Normal', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Site Title Hover Color. + array( + 'name' => 'header-color-h-site-title', + 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]', + 'section' => 'title_tagline', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'priority' => 10, + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-color-h-site-title' ), + 'title' => __( 'Hover', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Site Tagline Color. + array( + 'name' => ASTRA_THEME_SETTINGS . '[header-color-site-tagline]', + 'type' => 'control', + 'control' => 'ast-color', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'header-color-site-tagline' ), + 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline', 'astra' ) : __( 'Color', 'astra' ), + 'section' => 'title_tagline', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 8 : 12, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', + ), + ) + ); + } + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + + $_configs = array_merge( + $_configs, + array( + /** + * Notice - Transparent meta header enabled on page. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-meta-enabled]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-header-builder-layout', + 'priority' => 1, + 'active_callback' => array( $this, 'is_transparent_header_enabled' ), + 'help' => $this->get_help_text_notice( 'transparent-meta' ), + ), + + /** + * Notice Link - Transparent meta header enabled on page. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-meta-link]', + 'type' => 'control', + 'control' => 'ast-customizer-link', + 'section' => 'section-header-builder-layout', + 'priority' => 1, + 'link_type' => 'section', + 'linked' => 'section-transparent-header', + 'link_text' => '' . __( 'Customize Transparent Header.', 'astra' ) . '', + 'active_callback' => array( $this, 'is_transparent_header_enabled' ), + ), + ) + ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { + + $new_configs = array( + + /** + * Option: Header Site Title. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-title-typography]', + 'default' => astra_get_option( 'site-title-typography' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Title Font', 'astra' ) : __( 'Typography', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', + ), + + /** + * Options: Site Tagline. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', + 'default' => astra_get_option( 'site-tagline-typography' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline Font', 'astra' ) : __( 'Typography', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 11, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '', + ), + ); + + $_configs = array_merge( $_configs, $new_configs ); + } + + $configurations = array_merge( $configurations, $_configs ); + return $configurations; + + } + + /** + * Check if transparent header is enabled on the page being previewed. + * + * @since 2.4.5 + * @return boolean True - If Transparent Header is enabled, False if not. + */ + public function is_transparent_header_enabled() { + $status = Astra_Ext_Transparent_Header_Markup::is_transparent_header(); + return ( true === $status ? true : false ); + } + + /** + * Help notice message to be displayed when the page that is being previewed has Logo set from Transparent Header. + * + * @since 2.4.5 + * @param String $context Type of notice message to be returned. + * @return String HTML Markup for the help notice. + */ + private function get_help_text_notice( $context ) { + + switch ( $context ) { + case 'transparent-header': + $notice = '

The Logo on this page is set from the Transparent Header Section. Please click the link below to customize Transparent Header Logo.

'; + break; + case 'transparent-meta': + $notice = '

The header on this page is set from the Transparent Header.

Please click the link below to customize Transparent Header

'; + break; + default: + $notice = ''; + } + return $notice; + } + } +} + + +new Astra_Site_Identity_Configs(); diff --git a/inc/customizer/configurations/layout/class-astra-site-layout-configs.php b/inc/customizer/configurations/layout/class-astra-site-layout-configs.php index caf3e85..e8af125 100644 --- a/inc/customizer/configurations/layout/class-astra-site-layout-configs.php +++ b/inc/customizer/configurations/layout/class-astra-site-layout-configs.php @@ -1,69 +1,69 @@ - ASTRA_THEME_SETTINGS . '[site-content-width]', - 'type' => 'control', - 'control' => 'ast-slider', - 'default' => astra_get_option( 'site-content-width' ), - 'section' => 'section-container-layout', - 'priority' => 10, - 'title' => __( 'Container Width', 'astra' ), - 'context' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'site-layouts' ) ) ? array( - Astra_Builder_Helper::$general_tab_config, - array( - 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', - 'operator' => '==', - 'value' => 'ast-full-width-layout', - ), - ) : array(), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 768, - 'step' => 1, - 'max' => 1920, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - ); - - return array_merge( $configurations, $_configs ); - } - } -} - -/** - * Kicking this off by calling 'get_instance()' method - */ -new Astra_Site_Layout_Configs(); + ASTRA_THEME_SETTINGS . '[site-content-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'site-content-width' ), + 'section' => 'section-container-layout', + 'priority' => 10, + 'title' => __( 'Container Width', 'astra' ), + 'context' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'site-layouts' ) ) ? array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]', + 'operator' => '==', + 'value' => 'ast-full-width-layout', + ), + ) : array(), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 768, + 'step' => 1, + 'max' => 1920, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Site_Layout_Configs(); diff --git a/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php b/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php index 746ccd3..71ee4d6 100644 --- a/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php +++ b/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php @@ -1,197 +1,197 @@ - ASTRA_THEME_SETTINGS . '[ast-blog-typography-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-blog', - 'priority' => 999, - 'title' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - ); - } - - if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { - - $new_configs = array( - - /** - * Option: Blog / Archive Typography - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', - 'default' => astra_get_option( 'blog-content-archive-summary-typo' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Archive Title Font', 'astra' ), - 'section' => 'section-blog', - 'transport' => 'postMessage', - 'priority' => 140, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ), - - /** - * Option: Archive Summary Box Title Font Size - */ - array( - 'name' => 'font-size-archive-summary-title', - 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', - 'section' => 'section-blog', - 'type' => 'sub-control', - 'control' => 'ast-responsive', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'font-size-archive-summary-title' ), - 'priority' => 8, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', - 'default' => astra_get_option( 'blog-content-blog-post-title-typo' ), - 'type' => 'control', - 'control' => 'ast-settings-group', - 'title' => __( 'Post Title Font', 'astra' ), - 'section' => 'section-blog', - 'transport' => 'postMessage', - 'priority' => 140, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ), - - /** - * Option: Blog - Post Title Font Size - */ - array( - 'name' => 'font-size-page-title', - 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', - 'section' => 'section-blog', - 'type' => 'sub-control', - 'control' => 'ast-responsive', - 'transport' => 'postMessage', - 'priority' => 2, - 'default' => astra_get_option( 'font-size-page-title' ), - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - ); - } else { - - $new_configs = array( - - /** - * Option: Archive Summary Box Title Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-archive-summary-title]', - 'section' => 'section-blog', - 'type' => 'control', - 'control' => 'ast-responsive', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'font-size-archive-summary-title' ), - 'title' => __( 'Archive Title Font Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - 'priority' => 140, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ), - - /** - * Option: Blog - Post Title Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-page-title]', - 'section' => 'section-blog', - 'type' => 'control', - 'control' => 'ast-responsive', - 'transport' => 'postMessage', - 'default' => astra_get_option( 'font-size-page-title' ), - 'title' => __( 'Post Title Font Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - 'priority' => 140, - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ), - ); - } - - $_configs = array_merge( $_configs, $new_configs ); - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Archive_Typo_Configs(); + ASTRA_THEME_SETTINGS . '[ast-blog-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-blog', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { + + $new_configs = array( + + /** + * Option: Blog / Archive Typography + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', + 'default' => astra_get_option( 'blog-content-archive-summary-typo' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Archive Title Font', 'astra' ), + 'section' => 'section-blog', + 'transport' => 'postMessage', + 'priority' => 140, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Archive Summary Box Title Font Size + */ + array( + 'name' => 'font-size-archive-summary-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', + 'section' => 'section-blog', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-archive-summary-title' ), + 'priority' => 8, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', + 'default' => astra_get_option( 'blog-content-blog-post-title-typo' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Post Title Font', 'astra' ), + 'section' => 'section-blog', + 'transport' => 'postMessage', + 'priority' => 140, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Blog - Post Title Font Size + */ + array( + 'name' => 'font-size-page-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', + 'section' => 'section-blog', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'priority' => 2, + 'default' => astra_get_option( 'font-size-page-title' ), + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $new_configs = array( + + /** + * Option: Archive Summary Box Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-archive-summary-title]', + 'section' => 'section-blog', + 'type' => 'control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-archive-summary-title' ), + 'title' => __( 'Archive Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'priority' => 140, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Blog - Post Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-page-title]', + 'section' => 'section-blog', + 'type' => 'control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-page-title' ), + 'title' => __( 'Post Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'priority' => 140, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + ); + } + + $_configs = array_merge( $_configs, $new_configs ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Archive_Typo_Configs(); diff --git a/inc/customizer/configurations/typography/class-astra-body-typo-configs.php b/inc/customizer/configurations/typography/class-astra-body-typo-configs.php index 400af19..21276a1 100644 --- a/inc/customizer/configurations/typography/class-astra-body-typo-configs.php +++ b/inc/customizer/configurations/typography/class-astra-body-typo-configs.php @@ -1,277 +1,277 @@ - ASTRA_THEME_SETTINGS . '[body-font-family]', - 'type' => 'control', - 'control' => 'ast-font', - 'font-type' => 'ast-font-family', - 'ast_inherit' => __( 'Default System Font', 'astra' ), - 'default' => astra_get_option( 'body-font-family' ), - 'section' => 'section-body-typo', - 'priority' => 5, - 'title' => __( 'Body Font Family', 'astra' ), - 'connect' => ASTRA_THEME_SETTINGS . '[body-font-weight]', - 'variant' => ASTRA_THEME_SETTINGS . '[body-font-variant]', - ), - - /** - * Option: Font Variant - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[body-font-variant]', - 'type' => 'control', - 'control' => 'ast-font-variant', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), - 'default' => astra_get_option( 'body-font-variant' ), - 'ast_inherit' => __( 'Default', 'astra' ), - 'section' => 'section-body-typo', - 'priority' => 6, - 'title' => __( 'Variants', 'astra' ), - 'variant' => ASTRA_THEME_SETTINGS . '[body-font-family]', - ), - - /** - * Option: Font Weight - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[body-font-weight]', - 'type' => 'control', - 'control' => 'ast-font', - 'font-type' => 'ast-font-weight', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), - 'default' => astra_get_option( 'body-font-weight' ), - 'ast_inherit' => __( 'Default', 'astra' ), - 'section' => 'section-body-typo', - 'priority' => 15, - 'title' => __( 'Weight', 'astra' ), - 'connect' => ASTRA_THEME_SETTINGS . '[body-font-family]', - ), - - /** - * Option: Body Text Transform - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[body-text-transform]', - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-body-typo', - 'default' => astra_get_option( 'body-text-transform' ), - 'priority' => 20, - 'title' => __( 'Text Transform', 'astra' ), - 'choices' => array( - '' => __( 'Default', 'astra' ), - 'none' => __( 'None', 'astra' ), - 'capitalize' => __( 'Capitalize', 'astra' ), - 'uppercase' => __( 'Uppercase', 'astra' ), - 'lowercase' => __( 'Lowercase', 'astra' ), - ), - ), - - /** - * Option: Body Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-body]', - 'type' => 'control', - 'control' => 'ast-responsive-slider', - 'section' => 'section-body-typo', - 'default' => astra_get_option( 'font-size-body' ), - 'priority' => 10, - 'title' => __( 'Size', 'astra' ), - 'suffix' => 'px', - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - ), - ), - - /** - * Option: Body Line Height - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[body-line-height]', - 'type' => 'control', - 'control' => 'ast-slider', - 'section' => 'section-body-typo', - 'default' => astra_get_option( 'body-line-height' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'priority' => 25, - 'title' => __( 'Line Height', 'astra' ), - 'suffix' => 'em', - 'input_attrs' => array( - 'min' => 1, - 'step' => 0.01, - 'max' => 5, - ), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - /** - * Option: Paragraph Margin Bottom - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[para-margin-bottom]', - 'type' => 'control', - 'control' => 'ast-slider', - 'default' => astra_get_option( 'para-margin-bottom' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'transport' => 'postMessage', - 'section' => 'section-body-typo', - 'priority' => 25, - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - 'title' => __( 'Paragraph Margin Bottom', 'astra' ), - 'suffix' => 'em', - 'input_attrs' => array( - 'min' => 0.5, - 'step' => 0.01, - 'max' => 5, - ), - ), - - /** - * Option: Underline links in entry-content. - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[underline-content-links]', - 'default' => astra_get_option( 'underline-content-links' ), - 'type' => 'control', - 'control' => 'ast-toggle-control', - 'section' => 'section-body-typo', - 'priority' => 27, - 'title' => __( 'Underline Content Links', 'astra' ), - 'transport' => 'postMessage', - ), - - /** - * Option: Headings Font Family - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[headings-font-family]', - 'type' => 'control', - 'control' => 'ast-font', - 'font-type' => 'ast-font-family', - 'default' => astra_get_option( 'headings-font-family' ), - 'title' => __( 'Heading Font Family', 'astra' ), - 'section' => 'section-content-typo', - 'priority' => 3, - 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', - 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', - ), - - /** - * Option: Font Variant - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', - 'type' => 'control', - 'control' => 'ast-font-variant', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), - 'default' => astra_get_option( 'headings-font-variant' ), - 'ast_inherit' => __( 'Default', 'astra' ), - 'section' => 'section-content-typo', - 'priority' => 3, - 'title' => __( 'Variants', 'astra' ), - 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-family]', - ), - - /** - * Option: Headings Font Weight - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', - 'type' => 'control', - 'control' => 'ast-font', - 'font-type' => 'ast-font-weight', - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), - 'default' => astra_get_option( 'headings-font-weight' ), - 'title' => __( 'Weight', 'astra' ), - 'section' => 'section-content-typo', - 'priority' => 3, - 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-family]', - ), - - /** - * Option: Headings Text Transform - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[headings-text-transform]', - 'type' => 'control', - 'control' => 'ast-select', - 'section' => 'section-content-typo', - 'title' => __( 'Text Transform', 'astra' ), - 'default' => astra_get_option( 'headings-text-transform' ), - 'priority' => 3, - 'choices' => array( - '' => __( 'Inherit', 'astra' ), - 'none' => __( 'None', 'astra' ), - 'capitalize' => __( 'Capitalize', 'astra' ), - 'uppercase' => __( 'Uppercase', 'astra' ), - 'lowercase' => __( 'Lowercase', 'astra' ), - ), - ), - - /** - * Option: Heading

Line Height - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[headings-line-height]', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'headings-line-height' ), - 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), - 'type' => 'control', - 'control' => 'ast-slider', - 'title' => __( 'Line Height', 'astra' ), - 'transport' => 'postMessage', - 'priority' => 4, - 'suffix' => 'em', - 'input_attrs' => array( - 'min' => 1, - 'step' => 0.01, - 'max' => 5, - ), - ), - ); - - return array_merge( $configurations, $_configs ); - } - } -} - -new Astra_Body_Typo_Configs(); + ASTRA_THEME_SETTINGS . '[body-font-family]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'ast_inherit' => __( 'Default System Font', 'astra' ), + 'default' => astra_get_option( 'body-font-family' ), + 'section' => 'section-body-typo', + 'priority' => 5, + 'title' => __( 'Body Font Family', 'astra' ), + 'connect' => ASTRA_THEME_SETTINGS . '[body-font-weight]', + 'variant' => ASTRA_THEME_SETTINGS . '[body-font-variant]', + ), + + /** + * Option: Font Variant + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-font-variant]', + 'type' => 'control', + 'control' => 'ast-font-variant', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), + 'default' => astra_get_option( 'body-font-variant' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-body-typo', + 'priority' => 6, + 'title' => __( 'Variants', 'astra' ), + 'variant' => ASTRA_THEME_SETTINGS . '[body-font-family]', + ), + + /** + * Option: Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-font-weight]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'body-font-weight' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-body-typo', + 'priority' => 15, + 'title' => __( 'Weight', 'astra' ), + 'connect' => ASTRA_THEME_SETTINGS . '[body-font-family]', + ), + + /** + * Option: Body Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-text-transform]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'body-text-transform' ), + 'priority' => 20, + 'title' => __( 'Text Transform', 'astra' ), + 'choices' => array( + '' => __( 'Default', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Body Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-body]', + 'type' => 'control', + 'control' => 'ast-responsive-slider', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'font-size-body' ), + 'priority' => 10, + 'title' => __( 'Size', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + ), + ), + + /** + * Option: Body Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-line-height]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'body-line-height' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'priority' => 25, + 'title' => __( 'Line Height', 'astra' ), + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Paragraph Margin Bottom + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[para-margin-bottom]', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'para-margin-bottom' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'transport' => 'postMessage', + 'section' => 'section-body-typo', + 'priority' => 25, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'title' => __( 'Paragraph Margin Bottom', 'astra' ), + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 0.5, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Underline links in entry-content. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[underline-content-links]', + 'default' => astra_get_option( 'underline-content-links' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'section' => 'section-body-typo', + 'priority' => 27, + 'title' => __( 'Underline Content Links', 'astra' ), + 'transport' => 'postMessage', + ), + + /** + * Option: Headings Font Family + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'default' => astra_get_option( 'headings-font-family' ), + 'title' => __( 'Heading Font Family', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', + 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', + ), + + /** + * Option: Font Variant + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', + 'type' => 'control', + 'control' => 'ast-font-variant', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), + 'default' => astra_get_option( 'headings-font-variant' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'title' => __( 'Variants', 'astra' ), + 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + ), + + /** + * Option: Headings Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'headings-font-weight' ), + 'title' => __( 'Weight', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + ), + + /** + * Option: Headings Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-text-transform]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-content-typo', + 'title' => __( 'Text Transform', 'astra' ), + 'default' => astra_get_option( 'headings-text-transform' ), + 'priority' => 3, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Heading

Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-line-height]', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'headings-line-height' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'type' => 'control', + 'control' => 'ast-slider', + 'title' => __( 'Line Height', 'astra' ), + 'transport' => 'postMessage', + 'priority' => 4, + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +new Astra_Body_Typo_Configs(); diff --git a/inc/customizer/configurations/typography/class-astra-content-typo-configs.php b/inc/customizer/configurations/typography/class-astra-content-typo-configs.php index e6a99d2..777d9a0 100644 --- a/inc/customizer/configurations/typography/class-astra-content-typo-configs.php +++ b/inc/customizer/configurations/typography/class-astra-content-typo-configs.php @@ -1,272 +1,272 @@ - ASTRA_THEME_SETTINGS . '[divider-section-h1]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-content-typo', - 'priority' => 4, - 'title' => __( 'Heading 1', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Heading 1 (H1) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h1]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'font-size-h1' ), - 'transport' => 'postMessage', - 'priority' => 6, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Heading 2 (H2) Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h2]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-content-typo', - 'priority' => 9, - 'title' => __( 'Heading 2', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Heading 2 (H2) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h2]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'font-size-h2' ), - 'transport' => 'postMessage', - 'priority' => 11, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Heading 3 (H3) Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h3]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-content-typo', - 'priority' => 15, - 'title' => __( 'Heading 3', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Heading 3 (H3) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h3]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'priority' => 16, - 'default' => astra_get_option( 'font-size-h3' ), - 'transport' => 'postMessage', - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Heading 4 (H4) Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h4]', - 'type' => 'control', - 'title' => __( 'Heading 4', 'astra' ), - 'section' => 'section-content-typo', - 'control' => 'ast-heading', - 'priority' => 20, - 'settings' => array(), - ), - - /** - * Option: Heading 4 (H4) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h4]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'font-size-h4' ), - 'transport' => 'postMessage', - 'priority' => 21, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Heading 5 (H5) Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h5]', - 'type' => 'control', - 'control' => 'ast-heading', - 'section' => 'section-content-typo', - 'priority' => 25, - 'title' => __( 'Heading 5', 'astra' ), - 'settings' => array(), - ), - - /** - * Option: Heading 5 (H5) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h5]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'font-size-h5' ), - 'transport' => 'postMessage', - 'priority' => 26, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Heading 6 (H6) Divider - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h6]', - 'type' => 'control', - 'control' => 'ast-heading', - 'title' => __( 'Heading 6', 'astra' ), - 'section' => 'section-content-typo', - 'priority' => 30, - 'settings' => array(), - ), - - /** - * Option: Heading 6 (H6) Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-h6]', - 'type' => 'control', - 'control' => 'ast-responsive', - 'section' => 'section-content-typo', - 'default' => astra_get_option( 'font-size-h6' ), - 'transport' => 'postMessage', - 'priority' => 31, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - // Learn More link if Astra Pro is not activated. - if ( ! defined( 'ASTRA_EXT_VER' ) ) { - - $_configs = array( - /** - * Option: Learn More about Contant Typography - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[ast-content-typography-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-content-typo', - 'priority' => 999, - 'title' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - ), - ); - - $configurations = array_merge( $configurations, $_configs ); - - } - - return $configurations; - } - } -} - -new Astra_Content_Typo_Configs(); - - + ASTRA_THEME_SETTINGS . '[divider-section-h1]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 4, + 'title' => __( 'Heading 1', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 1 (H1) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h1]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h1' ), + 'transport' => 'postMessage', + 'priority' => 6, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 2 (H2) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h2]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 9, + 'title' => __( 'Heading 2', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 2 (H2) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h2]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h2' ), + 'transport' => 'postMessage', + 'priority' => 11, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 3 (H3) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h3]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 15, + 'title' => __( 'Heading 3', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 3 (H3) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h3]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'priority' => 16, + 'default' => astra_get_option( 'font-size-h3' ), + 'transport' => 'postMessage', + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 4 (H4) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h4]', + 'type' => 'control', + 'title' => __( 'Heading 4', 'astra' ), + 'section' => 'section-content-typo', + 'control' => 'ast-heading', + 'priority' => 20, + 'settings' => array(), + ), + + /** + * Option: Heading 4 (H4) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h4]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h4' ), + 'transport' => 'postMessage', + 'priority' => 21, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 5 (H5) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h5]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 25, + 'title' => __( 'Heading 5', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 5 (H5) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h5]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h5' ), + 'transport' => 'postMessage', + 'priority' => 26, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 6 (H6) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h6]', + 'type' => 'control', + 'control' => 'ast-heading', + 'title' => __( 'Heading 6', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 30, + 'settings' => array(), + ), + + /** + * Option: Heading 6 (H6) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h6]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h6' ), + 'transport' => 'postMessage', + 'priority' => 31, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + // Learn More link if Astra Pro is not activated. + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + + $_configs = array( + /** + * Option: Learn More about Contant Typography + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-content-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-content-typo', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + } + + return $configurations; + } + } +} + +new Astra_Content_Typo_Configs(); + + diff --git a/inc/customizer/configurations/typography/class-astra-header-typo-configs.php b/inc/customizer/configurations/typography/class-astra-header-typo-configs.php index 6bff400..f1d0d64 100644 --- a/inc/customizer/configurations/typography/class-astra-header-typo-configs.php +++ b/inc/customizer/configurations/typography/class-astra-header-typo-configs.php @@ -1,230 +1,230 @@ - 'font-size-site-title', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', - 'section' => 'title_tagline', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-site-title' ), - 'transport' => 'postMessage', - 'priority' => 9, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - - /** - * Option: Site Tagline Font Size - */ - array( - 'name' => 'font-size-site-tagline', - 'type' => 'sub-control', - 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', - 'section' => 'title_tagline', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-site-tagline' ), - 'transport' => 'postMessage', - 'priority' => 14, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - ); - } else { - - $_configs = array( - - /** - * Option: Site Title Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-title]', - 'type' => 'control', - 'section' => 'title_tagline', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-site-title' ), - 'transport' => 'postMessage', - 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8, - 'title' => __( 'Title Font Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( - Astra_Builder_Helper::$design_tab_config, - array( - 'relation' => 'OR', - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'desktop', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'tablet', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'mobile', - 'operator' => '==', - 'value' => true, - ), - ), - ) : array( - array( - 'relation' => 'OR', - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'desktop', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'tablet', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', - 'setting-key' => 'mobile', - 'operator' => '==', - 'value' => true, - ), - ), - ), - ), - - /** - * Option: Site Tagline Font Size - */ - array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-tagline]', - 'type' => 'control', - 'section' => 'title_tagline', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-site-tagline' ), - 'transport' => 'postMessage', - 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 12, - 'title' => __( 'Tagline Font Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( - Astra_Builder_Helper::$design_tab_config, - array( - 'relation' => 'OR', - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'desktop', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'tablet', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'mobile', - 'operator' => '==', - 'value' => true, - ), - ), - ) : array( - array( - 'relation' => 'OR', - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'desktop', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'tablet', - 'operator' => '==', - 'value' => true, - ), - array( - 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', - 'setting-key' => 'mobile', - 'operator' => '==', - 'value' => true, - ), - ), - ), - ), - ); - } - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Header_Typo_Configs(); - - + 'font-size-site-title', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-title' ), + 'transport' => 'postMessage', + 'priority' => 9, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Site Tagline Font Size + */ + array( + 'name' => 'font-size-site-tagline', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-tagline' ), + 'transport' => 'postMessage', + 'priority' => 14, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $_configs = array( + + /** + * Option: Site Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-title]', + 'type' => 'control', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-title' ), + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8, + 'title' => __( 'Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ) : array( + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ), + ), + + /** + * Option: Site Tagline Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-tagline]', + 'type' => 'control', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-tagline' ), + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 12, + 'title' => __( 'Tagline Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ) : array( + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ), + ), + ); + } + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Header_Typo_Configs(); + + diff --git a/inc/customizer/configurations/typography/class-astra-single-typo-configs.php b/inc/customizer/configurations/typography/class-astra-single-typo-configs.php index a1dd398..2977f4a 100644 --- a/inc/customizer/configurations/typography/class-astra-single-typo-configs.php +++ b/inc/customizer/configurations/typography/class-astra-single-typo-configs.php @@ -1,136 +1,136 @@ - ASTRA_THEME_SETTINGS . '[ast-sngle-blog-typography-more-feature-description]', - 'type' => 'control', - 'control' => 'ast-description', - 'section' => 'section-blog-single', - 'priority' => 999, - 'title' => '', - 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', - 'settings' => array(), - 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), - ), - - ); - } - - if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { - - $new_configs = array( - - array( - 'name' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', - 'type' => 'control', - 'priority' => Astra_Builder_Helper::$is_header_footer_builder_active ? - 13 : 20, - 'control' => 'ast-settings-group', - 'title' => __( 'Post / Page Title Font', 'astra' ), - 'section' => 'section-blog-single', - 'transport' => 'postMessage', - 'context' => Astra_Builder_Helper::$is_header_footer_builder_active ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ), - - /** - * Option: Single Post / Page Title Font Size - */ - array( - 'name' => 'font-size-entry-title', - 'parent' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', - 'section' => 'section-blog-single', - 'type' => 'sub-control', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-entry-title' ), - 'transport' => 'postMessage', - 'priority' => 8, - 'title' => __( 'Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - ), - ); - } else { - - $new_configs = array(); - - /** - * Option: Single Post / Page Title Font Size - */ - $new_configs[] = array( - 'name' => ASTRA_THEME_SETTINGS . '[font-size-entry-title]', - 'section' => 'section-blog-single', - 'type' => 'control', - 'control' => 'ast-responsive', - 'default' => astra_get_option( 'font-size-entry-title' ), - 'transport' => 'postMessage', - 'priority' => 9, - 'title' => __( 'Post / Page Title Font Size', 'astra' ), - 'input_attrs' => array( - 'min' => 0, - ), - 'units' => array( - 'px' => 'px', - 'em' => 'em', - ), - 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? - Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, - ); - } - - $_configs = array_merge( $_configs, $new_configs ); - - $configurations = array_merge( $configurations, $_configs ); - - return $configurations; - } - } -} - -new Astra_Single_Typo_Configs(); + ASTRA_THEME_SETTINGS . '[ast-sngle-blog-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-blog-single', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { + + $new_configs = array( + + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', + 'type' => 'control', + 'priority' => Astra_Builder_Helper::$is_header_footer_builder_active ? + 13 : 20, + 'control' => 'ast-settings-group', + 'title' => __( 'Post / Page Title Font', 'astra' ), + 'section' => 'section-blog-single', + 'transport' => 'postMessage', + 'context' => Astra_Builder_Helper::$is_header_footer_builder_active ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Single Post / Page Title Font Size + */ + array( + 'name' => 'font-size-entry-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', + 'section' => 'section-blog-single', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-entry-title' ), + 'transport' => 'postMessage', + 'priority' => 8, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $new_configs = array(); + + /** + * Option: Single Post / Page Title Font Size + */ + $new_configs[] = array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-entry-title]', + 'section' => 'section-blog-single', + 'type' => 'control', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-entry-title' ), + 'transport' => 'postMessage', + 'priority' => 9, + 'title' => __( 'Post / Page Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ); + } + + $_configs = array_merge( $_configs, $new_configs ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Single_Typo_Configs(); -- cgit v1.2.3-60-g2f50