summaryrefslogtreecommitdiff
path: root/inc/customizer/configurations/builder
diff options
context:
space:
mode:
Diffstat (limited to 'inc/customizer/configurations/builder')
-rw-r--r--inc/customizer/configurations/builder/base/class-astra-button-component-configs.php436
-rw-r--r--inc/customizer/configurations/builder/base/class-astra-html-component-configs.php231
-rw-r--r--inc/customizer/configurations/builder/base/class-astra-social-icon-component-configs.php480
-rw-r--r--inc/customizer/configurations/builder/class-astra-builder-base-configuration.php547
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-above-footer-configs.php284
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-below-footer-configs.php284
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-copyright-configs.php165
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-footer-builder-configs.php314
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-footer-menu-configs.php371
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-footer-social-icons-configs.php49
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-customizer-primary-footer-configs.php268
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-footer-button-component-configs.php48
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-footer-html-component-configs.php48
-rw-r--r--inc/customizer/configurations/builder/footer/class-astra-footer-widget-component-configs.php51
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-above-header-configs.php148
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-below-header-configs.php148
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-edd-cart-configs.php384
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-header-builder-configs.php526
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-header-widget-configs.php49
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-mobile-trigger-configs.php399
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-off-canvas-configs.php280
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-primary-header-configs.php163
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-site-identity-configs.php151
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-customizer-woo-cart-configs.php530
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-account-component-configs.php522
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-button-component-configs.php41
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-html-component-configs.php48
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-menu-component-configs.php645
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-search-component-configs.php143
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-header-social-icon-component-configs.php50
-rw-r--r--inc/customizer/configurations/builder/header/class-astra-mobile-menu-component-configs.php458
31 files changed, 8261 insertions, 0 deletions
diff --git a/inc/customizer/configurations/builder/base/class-astra-button-component-configs.php b/inc/customizer/configurations/builder/base/class-astra-button-component-configs.php
new file mode 100644
index 0000000..3075df5
--- /dev/null
+++ b/inc/customizer/configurations/builder/base/class-astra-button-component-configs.php
@@ -0,0 +1,436 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Button_Component_Configs {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Configurations.
+ * @param string $builder_type Builder Type.
+ * @param string $section Section.
+ *
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-button-' ) {
+
+ if ( 'footer' === $builder_type ) {
+ $class_obj = Astra_Builder_Footer::get_instance();
+ $number_of_button = Astra_Builder_Helper::$num_of_footer_button;
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_button;
+ } else {
+ $class_obj = Astra_Builder_Header::get_instance();
+ $number_of_button = Astra_Builder_Helper::$num_of_header_button;
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_button;
+ }
+
+ $button_config = array();
+
+ for ( $index = 1; $index <= $component_limit; $index++ ) {
+
+ $_section = $section . $index;
+ $_prefix = 'button' . $index;
+
+ /**
+ * These options are related to Header Section - Button.
+ * Prefix hs represents - Header Section.
+ */
+ $button_config[] = array(
+
+ /*
+ * Header Builder section - Button Component Configs.
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 50,
+ /* translators: %s Index */
+ 'title' => ( 1 === $number_of_button ) ? __( 'Button', 'astra' ) : sprintf( __( 'Button %s', 'astra' ), $index ),
+ 'panel' => 'panel-' . $builder_type . '-builder-group',
+ 'clone_index' => $index,
+ 'clone_type' => $builder_type . '-button',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+
+ ),
+
+ /**
+ * Option: Button Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'section' => $_section,
+ 'priority' => 20,
+ 'title' => __( 'Text', 'astra' ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-' . $builder_type . '-button-' . $index,
+ 'container_inclusive' => false,
+ 'render_callback' => array( $class_obj, 'button_' . $index ),
+ 'fallback_refresh' => false,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Button Link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-link-option]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-link-option' ),
+ 'type' => 'control',
+ 'control' => 'ast-link',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ),
+ 'section' => $_section,
+ 'priority' => 30,
+ 'title' => __( 'Link', 'astra' ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-' . $builder_type . '-button-' . $index,
+ 'container_inclusive' => false,
+ 'render_callback' => array( $class_obj, 'button_' . $index ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Group: Primary Header Button Colors Group
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Text Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Button Text Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-text-color',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-color' ),
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 9,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Text Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-text-h-color',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-h-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 9,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Background Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-back-color',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-back-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 10,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Button Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-back-h-color',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-back-h-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-background-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 10,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Border Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-border-size]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-size' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-border',
+ 'transport' => 'postMessage',
+ 'linked_choices' => true,
+ 'priority' => 79,
+ 'title' => __( 'Border Width', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Border Color', 'astra' ),
+ 'section' => $_section,
+ 'priority' => 80,
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+
+ /**
+ * Option: Button Border Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-border-color',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-color' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]',
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 80,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Border Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-border-h-color',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-h-color' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-builder-button-border-colors-group]',
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 80,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Border Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-border-radius]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-border-radius' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-slider',
+ 'transport' => 'postMessage',
+ 'priority' => 80,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 100,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ );
+
+ if ( 'footer' === $builder_type ) {
+ $button_config[] = array(
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-button-' . $index . '-alignment]',
+ 'default' => astra_get_option( 'footer-button-' . $index . '-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 35,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'flex-start' => 'align-left',
+ 'center' => 'align-center',
+ 'flex-end' => 'align-right',
+ ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ ),
+ );
+ }
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+ $button_config[] = array(
+
+ /**
+ * Option: Primary Header Button Typography
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-text-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Font', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'priority' => 90,
+ ),
+
+ /**
+ * Option: Primary Header Button Font Size
+ */
+ array(
+ 'name' => $builder_type . '-' . $_prefix . '-font-size',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-text-typography]',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Size', 'astra' ),
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 2,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+ );
+ } else {
+ $button_config[] = array(
+
+ /**
+ * Option: Primary Header Button Font Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-font-size]',
+ 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-font-size' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Font Size', 'astra' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 90,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+ );
+ }
+
+ $button_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type );
+
+ $button_config[] = Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section );
+
+ }
+
+ $button_config = call_user_func_array( 'array_merge', $button_config + array( array() ) );
+
+ $configurations = array_merge( $configurations, $button_config );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Button_Component_Configs();
diff --git a/inc/customizer/configurations/builder/base/class-astra-html-component-configs.php b/inc/customizer/configurations/builder/base/class-astra-html-component-configs.php
new file mode 100644
index 0000000..6da0d27
--- /dev/null
+++ b/inc/customizer/configurations/builder/base/class-astra-html-component-configs.php
@@ -0,0 +1,231 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Html_Component_Configs {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Configurations.
+ * @param string $builder_type Builder Type.
+ * @param string $section Section.
+ *
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-html-' ) {
+
+ $html_config = array();
+
+ if ( 'footer' === $builder_type ) {
+ $class_obj = Astra_Builder_Footer::get_instance();
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_html;
+ } else {
+ $class_obj = Astra_Builder_Header::get_instance();
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_html;
+ }
+
+ for ( $index = 1; $index <= $component_limit; $index++ ) {
+
+ $_section = $section . $index;
+
+ $_configs = array(
+
+ /**
+ * Option: Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /*
+ * Builder section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 60,
+ /* translators: %s Index */
+ 'title' => sprintf( __( 'HTML %s', 'astra' ), $index ),
+ 'panel' => 'panel-' . $builder_type . '-builder-group',
+ 'clone_index' => $index,
+ 'clone_type' => $builder_type . '-html',
+ ),
+
+ /**
+ * Option: Html Editor.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-html-' . $index . ']',
+ 'type' => 'control',
+ 'control' => 'ast-html-editor',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 4,
+ 'default' => astra_get_option( $builder_type . '-html-' . $index ),
+ 'input_attrs' => array(
+ 'id' => $builder_type . '-html-' . $index,
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-' . $builder_type . '-html-' . $index,
+ 'render_callback' => array( $class_obj, $builder_type . '_html_' . $index ),
+ 'fallback_refresh' => false,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: HTML Color.
+ */
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-html-' . $index . 'color]',
+ 'default' => astra_get_option( $builder_type . '-html-' . $index . 'color' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 8,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'title' => __( 'Text Color', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-html-' . $index . '-link-group]',
+ 'default' => astra_get_option( $builder_type . '-html-' . $index . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Link Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 8,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Link Color.
+ */
+ array(
+ 'name' => $builder_type . '-html-' . $index . 'link-color',
+ 'default' => astra_get_option( $builder_type . '-html-' . $index . 'link-color' ),
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'priority' => 9,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-html-' . $index . '-link-group]',
+ 'title' => __( 'Normal', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Link Hover Color.
+ */
+ array(
+ 'name' => $builder_type . '-html-' . $index . 'link-h-color',
+ 'default' => astra_get_option( $builder_type . '-html-' . $index . 'link-h-color' ),
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'priority' => 10,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-html-' . $index . '-link-group]',
+ 'title' => __( 'Hover', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ if ( 'footer' === $builder_type ) {
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-html-' . $index . '-alignment]',
+ 'default' => astra_get_option( 'footer-html-' . $index . '-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 6,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'left' => 'align-left',
+ 'center' => 'align-center',
+ 'right' => 'align-right',
+ ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ );
+ }
+
+ $html_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type );
+
+ $html_config[] = Astra_Builder_Base_Configuration::prepare_typography_options( $_section );
+
+ $html_config[] = $_configs;
+ }
+
+ $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) );
+ $configurations = array_merge( $configurations, $html_config );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Html_Component_Configs();
diff --git a/inc/customizer/configurations/builder/base/class-astra-social-icon-component-configs.php b/inc/customizer/configurations/builder/base/class-astra-social-icon-component-configs.php
new file mode 100644
index 0000000..91e8006
--- /dev/null
+++ b/inc/customizer/configurations/builder/base/class-astra-social-icon-component-configs.php
@@ -0,0 +1,480 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Social_Icon_Component_Configs {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Configurations.
+ * @param string $builder_type Builder Type.
+ * @param string $section Section slug.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-social-icons-' ) {
+
+ $social_configs = array();
+
+ $class_obj = Astra_Builder_Header::get_instance();
+ $number_of_social_icons = Astra_Builder_Helper::$num_of_header_social_icons;
+
+ if ( 'footer' === $builder_type ) {
+ $class_obj = Astra_Builder_Footer::get_instance();
+ $number_of_social_icons = Astra_Builder_Helper::$num_of_footer_social_icons;
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_social_icons;
+ } else {
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_social_icons;
+ }
+
+ for ( $index = 1; $index <= $component_limit; $index++ ) {
+
+ $_section = $section . $index;
+
+ $_configs = array(
+
+ /*
+ * Builder section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 90,
+ /* translators: 1: index */
+ 'title' => ( 1 === $number_of_social_icons ) ? __( 'Social Icons', 'astra' ) : sprintf( __( 'Social Icons %s', 'astra' ), $index ),
+ 'panel' => 'panel-' . $builder_type . '-builder-group',
+ 'clone_index' => $index,
+ 'clone_type' => $builder_type . '-social-icons',
+ ),
+
+ /**
+ * Option: Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Social Icons.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-icons-' . $index . ']',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-social-icons',
+ 'title' => __( 'Social Icons', 'astra' ),
+ 'transport' => 'postMessage',
+ 'priority' => 1,
+ 'default' => astra_get_option( $builder_type . '-social-icons-' . $index ),
+ 'partial' => array(
+ 'selector' => '.ast-' . $builder_type . '-social-' . $index . '-wrap',
+ 'container_inclusive' => true,
+ 'render_callback' => array( $class_obj, $builder_type . '_social_' . $index ),
+ 'fallback_refresh' => false,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Show label Toggle.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-label-toggle]',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-label-toggle' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'title' => __( 'Show Label', 'astra' ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-' . $builder_type . '-social-' . $index . '-wrap',
+ 'container_inclusive' => true,
+ 'render_callback' => array( $class_obj, $builder_type . '_social_' . $index ),
+ 'fallback_refresh' => false,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Social Icon Spacing
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-space]',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-space' ),
+ 'title' => __( 'Icon Spacing', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+
+ /**
+ * Option: Social Icon Background Spacing.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-bg-space]',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-bg-space' ),
+ 'title' => __( 'Icon Background Spacing', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ /**
+ * Option: Social Icon Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-size]',
+ 'section' => $_section,
+ 'priority' => 1,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-size' ),
+ 'title' => __( 'Icon Size', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Social Icon Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-radius]',
+ 'section' => $_section,
+ 'priority' => 4,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-radius' ),
+ 'title' => __( 'Icon Radius', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-color-type]',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-color-type' ),
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'title' => __( 'Color Type', 'astra' ),
+ 'priority' => 8,
+ 'choices' => array(
+ 'custom' => __( 'Custom', 'astra' ),
+ 'official' => __( 'Official', 'astra' ),
+ ),
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Group: Primary Social Colors Group
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-icon-color-group]',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Icon Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 9,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-color-type]',
+ 'operator' => '==',
+ 'value' => 'custom',
+ ),
+ ),
+ 'responsive' => true,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-label-color-group]',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Label Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 9,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-color-type]',
+ 'operator' => '==',
+ 'value' => 'custom',
+ ),
+ ),
+ 'responsive' => true,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-background-color-group]',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 9,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-color-type]',
+ 'operator' => '==',
+ 'value' => 'custom',
+ ),
+ ),
+ 'responsive' => true,
+ ),
+
+ /**
+ * Option: Social Text Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-color',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-color' ),
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-icon-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 5,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Social Text Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-h-color',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-h-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-icon-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 7,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Social Label Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-label-color',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-label-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-label-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 8,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Social Label Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-label-h-color',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-label-h-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-label-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 8,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Social Background Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-bg-color',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-bg-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-background-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 9,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Social Background Hover Color
+ */
+ array(
+ 'name' => $builder_type . '-social-' . $index . '-bg-h-color',
+ 'default' => astra_get_option( $builder_type . '-social-' . $index . '-bg-h-color' ),
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-background-color-group]',
+ 'section' => $_section,
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 11,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ if ( 'footer' === $builder_type ) {
+
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-social-' . $index . '-alignment]',
+ 'default' => astra_get_option( 'footer-social-' . $index . '-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 6,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'left' => 'align-left',
+ 'center' => 'align-center',
+ 'right' => 'align-right',
+ ),
+ );
+ }
+
+ $social_configs[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type );
+
+ $social_configs[] = Astra_Builder_Base_Configuration::prepare_typography_options(
+ $_section,
+ array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-label-toggle]',
+ 'operator' => '===',
+ 'value' => true,
+ ),
+ )
+ );
+
+ $social_configs[] = $_configs;
+ }
+
+ $social_configs = call_user_func_array( 'array_merge', $social_configs + array( array() ) );
+ $configurations = array_merge( $configurations, $social_configs );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Social_Icon_Component_Configs();
diff --git a/inc/customizer/configurations/builder/class-astra-builder-base-configuration.php b/inc/customizer/configurations/builder/class-astra-builder-base-configuration.php
new file mode 100644
index 0000000..8086886
--- /dev/null
+++ b/inc/customizer/configurations/builder/class-astra-builder-base-configuration.php
@@ -0,0 +1,547 @@
+<?php
+/**
+ * Astra Builder Base Configuration.
+ *
+ * @package astra-builder
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+/**
+ * Class Astra_Builder_Base_Configuration.
+ */
+final class Astra_Builder_Base_Configuration {
+
+ /**
+ * Member Variable
+ *
+ * @var instance
+ */
+ private static $instance = null;
+
+
+ /**
+ * Initiator
+ */
+ public static function get_instance() {
+
+ if ( is_null( self::$instance ) ) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+
+ }
+
+ /**
+ * Prepare Advance header configuration.
+ *
+ * @param string $section_id section id.
+ * @return array
+ */
+ public static function prepare_advanced_tab( $section_id ) {
+
+ return array(
+
+ /**
+ * Option: Padded Layout Custom Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $section_id . '-padding]',
+ 'default' => astra_get_option( $section_id . '-padding' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $section_id,
+ 'priority' => 210,
+ 'title' => __( 'Padding', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Padded Layout Custom Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $section_id . '-margin]',
+ 'default' => astra_get_option( $section_id . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $section_id,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+ }
+
+ /**
+ * Prepare Advance Typography configuration.
+ *
+ * @param string $section_id section id.
+ * @param array $required_condition Required Condition.
+ * @return array
+ */
+ public static function prepare_typography_options( $section_id, $required_condition = array() ) {
+
+ $parent = ASTRA_THEME_SETTINGS . '[' . $section_id . '-typography]';
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+
+ $_configs = array(
+
+ array(
+ 'name' => $parent,
+ 'default' => astra_get_option( $section_id . '-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Text Font', 'astra' ),
+ 'section' => $section_id,
+ 'transport' => 'postMessage',
+ 'priority' => 16,
+ 'context' => empty( $required_condition ) ? Astra_Builder_Helper::$design_tab : $required_condition,
+ ),
+
+ /**
+ * Option: Font Size
+ */
+ array(
+ 'name' => 'font-size-' . $section_id,
+ 'type' => 'sub-control',
+ 'parent' => $parent,
+ 'section' => $section_id,
+ 'control' => 'ast-responsive',
+ 'default' => astra_get_option( 'font-size-' . $section_id ),
+ 'transport' => 'postMessage',
+ 'priority' => 14,
+ 'title' => __( 'Size', 'astra' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+
+ );
+ } else {
+
+ $_configs = array(
+
+ /**
+ * Option: Font Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[font-size-' . $section_id . ']',
+ 'type' => 'control',
+ 'section' => $section_id,
+ 'control' => 'ast-responsive',
+ 'default' => astra_get_option( 'font-size-' . $section_id ),
+ 'transport' => 'postMessage',
+ 'priority' => 16,
+ 'title' => __( 'Font Size', 'astra' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => empty( $required_condition ) ? Astra_Builder_Helper::$design_tab : $required_condition,
+ ),
+ );
+ }
+
+ return $_configs;
+ }
+
+ /**
+ * Prepare Visibility options.
+ *
+ * @param string $_section section id.
+ * @param string $builder_type Builder Type.
+ * @return array
+ */
+ public static function prepare_visibility_tab( $_section, $builder_type = 'header' ) {
+
+ $configs = array(
+
+ /**
+ * Option: Hide on tablet
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-tablet]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'default' => astra_get_option( $_section . '-hide-tablet' ),
+ 'section' => $_section,
+ 'priority' => 320,
+ 'title' => __( 'Hide on Tablet', 'astra' ),
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$tablet_general_tab,
+ ),
+
+ /**
+ * Option: Hide on mobile
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-mobile]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'default' => astra_get_option( $_section . '-hide-mobile' ),
+ 'section' => $_section,
+ 'priority' => 330,
+ 'title' => __( 'Hide on Mobile', 'astra' ),
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$mobile_general_tab,
+ ),
+ );
+
+ if ( 'footer' === $builder_type ) {
+ /**
+ * Option: Hide on desktop
+ */
+ $configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-desktop]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'default' => astra_get_option( $_section . '-hide-desktop' ),
+ 'section' => $_section,
+ 'priority' => 320,
+ 'title' => __( 'Hide on Desktop', 'astra' ),
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$desktop_general_tab,
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ );
+ }
+
+ return $configs;
+ }
+
+ /**
+ * Prepare common options for the widgets by type.
+ *
+ * @param string $type type.
+ * @return array
+ */
+ public static function prepare_widget_options( $type = 'header' ) {
+ $html_config = array();
+
+
+ if ( 'footer' === $type ) {
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ?
+ Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_widgets;
+ } else {
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ?
+ Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_widgets;
+ }
+ $astra_has_widgets_block_editor = astra_has_widgets_block_editor();
+ for ( $index = 1; $index <= $component_limit; $index++ ) {
+
+ $_section = ( ! $astra_has_widgets_block_editor ) ? 'sidebar-widgets-' . $type . '-widget-' . $index : 'astra-sidebar-widgets-' . $type . '-widget-' . $index;
+
+ $html_config[] = array(
+
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'Widget ', 'astra' ) . $index,
+ 'panel' => 'panel-' . $type . '-builder-group',
+ 'clone_index' => $index,
+ 'clone_type' => $type . '-widget',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Widget title color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-title-color]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-title-color' ),
+ 'title' => __( 'Title Color', 'astra' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 7,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'divider' => ( ! $astra_has_widgets_block_editor ) ? array( 'ast_class' => 'ast-top-divider' ) : '',
+ 'rgba' => true,
+ ),
+ /**
+ * Option: Widget Color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-color]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-color' ),
+ 'title' => __( 'Content Color', 'astra' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 7,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-link-color-group]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Link Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 7,
+ 'responsive' => true,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Widget link color.
+ */
+ array(
+ 'name' => $type . '-widget-' . $index . '-link-color',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-link-color' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-link-color-group]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'priority' => 3,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'title' => __( 'Normal', 'astra' ),
+ ),
+
+ /**
+ * Option: Widget link color.
+ */
+ array(
+ 'name' => $type . '-widget-' . $index . '-link-h-color',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-link-h-color' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-link-color-group]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'priority' => 1,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'title' => __( 'Hover', 'astra' ),
+ ),
+
+ /**
+ * Option: Margin
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ ),
+ );
+
+ if ( 'footer' === $type ) {
+ $html_config [] = array(
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-alignment-' . $index . ']',
+ 'default' => astra_get_option( $type . '-widget-alignment-' . $index ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'left' => 'align-left',
+ 'center' => 'align-center',
+ 'right' => 'align-right',
+ ),
+ 'divider' => ( ! $astra_has_widgets_block_editor ) ? array( 'ast_class' => 'ast-top-divider' ) : '',
+ ),
+ );
+ }
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+ $html_config[] = array(
+
+ /**
+ * Option: Widget Title Typography
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-text-typography]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-text-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Title Font', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ /**
+ * Option: Widget Title Font Size
+ */
+ array(
+ 'name' => $type . '-widget-' . $index . '-font-size',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-text-typography]',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Size', 'astra' ),
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 2,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+
+ /**
+ * Option: Widget Content Typography
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-content-typography]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-content-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Content Font', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 91,
+ ),
+
+ /**
+ * Option: Widget Content Font Size
+ */
+ array(
+ 'name' => $type . '-widget-' . $index . '-content-font-size',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-content-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-content-typography]',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Size', 'astra' ),
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 2,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+ );
+ } else {
+ $html_config[] = array(
+
+ /**
+ * Option: Widget Title Font Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-font-size]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-font-size' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Title Font Size', 'astra' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 90,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+
+ /**
+ * Option: Widget Content Font Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $type . '-widget-' . $index . '-content-font-size]',
+ 'default' => astra_get_option( $type . '-widget-' . $index . '-content-font-size' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Content Font Size', 'astra' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'priority' => 91,
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+ );
+ }
+
+ $html_config[] = self::prepare_visibility_tab( $_section, $type );
+
+ }
+
+ return call_user_func_array( 'array_merge', $html_config + array( array() ) );
+
+ }
+
+}
+
+/**
+ * Prepare if class 'Astra_Builder_Base_Configuration' exist.
+ * Kicking this off by calling 'get_instance()' method
+ */
+Astra_Builder_Base_Configuration::get_instance();
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-above-footer-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-above-footer-configs.php
new file mode 100644
index 0000000..c42652e
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-above-footer-configs.php
@@ -0,0 +1,284 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Above footer.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Above footer Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Above_Footer_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Above Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-above-footer-builder';
+
+ $column_count = range( 1, Astra_Builder_Helper::$num_of_footer_columns );
+ $column_count = array_combine( $column_count, $column_count );
+
+ $_configs = array(
+
+ // Section: Above Footer.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Above Footer', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Footer Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Column count
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-column]',
+ 'default' => astra_get_option( 'hba-footer-column' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'title' => __( 'Column', 'astra' ),
+ 'choices' => $column_count,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-above-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'above_footer' ),
+ ),
+ ),
+
+ /**
+ * Option: Row Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-layout]',
+ 'section' => $_section,
+ 'default' => astra_get_option( 'hba-footer-layout' ),
+ 'priority' => 3,
+ 'title' => __( 'Layout', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-row-layout',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'input_attrs' => array(
+ 'responsive' => true,
+ 'footer' => 'primary',
+ 'layout' => Astra_Builder_Helper::$footer_row_layouts,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Layout Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-layout-width]',
+ 'default' => astra_get_option( 'hba-footer-layout-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 25,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'suffix' => '',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Section: Above Footer Height.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-height]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-footer-height' ),
+ 'priority' => 30,
+ 'title' => __( 'Height', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'input_attrs' => array(
+ 'min' => 30,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Vertical Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-vertical-alignment]',
+ 'default' => astra_get_option( 'hba-footer-vertical-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 34,
+ 'title' => __( 'Vertical Alignment', 'astra' ),
+ 'choices' => array(
+ 'flex-start' => __( 'Top', 'astra' ),
+ 'center' => __( 'Middle', 'astra' ),
+ 'flex-end' => __( 'Bottom', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-stack]',
+ 'default' => astra_get_option( 'hba-stack' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Inner Elements Layout', 'astra' ),
+ 'choices' => array(
+ 'stack' => __( 'Stack', 'astra' ),
+ 'inline' => __( 'Inline', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-above-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'above_footer' ),
+ ),
+ 'renderAs' => 'text',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Section: Above Footer Border.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-separator]',
+ 'section' => $_section,
+ 'priority' => 40,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-footer-separator' ),
+ 'title' => __( 'Top Border Size', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Section: Above Footer Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-top-border-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-footer-top-border-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 50,
+ 'title' => __( 'Border Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hba-footer-separator]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ ),
+
+ // Option: Above Footer Background styling.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-footer-bg-obj-responsive]',
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-footer-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Inner Spacing
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-inner-spacing]',
+ 'section' => $_section,
+ 'priority' => 205,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-inner-spacing' ),
+ 'title' => __( 'Inner Column Spacing', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, 'footer' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Above_Footer_Configs();
+}
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-below-footer-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-below-footer-configs.php
new file mode 100644
index 0000000..63d57fc
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-below-footer-configs.php
@@ -0,0 +1,284 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Below footer.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Below footer Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Below_Footer_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Below footer Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-below-footer-builder';
+
+ $column_count = range( 1, Astra_Builder_Helper::$num_of_footer_columns );
+ $column_count = array_combine( $column_count, $column_count );
+
+ $_configs = array(
+
+ // Section: Below Footer.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Below Footer', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Footer Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Column count
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-column]',
+ 'default' => astra_get_option( 'hbb-footer-column' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'title' => __( 'Column', 'astra' ),
+ 'choices' => $column_count,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-below-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'below_footer' ),
+ ),
+ ),
+
+ /**
+ * Option: Row Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-layout]',
+ 'section' => $_section,
+ 'default' => astra_get_option( 'hbb-footer-layout' ),
+ 'priority' => 3,
+ 'title' => __( 'Layout', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-row-layout',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'input_attrs' => array(
+ 'responsive' => true,
+ 'footer' => 'primary',
+ 'layout' => Astra_Builder_Helper::$footer_row_layouts,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Layout Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-layout-width]',
+ 'default' => astra_get_option( 'hbb-footer-layout-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 25,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'suffix' => '',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Section: Below Footer Height.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-height]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-footer-height' ),
+ 'priority' => 30,
+ 'title' => __( 'Height', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 30,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Vertical Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-vertical-alignment]',
+ 'default' => astra_get_option( 'hbb-footer-vertical-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 34,
+ 'title' => __( 'Vertical Alignment', 'astra' ),
+ 'choices' => array(
+ 'flex-start' => __( 'Top', 'astra' ),
+ 'center' => __( 'Middle', 'astra' ),
+ 'flex-end' => __( 'Bottom', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-stack]',
+ 'default' => astra_get_option( 'hbb-stack' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Inner Elements Layout', 'astra' ),
+ 'choices' => array(
+ 'stack' => __( 'Stack', 'astra' ),
+ 'inline' => __( 'Inline', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-below-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'below_footer' ),
+ ),
+ 'renderAs' => 'text',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Section: Below Footer Border.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-separator]',
+ 'section' => $_section,
+ 'priority' => 40,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-footer-separator' ),
+ 'title' => __( 'Top Border Size', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Section: Below Footer Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-top-border-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-footer-top-border-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 50,
+ 'title' => __( 'Border Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ ASTRA_THEME_SETTINGS . '[hbb-footer-separator]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Below Footer Background styling.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-footer-bg-obj-responsive]',
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-footer-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ 'priority' => 70,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Inner Spacing
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-inner-spacing]',
+ 'section' => $_section,
+ 'priority' => 205,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-inner-spacing' ),
+ 'title' => __( 'Inner Column Spacing', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, 'footer' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Below_Footer_Configs();
+}
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-copyright-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-copyright-configs.php
new file mode 100644
index 0000000..b5efa0a
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-copyright-configs.php
@@ -0,0 +1,165 @@
+<?php
+/**
+ * Footer Copyright Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Copyright_Configs extends Astra_Customizer_Config_Base {
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-footer-copyright';
+ $_configs = array(
+
+ /*
+ * Footer Builder section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'Copyright', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ ),
+
+ /**
+ * Option: Footer Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Footer Copyright Html Editor.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-copyright-editor]',
+ 'type' => 'control',
+ 'control' => 'ast-html-editor',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 4,
+ 'default' => astra_get_option( 'footer-copyright-editor', 'Copyright [copyright] [current_year] [site_title] | Powered by [theme_author]' ),
+ 'input_attrs' => array(
+ 'id' => 'ast-footer-copyright',
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-footer-copyright',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'footer_copyright' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Column Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-copyright-alignment]',
+ 'default' => astra_get_option( 'footer-copyright-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 6,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'left' => 'align-left',
+ 'center' => 'align-center',
+ 'right' => 'align-right',
+ ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Text Color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-copyright-color]',
+ 'default' => astra_get_option( 'footer-copyright-color' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 8,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Text Color', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+
+ ),
+
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_typography_options( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, 'footer' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Copyright_Configs();
+
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-builder-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-builder-configs.php
new file mode 100644
index 0000000..5fa305b
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-builder-configs.php
@@ -0,0 +1,314 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+// Bail if Customizer config base class does not exist.
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Footer_Builder_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Footer Zones.
+ *
+ * @var array
+ * @since 3.0.0
+ */
+ public static $zones = array(
+ 'above' => array(),
+ 'primary' => array(),
+ 'below' => array(),
+ );
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $cloned_component_track = Astra_Builder_Helper::$component_count_array;
+ $widget_config = array();
+ $astra_has_widgets_block_editor = astra_has_widgets_block_editor();
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_html; $index++ ) {
+
+ $footer_html_section = 'section-fb-html-' . $index;
+
+ if ( in_array( $footer_html_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ Astra_Builder_Helper::$footer_desktop_items[ 'html-' . $index ] = array(
+ 'name' => 'HTML ' . $index,
+ 'icon' => 'text',
+ 'section' => $footer_html_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'html',
+ 'builder' => 'footer',
+ );
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_widgets; $index++ ) {
+
+ $footer_widget_section = 'sidebar-widgets-footer-widget-' . $index;
+
+ if ( in_array( $footer_widget_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ Astra_Builder_Helper::$footer_desktop_items[ 'widget-' . $index ] = array(
+ 'name' => 'Widget ' . $index,
+ 'icon' => 'wordpress',
+ 'section' => $footer_widget_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'widget',
+ 'builder' => 'footer',
+ );
+
+ if ( $astra_has_widgets_block_editor ) {
+ $widget_config[] = array(
+ 'name' => $footer_widget_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'panel' => 'panel-footer-builder-group',
+ );
+ }
+ }
+
+ if ( $astra_has_widgets_block_editor ) {
+ $configurations = array_merge( $configurations, $widget_config );
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_button; $index++ ) {
+
+ $footer_button_section = 'section-fb-button-' . $index;
+
+ if ( in_array( $footer_button_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ Astra_Builder_Helper::$footer_desktop_items[ 'button-' . $index ] = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_footer_button ) ? 'Button' : 'Button ' . $index,
+ 'icon' => 'admin-links',
+ 'section' => $footer_button_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'button',
+ 'builder' => 'footer',
+ );
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_social_icons; $index++ ) {
+
+ $footer_social_section = 'section-fb-social-icons-' . $index;
+
+ if ( in_array( $footer_social_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ Astra_Builder_Helper::$footer_desktop_items[ 'social-icons-' . $index ] = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_footer_social_icons ) ? 'Social' : 'Social ' . $index,
+ 'icon' => 'share',
+ 'section' => $footer_social_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'social-icons',
+ 'builder' => 'footer',
+ );
+ }
+
+ $zone_base = array( 'above', 'primary', 'below' );
+
+ foreach ( $zone_base as $key => $base ) {
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_columns; $index++ ) {
+ self::$zones[ $base ][ $base . '_' . $index ] = ucfirst( $base ) . ' Section ' . $index;
+ }
+ }
+
+ $_configs = array(
+
+ array(
+ 'name' => 'panel-footer-builder-group',
+ 'type' => 'panel',
+ 'priority' => 60,
+ 'title' => __( 'Footer Builder', 'astra' ),
+ ),
+
+ /**
+ * Option: Footer Layout
+ */
+ array(
+ 'name' => 'section-footer-builder-layout',
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'Footer Layout', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => 'section-footer-builder-layout-ast-context-tabs',
+ 'section' => 'section-footer-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /*
+ * Header Builder section
+ */
+ array(
+ 'name' => 'section-footer-builder',
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'Footer Builder', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_tab',
+ 'operator' => 'in',
+ 'value' => array( 'general', 'design' ),
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Footer Builder
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[builder-footer]',
+ 'section' => 'section-footer-builder',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 20,
+ 'description' => '',
+ ),
+
+ // Group Option: Global Footer Background styling.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-bg-obj-responsive]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-background',
+ 'default' => astra_get_option( 'footer-bg-obj-responsive' ),
+ 'section' => 'section-footer-builder-layout',
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'title' => __( 'Background Color & Image', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Footer Background Color notice.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-bg-obj-responsive-description]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-footer-builder-layout',
+ 'priority' => 71,
+ 'label' => '',
+ 'help' => __( 'If this color setting is not reflecting, check if colors are set from dedicated above, below or primary footer settings.', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Footer Desktop Items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-desktop-items]',
+ 'section' => 'section-footer-builder',
+ 'type' => 'control',
+ 'control' => 'ast-builder',
+ 'title' => __( 'Footer Builder', 'astra' ),
+ 'priority' => 10,
+ 'default' => astra_get_option( 'footer-desktop-items' ),
+ 'choices' => Astra_Builder_Helper::$footer_desktop_items,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-footer',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'footer_markup' ),
+ ),
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[footer-desktop-items]',
+ 'rows' => array( 'above', 'primary', 'below' ),
+ 'zones' => self::$zones,
+ 'layouts' => array(
+ 'above' => array(
+ 'column' => astra_get_option( 'hba-footer-column' ),
+ 'layout' => astra_get_option( 'hba-footer-layout' ),
+ ),
+ 'primary' => array(
+ 'column' => astra_get_option( 'hb-footer-column' ),
+ 'layout' => astra_get_option( 'hb-footer-layout' ),
+ ),
+ 'below' => array(
+ 'column' => astra_get_option( 'hbb-footer-column' ),
+ 'layout' => astra_get_option( 'hbb-footer-layout' ),
+ ),
+ ),
+ 'status' => array(
+ 'above' => true,
+ 'primary' => true,
+ 'below' => true,
+ ),
+ ),
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_tab',
+ 'operator' => 'in',
+ 'value' => array( 'general', 'design' ),
+ ),
+ ),
+ ),
+
+ /**
+ * Footer Available draggable items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-draggable-items]',
+ 'section' => 'section-footer-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-draggable-items',
+ 'priority' => 10,
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[footer-desktop-items]',
+ 'zones' => array( 'above', 'primary', 'below' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( 'section-footer-builder-layout' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ new Astra_Customizer_Footer_Builder_Configs();
+}
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-menu-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-menu-configs.php
new file mode 100644
index 0000000..28cb91f
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-menu-configs.php
@@ -0,0 +1,371 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Footer_Menu_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-footer-menu';
+
+ $_configs = array(
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+
+ ),
+
+ // Section: Primary Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Footer Menu', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ 'priority' => 50,
+ ),
+
+ /**
+ * Option: Theme Menu create link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-create-menu-link]',
+ 'default' => astra_get_option( 'footer-create-menu-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => $_section,
+ 'priority' => 10,
+ 'link_type' => 'section',
+ 'linked' => 'menu_locations',
+ 'link_text' => __( 'Configure Menu from Here.', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+
+ ),
+
+
+ // Option: Footer Menu Layout.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-layout]',
+ 'default' => astra_get_option( 'footer-menu-layout' ),
+ 'section' => $_section,
+ 'priority' => 20,
+ 'title' => __( 'Layout', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.footer-widget-area[data-section="section-footer-menu"] nav',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'footer_menu' ),
+ ),
+ 'choices' => array(
+ 'horizontal' => __( 'Inline', 'astra' ),
+ 'vertical' => __( 'Stack', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'responsive' => true,
+ 'renderAs' => 'text',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-alignment]',
+ 'default' => astra_get_option( 'footer-menu-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 21,
+ 'title' => __( 'Alignment', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'choices' => array(
+ 'flex-start' => 'align-left',
+ 'center' => 'align-center',
+ 'flex-end' => 'align-right',
+ ),
+ ),
+
+ // Option Group: Menu Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-link-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Link / Text', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'responsive' => true,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-background-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'responsive' => true,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ // Option: Menu Color.
+ array(
+ 'name' => 'footer-menu-color-responsive',
+ 'default' => astra_get_option( 'footer-menu-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-link-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'section' => $_section,
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 7,
+ ),
+
+ // Option: Menu Background image, color.
+ array(
+ 'name' => 'footer-menu-bg-obj-responsive',
+ 'default' => astra_get_option( 'footer-menu-bg-obj-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-background',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'data_attrs' => array( 'name' => 'footer-menu-bg-obj-responsive' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'label' => __( 'Normal', 'astra' ),
+ 'priority' => 9,
+ ),
+
+ // Option: Menu Hover Color.
+ array(
+ 'name' => 'footer-menu-h-color-responsive',
+ 'default' => astra_get_option( 'footer-menu-h-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-link-colors]',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 19,
+ ),
+
+ // Option: Menu Hover Background Color.
+ array(
+ 'name' => 'footer-menu-h-bg-color-responsive',
+ 'default' => astra_get_option( 'footer-menu-h-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 21,
+ ),
+
+ // Option: Active Menu Color.
+ array(
+ 'name' => 'footer-menu-a-color-responsive',
+ 'default' => astra_get_option( 'footer-menu-a-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-link-colors]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Active', 'astra' ),
+ 'title' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 31,
+ ),
+
+ // Option: Active Menu Background Color.
+ array(
+ 'name' => 'footer-menu-a-bg-color-responsive',
+ 'default' => astra_get_option( 'footer-menu-a-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'title' => __( 'Active', 'astra' ),
+ 'tab' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 33,
+ ),
+
+ // Option - Menu Space.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-main-menu-spacing]',
+ 'default' => astra_get_option( 'footer-main-menu-spacing' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'priority' => 210,
+ 'title' => __( 'Menu Spacing', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+
+ $new_configs = array(
+
+ // Option Group: Menu Typography.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-typography]',
+ 'default' => astra_get_option( 'footer-menu-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Menu Font', 'astra' ),
+ 'section' => $_section,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'transport' => 'postMessage',
+ 'priority' => 120,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Menu Font Size.
+ array(
+ 'name' => 'footer-menu-font-size',
+ 'default' => astra_get_option( 'footer-menu-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 23,
+ 'title' => __( 'Size', 'astra' ),
+ 'control' => 'ast-responsive',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+ );
+ } else {
+
+ $new_configs = array(
+
+ // Option: Menu Font Size.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-font-size]',
+ 'default' => astra_get_option( 'footer-menu-font-size' ),
+ 'section' => $_section,
+ 'type' => 'control',
+ 'priority' => 120,
+ 'title' => __( 'Menu Font Size', 'astra' ),
+ 'control' => 'ast-responsive',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+ }
+
+ $_configs = array_merge( $_configs, $new_configs );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, 'footer' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating 'new' object of this class.
+ */
+ new Astra_Customizer_Footer_Menu_Configs();
+}
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-social-icons-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-social-icons-configs.php
new file mode 100644
index 0000000..e067724
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-footer-social-icons-configs.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Social Icons Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Footer_Social_Icons_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Social Icons Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Social_Icon_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-social-icons-' );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Footer_Social_Icons_Configs();
+
diff --git a/inc/customizer/configurations/builder/footer/class-astra-customizer-primary-footer-configs.php b/inc/customizer/configurations/builder/footer/class-astra-customizer-primary-footer-configs.php
new file mode 100644
index 0000000..31ba074
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-customizer-primary-footer-configs.php
@@ -0,0 +1,268 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Primary_Footer_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-primary-footer-builder';
+
+ $column_count = range( 1, Astra_Builder_Helper::$num_of_footer_columns );
+ $column_count = array_combine( $column_count, $column_count );
+
+ $_configs = array(
+
+ // Section: Primary Footer.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Primary Footer', 'astra' ),
+ 'panel' => 'panel-footer-builder-group',
+ 'priority' => 20,
+ ),
+
+ /**
+ * Option: Footer Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Column count
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-column]',
+ 'default' => astra_get_option( 'hb-footer-column' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'title' => __( 'Column', 'astra' ),
+ 'choices' => $column_count,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-primary-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'primary_footer' ),
+ ),
+ ),
+
+ /**
+ * Option: Row Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-layout]',
+ 'section' => $_section,
+ 'default' => astra_get_option( 'hb-footer-layout' ),
+ 'priority' => 3,
+ 'title' => __( 'Layout', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-row-layout',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'input_attrs' => array(
+ 'responsive' => true,
+ 'footer' => 'primary',
+ 'layout' => Astra_Builder_Helper::$footer_row_layouts,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Layout Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-layout-width]',
+ 'default' => astra_get_option( 'hb-footer-layout-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 25,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ /**
+ * Option: Vertical Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-vertical-alignment]',
+ 'default' => astra_get_option( 'hb-footer-vertical-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 30,
+ 'title' => __( 'Vertical Alignment', 'astra' ),
+ 'choices' => array(
+ 'flex-start' => __( 'Top', 'astra' ),
+ 'center' => __( 'Middle', 'astra' ),
+ 'flex-end' => __( 'Bottom', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-stack]',
+ 'default' => astra_get_option( 'hb-stack' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Inner Elements Layout', 'astra' ),
+ 'choices' => array(
+ 'stack' => __( 'Stack', 'astra' ),
+ 'inline' => __( 'Inline', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-primary-footer-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => array( Astra_Builder_Footer::get_instance(), 'primary_footer' ),
+ ),
+ 'renderAs' => 'text',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Footer Separator.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-main-sep]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-footer-main-sep' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => $_section,
+ 'priority' => 4,
+ 'title' => __( 'Top Border Size', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Footer Top Boder Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-main-sep-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-footer-main-sep-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Border Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hb-footer-main-sep]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Sub Option: Footer Background.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-footer-bg-obj-responsive]',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'priority' => 7,
+ 'data_attrs' => array(
+ 'name' => 'hb-footer-bg-obj-responsive',
+ ),
+ 'default' => astra_get_option( 'hb-footer-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Inner Spacing
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-inner-spacing]',
+ 'section' => $_section,
+ 'priority' => 205,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-inner-spacing' ),
+ 'title' => __( 'Inner Column Spacing', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, 'footer' ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Primary_Footer_Configs();
+}
diff --git a/inc/customizer/configurations/builder/footer/class-astra-footer-button-component-configs.php b/inc/customizer/configurations/builder/footer/class-astra-footer-button-component-configs.php
new file mode 100644
index 0000000..a443890
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-footer-button-component-configs.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Footer_Button_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Button_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-button-' );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Footer_Button_Component_Configs();
diff --git a/inc/customizer/configurations/builder/footer/class-astra-footer-html-component-configs.php b/inc/customizer/configurations/builder/footer/class-astra-footer-html-component-configs.php
new file mode 100644
index 0000000..5671c5e
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-footer-html-component-configs.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Footer_Html_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Html_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-html-' );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Footer_Html_Component_Configs();
diff --git a/inc/customizer/configurations/builder/footer/class-astra-footer-widget-component-configs.php b/inc/customizer/configurations/builder/footer/class-astra-footer-widget-component-configs.php
new file mode 100644
index 0000000..5ba4f18
--- /dev/null
+++ b/inc/customizer/configurations/builder/footer/class-astra-footer-widget-component-configs.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Footer_Widget_Component_Configs extends Astra_Customizer_Config_Base {
+
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $html_config = Astra_Builder_Base_Configuration::prepare_widget_options( 'footer' );
+ $configurations = array_merge( $configurations, $html_config );
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Footer_Widget_Component_Configs();
+
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-above-header-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-above-header-configs.php
new file mode 100644
index 0000000..92244fc
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-above-header-configs.php
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Above Header.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Above Header Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Above_Header_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Above Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-above-header-builder';
+
+ $_configs = array(
+
+ // Section: Above Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Above Header', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ // Section: Above Header Height.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-header-height]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-header-height' ),
+ 'priority' => 30,
+ 'title' => __( 'Height', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 30,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Section: Above Header Border.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-header-separator]',
+ 'section' => $_section,
+ 'priority' => 40,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-header-separator' ),
+ 'title' => __( 'Bottom Border Size', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 10,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Section: Above Header Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-header-bottom-border-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-header-bottom-border-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 50,
+ 'title' => __( 'Bottom Border Color', 'astra' ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hba-header-separator]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ ),
+
+ // Option: Above Header Background styling.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hba-header-bg-obj-responsive]',
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hba-header-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Above_Header_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-below-header-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-below-header-configs.php
new file mode 100644
index 0000000..625b1cb
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-below-header-configs.php
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Below Header.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Below Header Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Below_Header_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Below Header Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-below-header-builder';
+
+ $_configs = array(
+
+ // Section: Below Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Below Header', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ // Section: Below Header Height.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-header-height]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-header-height' ),
+ 'priority' => 30,
+ 'title' => __( 'Height', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 30,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Section: Below Header Border.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-header-separator]',
+ 'section' => $_section,
+ 'priority' => 40,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-header-separator' ),
+ 'title' => __( 'Bottom Border Size', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 10,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Section: Below Header Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-header-bottom-border-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-header-bottom-border-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 50,
+ 'title' => __( 'Bottom Border Color', 'astra' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hbb-header-separator]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ Astra_Builder_Helper::$design_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Below Header Background styling.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hbb-header-bg-obj-responsive]',
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hbb-header-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Below_Header_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-edd-cart-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-edd-cart-configs.php
new file mode 100644
index 0000000..13cb19a
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-edd-cart-configs.php
@@ -0,0 +1,384 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration for EDD Cart Element.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Edd_Cart_Configs extends Astra_Customizer_Config_Base {
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 'section-header-edd-cart' : 'section-edd-general';
+
+ $_configs = array(
+
+ /**
+ * EDD Cart section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'EDD Cart', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header cart total
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-total-display]',
+ 'default' => astra_get_option( 'edd-header-cart-total-display' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Display Cart Total', 'astra' ),
+ 'priority' => 50,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-edd-cart',
+ 'container_inclusive' => false,
+ 'render_callback' => array( 'Astra_Builder_Header', 'header_edd_cart' ),
+ ),
+ 'control' => 'ast-toggle-control',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Cart Title
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-title-display]',
+ 'default' => astra_get_option( 'edd-header-cart-title-display' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Display Cart Title', 'astra' ),
+ 'priority' => 55,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-edd-cart',
+ 'container_inclusive' => false,
+ 'render_callback' => array( 'Astra_Builder_Header', 'header_edd_cart' ),
+ ),
+ 'control' => 'ast-toggle-control',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+ /**
+ * Option: Icon Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]',
+ 'default' => astra_get_option( 'edd-header-cart-icon-style' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'title' => __( 'Style', 'astra' ),
+ 'control' => 'ast-selector',
+ 'priority' => 40,
+ 'choices' => array(
+ 'outline' => __( 'Outline', 'astra' ),
+ 'fill' => __( 'Fill', 'astra' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Background color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-color]',
+ 'default' => astra_get_option( 'edd-header-cart-icon-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Color', 'astra' ),
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'priority' => 45,
+ ),
+
+ /**
+ * Option: Border Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-radius]',
+ 'default' => astra_get_option( 'edd-header-cart-icon-radius' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'suffix' => 'px',
+ 'control' => 'ast-slider',
+ 'priority' => 47,
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ ),
+
+ /**
+ * Option: Icon color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-edd-cart-icon-color]',
+ 'default' => astra_get_option( 'transparent-header-edd-cart-icon-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'EDD Cart Icon Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'section' => 'section-transparent-header',
+ 'priority' => 95,
+ ),
+ );
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $_edd_configs = array(
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Divider
+ * Option: EDD cart tray Section divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-edd-cart-tray-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => $_section,
+ 'title' => __( 'Cart Tray', 'astra' ),
+ 'priority' => 60,
+ 'settings' => array(),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Link / Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-cart-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-edd-cart-text-color',
+ 'default' => astra_get_option( 'header-edd-cart-text-color' ),
+ 'title' => __( 'Text Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Link / Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-cart-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-edd-cart-link-color',
+ 'default' => astra_get_option( 'header-edd-cart-link-color' ),
+ 'title' => __( 'Link Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Background Color.
+ array(
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[header-edd-cart-background-color]',
+ 'default' => astra_get_option( 'header-edd-cart-background-color' ),
+ 'title' => __( 'Background Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Separator Color.
+ array(
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[header-edd-cart-separator-color]',
+ 'default' => astra_get_option( 'header-edd-cart-separator-color' ),
+ 'title' => __( 'Separator Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Checkout Button colors.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-text-colors]',
+ 'default' => astra_get_option( 'header-edd-checkout-button-text-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Button Text', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array(
+ 'ast_class' => 'ast-top-divider',
+ 'ast_title' => __( 'Checkout', 'astra' ),
+ ),
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-background-colors]',
+ 'default' => astra_get_option( 'header-edd-checkout-button-background-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Button Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+ // Option: Checkout Button Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-edd-checkout-btn-text-color',
+ 'default' => astra_get_option( 'header-edd-checkout-btn-text-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-background-colors]',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => 'header-edd-checkout-btn-background-color',
+ 'default' => astra_get_option( 'header-edd-checkout-btn-background-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Hover Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-edd-checkout-btn-text-hover-color',
+ 'default' => astra_get_option( 'header-edd-checkout-btn-text-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Hover Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-edd-checkout-button-background-colors]',
+ 'section' => $_section,
+ 'name' => 'header-edd-checkout-btn-bg-hover-color',
+ 'default' => astra_get_option( 'header-edd-checkout-btn-bg-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $_edd_configs );
+
+ $configurations = array_merge( $configurations, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+ }
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Edd_Cart_Configs();
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-header-builder-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-header-builder-configs.php
new file mode 100644
index 0000000..0b38e1e
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-header-builder-configs.php
@@ -0,0 +1,526 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+// Bail if Customizer config base class does not exist.
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Header_Builder_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $cloned_component_track = Astra_Builder_Helper::$component_count_array;
+ $widget_config = array();
+ $astra_has_widgets_block_editor = astra_has_widgets_block_editor();
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_button; $index++ ) {
+
+ $header_button_section = 'section-hb-button-' . $index;
+
+ if ( in_array( $header_button_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ $item = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_header_button ) ? 'Button' : 'Button ' . $index,
+ 'icon' => 'admin-links',
+ 'section' => $header_button_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'button',
+ 'builder' => 'header',
+ );
+
+ Astra_Builder_Helper::$header_desktop_items[ 'button-' . $index ] = $item;
+ Astra_Builder_Helper::$header_mobile_items[ 'button-' . $index ] = $item;
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_html; $index++ ) {
+
+ $header_html_section = 'section-hb-html-' . $index;
+
+ if ( in_array( $header_html_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ $item = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_header_html ) ? 'HTML' : 'HTML ' . $index,
+ 'icon' => 'text',
+ 'section' => $header_html_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'html',
+ 'builder' => 'header',
+ );
+
+ Astra_Builder_Helper::$header_desktop_items[ 'html-' . $index ] = $item;
+ Astra_Builder_Helper::$header_mobile_items[ 'html-' . $index ] = $item;
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_widgets; $index++ ) {
+
+ $header_widget_section = 'sidebar-widgets-header-widget-' . $index;
+
+ if ( in_array( $header_widget_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ $item = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_header_widgets ) ? 'Widget' : 'Widget ' . $index,
+ 'icon' => 'wordpress',
+ 'section' => $header_widget_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'widget',
+ 'builder' => 'header',
+ );
+
+ if ( $astra_has_widgets_block_editor ) {
+ $widget_config[] = array(
+ 'name' => $header_widget_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'panel' => 'panel-header-builder-group',
+ );
+ }
+
+ Astra_Builder_Helper::$header_desktop_items[ 'widget-' . $index ] = $item;
+ Astra_Builder_Helper::$header_mobile_items[ 'widget-' . $index ] = $item;
+ }
+
+ if ( $astra_has_widgets_block_editor ) {
+ $configurations = array_merge( $configurations, $widget_config );
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_menu; $index++ ) {
+
+ switch ( $index ) {
+ case 1:
+ $name = __( 'Primary Menu', 'astra' );
+ break;
+ case 2:
+ $name = __( 'Secondary Menu', 'astra' );
+ break;
+ default:
+ $name = __( 'Menu ', 'astra' ) . $index;
+ break;
+ }
+
+ $item = array(
+ 'name' => $name,
+ 'icon' => 'menu',
+ 'section' => 'section-hb-menu-' . $index,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'menu',
+ 'builder' => 'header',
+ );
+
+ Astra_Builder_Helper::$header_desktop_items[ 'menu-' . $index ] = $item;
+
+ Astra_Builder_Helper::$header_mobile_items[ 'menu-' . $index ] = $item;
+ }
+
+ for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_social_icons; $index++ ) {
+
+ $header_social_section = 'section-hb-social-icons-' . $index;
+
+ if ( in_array( $header_social_section, $cloned_component_track['removed-items'], true ) ) {
+ continue;
+ }
+
+ $item = array(
+ 'name' => ( 1 === Astra_Builder_Helper::$num_of_header_social_icons ) ? 'Social' : 'Social ' . $index,
+ 'icon' => 'share',
+ 'section' => $header_social_section,
+ 'clone' => defined( 'ASTRA_EXT_VER' ),
+ 'type' => 'social-icons',
+ 'builder' => 'header',
+ );
+
+ Astra_Builder_Helper::$header_desktop_items[ 'social-icons-' . $index ] = $item;
+ Astra_Builder_Helper::$header_mobile_items[ 'social-icons-' . $index ] = $item;
+ }
+
+ $_configs = array(
+
+ /*
+ * Header Builder section
+ */
+ array(
+ 'name' => 'section-header-builder',
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'Header Builder', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Layout
+ */
+ array(
+ 'name' => 'section-header-builder-layout',
+ 'type' => 'section',
+ 'priority' => 0,
+ 'title' => __( 'Header Layout', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => 'section-header-builder-layout-ast-context-tabs',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Header Clone Component Track.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[cloned-component-track]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-hidden',
+ 'priority' => 43,
+ 'transport' => 'postMessage',
+ 'partial' => false,
+ 'default' => astra_get_option( 'cloned-component-track' ),
+ ),
+
+ /**
+ * Option: Header Builder
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[builder-header]',
+ 'section' => 'section-header-builder',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 40,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Header Desktop Items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-desktop-items]',
+ 'section' => 'section-header-builder',
+ 'type' => 'control',
+ 'control' => 'ast-builder',
+ 'title' => __( 'Header Builder', 'astra' ),
+ 'priority' => 25,
+ 'default' => astra_get_option( 'header-desktop-items' ),
+ 'choices' => Astra_Builder_Helper::$header_desktop_items,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '#masthead',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Header::get_instance(), 'header_builder_markup' ),
+ ),
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[header-desktop-items]',
+ 'rows' => array( 'popup', 'above', 'primary', 'below' ),
+ 'zones' => array(
+ 'popup' => array(
+ 'popup_content' => 'Popup Content',
+ ),
+ 'above' => array(
+ 'above_left' => 'Top - Left',
+ 'above_left_center' => 'Top - Left Center',
+ 'above_center' => 'Top - Center',
+ 'above_right_center' => 'Top - Right Center',
+ 'above_right' => 'Top - Right',
+ ),
+ 'primary' => array(
+ 'primary_left' => 'Main - Left',
+ 'primary_left_center' => 'Main - Left Center',
+ 'primary_center' => 'Main - Center',
+ 'primary_right_center' => 'Main - Right Center',
+ 'primary_right' => 'Main - Right',
+ ),
+ 'below' => array(
+ 'below_left' => 'Bottom - Left',
+ 'below_left_center' => 'Bottom - Left Center',
+ 'below_center' => 'Bottom - Center',
+ 'below_right_center' => 'Bottom - Right Center',
+ 'below_right' => 'Bottom - Right',
+ ),
+ ),
+ 'status' => array(
+ 'above' => true,
+ 'primary' => true,
+ 'below' => true,
+ ),
+ ),
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_device',
+ 'value' => 'desktop',
+ ),
+ ),
+ ),
+
+ /**
+ * Header Desktop Available draggable items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-desktop-draggable-items]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-draggable-items',
+ 'priority' => 30,
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[header-desktop-items]',
+ 'zones' => array( 'popup', 'above', 'primary', 'below' ),
+ ),
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_device',
+ 'value' => 'desktop',
+ ),
+ array(
+ 'setting' => 'ast_selected_tab',
+ 'value' => 'general',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Header Mobile Items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-items]',
+ 'section' => 'section-header-builder',
+ 'type' => 'control',
+ 'control' => 'ast-builder',
+ 'title' => __( 'Header Builder', 'astra' ),
+ 'priority' => 35,
+ 'default' => astra_get_option( 'header-mobile-items' ),
+ 'choices' => Astra_Builder_Helper::$header_mobile_items,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '#masthead',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Header::get_instance(), 'header_builder_markup' ),
+ ),
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[header-mobile-items]',
+ 'rows' =>
+ array( 'popup', 'above', 'primary', 'below' ),
+ 'zones' =>
+ array(
+ 'popup' =>
+ array(
+ 'popup_content' => 'Popup Content',
+ ),
+ 'above' =>
+ array(
+ 'above_left' => 'Top - Left',
+ 'above_center' => 'Top - Center',
+ 'above_right' => 'Top - Right',
+ ),
+ 'primary' =>
+ array(
+ 'primary_left' => 'Main - Left',
+ 'primary_center' => 'Main - Center',
+ 'primary_right' => 'Main - Right',
+ ),
+ 'below' =>
+ array(
+ 'below_left' => 'Bottom - Left',
+ 'below_center' => 'Bottom - Center',
+ 'below_right' => 'Bottom - Right',
+ ),
+ ),
+ 'status' => array(
+ 'above' => true,
+ 'primary' => true,
+ 'below' => true,
+ ),
+ ),
+ 'context' => Astra_Builder_Helper::$responsive_devices,
+ ),
+
+ /**
+ * Header Mobile Available draggable items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-draggable-items]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-draggable-items',
+ 'input_attrs' => array(
+ 'group' => ASTRA_THEME_SETTINGS . '[header-mobile-items]',
+ 'zones' => array( 'popup', 'above', 'primary', 'below' ),
+ ),
+ 'priority' => 43,
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_device',
+ 'operator' => 'in',
+ 'value' => array( 'tablet', 'mobile' ),
+ ),
+ array(
+ 'setting' => 'ast_selected_tab',
+ 'value' => 'general',
+ ),
+ ),
+ ),
+
+ /**
+ * Header Mobile popup items.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-popup-items]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-hidden',
+ 'priority' => 43,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '#ast-mobile-popup-wrapper',
+ 'container_inclusive' => true,
+ 'render_callback' => array( Astra_Builder_Header::get_instance(), 'mobile_popup' ),
+ ),
+ 'default' => false,
+ ),
+
+ /**
+ * Option: Blog Color Section heading
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-transparent-link-heading]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => 'section-header-builder-layout',
+ 'title' => __( 'Header Types', 'astra' ),
+ 'priority' => 44,
+ 'settings' => array(),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Header Transparant
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-transparant-link]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-header-type-button',
+ 'input_attrs' => array(
+ 'section' => 'section-transparent-header',
+ 'label' => esc_html__( 'Transparent Header', 'astra' ),
+ ),
+ 'priority' => 45,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'settings' => false,
+ ),
+
+ // Option: Header Width.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-header-main-layout-width]',
+ 'default' => astra_get_option( 'hb-header-main-layout-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => 'section-header-builder-layout',
+ 'priority' => 4,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'context' => array(
+ array(
+ 'setting' => 'ast_selected_tab',
+ 'value' => 'design',
+ ),
+ array(
+ 'setting' => 'ast_selected_device',
+ 'value' => 'desktop',
+ ),
+ ),
+ 'transport' => 'postMessage',
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-header-builder-layout-margin]',
+ 'default' => astra_get_option( 'section-header-builder-layout-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => 'section-header-builder-layout',
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'sticky-header' ) ) {
+ /**
+ * Option: Header Transparant
+ */
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-sticky-link]',
+ 'section' => 'section-header-builder-layout',
+ 'type' => 'control',
+ 'control' => 'ast-header-type-button',
+ 'input_attrs' => array(
+ 'section' => 'section-sticky-header',
+ 'label' => esc_html__( 'Sticky Header', 'astra' ),
+ ),
+ 'priority' => 45,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'settings' => false,
+ );
+ }
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ new Astra_Customizer_Header_Builder_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-header-widget-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-header-widget-configs.php
new file mode 100644
index 0000000..8e97945
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-header-widget-configs.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Header_Widget_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $html_config = Astra_Builder_Base_Configuration::prepare_widget_options( 'header' );
+ $configurations = array_merge( $configurations, $html_config );
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Header_Widget_Configs();
+
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-mobile-trigger-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-mobile-trigger-configs.php
new file mode 100644
index 0000000..672b024
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-mobile-trigger-configs.php
@@ -0,0 +1,399 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Mobile_Trigger_Configs extends Astra_Customizer_Config_Base {
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-header-mobile-trigger';
+
+ $_configs = array(
+
+ /*
+ * Header Builder section
+ */
+ array(
+ 'name' => 'section-header-mobile-trigger',
+ 'type' => 'section',
+ 'priority' => 70,
+ 'title' => __( 'Toggle Button', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+
+ ),
+
+ /**
+ * Option: Header Html Editor.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-trigger-icon]',
+ 'type' => 'control',
+ 'control' => 'ast-radio-image',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
+ 'default' => astra_get_option( 'header-trigger-icon' ),
+ 'title' => __( 'Icons', 'astra' ),
+ 'section' => $_section,
+ 'choices' => array(
+ 'menu' => array(
+ 'label' => __( 'menu', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'mobile_menu' ),
+ ),
+ 'menu2' => array(
+ 'label' => __( 'menu2', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'mobile_menu2' ),
+ ),
+ 'menu3' => array(
+ 'label' => __( 'menu3', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'mobile_menu3' ),
+ ),
+ ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-button-wrap',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_mobile_trigger' ),
+ ),
+ 'priority' => 10,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * 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,
+ 'title' => __( 'Toggle Button Style', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'priority' => 11,
+ 'choices' => array(
+ 'fill' => __( 'Fill', 'astra' ),
+ 'outline' => __( 'Outline', 'astra' ),
+ 'minimal' => __( 'Minimal', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-button-wrap',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_mobile_trigger' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Mobile Menu Label
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-menu-label]',
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-button-wrap',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_mobile_trigger' ),
+ ),
+ 'default' => astra_get_option( 'mobile-header-menu-label' ),
+ 'section' => $_section,
+ 'priority' => 20,
+ 'title' => __( 'Menu Label', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Icon Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-icon-size]',
+ 'default' => astra_get_option( 'mobile-header-toggle-icon-size' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => $_section,
+ 'title' => __( 'Icon Size', 'astra' ),
+ 'priority' => 40,
+ 'suffix' => 'px',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 100,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Toggle Button Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-color]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Icon Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 50,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Toggle Button Bg Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-bg-color]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-bg-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Background Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 50,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'operator' => '==',
+ 'value' => 'fill',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Toggle Button Border Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-border-size]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-border-size' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-border',
+ 'transport' => 'postMessage',
+ 'linked_choices' => true,
+ 'priority' => 60,
+ 'title' => __( 'Border Width', 'astra' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'operator' => '==',
+ 'value' => 'outline',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Toggle Button Border Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-border-color]',
+ 'default' => astra_get_option( 'mobile-header-toggle-border-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Border Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 65,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'operator' => '==',
+ 'value' => 'outline',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Border Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-border-radius]',
+ 'default' => astra_get_option( 'mobile-header-toggle-border-radius' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => $_section,
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'priority' => 70,
+ 'suffix' => 'px',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 100,
+ ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'operator' => '!=',
+ 'value' => 'minimal',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+
+ $typo_configs = array(
+
+ // Option Group: Trigger Typography.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-label-typography]',
+ 'default' => astra_get_option( 'mobile-header-label-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Typography', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-menu-label]',
+ 'operator' => '!=',
+ 'value' => '',
+ ),
+ ),
+ ),
+
+ // Option: Trigger Font Size.
+ array(
+ 'name' => 'mobile-header-label-font-size',
+ 'default' => astra_get_option( 'mobile-header-label-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[mobile-header-label-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 23,
+ 'suffix' => 'px',
+ 'title' => __( 'Size', 'astra' ),
+ 'control' => 'ast-slider',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ } else {
+
+ $typo_configs = array(
+
+ // Option: Trigger Font Size.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-label-font-size]',
+ 'default' => astra_get_option( 'mobile-header-label-font-size' ),
+ 'section' => $_section,
+ 'type' => 'control',
+ 'priority' => 70,
+ 'suffix' => 'px',
+ 'title' => __( 'Font Size', 'astra' ),
+ 'control' => 'ast-slider',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+ }
+
+ $_configs = array_merge( $_configs, $typo_configs );
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Mobile_Trigger_Configs();
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-off-canvas-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-off-canvas-configs.php
new file mode 100644
index 0000000..0f46992
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-off-canvas-configs.php
@@ -0,0 +1,280 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Off Canvas.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Off Canvas Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Off_Canvas_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Above Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-popup-header-builder';
+
+ $_configs = array(
+
+ // Section: Off-Canvas.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Off-Canvas', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Mobile Header Type.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'default' => astra_get_option( 'mobile-header-type' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 25,
+ 'title' => __( 'Header Type', 'astra' ),
+ 'choices' => array(
+ 'off-canvas' => __( 'Flyout', 'astra' ),
+ 'full-width' => __( 'Full-Screen', 'astra' ),
+ 'dropdown' => __( 'Dropdown', 'astra' ),
+ ),
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ ),
+
+ /**
+ * Option: Off-Canvas Slide-Out.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-slide]',
+ 'default' => astra_get_option( 'off-canvas-slide' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 30,
+ 'title' => __( 'Position', 'astra' ),
+ 'choices' => array(
+ 'left' => __( 'Left', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'operator' => '==',
+ 'value' => 'off-canvas',
+ ),
+ ),
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Toggle on click of button or link.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-builder-menu-toggle-target]',
+ 'default' => astra_get_option( 'header-builder-menu-toggle-target' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'priority' => 40,
+ 'title' => __( 'Dropdown Target', 'astra' ),
+ 'suffix' => '',
+ 'choices' => array(
+ 'icon' => __( 'Icon', 'astra' ),
+ 'link' => __( 'Link', 'astra' ),
+ ),
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Content alignment option for offcanvas
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-offcanvas-content-alignment]',
+ 'default' => astra_get_option( 'header-offcanvas-content-alignment' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'priority' => 40,
+ 'title' => __( 'Content Alignment', 'astra' ),
+ 'suffix' => '',
+ 'choices' => array(
+ 'flex-start' => __( 'Left', 'astra' ),
+ 'center' => __( 'Center', 'astra' ),
+ 'flex-end' => __( 'Right', 'astra' ),
+ ),
+ 'renderAs' => 'text',
+ 'responsive' => false,
+ 'transport' => 'postMessage',
+ ),
+
+ // Option Group: Off-Canvas Colors Group.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-background]',
+ 'type' => 'control',
+ 'control' => 'ast-background',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 26,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_background_obj' ),
+ 'default' => astra_get_option( 'off-canvas-background' ),
+ ),
+
+ // Option: Off-Canvas Close Icon Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-close-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'off-canvas-close-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 27,
+ 'title' => __( 'Close Icon Color', 'astra' ),
+ 'context' => array(
+ 'relation' => 'AND',
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'operator' => '==',
+ 'value' => 'off-canvas',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'operator' => '==',
+ 'value' => 'full-width',
+ ),
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ // Spacing Between every element in the flyout.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-inner-spacing]',
+ 'default' => astra_get_option( 'off-canvas-inner-spacing' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'title' => __( 'Inner Element Spacing', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 28,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option Group: Off-Canvas Colors Group.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-background]',
+ 'type' => 'control',
+ 'control' => 'ast-background',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 30,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_background_obj' ),
+ 'default' => astra_get_option( 'off-canvas-background' ),
+ ),
+
+ /**
+ * Option: Popup Padding.
+ */
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-padding]',
+ 'default' => astra_get_option( 'off-canvas-padding' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'section' => $_section,
+ 'priority' => 210,
+ 'title' => __( 'Popup Padding', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => array(
+ 'relation' => 'AND',
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'operator' => '==',
+ 'value' => 'off-canvas',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
+ 'operator' => '==',
+ 'value' => 'full-width',
+ ),
+ ),
+ ),
+ ),
+
+ );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Off_Canvas_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-primary-header-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-primary-header-configs.php
new file mode 100644
index 0000000..e693392
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-primary-header-configs.php
@@ -0,0 +1,163 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Primary_Header_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-primary-header-builder';
+
+ $_configs = array(
+
+ /*
+ * Panel - New Header
+ *
+ * @since 3.0.0
+ */
+ array(
+ 'name' => 'panel-header-builder-group',
+ 'type' => 'panel',
+ 'priority' => 20,
+ 'title' => __( 'Header Builder', 'astra' ),
+ ),
+
+ // Section: Primary Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Primary Header', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 20,
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ // Section: Primary Header Height.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-header-height]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-header-height' ),
+ 'priority' => 3,
+ 'title' => __( 'Height', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 30,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Header Separator.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-header-main-sep' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => $_section,
+ 'priority' => 4,
+ 'title' => __( 'Bottom Border Size', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 10,
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Header Bottom Boder Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'hb-header-main-sep-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => $_section,
+ 'priority' => 5,
+ 'title' => __( 'Bottom Border Color', 'astra' ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hb-header-main-sep]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ ),
+
+ // Sub Option: Header Background.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hb-header-bg-obj-responsive]',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-responsive-background',
+ 'transport' => 'postMessage',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'priority' => 7,
+ 'data_attrs' => array(
+ 'name' => 'hb-header-bg-obj-responsive',
+ ),
+ 'default' => astra_get_option( 'hb-header-bg-obj-responsive' ),
+ 'title' => __( 'Background', 'astra' ),
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_advanced_tab( $_section ) );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Primary_Header_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-site-identity-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-site-identity-configs.php
new file mode 100644
index 0000000..febcb12
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-site-identity-configs.php
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Site Identity.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Site Identity Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Customizer_Site_Identity_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Site Identity Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'title_tagline';
+
+ $_configs = array(
+
+ /*
+ * Update the Site Identity section inside Layout -> Header
+ *
+ * @since 3.0.0
+ */
+ array(
+ 'name' => 'title_tagline',
+ 'type' => 'section',
+ 'priority' => 100,
+ 'title' => __( 'Logo', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * 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' => true,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // 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: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ $wp_customize->remove_control( 'astra-settings[divider-section-site-identity-logo]' );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Customizer_Site_Identity_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-customizer-woo-cart-configs.php b/inc/customizer/configurations/builder/header/class-astra-customizer-woo-cart-configs.php
new file mode 100644
index 0000000..06fe574
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-customizer-woo-cart-configs.php
@@ -0,0 +1,530 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Customizer_Woo_Cart_Configs extends Astra_Customizer_Config_Base {
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+ $_section = ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 'section-header-woo-cart' : 'section-woo-general';
+
+ $_configs = array(
+
+ /**
+ * Option: Header cart total
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[woo-header-cart-total-display]',
+ 'default' => astra_get_option( 'woo-header-cart-total-display' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-woo-cart',
+ 'container_inclusive' => false,
+ 'render_callback' => array( 'Astra_Builder_Header', 'header_woo_cart' ),
+ ),
+ 'title' => __( 'Display Cart Total', 'astra' ),
+ 'priority' => 50,
+ 'control' => 'ast-toggle-control',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Cart Title
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[woo-header-cart-title-display]',
+ 'default' => astra_get_option( 'woo-header-cart-title-display' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Display Cart Title', 'astra' ),
+ 'priority' => 55,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-woo-cart',
+ 'container_inclusive' => false,
+ 'render_callback' => array( 'Astra_Builder_Header', 'header_woo_cart' ),
+ ),
+ 'control' => 'ast-toggle-control',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Icon Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[woo-header-cart-icon-style]',
+ 'default' => astra_get_option( 'woo-header-cart-icon-style' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'title' => __( 'Style', 'astra' ),
+ 'control' => 'ast-selector',
+ 'priority' => 45,
+ 'choices' => array(
+ 'outline' => __( 'Outline', 'astra' ),
+ 'fill' => __( 'Fill', 'astra' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Icon color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-cart-icon-color]',
+ 'default' => astra_get_option( 'header-woo-cart-icon-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[woo-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'section' => $_section,
+ 'priority' => 45,
+ ),
+
+ /**
+ * Option: Border Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[woo-header-cart-icon-radius]',
+ 'default' => astra_get_option( 'woo-header-cart-icon-radius' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[woo-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'control' => 'ast-slider',
+ 'suffix' => 'px',
+ 'priority' => 47,
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ ),
+
+ /**
+ * Option: Icon color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-woo-cart-icon-color]',
+ 'default' => astra_get_option( 'transparent-header-woo-cart-icon-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Woo Cart Icon Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[woo-header-cart-icon-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ 'section' => 'section-transparent-header',
+ 'priority' => 85,
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ $_configs = array(
+ /**
+ * Option: Divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-cart-icon-divider]',
+ 'section' => $_section,
+ 'title' => __( 'Header Cart Icon', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'priority' => 30,
+ 'settings' => array(),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+ );
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $_configs = array(
+ /**
+ * Woo Cart section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 5,
+ 'title' => __( 'WooCommerce Cart', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Woo Cart Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Divider
+ * Option: WOO cart tray Section divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-woo-cart-tray-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => $_section,
+ 'title' => __( 'Cart Tray', 'astra' ),
+ 'priority' => 60,
+ 'settings' => array(),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+
+ // Option: Cart Link / Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-text-color',
+ 'default' => astra_get_option( 'header-woo-cart-text-color' ),
+ 'title' => __( 'Text Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ // Option: Cart Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-colors]',
+ 'section' => $_section,
+ 'control' => 'ast-color',
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-background-color',
+ 'default' => astra_get_option( 'header-woo-cart-background-color' ),
+ 'title' => __( 'Background Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Separator Color.
+ array(
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-cart-separator-color]',
+ 'default' => astra_get_option( 'header-woo-cart-separator-color' ),
+ 'title' => __( 'Separator Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-cart-link-colors]',
+ 'default' => astra_get_option( 'header-woo-cart-link-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Link Color', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+
+ // Option: Cart Link / Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-link-colors]',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-link-color',
+ 'default' => astra_get_option( 'header-woo-cart-link-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Link Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-link-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-link-hover-color',
+ 'default' => astra_get_option( 'header-woo-cart-link-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 65,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-text-colors]',
+ 'default' => astra_get_option( 'header-woo-cart-button-text-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Text', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array(
+ 'ast_class' => 'ast-top-divider',
+ 'ast_title' => __( 'Cart Button', 'astra' ),
+ ),
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-background-colors]',
+ 'default' => astra_get_option( 'header-woo-cart-button-background-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+
+ // Option: Cart Button Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-btn-text-color',
+ 'default' => astra_get_option( 'header-woo-cart-btn-text-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Button Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-background-colors]',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-btn-background-color',
+ 'default' => astra_get_option( 'header-woo-cart-btn-background-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Button Hover Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-cart-btn-text-hover-color',
+ 'default' => astra_get_option( 'header-woo-cart-btn-text-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Cart Button Hover Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-cart-button-background-colors]',
+ 'section' => $_section,
+ 'name' => 'header-woo-cart-btn-bg-hover-color',
+ 'default' => astra_get_option( 'header-woo-cart-btn-bg-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 70,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-text-colors]',
+ 'default' => astra_get_option( 'header-woo-checkout-button-text-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Text', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array(
+ 'ast_class' => 'ast-top-divider',
+ 'ast_title' => __( 'Checkout Button', 'astra' ),
+ ),
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-background-colors]',
+ 'default' => astra_get_option( 'header-woo-checkout-button-background-colors' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+
+ // Option: Checkout Button Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-checkout-btn-text-color',
+ 'default' => astra_get_option( 'header-woo-checkout-btn-text-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-background-colors]',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-checkout-btn-background-color',
+ 'default' => astra_get_option( 'header-woo-checkout-btn-background-color' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Hover Text Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-text-colors]',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'name' => 'header-woo-checkout-btn-text-hover-color',
+ 'default' => astra_get_option( 'header-woo-checkout-btn-text-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Checkout Button Hover Background Color.
+ array(
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-woo-checkout-button-background-colors]',
+ 'section' => $_section,
+ 'name' => 'header-woo-checkout-btn-bg-hover-color',
+ 'default' => astra_get_option( 'header-woo-checkout-btn-bg-hover-color' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 75,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ }
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Customizer_Woo_Cart_Configs();
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-account-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-account-component-configs.php
new file mode 100644
index 0000000..982ec6c
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-account-component-configs.php
@@ -0,0 +1,522 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Header_Account_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-header-account';
+
+
+ $account_choices = array(
+ 'default' => __( 'Default', 'astra' ),
+ );
+
+ $login_link_context = Astra_Builder_Helper::$general_tab;
+
+ $logout_link_context = array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ );
+
+ if ( defined( 'ASTRA_EXT_VER' ) ) {
+
+ $account_type_condition = array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]',
+ 'operator' => '==',
+ 'value' => 'link',
+ );
+
+ if ( class_exists( 'LifterLMS' ) ) {
+ $account_choices['lifterlms'] = __( 'LifterLMS', 'astra' );
+ }
+
+ if ( class_exists( 'WooCommerce' ) ) {
+ $account_choices['woocommerce'] = __( 'WooCommerce', 'astra' );
+ }
+
+ if ( count( $account_choices ) > 1 ) {
+ $account_type_condition = array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-type]',
+ 'operator' => '==',
+ 'value' => 'default',
+ );
+ }
+
+ $login_link_context = array(
+ 'relation' => 'AND',
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]',
+ 'operator' => '==',
+ 'value' => 'link',
+ ),
+ array(
+ 'relation' => 'OR',
+ $account_type_condition,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-link-type]',
+ 'operator' => '==',
+ 'value' => 'custom',
+ ),
+ ),
+ );
+
+ $logout_link_context = array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-action]',
+ 'operator' => '==',
+ 'value' => 'link',
+ );
+
+ }
+
+ $_configs = array(
+
+ /*
+ * Header Builder section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 80,
+ 'title' => __( 'Account', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-tabs]',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Log In view
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-login-heading]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => $_section,
+ 'priority' => 1,
+ 'title' => __( 'Logged In View', 'astra' ),
+ 'settings' => array(),
+ 'input_attrs' => array(
+ 'class' => 'ast-control-reduce-top-space',
+ ),
+ ),
+
+ /**
+ * Option: Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'default' => astra_get_option( 'header-account-login-style' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'priority' => 3,
+ 'title' => __( 'Profile Type', 'astra' ),
+ 'choices' => array(
+ 'icon' => __( 'Icon', 'astra' ),
+ 'avatar' => __( 'Avatar', 'astra' ),
+ 'text' => __( 'Text', 'astra' ),
+ ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Logged Out Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logged-in-text]',
+ 'default' => astra_get_option( 'header-account-logged-in-text' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'section' => $_section,
+ 'title' => __( 'Text', 'astra' ),
+ 'priority' => 3,
+ 'transport' => 'postMessage',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ ),
+
+
+ /**
+ * Option: Account Log In Link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-login-link]',
+ 'default' => astra_get_option( 'header-account-login-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-link',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ),
+ 'section' => $_section,
+ 'title' => __( 'Account URL', 'astra' ),
+ 'priority' => 6,
+ 'transport' => 'postMessage',
+ 'context' => $login_link_context,
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ ),
+
+ /**
+ * Option: Log Out view
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logout-heading]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => $_section,
+ 'title' => __( 'Logged Out View', 'astra' ),
+ 'priority' => 200,
+ 'settings' => array(),
+ ),
+
+ /**
+ * Option: Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'default' => astra_get_option( 'header-account-logout-style' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => $_section,
+ 'title' => __( 'Profile Type', 'astra' ),
+ 'priority' => 201,
+ 'choices' => array(
+ 'none' => __( 'None', 'astra' ),
+ 'icon' => __( 'Icon', 'astra' ),
+ 'text' => __( 'Text', 'astra' ),
+ ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+
+ // Option: Logged out options preview.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logout-preview]',
+ 'default' => astra_get_option( 'header-account-logout-preview' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'title' => __( 'Preview', 'astra' ),
+ 'priority' => 206,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ ),
+
+ /**
+ * Option: Logged Out Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logged-out-text]',
+ 'default' => astra_get_option( 'header-account-logged-out-text' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'section' => $_section,
+ 'title' => __( 'Text', 'astra' ),
+ 'priority' => 203,
+ 'transport' => 'postMessage',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-header-account',
+ 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ),
+ ),
+ ),
+
+ /**
+ * Option: Account Log Out Link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-logout-link]',
+ 'default' => astra_get_option( 'header-account-logout-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-link',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ),
+ 'section' => $_section,
+ 'title' => __( 'Login URL', 'astra' ),
+ 'priority' => 205,
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ $logout_link_context,
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ ),
+
+ /**
+ * Option: Image Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-image-width]',
+ 'section' => $_section,
+ 'priority' => 2,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-account-image-width' ),
+ 'title' => __( 'Image Width', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 100,
+ ),
+ 'suffix' => 'px',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'avatar',
+ ),
+ Astra_Builder_Helper::$design_tab_config,
+ ),
+ ),
+
+ /**
+ * Option: account Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-icon-size]',
+ 'section' => $_section,
+ 'priority' => 4,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-account-icon-size' ),
+ 'title' => __( 'Icon Size', 'astra' ),
+ 'type' => 'control',
+ 'suffix' => 'px',
+ 'control' => 'ast-responsive-slider',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'icon',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '==',
+ 'value' => 'icon',
+ ),
+ ),
+ ),
+ ),
+
+ /**
+ * Option: account Color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-icon-color]',
+ 'default' => astra_get_option( 'header-account-icon-color' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 5,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Icon Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'icon',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '==',
+ 'value' => 'icon',
+ ),
+ ),
+ ),
+ ),
+
+
+ /**
+ * Option: account Color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-type-text-color]',
+ 'default' => astra_get_option( 'header-account-type-text-color' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 16,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Profile Text Color', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-account-margin]',
+ 'default' => astra_get_option( 'header-account-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 520,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge(
+ $_configs,
+ Astra_Builder_Base_Configuration::prepare_typography_options(
+ $_section,
+ array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
+ 'operator' => '==',
+ 'value' => 'text',
+ ),
+ ),
+ )
+ )
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Header_Account_Component_Configs();
+
+
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-button-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-button-component-configs.php
new file mode 100644
index 0000000..b01c6c6
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-button-component-configs.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * [Header] options for astra theme.
+ *
+ * @package Astra Header Footer Builder
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since 3.0.0
+ */
+
+// Block direct access to the file.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register below header Configurations.
+ */
+ class Astra_Header_Button_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Button control for Header/Footer Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Button_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-button-' );
+
+ return $configurations;
+ }
+ }
+
+ new Astra_Header_Button_Component_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-html-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-html-component-configs.php
new file mode 100644
index 0000000..9a169c6
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-html-component-configs.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Header_Html_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Html_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-html-' );
+
+ return $configurations;
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Header_Html_Component_Configs();
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-menu-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-menu-component-configs.php
new file mode 100644
index 0000000..e1960e7
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-menu-component-configs.php
@@ -0,0 +1,645 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Header_Menu_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $html_config = array();
+
+ $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_menu;
+
+ for ( $index = 1; $index <= $component_limit; $index++ ) {
+
+ $_section = 'section-hb-menu-' . $index;
+ $_prefix = 'menu' . $index;
+
+ switch ( $index ) {
+ case 1:
+ $edit_menu_title = __( 'Primary Menu', 'astra' );
+ break;
+ case 2:
+ $edit_menu_title = __( 'Secondary Menu', 'astra' );
+ break;
+ default:
+ $edit_menu_title = __( 'Menu ', 'astra' ) . $index;
+ break;
+ }
+
+ $_configs = array(
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ // Section: Primary Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => $edit_menu_title,
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 40,
+ 'clone_index' => $index,
+ 'clone_type' => 'header-menu',
+ ),
+
+ /**
+ * Option: Theme Menu create link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-create-menu-link]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-create-menu-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => $_section,
+ 'priority' => 30,
+ 'link_type' => 'section',
+ 'linked' => 'menu_locations',
+ 'link_text' => __( 'Configure Menu from Here.', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Menu hover style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-menu-hover-animation]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-menu-hover-animation' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => $_section,
+ 'priority' => 10,
+ 'title' => __( 'Menu Hover Style', 'astra' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'zoom' => __( 'Zoom In', 'astra' ),
+ 'underline' => __( 'Underline', 'astra' ),
+ 'overline' => __( 'Overline', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'transport' => 'postMessage',
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Submenu heading.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-heading]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => $_section,
+ 'title' => __( 'Submenu', 'astra' ),
+ 'settings' => array(),
+ 'priority' => 30,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Submenu width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-width]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-width' ),
+ 'type' => 'control',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'section' => $_section,
+ 'control' => 'ast-slider',
+ 'priority' => 30.5,
+ 'title' => __( 'Width', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 1920,
+ ),
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Submenu Animation
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-container-animation]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-container-animation' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => $_section,
+ 'priority' => 23,
+ 'title' => __( 'Submenu Animation', 'astra' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'slide-down' => __( 'Slide Down', 'astra' ),
+ 'slide-up' => __( 'Slide Up', 'astra' ),
+ 'fade' => __( 'Fade', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'transport' => 'postMessage',
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Submenu Container Divider.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-container-divider]',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'title' => __( 'Submenu Container', 'astra' ),
+ 'priority' => 20,
+ 'settings' => array(),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Submenu Divider Size.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-item-b-size]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-item-b-size' ),
+ 'section' => $_section,
+ 'priority' => 20.5,
+ 'transport' => 'postMessage',
+ 'title' => __( 'Divider Size', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 1,
+ 'step' => 1,
+ 'max' => 10,
+ ),
+ ),
+
+ // Option: Submenu item Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-item-b-color]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-item-b-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Divider Color', 'astra' ),
+ 'section' => $_section,
+ 'priority' => 21,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Submenu Top Offset
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-top-offset]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-top-offset' ),
+ 'type' => 'control',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'section' => $_section,
+ 'control' => 'ast-slider',
+ 'priority' => 22,
+ 'title' => __( 'Top Offset', 'astra' ),
+ 'suffix' => 'px',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ ),
+
+ // Option: Sub-Menu Border.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-border]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-border' ),
+ 'type' => 'control',
+ 'control' => 'ast-border',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'linked_choices' => true,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'priority' => 23,
+ 'title' => __( 'Border Width', 'astra' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ ),
+
+ // Option: Submenu Container Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-b-color]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-b-color' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-border-group]',
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Border Color', 'astra' ),
+ 'section' => $_section,
+ 'priority' => 23,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Submenu Button Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-border-radius]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-border-radius' ),
+ 'type' => 'control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-border-group]',
+ 'section' => $_section,
+ 'control' => 'ast-slider',
+ 'priority' => 23,
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'suffix' => 'px',
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 200,
+ ),
+ ),
+
+ // Option: Submenu Divider Checkbox.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-item-border]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-item-border' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'priority' => 35,
+ 'title' => __( 'Item Divider', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ // Option: Menu Stack on Mobile Checkbox.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-menu-stack-on-mobile]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-menu-stack-on-mobile' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'priority' => 41,
+ 'title' => __( 'Stack on Mobile', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option Group: Menu Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-text-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Text / Link', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array(
+ 'ast_class' => 'ast-top-divider',
+ 'ast_title' => __( 'Menu Color', 'astra' ),
+ ),
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-background-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+
+ // Option: Menu Color.
+ array(
+ 'name' => 'header-' . $_prefix . '-color-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-text-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'section' => $_section,
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 7,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Background image, color.
+ array(
+ 'name' => 'header-' . $_prefix . '-bg-obj-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-bg-obj-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-background',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'data_attrs' => array( 'name' => 'header-' . $_prefix . '-bg-obj-responsive' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'priority' => 9,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Hover Color.
+ array(
+ 'name' => 'header-' . $_prefix . '-h-color-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-h-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-text-colors]',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 19,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Hover Background Color.
+ array(
+ 'name' => 'header-' . $_prefix . '-h-bg-color-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-h-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-background-colors]',
+ 'type' => 'sub-control',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 21,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Active Menu Color.
+ array(
+ 'name' => 'header-' . $_prefix . '-a-color-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-a-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-text-colors]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Active', 'astra' ),
+ 'title' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 31,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Active Menu Background Color.
+ array(
+ 'name' => 'header-' . $_prefix . '-a-bg-color-responsive',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-a-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'title' => __( 'Active', 'astra' ),
+ 'tab' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 33,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option Group: Menu Typography.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-header-menu-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Menu Font', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 120,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Menu Font Family.
+ array(
+ 'name' => 'header-' . $_prefix . '-font-family',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-font-family' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-font',
+ 'font_type' => 'ast-font-family',
+ 'title' => __( 'Family', 'astra' ),
+ 'priority' => 22,
+ 'connect' => 'header-' . $_prefix . '-font-weight',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Font Weight.
+ array(
+ 'name' => 'header-' . $_prefix . '-font-weight',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-font-weight' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'control' => 'ast-font',
+ 'transport' => 'postMessage',
+ 'font_type' => 'ast-font-weight',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ),
+ 'title' => __( 'Weight', 'astra' ),
+ 'priority' => 24,
+ 'connect' => 'header-' . $_prefix . '-font-family',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Text Transform.
+ array(
+ 'name' => 'header-' . $_prefix . '-text-transform',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-text-transform' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'control' => 'ast-select',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Text Transform', 'astra' ),
+ 'priority' => 25,
+ 'choices' => array(
+ '' => __( 'Inherit', 'astra' ),
+ 'none' => __( 'None', 'astra' ),
+ 'capitalize' => __( 'Capitalize', 'astra' ),
+ 'uppercase' => __( 'Uppercase', 'astra' ),
+ 'lowercase' => __( 'Lowercase', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Font Size.
+ array(
+ 'name' => 'header-' . $_prefix . '-font-size',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 23,
+ 'title' => __( 'Size', 'astra' ),
+ 'control' => 'ast-responsive',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Line Height.
+ array(
+ 'name' => 'header-' . $_prefix . '-line-height',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 26,
+ 'title' => __( 'Line Height', 'astra' ),
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-line-height' ),
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
+ 'control' => 'ast-slider',
+ 'suffix' => 'em',
+ 'input_attrs' => array(
+ 'min' => 1,
+ 'step' => 0.01,
+ 'max' => 10,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option - Menu Space.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-menu-spacing]',
+ 'default' => astra_get_option( 'header-' . $_prefix . '-menu-spacing' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'priority' => 150,
+ 'title' => __( 'Menu Spacing', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ );
+
+ $html_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section );
+ $html_config[] = $_configs;
+ }
+
+ $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) );
+ $configurations = array_merge( $configurations, $html_config );
+
+ return $configurations;
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Header_Menu_Component_Configs();
+}
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-search-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-search-component-configs.php
new file mode 100644
index 0000000..f18797a
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-search-component-configs.php
@@ -0,0 +1,143 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Header_Search_Component_Configs extends Astra_Customizer_Config_Base {
+
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-header-search';
+
+ $_configs = array(
+
+ /*
+ * Header Builder section
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 80,
+ 'title' => __( 'Search', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ ),
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ /**
+ * Option: Search Color.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-search-icon-color]',
+ 'default' => astra_get_option( 'header-search-icon-color' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'priority' => 8,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'responsive' => true,
+ 'rgba' => true,
+ 'title' => __( 'Icon Color', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ /**
+ * Option: Search Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-search-icon-space]',
+ 'section' => $_section,
+ 'priority' => 4,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-search-icon-space' ),
+ 'title' => __( 'Icon Size', 'astra' ),
+ 'suffix' => 'px',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ return array_merge( $configurations, $_configs );
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Header_Search_Component_Configs();
+
diff --git a/inc/customizer/configurations/builder/header/class-astra-header-social-icon-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-header-social-icon-component-configs.php
new file mode 100644
index 0000000..3cbe1d2
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-header-social-icon-component-configs.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+class Astra_Header_Social_Icon_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $configurations = Astra_Social_Icon_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-social-icons-' );
+
+ return $configurations;
+
+ }
+}
+
+/**
+ * Kicking this off by creating object of this class.
+ */
+
+new Astra_Header_Social_Icon_Component_Configs();
+
diff --git a/inc/customizer/configurations/builder/header/class-astra-mobile-menu-component-configs.php b/inc/customizer/configurations/builder/header/class-astra-mobile-menu-component-configs.php
new file mode 100644
index 0000000..eab9178
--- /dev/null
+++ b/inc/customizer/configurations/builder/header/class-astra-mobile-menu-component-configs.php
@@ -0,0 +1,458 @@
+<?php
+/**
+ * Astra Theme Customizer Configuration Builder.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+// No direct access, please.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( class_exists( 'Astra_Customizer_Config_Base' ) ) {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @since 3.0.0
+ */
+ class Astra_Mobile_Menu_Component_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Builder Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 3.0.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'section-header-mobile-menu';
+
+ $_configs = array(
+
+ /**
+ * Option: Header Builder Tabs
+ */
+ array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ ),
+
+ // Section: Primary Header.
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'title' => __( 'Off-Canvas Menu', 'astra' ),
+ 'panel' => 'panel-header-builder-group',
+ 'priority' => 40,
+ ),
+
+ /**
+ * Option: Theme Menu create link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-create-menu-link]',
+ 'default' => astra_get_option( 'header-mobile-menu-create-menu-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => $_section,
+ 'priority' => 30,
+ 'link_type' => 'section',
+ 'linked' => 'menu_locations',
+ 'link_text' => __( 'Configure Menu from Here.', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ // Option: Submenu Divider Checkbox.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-border]',
+ 'default' => astra_get_option( 'header-mobile-menu-submenu-item-border' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'priority' => 35,
+ 'title' => __( 'Item Divider', 'astra' ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'transport' => 'postMessage',
+ ),
+
+ // Option: Menu Color Divider.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-divider-colors-divider]',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'title' => __( 'Item Divider', 'astra' ),
+ 'priority' => 70,
+ 'settings' => array(),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ ),
+
+ // Option: Submenu item Border Size.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-b-size]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'default' => astra_get_option( 'header-mobile-menu-submenu-item-b-size' ),
+ 'section' => $_section,
+ 'priority' => 72,
+ 'transport' => 'postMessage',
+ 'title' => __( 'Divider Size', 'astra' ),
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 1,
+ 'step' => 1,
+ 'max' => 10,
+ ),
+ ),
+
+ // Option: Submenu item Border Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-b-color]',
+ 'default' => astra_get_option( 'header-mobile-menu-submenu-item-b-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'transport' => 'postMessage',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'title' => __( 'Divider Color', 'astra' ),
+ 'section' => $_section,
+ 'priority' => 75,
+ 'context' => array(
+ Astra_Builder_Helper::$design_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'divider' => array(
+ 'ast_class' => 'ast-bottom-divider',
+ ),
+ ),
+
+ // Option Group: Menu Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-link-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Link', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ 'divider' => array(
+ 'ast_title' => __( 'Menu Color', 'astra' ),
+ ),
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-background-colors]',
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Background', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 90,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'responsive' => true,
+ ),
+ // Option: Menu Color.
+ array(
+ 'name' => 'header-mobile-menu-color-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-link-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'section' => $_section,
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 7,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Background image, color.
+ array(
+ 'name' => 'header-mobile-menu-bg-obj-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-bg-obj-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-background',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'data_attrs' => array( 'name' => 'header-mobile-menu-bg-obj-responsive' ),
+ 'title' => __( 'Normal', 'astra' ),
+ 'priority' => 9,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Hover Color.
+ array(
+ 'name' => 'header-mobile-menu-h-color-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-h-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-link-colors]',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 19,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Hover Background Color.
+ array(
+ 'name' => 'header-mobile-menu-h-bg-color-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-h-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'title' => __( 'Hover', 'astra' ),
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 21,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Active Menu Color.
+ array(
+ 'name' => 'header-mobile-menu-a-color-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-a-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-link-colors]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Active', 'astra' ),
+ 'title' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 31,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Active Menu Background Color.
+ array(
+ 'name' => 'header-mobile-menu-a-bg-color-responsive',
+ 'default' => astra_get_option( 'header-mobile-menu-a-bg-color-responsive' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-background-colors]',
+ 'type' => 'sub-control',
+ 'control' => 'ast-responsive-color',
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'title' => __( 'Active', 'astra' ),
+ 'tab' => __( 'Active', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 33,
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option Group: Menu Typography.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'default' => astra_get_option( 'header-mobile-menu-header-menu-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Menu Font', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => 120,
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Menu Font Family.
+ array(
+ 'name' => 'header-mobile-menu-font-family',
+ 'default' => astra_get_option( 'header-mobile-menu-font-family' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'type' => 'sub-control',
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'control' => 'ast-font',
+ 'font_type' => 'ast-font-family',
+ 'title' => __( 'Family', 'astra' ),
+ 'priority' => 22,
+ 'connect' => 'header-mobile-menu-font-weight',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Font Weight.
+ array(
+ 'name' => 'header-mobile-menu-font-weight',
+ 'default' => astra_get_option( 'header-mobile-menu-font-weight' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'control' => 'ast-font',
+ 'transport' => 'postMessage',
+ 'font_type' => 'ast-font-weight',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ),
+ 'title' => __( 'Weight', 'astra' ),
+ 'priority' => 24,
+ 'connect' => 'header-mobile-menu-font-family',
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Text Transform.
+ array(
+ 'name' => 'header-mobile-menu-text-transform',
+ 'default' => astra_get_option( 'header-mobile-menu-text-transform' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'control' => 'ast-select',
+ 'transport' => 'postMessage',
+ 'title' => __( 'Text Transform', 'astra' ),
+ 'priority' => 25,
+ 'choices' => array(
+ '' => __( 'Inherit', 'astra' ),
+ 'none' => __( 'None', 'astra' ),
+ 'capitalize' => __( 'Capitalize', 'astra' ),
+ 'uppercase' => __( 'Uppercase', 'astra' ),
+ 'lowercase' => __( 'Lowercase', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Font Size.
+ array(
+ 'name' => 'header-mobile-menu-font-size',
+ 'default' => astra_get_option( 'header-mobile-menu-font-size' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 23,
+ 'title' => __( 'Size', 'astra' ),
+ 'control' => 'ast-responsive',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+ // Option: Menu Line Height.
+ array(
+ 'name' => 'header-mobile-menu-line-height',
+ 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-header-menu-typography]',
+ 'section' => $_section,
+ 'type' => 'sub-control',
+ 'priority' => 26,
+ 'title' => __( 'Line Height', 'astra' ),
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-mobile-menu-line-height' ),
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
+ 'control' => 'ast-slider',
+ 'suffix' => 'em',
+ 'input_attrs' => array(
+ 'min' => 1,
+ 'step' => 0.01,
+ 'max' => 10,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ ),
+
+
+ // Option - Menu Space.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-menu-spacing]',
+ 'default' => astra_get_option( 'header-mobile-menu-menu-spacing' ),
+ 'type' => 'control',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'transport' => 'postMessage',
+ 'section' => $_section,
+ 'priority' => 150,
+ 'title' => __( 'Menu Spacing', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Margin Space
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]',
+ 'default' => astra_get_option( $_section . '-margin' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'section' => $_section,
+ 'priority' => 220,
+ 'title' => __( 'Margin', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+ );
+
+ $_configs = array_merge( $_configs, Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section ) );
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ return $configurations;
+ }
+ }
+
+ /**
+ * Kicking this off by creating object of this class.
+ */
+ new Astra_Mobile_Menu_Component_Configs();
+}