summaryrefslogtreecommitdiff
path: root/inc/customizer/configurations/layout
diff options
context:
space:
mode:
Diffstat (limited to 'inc/customizer/configurations/layout')
-rw-r--r--inc/customizer/configurations/layout/class-astra-blog-layout-configs.php346
-rw-r--r--inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php312
-rw-r--r--inc/customizer/configurations/layout/class-astra-footer-layout-configs.php964
-rw-r--r--inc/customizer/configurations/layout/class-astra-header-layout-configs.php1368
-rw-r--r--inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php310
-rw-r--r--inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php314
-rw-r--r--inc/customizer/configurations/layout/class-astra-site-identity-configs.php990
-rw-r--r--inc/customizer/configurations/layout/class-astra-site-layout-configs.php138
8 files changed, 2371 insertions, 2371 deletions
diff --git a/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php b/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php
index 854604e..8a88f54 100644
--- a/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-blog-layout-configs.php
@@ -1,173 +1,173 @@
-<?php
-/**
- * Bottom Footer Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Blog_Layout_Configs' ) ) {
-
- /**
- * Register Blog Layout Customizer Configurations.
- */
- class Astra_Blog_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Blog Layout Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Blog Content Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-width]',
- 'default' => astra_get_option( 'blog-width' ),
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'section' => 'section-blog',
- 'priority' => 50,
- 'transport' => 'postMessage',
- 'title' => __( 'Content Width', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'custom' => __( 'Custom', 'astra' ),
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Enter Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-max-width]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'section' => 'section-blog',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'blog-max-width' ),
- 'priority' => 50,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[blog-width]',
- 'operator' => '===',
- 'value' => 'custom',
- ),
- ),
- 'title' => __( 'Custom Width', 'astra' ),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 768,
- 'step' => 1,
- 'max' => 1920,
- ),
- ),
-
- /**
- * Option: Blog Post Content
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-post-content]',
- 'section' => 'section-blog',
- 'title' => __( 'Post Content', 'astra' ),
- 'default' => astra_get_option( 'blog-post-content' ),
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'priority' => 75,
- 'choices' => array(
- 'full-content' => __( 'Full Content', 'astra' ),
- 'excerpt' => __( 'Excerpt', 'astra' ),
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Display Post Structure
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-post-structure]',
- 'default' => astra_get_option( 'blog-post-structure' ),
- 'type' => 'control',
- 'control' => 'ast-sortable',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
- 'section' => 'section-blog',
- 'priority' => 50,
- 'title' => __( 'Post Structure', 'astra' ),
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- 'choices' => array(
- 'image' => __( 'Featured Image', 'astra' ),
- 'title-meta' => __( 'Title & Blog Meta', 'astra' ),
- ),
- ),
-
- );
-
- if ( ! defined( 'ASTRA_EXT_VER' ) ) {
- $_configs[] = array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-meta]',
- 'type' => 'control',
- 'control' => 'ast-sortable',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
- 'section' => 'section-blog',
- 'default' => astra_get_option( 'blog-meta' ),
- 'priority' => 50,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]',
- 'operator' => 'contains',
- 'value' => 'title-meta',
- ),
- ),
- 'title' => __( 'Meta', 'astra' ),
- 'choices' => array(
- 'comments' => __( 'Comments', 'astra' ),
- 'category' => __( 'Category', 'astra' ),
- 'author' => __( 'Author', 'astra' ),
- 'date' => __( 'Publish Date', 'astra' ),
- 'tag' => __( 'Tag', 'astra' ),
- ),
- );
- }
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
-
- $_configs[] = array(
- 'name' => 'section-blog-ast-context-tabs',
- 'section' => 'section-blog',
- 'type' => 'control',
- 'control' => 'ast-builder-header-control',
- 'priority' => 0,
- 'description' => '',
- );
-
- }
-
- $configurations = array_merge( $configurations, $_configs );
-
- return $configurations;
-
- }
- }
-}
-
-
-new Astra_Blog_Layout_Configs();
+<?php
+/**
+ * Bottom Footer Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Blog_Layout_Configs' ) ) {
+
+ /**
+ * Register Blog Layout Customizer Configurations.
+ */
+ class Astra_Blog_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Blog Layout Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Blog Content Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-width]',
+ 'default' => astra_get_option( 'blog-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => 'section-blog',
+ 'priority' => 50,
+ 'transport' => 'postMessage',
+ 'title' => __( 'Content Width', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'custom' => __( 'Custom', 'astra' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Enter Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-max-width]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => 'section-blog',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'blog-max-width' ),
+ 'priority' => 50,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[blog-width]',
+ 'operator' => '===',
+ 'value' => 'custom',
+ ),
+ ),
+ 'title' => __( 'Custom Width', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 768,
+ 'step' => 1,
+ 'max' => 1920,
+ ),
+ ),
+
+ /**
+ * Option: Blog Post Content
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-post-content]',
+ 'section' => 'section-blog',
+ 'title' => __( 'Post Content', 'astra' ),
+ 'default' => astra_get_option( 'blog-post-content' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'priority' => 75,
+ 'choices' => array(
+ 'full-content' => __( 'Full Content', 'astra' ),
+ 'excerpt' => __( 'Excerpt', 'astra' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Display Post Structure
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-post-structure]',
+ 'default' => astra_get_option( 'blog-post-structure' ),
+ 'type' => 'control',
+ 'control' => 'ast-sortable',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
+ 'section' => 'section-blog',
+ 'priority' => 50,
+ 'title' => __( 'Post Structure', 'astra' ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'choices' => array(
+ 'image' => __( 'Featured Image', 'astra' ),
+ 'title-meta' => __( 'Title & Blog Meta', 'astra' ),
+ ),
+ ),
+
+ );
+
+ if ( ! defined( 'ASTRA_EXT_VER' ) ) {
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-meta]',
+ 'type' => 'control',
+ 'control' => 'ast-sortable',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
+ 'section' => 'section-blog',
+ 'default' => astra_get_option( 'blog-meta' ),
+ 'priority' => 50,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]',
+ 'operator' => 'contains',
+ 'value' => 'title-meta',
+ ),
+ ),
+ 'title' => __( 'Meta', 'astra' ),
+ 'choices' => array(
+ 'comments' => __( 'Comments', 'astra' ),
+ 'category' => __( 'Category', 'astra' ),
+ 'author' => __( 'Author', 'astra' ),
+ 'date' => __( 'Publish Date', 'astra' ),
+ 'tag' => __( 'Tag', 'astra' ),
+ ),
+ );
+ }
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+
+ $_configs[] = array(
+ 'name' => 'section-blog-ast-context-tabs',
+ 'section' => 'section-blog',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ );
+
+ }
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ return $configurations;
+
+ }
+ }
+}
+
+
+new Astra_Blog_Layout_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php b/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php
index 7437479..9f8938e 100644
--- a/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-blog-single-layout-configs.php
@@ -1,156 +1,156 @@
-<?php
-/**
- * Bottom Footer Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Blog_Single_Layout_Configs' ) ) {
-
- /**
- * Register Blog Single Layout Configurations.
- */
- class Astra_Blog_Single_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Blog Single Layout Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Single Post Content Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-single-width]',
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'section' => 'section-blog-single',
- 'default' => astra_get_option( 'blog-single-width' ),
- 'priority' => 5,
- 'title' => __( 'Content Width', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'custom' => __( 'Custom', 'astra' ),
- ),
- 'transport' => 'postMessage',
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Enter Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-single-max-width]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'section' => 'section-blog-single',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'blog-single-max-width' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-width]',
- 'operator' => '===',
- 'value' => 'custom',
- ),
- ),
- 'priority' => 5,
- 'title' => __( 'Custom Width', 'astra' ),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 768,
- 'step' => 1,
- 'max' => 1920,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
-
- /**
- * Option: Display Post Structure
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]',
- 'type' => 'control',
- 'control' => 'ast-sortable',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
- 'section' => 'section-blog-single',
- 'default' => astra_get_option( 'blog-single-post-structure' ),
- 'priority' => 5,
- 'title' => __( 'Structure', 'astra' ),
- 'choices' => array(
- 'single-image' => __( 'Featured Image', 'astra' ),
- 'single-title-meta' => __( 'Title & Blog Meta', 'astra' ),
- ),
- ),
-
- );
-
- if ( ! defined( 'ASTRA_EXT_VER' ) ) {
- $_configs[] = array(
- 'name' => ASTRA_THEME_SETTINGS . '[blog-single-meta]',
- 'type' => 'control',
- 'control' => 'ast-sortable',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
- 'default' => astra_get_option( 'blog-single-meta' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]',
- 'operator' => 'contains',
- 'value' => 'single-title-meta',
- ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'section' => 'section-blog-single',
- 'priority' => 5,
- 'title' => __( 'Meta', 'astra' ),
- 'choices' => array(
- 'comments' => __( 'Comments', 'astra' ),
- 'category' => __( 'Category', 'astra' ),
- 'author' => __( 'Author', 'astra' ),
- 'date' => __( 'Publish Date', 'astra' ),
- 'tag' => __( 'Tag', 'astra' ),
- ),
- );
- }
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
-
- $_configs[] = array(
- 'name' => 'section-blog-single-ast-context-tabs',
- 'section' => 'section-blog-single',
- 'type' => 'control',
- 'control' => 'ast-builder-header-control',
- 'priority' => 0,
- 'description' => '',
- );
-
- }
-
- $configurations = array_merge( $configurations, $_configs );
-
- return $configurations;
-
- }
- }
-}
-
-
-new Astra_Blog_Single_Layout_Configs();
+<?php
+/**
+ * Bottom Footer Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Blog_Single_Layout_Configs' ) ) {
+
+ /**
+ * Register Blog Single Layout Configurations.
+ */
+ class Astra_Blog_Single_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Blog Single Layout Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Single Post Content Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-single-width]',
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'section' => 'section-blog-single',
+ 'default' => astra_get_option( 'blog-single-width' ),
+ 'priority' => 5,
+ 'title' => __( 'Content Width', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'custom' => __( 'Custom', 'astra' ),
+ ),
+ 'transport' => 'postMessage',
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Enter Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-single-max-width]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => 'section-blog-single',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'blog-single-max-width' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-width]',
+ 'operator' => '===',
+ 'value' => 'custom',
+ ),
+ ),
+ 'priority' => 5,
+ 'title' => __( 'Custom Width', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 768,
+ 'step' => 1,
+ 'max' => 1920,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+
+ /**
+ * Option: Display Post Structure
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]',
+ 'type' => 'control',
+ 'control' => 'ast-sortable',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
+ 'section' => 'section-blog-single',
+ 'default' => astra_get_option( 'blog-single-post-structure' ),
+ 'priority' => 5,
+ 'title' => __( 'Structure', 'astra' ),
+ 'choices' => array(
+ 'single-image' => __( 'Featured Image', 'astra' ),
+ 'single-title-meta' => __( 'Title & Blog Meta', 'astra' ),
+ ),
+ ),
+
+ );
+
+ if ( ! defined( 'ASTRA_EXT_VER' ) ) {
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[blog-single-meta]',
+ 'type' => 'control',
+ 'control' => 'ast-sortable',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),
+ 'default' => astra_get_option( 'blog-single-meta' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]',
+ 'operator' => 'contains',
+ 'value' => 'single-title-meta',
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'section' => 'section-blog-single',
+ 'priority' => 5,
+ 'title' => __( 'Meta', 'astra' ),
+ 'choices' => array(
+ 'comments' => __( 'Comments', 'astra' ),
+ 'category' => __( 'Category', 'astra' ),
+ 'author' => __( 'Author', 'astra' ),
+ 'date' => __( 'Publish Date', 'astra' ),
+ 'tag' => __( 'Tag', 'astra' ),
+ ),
+ );
+ }
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+
+ $_configs[] = array(
+ 'name' => 'section-blog-single-ast-context-tabs',
+ 'section' => 'section-blog-single',
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ );
+
+ }
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ return $configurations;
+
+ }
+ }
+}
+
+
+new Astra_Blog_Single_Layout_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php b/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php
index 68eba96..79da36a 100644
--- a/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-footer-layout-configs.php
@@ -1,482 +1,482 @@
-<?php
-/**
- * Bottom Footer Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Footer_Layout_Configs' ) ) {
-
- /**
- * Register Footer Layout Configurations.
- */
- class Astra_Footer_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Footer Layout Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Footer Bar Layout
- */
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'type' => 'control',
- 'control' => 'ast-radio-image',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
- 'default' => astra_get_option( 'footer-sml-layout' ),
- 'section' => 'section-footer-small',
- 'priority' => 5,
- 'title' => __( 'Layout', 'astra' ),
- 'choices' => array(
- 'disabled' => array(
- 'label' => __( 'Disabled', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ),
- ),
- 'footer-sml-layout-1' => array(
- 'label' => __( 'Footer Bar Layout 1', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-1' ),
- ),
- 'footer-sml-layout-2' => array(
- 'label' => __( 'Footer Bar Layout 2', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-2' ),
- ),
- ),
- 'partial' => array(
- 'selector' => '.ast-small-footer',
- 'container_inclusive' => false,
- ),
- ),
-
- /**
- * Section: Section 1
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]',
- 'control' => 'ast-selector',
- 'default' => astra_get_option( 'footer-sml-section-1' ),
- 'type' => 'control',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'section' => 'section-footer-small',
- 'priority' => 15,
- 'title' => __( 'Section 1', 'astra' ),
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- 'choices' => array(
- '' => __( 'None', 'astra' ),
- 'custom' => __( 'Text', 'astra' ),
- 'widget' => __( 'Widget', 'astra' ),
- 'menu' => __( 'Footer Menu', 'astra' ),
- ),
- 'partial' => array(
- 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-1-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-1 .footer-primary-navigation .nav-menu',
- 'container_inclusive' => false,
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
- /**
- * Option: Section 1 Custom Text
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1-credit]',
- 'default' => astra_get_option( 'footer-sml-section-1-credit' ),
- 'type' => 'control',
- 'control' => 'textarea',
- 'transport' => 'postMessage',
- 'section' => 'section-footer-small',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]',
- 'operator' => '==',
- 'value' => array( 'custom' ),
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'priority' => 20,
- 'title' => __( 'Section 1 Custom Text', 'astra' ),
- 'choices' => array(
- '' => __( 'None', 'astra' ),
- 'custom' => __( 'Custom Text', 'astra' ),
- 'widget' => __( 'Widget', 'astra' ),
- 'menu' => __( 'Footer Menu', 'astra' ),
- ),
- 'partial' => array(
- 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-1:has(> .ast-footer-site-title)',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_1_credit',
- ),
- ),
-
- /**
- * Option: Section 2
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]',
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'default' => astra_get_option( 'footer-sml-section-2' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'section' => 'section-footer-small',
- 'priority' => 25,
- 'title' => __( 'Section 2', 'astra' ),
- 'choices' => array(
- '' => __( 'None', 'astra' ),
- 'custom' => __( 'Text', 'astra' ),
- 'widget' => __( 'Widget', 'astra' ),
- 'menu' => __( 'Footer Menu', 'astra' ),
- ),
- 'partial' => array(
- 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-2-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-2 .footer-primary-navigation .nav-menu',
- 'container_inclusive' => false,
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Section 2 Custom Text
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2-credit]',
- 'type' => 'control',
- 'control' => 'textarea',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'footer-sml-section-2-credit' ),
- 'section' => 'section-footer-small',
- 'priority' => 30,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]',
- 'operator' => '==',
- 'value' => 'custom',
- ),
- ),
- 'title' => __( 'Section 2 Custom Text', 'astra' ),
- 'partial' => array(
- 'selector' => '.ast-small-footer-section-2',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_2_credit',
- ),
- 'partial' => array(
- 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-2:has(> .ast-footer-site-title)',
- 'container_inclusive' => false,
- ),
- ),
-
- /**
- * Option: Footer Top Border
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'default' => astra_get_option( 'footer-sml-divider' ),
- 'section' => 'section-footer-small',
- 'priority' => 40,
- 'suffix' => 'px',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'title' => __( 'Border Size', 'astra' ),
- 'transport' => 'postMessage',
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 600,
- ),
- ),
-
- /**
- * Option: Footer Top Border Color
- */
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider-color]',
- 'section' => 'section-footer-small',
- 'default' => astra_get_option( 'footer-sml-divider-color', '#7a7a7a' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]',
- 'operator' => '>=',
- 'value' => 1,
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'priority' => 45,
- 'title' => __( 'Border Color', 'astra' ),
- 'transport' => 'postMessage',
- ),
-
- /**
- * Option: Footer Bar Content Group
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]',
- 'default' => astra_get_option( 'footer-bar-background-group' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => __( 'Background Color', 'astra' ),
- 'section' => 'section-footer-small',
- 'transport' => 'postMessage',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'priority' => 47,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- ),
-
- /**
- * Option: Footer Bar Content Group
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]',
- 'default' => astra_get_option( 'footer-bar-content-group' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => __( 'Content Colors', 'astra' ),
- 'section' => 'section-footer-small',
- 'transport' => 'postMessage',
- 'priority' => 47,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- ),
-
- /**
- * Option: Footer Bar Content Group
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]',
- 'default' => astra_get_option( 'footer-bar-link-color-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Link Color', 'astra' ),
- 'section' => 'section-footer-small',
- 'transport' => 'postMessage',
- 'priority' => 47,
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- ),
-
- /**
- * Option: Header Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-layout-width]',
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'default' => astra_get_option( 'footer-layout-width' ),
- 'section' => 'section-footer-small',
- 'divider' => array( 'ast_class' => 'ast-top-divider ast-bottom-divider' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
- 'operator' => '!=',
- 'value' => 'ast-box-layout',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
- 'operator' => '!=',
- 'value' => 'ast-fluid-width-layout',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'priority' => 35,
- 'title' => __( 'Width', 'astra' ),
- 'choices' => array(
- 'full' => __( 'Full Width', 'astra' ),
- 'content' => __( 'Content Width', 'astra' ),
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Footer Top Border
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-width]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'transport' => 'postMessage',
- 'section' => 'section-footer-adv',
- 'default' => astra_get_option( 'footer-adv-border-width' ),
- 'priority' => 40,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'suffix' => 'px',
- 'title' => __( 'Top Border Size', 'astra' ),
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 600,
- ),
- ),
-
- /**
- * Option: Footer Top Border Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-color]',
- 'section' => 'section-footer-adv',
- 'title' => __( 'Top Border Color', 'astra' ),
- 'type' => 'control',
- 'transport' => 'postMessage',
- 'control' => 'ast-color',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'default' => astra_get_option( 'footer-adv-border-color' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]',
- 'operator' => '!=',
- 'value' => 'disabled',
- ),
- ),
- 'priority' => 45,
- ),
- );
-
- $configurations = array_merge( $configurations, $_configs );
-
- // Learn More link if Astra Pro is not activated.
- if ( ! defined( 'ASTRA_EXT_VER' ) || ( defined( 'ASTRA_EXT_VER' ) && false === Astra_Ext_Extension::is_active( 'advanced-footer' ) ) ) {
-
- $config = array(
-
- /**
- * Option: Footer Widgets Layout Layout
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[footer-adv]',
- 'type' => 'control',
- 'priority' => 0,
- 'control' => 'ast-radio-image',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
- 'default' => astra_get_option( 'footer-adv' ),
- 'title' => __( 'Layout', 'astra' ),
- 'section' => 'section-footer-adv',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'choices' => array(
- 'disabled' => array(
- 'label' => __( 'Disable', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ),
- ),
- 'layout-4' => array(
- 'label' => __( 'Layout 4', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-4' ),
- ),
- ),
- 'partial' => array(
- 'selector' => '.footer-adv .ast-container',
- 'container_inclusive' => false,
- ),
- ),
-
- /**
- * Option: Learn More about Footer Widget
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-footer-widget-more-feature-description]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-footer-adv',
- 'priority' => 999,
- 'label' => '',
- 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
- 'settings' => array(),
- ),
-
- );
-
- $configurations = array_merge( $configurations, $config );
- }
-
- return $configurations;
-
- }
- }
-}
-
-
-new Astra_Footer_Layout_Configs();
+<?php
+/**
+ * Bottom Footer Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Footer_Layout_Configs' ) ) {
+
+ /**
+ * Register Footer Layout Configurations.
+ */
+ class Astra_Footer_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Footer Layout Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Footer Bar Layout
+ */
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-radio-image',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
+ 'default' => astra_get_option( 'footer-sml-layout' ),
+ 'section' => 'section-footer-small',
+ 'priority' => 5,
+ 'title' => __( 'Layout', 'astra' ),
+ 'choices' => array(
+ 'disabled' => array(
+ 'label' => __( 'Disabled', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ),
+ ),
+ 'footer-sml-layout-1' => array(
+ 'label' => __( 'Footer Bar Layout 1', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-1' ),
+ ),
+ 'footer-sml-layout-2' => array(
+ 'label' => __( 'Footer Bar Layout 2', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-2' ),
+ ),
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer',
+ 'container_inclusive' => false,
+ ),
+ ),
+
+ /**
+ * Section: Section 1
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]',
+ 'control' => 'ast-selector',
+ 'default' => astra_get_option( 'footer-sml-section-1' ),
+ 'type' => 'control',
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'section' => 'section-footer-small',
+ 'priority' => 15,
+ 'title' => __( 'Section 1', 'astra' ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'custom' => __( 'Text', 'astra' ),
+ 'widget' => __( 'Widget', 'astra' ),
+ 'menu' => __( 'Footer Menu', 'astra' ),
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-1-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-1 .footer-primary-navigation .nav-menu',
+ 'container_inclusive' => false,
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+ /**
+ * Option: Section 1 Custom Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1-credit]',
+ 'default' => astra_get_option( 'footer-sml-section-1-credit' ),
+ 'type' => 'control',
+ 'control' => 'textarea',
+ 'transport' => 'postMessage',
+ 'section' => 'section-footer-small',
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]',
+ 'operator' => '==',
+ 'value' => array( 'custom' ),
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'priority' => 20,
+ 'title' => __( 'Section 1 Custom Text', 'astra' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'custom' => __( 'Custom Text', 'astra' ),
+ 'widget' => __( 'Widget', 'astra' ),
+ 'menu' => __( 'Footer Menu', 'astra' ),
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-1:has(> .ast-footer-site-title)',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_1_credit',
+ ),
+ ),
+
+ /**
+ * Option: Section 2
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]',
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'default' => astra_get_option( 'footer-sml-section-2' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'section' => 'section-footer-small',
+ 'priority' => 25,
+ 'title' => __( 'Section 2', 'astra' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'custom' => __( 'Text', 'astra' ),
+ 'widget' => __( 'Widget', 'astra' ),
+ 'menu' => __( 'Footer Menu', 'astra' ),
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer .ast-container .ast-footer-widget-2-area .ast-no-widget-row, .ast-small-footer .ast-container .ast-small-footer-section-2 .footer-primary-navigation .nav-menu',
+ 'container_inclusive' => false,
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Section 2 Custom Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2-credit]',
+ 'type' => 'control',
+ 'control' => 'textarea',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'footer-sml-section-2-credit' ),
+ 'section' => 'section-footer-small',
+ 'priority' => 30,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]',
+ 'operator' => '==',
+ 'value' => 'custom',
+ ),
+ ),
+ 'title' => __( 'Section 2 Custom Text', 'astra' ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer-section-2',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Customizer_Partials::render_footer_sml_section_2_credit',
+ ),
+ 'partial' => array(
+ 'selector' => '.ast-small-footer .ast-container .ast-small-footer-section.ast-small-footer-section-2:has(> .ast-footer-site-title)',
+ 'container_inclusive' => false,
+ ),
+ ),
+
+ /**
+ * Option: Footer Top Border
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'default' => astra_get_option( 'footer-sml-divider' ),
+ 'section' => 'section-footer-small',
+ 'priority' => 40,
+ 'suffix' => 'px',
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'title' => __( 'Border Size', 'astra' ),
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ ),
+
+ /**
+ * Option: Footer Top Border Color
+ */
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-divider-color]',
+ 'section' => 'section-footer-small',
+ 'default' => astra_get_option( 'footer-sml-divider-color', '#7a7a7a' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-divider]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'priority' => 45,
+ 'title' => __( 'Border Color', 'astra' ),
+ 'transport' => 'postMessage',
+ ),
+
+ /**
+ * Option: Footer Bar Content Group
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-background-group]',
+ 'default' => astra_get_option( 'footer-bar-background-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Background Color', 'astra' ),
+ 'section' => 'section-footer-small',
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'priority' => 47,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Footer Bar Content Group
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-content-group]',
+ 'default' => astra_get_option( 'footer-bar-content-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Content Colors', 'astra' ),
+ 'section' => 'section-footer-small',
+ 'transport' => 'postMessage',
+ 'priority' => 47,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Footer Bar Content Group
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-link-color-group]',
+ 'default' => astra_get_option( 'footer-bar-link-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Link Color', 'astra' ),
+ 'section' => 'section-footer-small',
+ 'transport' => 'postMessage',
+ 'priority' => 47,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Header Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-layout-width]',
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'default' => astra_get_option( 'footer-layout-width' ),
+ 'section' => 'section-footer-small',
+ 'divider' => array( 'ast_class' => 'ast-top-divider ast-bottom-divider' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
+ 'operator' => '!=',
+ 'value' => 'ast-box-layout',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
+ 'operator' => '!=',
+ 'value' => 'ast-fluid-width-layout',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'priority' => 35,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Footer Top Border
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-width]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'transport' => 'postMessage',
+ 'section' => 'section-footer-adv',
+ 'default' => astra_get_option( 'footer-adv-border-width' ),
+ 'priority' => 40,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'suffix' => 'px',
+ 'title' => __( 'Top Border Size', 'astra' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ ),
+
+ /**
+ * Option: Footer Top Border Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-adv-border-color]',
+ 'section' => 'section-footer-adv',
+ 'title' => __( 'Top Border Color', 'astra' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-color',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'default' => astra_get_option( 'footer-adv-border-color' ),
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[footer-adv]',
+ 'operator' => '!=',
+ 'value' => 'disabled',
+ ),
+ ),
+ 'priority' => 45,
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ // Learn More link if Astra Pro is not activated.
+ if ( ! defined( 'ASTRA_EXT_VER' ) || ( defined( 'ASTRA_EXT_VER' ) && false === Astra_Ext_Extension::is_active( 'advanced-footer' ) ) ) {
+
+ $config = array(
+
+ /**
+ * Option: Footer Widgets Layout Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[footer-adv]',
+ 'type' => 'control',
+ 'priority' => 0,
+ 'control' => 'ast-radio-image',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
+ 'default' => astra_get_option( 'footer-adv' ),
+ 'title' => __( 'Layout', 'astra' ),
+ 'section' => 'section-footer-adv',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'choices' => array(
+ 'disabled' => array(
+ 'label' => __( 'Disable', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'disabled' ),
+ ),
+ 'layout-4' => array(
+ 'label' => __( 'Layout 4', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'footer-layout-4' ),
+ ),
+ ),
+ 'partial' => array(
+ 'selector' => '.footer-adv .ast-container',
+ 'container_inclusive' => false,
+ ),
+ ),
+
+ /**
+ * Option: Learn More about Footer Widget
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-footer-widget-more-feature-description]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-footer-adv',
+ 'priority' => 999,
+ 'label' => '',
+ 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
+ 'settings' => array(),
+ ),
+
+ );
+
+ $configurations = array_merge( $configurations, $config );
+ }
+
+ return $configurations;
+
+ }
+ }
+}
+
+
+new Astra_Footer_Layout_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-header-layout-configs.php b/inc/customizer/configurations/layout/class-astra-header-layout-configs.php
index 29d25df..8c6549e 100644
--- a/inc/customizer/configurations/layout/class-astra-header-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-header-layout-configs.php
@@ -1,684 +1,684 @@
-<?php
-/**
- * General Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Header_Layout_Configs' ) ) {
-
- /**
- * Register Header Layout Customizer Configurations.
- */
- class Astra_Header_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Header Layout Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Header Layout
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-layouts]',
- 'default' => astra_get_option( 'header-layouts' ),
- 'section' => 'section-header',
- 'priority' => 4,
- 'title' => __( 'Layout', 'astra' ),
- 'type' => 'control',
- 'control' => 'ast-radio-image',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
- 'choices' => array(
- 'header-main-layout-1' => array(
- 'label' => __( 'Logo Left', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-1' ),
- ),
- 'header-main-layout-2' => array(
- 'label' => __( 'Logo Center', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-2' ),
- ),
- 'header-main-layout-3' => array(
- 'label' => __( 'Logo Right', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-3' ),
- ),
- ),
- ),
-
- /**
- * Option: Header Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-layout-width]',
- 'default' => astra_get_option( 'header-main-layout-width' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-header',
- 'priority' => 4,
- 'title' => __( 'Width', 'astra' ),
- 'choices' => array(
- 'full' => __( 'Full Width', 'astra' ),
- 'content' => __( 'Content Width', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Bottom Border Size
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep]',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-main-sep' ),
- 'type' => 'control',
- 'control' => 'number',
- 'section' => 'section-header',
- 'priority' => 4,
- 'title' => __( 'Bottom Border Size', 'astra' ),
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 600,
- ),
- ),
-
- /**
- * Option: Bottom Border Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep-color]',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-main-sep-color' ),
- 'type' => 'control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-sep]',
- 'operator' => '>=',
- 'value' => 1,
- ),
- ),
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-header',
- 'priority' => 4,
- 'title' => __( 'Bottom Border Color', 'astra' ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
- 'default' => astra_get_option( 'disable-primary-nav' ),
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'section' => 'section-primary-menu',
- 'title' => __( 'Disable Menu', 'astra' ),
- 'priority' => 5,
- 'partial' => array(
- 'selector' => '.main-header-bar .main-navigation',
- 'container_inclusive' => false,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'default' => astra_get_option( 'header-main-rt-section' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-primary-menu',
- 'priority' => 7,
- 'title' => __( 'Last Item in Menu', 'astra' ),
- 'choices' => apply_filters(
- 'astra_header_section_elements',
- array(
- 'none' => __( 'None', 'astra' ),
- 'search' => __( 'Search', 'astra' ),
- 'button' => __( 'Button', 'astra' ),
- 'text-html' => __( 'Text / HTML', 'astra' ),
- 'widget' => __( 'Widget', 'astra' ),
- ),
- 'primary-header'
- ),
- 'partial' => array(
- 'selector' => '.main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.search-custom-menu-item .ast-search-icon .astra-search-icon, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.woocommerce-custom-menu-item, .main-header-bar .ast-masthead-custom-menu-items.widget-custom-menu-item .ast-header-widget-area .widget.ast-no-widget-row, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.edd-custom-menu-item',
- 'container_inclusive' => false,
- ),
- ),
-
- /**
- * Option: Button Text
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-text]',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-main-rt-section-button-text' ),
- 'type' => 'control',
- 'control' => 'text',
- 'section' => 'section-primary-menu',
- 'partial' => array(
- 'selector' => '.button-custom-menu-item',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_button_text',
- ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '===',
- 'value' => 'button',
- ),
- ),
- 'priority' => 10,
- 'title' => __( 'Button Text', 'astra' ),
- ),
-
- /**
- * Option: Button Link
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-link-option]',
- 'default' => astra_get_option( 'header-main-rt-section-button-link-option' ),
- 'type' => 'control',
- 'control' => 'ast-link',
- 'section' => 'section-primary-menu',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '===',
- 'value' => 'button',
- ),
- ),
- 'priority' => 10,
- 'title' => __( 'Button Link', 'astra' ),
- ),
-
- /**
- * Option: Button Style
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]',
- 'default' => astra_get_option( 'header-main-rt-section-button-style' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-primary-menu',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '===',
- 'value' => 'button',
- ),
- ),
- 'priority' => 10,
- 'choices' => array(
- 'theme-button' => __( 'Theme Button', 'astra' ),
- 'custom-button' => __( 'Header Button', 'astra' ),
- ),
- 'title' => __( 'Button Style', 'astra' ),
- ),
-
- /**
- * Option: Theme Button Style edit link
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-button-style-link]',
- 'default' => astra_get_option( 'header-button-style-link' ),
- 'type' => 'control',
- 'control' => 'ast-customizer-link',
- 'section' => 'section-primary-menu',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '===',
- 'value' => 'button',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]',
- 'operator' => '===',
- 'value' => 'theme-button',
- ),
- ),
- 'priority' => 10,
- 'link_type' => 'section',
- 'linked' => 'section-buttons',
- 'link_text' => __( 'Customize Button Style.', 'astra' ),
- ),
-
- /**
- * Option: Right Section Text / HTML
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-html]',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-main-rt-section-html' ),
- 'type' => 'control',
- 'control' => 'textarea',
- 'section' => 'section-primary-menu',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '===',
- 'value' => 'text-html',
- ),
- ),
- 'priority' => 10,
- 'partial' => array(
- 'selector' => '.main-header-bar .ast-masthead-custom-menu-items .ast-custom-html',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_html',
- ),
- 'title' => __( 'Custom Menu Text / HTML', 'astra' ),
- ),
-
- array(
- 'name' => 'primary-header-sub-menu-label-divider',
- 'type' => 'control',
- 'control' => 'ast-heading',
- 'priority' => 30,
- 'title' => __( 'Sub Menu', 'astra' ),
- 'section' => 'section-primary-menu',
- 'settings' => array(),
- ),
-
- /**
- * Option: Submenu Container Animation
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-submenu-container-animation]',
- 'default' => astra_get_option( 'header-main-submenu-container-animation' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-primary-menu',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
- 'operator' => '!=',
- 'value' => true,
- ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'priority' => 30,
- 'title' => __( 'Submenu Animation', 'astra' ),
- 'choices' => array(
- '' => __( 'None', 'astra' ),
- 'slide-down' => __( 'Slide Down', 'astra' ),
- 'slide-up' => __( 'Slide Up', 'astra' ),
- 'fade' => __( 'Fade', 'astra' ),
- ),
- ),
-
- // Option: Primary Menu Border.
- array(
- 'type' => 'control',
- 'control' => 'ast-border',
- 'transport' => 'postMessage',
- 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-border]',
- 'section' => 'section-primary-menu',
- 'linked_choices' => true,
- 'priority' => 30,
- 'default' => astra_get_option( 'primary-submenu-border' ),
- 'title' => __( 'Container Border', 'astra' ),
- 'choices' => array(
- 'top' => __( 'Top', 'astra' ),
- 'right' => __( 'Right', 'astra' ),
- 'bottom' => __( 'Bottom', 'astra' ),
- 'left' => __( 'Left', 'astra' ),
- ),
- ),
-
- // Option: Submenu Container Border Color.
- array(
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'transport' => 'postMessage',
- 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-b-color]',
- 'default' => astra_get_option( 'primary-submenu-b-color' ),
- 'title' => __( 'Border Color', 'astra' ),
- 'section' => 'section-primary-menu',
- 'priority' => 30,
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- array(
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'transport' => 'postMessage',
- 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]',
- 'section' => 'section-primary-menu',
- 'priority' => 30,
- 'default' => astra_get_option( 'primary-submenu-item-border' ),
- 'title' => __( 'Submenu Divider', 'astra' ),
- ),
-
- // Option: Submenu item Border Color.
- array(
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'transport' => 'postMessage',
- 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-b-color]',
- 'default' => astra_get_option( 'primary-submenu-item-b-color' ),
- 'title' => __( 'Divider Color', 'astra' ),
- 'section' => 'section-primary-menu',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'priority' => 30,
- ),
-
- /**
- * Option: Mobile Menu Label Divider
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label-divider]',
- 'type' => 'control',
- 'control' => 'ast-heading',
- 'section' => 'section-header',
- 'priority' => 35,
- 'title' => __( 'Mobile Header', 'astra' ),
- 'settings' => array(),
- ),
-
- /**
- * Option: Mobile Menu Alignment
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-align]',
- 'default' => astra_get_option( 'header-main-menu-align' ),
- 'type' => 'control',
- 'control' => 'ast-radio-image',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
- 'choices' => array(
- 'inline' => array(
- 'label' => __( 'Inline', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-inline' ),
- ),
- 'stack' => array(
- 'label' => __( 'Stack', 'astra' ),
- 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-stack' ),
- ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'section' => 'section-header',
- 'priority' => 40,
- 'title' => __( 'Layout', 'astra' ),
- ),
-
- /**
- * Option: Hide Last item in Menu on mobile device
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]',
- 'default' => astra_get_option( 'hide-custom-menu-mobile' ),
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => 'in',
- 'value' => array( 'button', 'text-html' ),
- ),
- ),
- 'section' => 'section-primary-menu',
- 'title' => __( 'Hide Last Item in Menu on Mobile', 'astra' ),
- 'priority' => 7,
- 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
- ),
-
- /**
- * Option: Display outside menu
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-display-outside-menu]',
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]',
- 'operator' => '!=',
- 'value' => '1',
- ),
- ),
- 'default' => astra_get_option( 'header-display-outside-menu' ),
- 'section' => 'section-primary-menu',
- 'title' => __( 'Take Last Item Outside Menu', 'astra' ),
- 'priority' => 7,
- ),
-
- array(
- 'name' => 'primary-menu-label-divider',
- 'type' => 'control',
- 'control' => 'ast-heading',
- 'priority' => 39,
- 'title' => __( 'Mobile Menu', 'astra' ),
- 'section' => 'section-primary-menu',
- 'settings' => array(),
- ),
-
- /**
- * Option: Mobile Header Breakpoint
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-breakpoint]',
- 'default' => astra_get_option( 'mobile-header-breakpoint' ),
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'section' => 'section-primary-menu',
- 'priority' => 40,
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
- 'title' => __( 'Menu Breakpoint', 'astra' ),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 10,
- 'max' => 6000,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Notice to add # link to parent menu when Link option selected in Dropdown Target.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target-link-notice]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-header',
- 'priority' => 41,
- 'title' => '',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]',
- 'operator' => '==',
- 'value' => 'link',
- ),
- ),
- 'help' => __( 'The parent menu should have a # link for the submenu to open on a link.', 'astra' ),
- 'settings' => array(),
- ),
-
- /**
- * Option: Mobile Menu Label.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label]',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-main-menu-label' ),
- 'section' => 'section-primary-menu',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'context' => array(
- 'relation' => 'AND',
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab,
- array(
- 'relation' => 'OR',
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
- 'operator' => '!=',
- 'value' => array( 'none' ),
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
- 'operator' => '!=',
- 'value' => array( '1' ),
- ),
- ),
- ),
- 'priority' => 40,
- 'title' => __( 'Menu Label', 'astra' ),
- 'type' => 'control',
- 'control' => 'text',
- 'partial' => array(
- 'selector' => '.ast-button-wrap',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Customizer_Partials::mobile_toggle_menu',
- ),
- ),
-
- /**
- * Option: Toggle Button Style
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
- 'default' => astra_get_option( 'mobile-header-toggle-btn-style' ),
- 'section' => 'section-primary-menu',
- 'title' => __( 'Toggle Button Style', 'astra' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'priority' => 42,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
- 'operator' => '!=',
- 'value' => true,
- ),
- ),
- 'choices' => array(
- 'fill' => __( 'Fill', 'astra' ),
- 'outline' => __( 'Outline', 'astra' ),
- 'minimal' => __( 'Minimal', 'astra' ),
- ),
- ),
-
- /**
- * Option: Toggle Button Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style-color]',
- 'default' => astra_get_option( 'mobile-header-toggle-btn-style-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[mobile-menu-style]',
- 'operator' => '!=',
- 'value' => 'no-toggle',
- ),
- ),
- 'title' => __( 'Toggle Button Color', 'astra' ),
- 'section' => 'section-primary-menu',
- 'transport' => 'postMessage',
- 'priority' => 42,
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Border Radius
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-border-radius]',
- 'default' => astra_get_option( 'mobile-header-toggle-btn-border-radius' ),
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'section' => 'section-primary-menu',
- 'title' => __( 'Border Radius', 'astra' ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
- 'operator' => '!=',
- 'value' => 'minimal',
- ),
- ),
- 'priority' => 42,
- 'suffix' => 'px',
- 'transport' => 'postMessage',
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 100,
- ),
- ),
-
- /**
- * Option: Toggle on click of button or link.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]',
- 'default' => astra_get_option( 'mobile-header-toggle-target' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-primary-menu',
- 'priority' => 42,
- 'title' => __( 'Dropdown Target', 'astra' ),
- 'suffix' => '',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'choices' => array(
- 'icon' => __( 'Icon', 'astra' ),
- 'link' => __( 'Link', 'astra' ),
- ),
- ),
-
- );
-
- $configurations = array_merge( $configurations, $_configs );
-
- // Learn More link if Astra Pro is not activated.
- if ( ! defined( 'ASTRA_EXT_VER' ) ) {
-
- $config = array(
-
- /**
- * Option: Learn More about Mobile Header
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-more-feature-description]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-header',
- 'priority' => 999,
- 'title' => '',
- 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
- 'settings' => array(),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
- );
-
- $configurations = array_merge( $configurations, $config );
- }
-
- return $configurations;
- }
- }
-}
-
-
-new Astra_Header_Layout_Configs();
+<?php
+/**
+ * General Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Header_Layout_Configs' ) ) {
+
+ /**
+ * Register Header Layout Customizer Configurations.
+ */
+ class Astra_Header_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Header Layout Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Header Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-layouts]',
+ 'default' => astra_get_option( 'header-layouts' ),
+ 'section' => 'section-header',
+ 'priority' => 4,
+ 'title' => __( 'Layout', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-radio-image',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
+ 'choices' => array(
+ 'header-main-layout-1' => array(
+ 'label' => __( 'Logo Left', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-1' ),
+ ),
+ 'header-main-layout-2' => array(
+ 'label' => __( 'Logo Center', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-2' ),
+ ),
+ 'header-main-layout-3' => array(
+ 'label' => __( 'Logo Right', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'header-main-layout-3' ),
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Header Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-layout-width]',
+ 'default' => astra_get_option( 'header-main-layout-width' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-header',
+ 'priority' => 4,
+ 'title' => __( 'Width', 'astra' ),
+ 'choices' => array(
+ 'full' => __( 'Full Width', 'astra' ),
+ 'content' => __( 'Content Width', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Bottom Border Size
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-main-sep' ),
+ 'type' => 'control',
+ 'control' => 'number',
+ 'section' => 'section-header',
+ 'priority' => 4,
+ 'title' => __( 'Bottom Border Size', 'astra' ),
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ ),
+
+ /**
+ * Option: Bottom Border Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-sep-color]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-main-sep-color' ),
+ 'type' => 'control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-sep]',
+ 'operator' => '>=',
+ 'value' => 1,
+ ),
+ ),
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'section' => 'section-header',
+ 'priority' => 4,
+ 'title' => __( 'Bottom Border Color', 'astra' ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
+ 'default' => astra_get_option( 'disable-primary-nav' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => 'section-primary-menu',
+ 'title' => __( 'Disable Menu', 'astra' ),
+ 'priority' => 5,
+ 'partial' => array(
+ 'selector' => '.main-header-bar .main-navigation',
+ 'container_inclusive' => false,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'default' => astra_get_option( 'header-main-rt-section' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-primary-menu',
+ 'priority' => 7,
+ 'title' => __( 'Last Item in Menu', 'astra' ),
+ 'choices' => apply_filters(
+ 'astra_header_section_elements',
+ array(
+ 'none' => __( 'None', 'astra' ),
+ 'search' => __( 'Search', 'astra' ),
+ 'button' => __( 'Button', 'astra' ),
+ 'text-html' => __( 'Text / HTML', 'astra' ),
+ 'widget' => __( 'Widget', 'astra' ),
+ ),
+ 'primary-header'
+ ),
+ 'partial' => array(
+ 'selector' => '.main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.search-custom-menu-item .ast-search-icon .astra-search-icon, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.woocommerce-custom-menu-item, .main-header-bar .ast-masthead-custom-menu-items.widget-custom-menu-item .ast-header-widget-area .widget.ast-no-widget-row, .main-header-bar .main-navigation .main-header-menu .ast-masthead-custom-menu-items.edd-custom-menu-item',
+ 'container_inclusive' => false,
+ ),
+ ),
+
+ /**
+ * Option: Button Text
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-text]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-main-rt-section-button-text' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'section' => 'section-primary-menu',
+ 'partial' => array(
+ 'selector' => '.button-custom-menu-item',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_button_text',
+ ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '===',
+ 'value' => 'button',
+ ),
+ ),
+ 'priority' => 10,
+ 'title' => __( 'Button Text', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-link-option]',
+ 'default' => astra_get_option( 'header-main-rt-section-button-link-option' ),
+ 'type' => 'control',
+ 'control' => 'ast-link',
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '===',
+ 'value' => 'button',
+ ),
+ ),
+ 'priority' => 10,
+ 'title' => __( 'Button Link', 'astra' ),
+ ),
+
+ /**
+ * Option: Button Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]',
+ 'default' => astra_get_option( 'header-main-rt-section-button-style' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '===',
+ 'value' => 'button',
+ ),
+ ),
+ 'priority' => 10,
+ 'choices' => array(
+ 'theme-button' => __( 'Theme Button', 'astra' ),
+ 'custom-button' => __( 'Header Button', 'astra' ),
+ ),
+ 'title' => __( 'Button Style', 'astra' ),
+ ),
+
+ /**
+ * Option: Theme Button Style edit link
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-button-style-link]',
+ 'default' => astra_get_option( 'header-button-style-link' ),
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '===',
+ 'value' => 'button',
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-button-style]',
+ 'operator' => '===',
+ 'value' => 'theme-button',
+ ),
+ ),
+ 'priority' => 10,
+ 'link_type' => 'section',
+ 'linked' => 'section-buttons',
+ 'link_text' => __( 'Customize Button Style.', 'astra' ),
+ ),
+
+ /**
+ * Option: Right Section Text / HTML
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-rt-section-html]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-main-rt-section-html' ),
+ 'type' => 'control',
+ 'control' => 'textarea',
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '===',
+ 'value' => 'text-html',
+ ),
+ ),
+ 'priority' => 10,
+ 'partial' => array(
+ 'selector' => '.main-header-bar .ast-masthead-custom-menu-items .ast-custom-html',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Customizer_Partials::render_header_main_rt_section_html',
+ ),
+ 'title' => __( 'Custom Menu Text / HTML', 'astra' ),
+ ),
+
+ array(
+ 'name' => 'primary-header-sub-menu-label-divider',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'priority' => 30,
+ 'title' => __( 'Sub Menu', 'astra' ),
+ 'section' => 'section-primary-menu',
+ 'settings' => array(),
+ ),
+
+ /**
+ * Option: Submenu Container Animation
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-submenu-container-animation]',
+ 'default' => astra_get_option( 'header-main-submenu-container-animation' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
+ 'operator' => '!=',
+ 'value' => true,
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'priority' => 30,
+ 'title' => __( 'Submenu Animation', 'astra' ),
+ 'choices' => array(
+ '' => __( 'None', 'astra' ),
+ 'slide-down' => __( 'Slide Down', 'astra' ),
+ 'slide-up' => __( 'Slide Up', 'astra' ),
+ 'fade' => __( 'Fade', 'astra' ),
+ ),
+ ),
+
+ // Option: Primary Menu Border.
+ array(
+ 'type' => 'control',
+ 'control' => 'ast-border',
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-border]',
+ 'section' => 'section-primary-menu',
+ 'linked_choices' => true,
+ 'priority' => 30,
+ 'default' => astra_get_option( 'primary-submenu-border' ),
+ 'title' => __( 'Container Border', 'astra' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+ ),
+
+ // Option: Submenu Container Border Color.
+ array(
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-b-color]',
+ 'default' => astra_get_option( 'primary-submenu-b-color' ),
+ 'title' => __( 'Border Color', 'astra' ),
+ 'section' => 'section-primary-menu',
+ 'priority' => 30,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ array(
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]',
+ 'section' => 'section-primary-menu',
+ 'priority' => 30,
+ 'default' => astra_get_option( 'primary-submenu-item-border' ),
+ 'title' => __( 'Submenu Divider', 'astra' ),
+ ),
+
+ // Option: Submenu item Border Color.
+ array(
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'transport' => 'postMessage',
+ 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-b-color]',
+ 'default' => astra_get_option( 'primary-submenu-item-b-color' ),
+ 'title' => __( 'Divider Color', 'astra' ),
+ 'section' => 'section-primary-menu',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[primary-submenu-item-border]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'priority' => 30,
+ ),
+
+ /**
+ * Option: Mobile Menu Label Divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => 'section-header',
+ 'priority' => 35,
+ 'title' => __( 'Mobile Header', 'astra' ),
+ 'settings' => array(),
+ ),
+
+ /**
+ * Option: Mobile Menu Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-align]',
+ 'default' => astra_get_option( 'header-main-menu-align' ),
+ 'type' => 'control',
+ 'control' => 'ast-radio-image',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),
+ 'choices' => array(
+ 'inline' => array(
+ 'label' => __( 'Inline', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-inline' ),
+ ),
+ 'stack' => array(
+ 'label' => __( 'Stack', 'astra' ),
+ 'path' => Astra_Builder_UI_Controller::fetch_svg_icon( 'menu-stack' ),
+ ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'section' => 'section-header',
+ 'priority' => 40,
+ 'title' => __( 'Layout', 'astra' ),
+ ),
+
+ /**
+ * Option: Hide Last item in Menu on mobile device
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]',
+ 'default' => astra_get_option( 'hide-custom-menu-mobile' ),
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => 'in',
+ 'value' => array( 'button', 'text-html' ),
+ ),
+ ),
+ 'section' => 'section-primary-menu',
+ 'title' => __( 'Hide Last Item in Menu on Mobile', 'astra' ),
+ 'priority' => 7,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Display outside menu
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-display-outside-menu]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[hide-custom-menu-mobile]',
+ 'operator' => '!=',
+ 'value' => '1',
+ ),
+ ),
+ 'default' => astra_get_option( 'header-display-outside-menu' ),
+ 'section' => 'section-primary-menu',
+ 'title' => __( 'Take Last Item Outside Menu', 'astra' ),
+ 'priority' => 7,
+ ),
+
+ array(
+ 'name' => 'primary-menu-label-divider',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'priority' => 39,
+ 'title' => __( 'Mobile Menu', 'astra' ),
+ 'section' => 'section-primary-menu',
+ 'settings' => array(),
+ ),
+
+ /**
+ * Option: Mobile Header Breakpoint
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-breakpoint]',
+ 'default' => astra_get_option( 'mobile-header-breakpoint' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => 'section-primary-menu',
+ 'priority' => 40,
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
+ 'title' => __( 'Menu Breakpoint', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 10,
+ 'max' => 6000,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Notice to add # link to parent menu when Link option selected in Dropdown Target.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target-link-notice]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-header',
+ 'priority' => 41,
+ 'title' => '',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]',
+ 'operator' => '==',
+ 'value' => 'link',
+ ),
+ ),
+ 'help' => __( 'The parent menu should have a # link for the submenu to open on a link.', 'astra' ),
+ 'settings' => array(),
+ ),
+
+ /**
+ * Option: Mobile Menu Label.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-main-menu-label]',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-main-menu-label' ),
+ 'section' => 'section-primary-menu',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ 'relation' => 'AND',
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab,
+ array(
+ 'relation' => 'OR',
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[header-main-rt-section]',
+ 'operator' => '!=',
+ 'value' => array( 'none' ),
+ ),
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
+ 'operator' => '!=',
+ 'value' => array( '1' ),
+ ),
+ ),
+ ),
+ 'priority' => 40,
+ 'title' => __( 'Menu Label', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'text',
+ 'partial' => array(
+ 'selector' => '.ast-button-wrap',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Customizer_Partials::mobile_toggle_menu',
+ ),
+ ),
+
+ /**
+ * Option: Toggle Button Style
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-style' ),
+ 'section' => 'section-primary-menu',
+ 'title' => __( 'Toggle Button Style', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'priority' => 42,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[disable-primary-nav]',
+ 'operator' => '!=',
+ 'value' => true,
+ ),
+ ),
+ 'choices' => array(
+ 'fill' => __( 'Fill', 'astra' ),
+ 'outline' => __( 'Outline', 'astra' ),
+ 'minimal' => __( 'Minimal', 'astra' ),
+ ),
+ ),
+
+ /**
+ * Option: Toggle Button Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style-color]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-style-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-menu-style]',
+ 'operator' => '!=',
+ 'value' => 'no-toggle',
+ ),
+ ),
+ 'title' => __( 'Toggle Button Color', 'astra' ),
+ 'section' => 'section-primary-menu',
+ 'transport' => 'postMessage',
+ 'priority' => 42,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Border Radius
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-border-radius]',
+ 'default' => astra_get_option( 'mobile-header-toggle-btn-border-radius' ),
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'section' => 'section-primary-menu',
+ 'title' => __( 'Border Radius', 'astra' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-btn-style]',
+ 'operator' => '!=',
+ 'value' => 'minimal',
+ ),
+ ),
+ 'priority' => 42,
+ 'suffix' => 'px',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 100,
+ ),
+ ),
+
+ /**
+ * Option: Toggle on click of button or link.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-toggle-target]',
+ 'default' => astra_get_option( 'mobile-header-toggle-target' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-primary-menu',
+ 'priority' => 42,
+ 'title' => __( 'Dropdown Target', 'astra' ),
+ 'suffix' => '',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'choices' => array(
+ 'icon' => __( 'Icon', 'astra' ),
+ 'link' => __( 'Link', 'astra' ),
+ ),
+ ),
+
+ );
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ // Learn More link if Astra Pro is not activated.
+ if ( ! defined( 'ASTRA_EXT_VER' ) ) {
+
+ $config = array(
+
+ /**
+ * Option: Learn More about Mobile Header
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-more-feature-description]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-header',
+ 'priority' => 999,
+ 'title' => '',
+ 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
+ 'settings' => array(),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $config );
+ }
+
+ return $configurations;
+ }
+ }
+}
+
+
+new Astra_Header_Layout_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php b/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php
index 279675d..14a303b 100644
--- a/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-sidebar-layout-configs.php
@@ -1,155 +1,155 @@
-<?php
-/**
- * Bottom Footer Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Sidebar_Layout_Configs' ) ) {
-
- /**
- * Register Astra Sidebar Layout Configurations.
- */
- class Astra_Sidebar_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Astra Sidebar Layout Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Default Sidebar Position
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-sidebars',
- 'default' => astra_get_option( 'site-sidebar-layout' ),
- 'priority' => 5,
- 'title' => __( 'Default Layout', 'astra' ),
- 'choices' => array(
- 'no-sidebar' => __( 'No Sidebar', 'astra' ),
- 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
- 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Page
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[single-page-sidebar-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'section' => 'section-sidebars',
- 'default' => astra_get_option( 'single-page-sidebar-layout' ),
- 'priority' => 5,
- 'title' => __( 'Pages', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'no-sidebar' => __( 'No Sidebar', 'astra' ),
- 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
- 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
- ),
- ),
-
- /**
- * Option: Blog Post
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[single-post-sidebar-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'default' => astra_get_option( 'single-post-sidebar-layout' ),
- 'section' => 'section-sidebars',
- 'priority' => 5,
- 'title' => __( 'Blog Posts', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'no-sidebar' => __( 'No Sidebar', 'astra' ),
- 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
- 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
- ),
- ),
-
- /**
- * Option: Blog Post Archive
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[archive-post-sidebar-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'default' => astra_get_option( 'archive-post-sidebar-layout' ),
- 'section' => 'section-sidebars',
- 'priority' => 5,
- 'title' => __( 'Archives', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'no-sidebar' => __( 'No Sidebar', 'astra' ),
- 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
- 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Primary Content Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'default' => astra_get_option( 'site-sidebar-width' ),
- 'section' => 'section-sidebars',
- 'priority' => 15,
- 'title' => __( 'Sidebar Width', 'astra' ),
- 'suffix' => '%',
- 'transport' => 'postMessage',
- 'input_attrs' => array(
- 'min' => 15,
- 'step' => 1,
- 'max' => 50,
- ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width-description]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-sidebars',
- 'priority' => 15,
- 'title' => '',
- 'help' => __( 'Sidebar width will apply only when one of the above sidebar is set.', 'astra' ),
- 'settings' => array(),
- ),
- );
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-
-new Astra_Sidebar_Layout_Configs();
-
-
-
-
-
+<?php
+/**
+ * Bottom Footer Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Sidebar_Layout_Configs' ) ) {
+
+ /**
+ * Register Astra Sidebar Layout Configurations.
+ */
+ class Astra_Sidebar_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Astra Sidebar Layout Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Default Sidebar Position
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-sidebars',
+ 'default' => astra_get_option( 'site-sidebar-layout' ),
+ 'priority' => 5,
+ 'title' => __( 'Default Layout', 'astra' ),
+ 'choices' => array(
+ 'no-sidebar' => __( 'No Sidebar', 'astra' ),
+ 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
+ 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Page
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[single-page-sidebar-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'section' => 'section-sidebars',
+ 'default' => astra_get_option( 'single-page-sidebar-layout' ),
+ 'priority' => 5,
+ 'title' => __( 'Pages', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'no-sidebar' => __( 'No Sidebar', 'astra' ),
+ 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
+ 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
+ ),
+ ),
+
+ /**
+ * Option: Blog Post
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[single-post-sidebar-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'default' => astra_get_option( 'single-post-sidebar-layout' ),
+ 'section' => 'section-sidebars',
+ 'priority' => 5,
+ 'title' => __( 'Blog Posts', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'no-sidebar' => __( 'No Sidebar', 'astra' ),
+ 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
+ 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
+ ),
+ ),
+
+ /**
+ * Option: Blog Post Archive
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[archive-post-sidebar-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'default' => astra_get_option( 'archive-post-sidebar-layout' ),
+ 'section' => 'section-sidebars',
+ 'priority' => 5,
+ 'title' => __( 'Archives', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'no-sidebar' => __( 'No Sidebar', 'astra' ),
+ 'left-sidebar' => __( 'Left Sidebar', 'astra' ),
+ 'right-sidebar' => __( 'Right Sidebar', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Primary Content Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'default' => astra_get_option( 'site-sidebar-width' ),
+ 'section' => 'section-sidebars',
+ 'priority' => 15,
+ 'title' => __( 'Sidebar Width', 'astra' ),
+ 'suffix' => '%',
+ 'transport' => 'postMessage',
+ 'input_attrs' => array(
+ 'min' => 15,
+ 'step' => 1,
+ 'max' => 50,
+ ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-sidebar-width-description]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-sidebars',
+ 'priority' => 15,
+ 'title' => '',
+ 'help' => __( 'Sidebar width will apply only when one of the above sidebar is set.', 'astra' ),
+ 'settings' => array(),
+ ),
+ );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+}
+
+
+new Astra_Sidebar_Layout_Configs();
+
+
+
+
+
diff --git a/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php b/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php
index e930c89..cb38b95 100644
--- a/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-site-container-layout-configs.php
@@ -1,157 +1,157 @@
-<?php
-/**
- * General Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Site_Container_Layout_Configs' ) ) {
-
- /**
- * Register Astra Site Container Layout Customizer Configurations.
- */
- class Astra_Site_Container_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Astra Site Container Layout Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /**
- * Option: Single Page Content Layout
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-content-layout]',
- 'type' => 'control',
- 'default' => astra_get_option( 'site-content-layout' ),
- 'control' => 'ast-select',
- 'section' => 'section-container-layout',
- 'priority' => 50,
- 'title' => __( 'Layout', 'astra' ),
- 'choices' => array(
- 'boxed-container' => __( 'Boxed', 'astra' ),
- 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
- 'plain-container' => __( 'Full Width / Contained', 'astra' ),
- 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Single Page Content Layout
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[single-page-content-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'default' => astra_get_option( 'single-page-content-layout' ),
- 'section' => 'section-container-layout',
- 'title' => __( 'Page Layout', 'astra' ),
- 'priority' => 55,
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'boxed-container' => __( 'Boxed', 'astra' ),
- 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
- 'plain-container' => __( 'Full Width / Contained', 'astra' ),
- 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[single-post-content-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'default' => astra_get_option( 'single-post-content-layout' ),
- 'section' => 'section-container-layout',
- 'priority' => 60,
- 'title' => __( 'Blog Post Layout', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'boxed-container' => __( 'Boxed', 'astra' ),
- 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
- 'plain-container' => __( 'Full Width / Contained', 'astra' ),
- 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Archive Post Content Layout
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[archive-post-content-layout]',
- 'type' => 'control',
- 'control' => 'ast-select',
- 'default' => astra_get_option( 'archive-post-content-layout' ),
- 'section' => 'section-container-layout',
- 'priority' => 65,
- 'title' => __( 'Archives Layout', 'astra' ),
- 'choices' => array(
- 'default' => __( 'Default', 'astra' ),
- 'boxed-container' => __( 'Boxed', 'astra' ),
- 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
- 'plain-container' => __( 'Full Width / Contained', 'astra' ),
- 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
- ),
- ),
-
- /**
- * Option: Body Background
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-layout-outside-bg-obj-responsive]',
- 'type' => 'control',
- 'control' => 'ast-responsive-background',
- 'default' => astra_get_option( 'site-layout-outside-bg-obj-responsive' ),
- 'section' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) ) ? 'section-colors-body' : 'section-colors-background',
- 'transport' => 'postMessage',
- 'priority' => 25,
- 'title' => __( 'Background', 'astra' ),
- ),
- );
-
- $configurations = array_merge( $configurations, $_configs );
-
- // Learn More link if Astra Pro is not activated.
- if ( ! defined( 'ASTRA_EXT_VER' ) ) {
-
- $config = array(
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-container-more-feature-description]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-container-layout',
- 'priority' => 999,
- 'title' => '',
- 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
- 'settings' => array(),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
- );
-
- $configurations = array_merge( $configurations, $config );
- }
-
- return $configurations;
- }
- }
-}
-
-new Astra_Site_Container_Layout_Configs();
+<?php
+/**
+ * General Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Site_Container_Layout_Configs' ) ) {
+
+ /**
+ * Register Astra Site Container Layout Customizer Configurations.
+ */
+ class Astra_Site_Container_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Astra Site Container Layout Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /**
+ * Option: Single Page Content Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-content-layout]',
+ 'type' => 'control',
+ 'default' => astra_get_option( 'site-content-layout' ),
+ 'control' => 'ast-select',
+ 'section' => 'section-container-layout',
+ 'priority' => 50,
+ 'title' => __( 'Layout', 'astra' ),
+ 'choices' => array(
+ 'boxed-container' => __( 'Boxed', 'astra' ),
+ 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
+ 'plain-container' => __( 'Full Width / Contained', 'astra' ),
+ 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Single Page Content Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[single-page-content-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'default' => astra_get_option( 'single-page-content-layout' ),
+ 'section' => 'section-container-layout',
+ 'title' => __( 'Page Layout', 'astra' ),
+ 'priority' => 55,
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'boxed-container' => __( 'Boxed', 'astra' ),
+ 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
+ 'plain-container' => __( 'Full Width / Contained', 'astra' ),
+ 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[single-post-content-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'default' => astra_get_option( 'single-post-content-layout' ),
+ 'section' => 'section-container-layout',
+ 'priority' => 60,
+ 'title' => __( 'Blog Post Layout', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'boxed-container' => __( 'Boxed', 'astra' ),
+ 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
+ 'plain-container' => __( 'Full Width / Contained', 'astra' ),
+ 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Archive Post Content Layout
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[archive-post-content-layout]',
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'default' => astra_get_option( 'archive-post-content-layout' ),
+ 'section' => 'section-container-layout',
+ 'priority' => 65,
+ 'title' => __( 'Archives Layout', 'astra' ),
+ 'choices' => array(
+ 'default' => __( 'Default', 'astra' ),
+ 'boxed-container' => __( 'Boxed', 'astra' ),
+ 'content-boxed-container' => __( 'Content Boxed', 'astra' ),
+ 'plain-container' => __( 'Full Width / Contained', 'astra' ),
+ 'page-builder' => __( 'Full Width / Stretched', 'astra' ),
+ ),
+ ),
+
+ /**
+ * Option: Body Background
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-layout-outside-bg-obj-responsive]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-background',
+ 'default' => astra_get_option( 'site-layout-outside-bg-obj-responsive' ),
+ 'section' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) ) ? 'section-colors-body' : 'section-colors-background',
+ 'transport' => 'postMessage',
+ 'priority' => 25,
+ 'title' => __( 'Background', 'astra' ),
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $_configs );
+
+ // Learn More link if Astra Pro is not activated.
+ if ( ! defined( 'ASTRA_EXT_VER' ) ) {
+
+ $config = array(
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-container-more-feature-description]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-container-layout',
+ 'priority' => 999,
+ 'title' => '',
+ 'help' => '<p>' . __( 'More Options Available in Astra Pro!', 'astra' ) . '</p><a href="' . astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ) . '" class="button button-secondary" target="_blank" rel="noopener">' . __( 'Learn More', 'astra' ) . '</a>',
+ 'settings' => array(),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ );
+
+ $configurations = array_merge( $configurations, $config );
+ }
+
+ return $configurations;
+ }
+ }
+}
+
+new Astra_Site_Container_Layout_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-site-identity-configs.php b/inc/customizer/configurations/layout/class-astra-site-identity-configs.php
index d01af50..c046a97 100644
--- a/inc/customizer/configurations/layout/class-astra-site-identity-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-site-identity-configs.php
@@ -1,495 +1,495 @@
-<?php
-/**
- * Bottom Footer Options for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Site_Identity_Configs' ) ) {
-
- /**
- * Register Astra Customizerr Site identity Customizer Configurations.
- */
- class Astra_Site_Identity_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Astra Customizerr Site identity Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_section = 'title_tagline';
- $retina_logo_divider = 6;
- $retina_logo_togglecontrol = 5;
-
- /**
- * Priorities updated based on is new header-footer builder active or not.
- */
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $retina_logo_divider = 4;
- $retina_logo_togglecontrol = 4;
- }
-
- $_configs = array(
-
- /**
- * Notice for Colors - Transparent header enabled on page.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => $_section,
- 'priority' => 1,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
- 'help' => $this->get_help_text_notice( 'transparent-header' ),
- ),
-
- /**
- * Option: Transparent Header Section - Link.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo-link]',
- 'type' => 'control',
- 'control' => 'ast-customizer-link',
- 'section' => $_section,
- 'priority' => 1,
- 'link_type' => 'control',
- 'linked' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'link_text' => '<u>' . __( 'Customize Transparent Header.', 'astra' ) . '</u>',
- 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
- ),
-
-
- /**
- * Option: Different retina logo
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[different-retina-logo]',
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'section' => $_section,
- 'title' => __( 'Different Logo For Retina Devices?', 'astra' ),
- 'default' => astra_get_option( 'different-retina-logo' ),
- 'priority' => 5,
- 'transport' => 'postMessage',
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- 'context' => array(
- array(
- 'setting' => 'custom_logo',
- 'operator' => '!=',
- 'value' => '',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'partial' => array(
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
-
- /**
- * Option: Retina logo selector
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-header-retina-logo]',
- 'default' => astra_get_option( 'ast-header-retina-logo' ),
- 'type' => 'control',
- 'control' => 'image',
- 'sanitize_callback' => 'esc_url_raw',
- 'section' => 'title_tagline',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-retina-logo]',
- 'operator' => '!=',
- 'value' => 0,
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'priority' => 6,
- 'title' => __( 'Retina Logo', 'astra' ),
- 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
- 'transport' => 'postMessage',
- 'partial' => array(
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
-
- /**
- * Option: Inherit Desktop logo
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]',
- 'type' => 'control',
- 'control' => 'ast-toggle-control',
- 'default' => astra_get_option( 'different-mobile-logo' ),
- 'section' => 'title_tagline',
- 'title' => __( 'Different Logo For Mobile Devices?', 'astra' ),
- 'priority' => 5,
- 'context' => array(
- array(
- 'setting' => 'custom_logo',
- 'operator' => '!=',
- 'value' => '',
- ),
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => 'ast_selected_device',
- 'operator' => 'in',
- 'value' => array( 'tablet', 'mobile' ),
- ),
- ),
- 'transport' => 'postMessage',
- 'partial' => array(
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
-
- /**
- * Option: Mobile header logo
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-logo]',
- 'default' => astra_get_option( 'mobile-header-logo' ),
- 'type' => 'control',
- 'control' => 'image',
- 'sanitize_callback' => 'esc_url_raw',
- 'section' => 'title_tagline',
- 'priority' => 5.5,
- 'title' => __( 'Mobile Logo (optional)', 'astra' ),
- 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]',
- 'operator' => '==',
- 'value' => '1',
- ),
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => 'ast_selected_device',
- 'operator' => 'in',
- 'value' => array( 'tablet', 'mobile' ),
- ),
- ),
- ),
-
- /**
- * Option: Logo Width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-header-responsive-logo-width]',
- 'type' => 'control',
- 'control' => 'ast-responsive-slider',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'ast-header-responsive-logo-width' ),
- 'priority' => 7,
- 'title' => __( 'Logo Width', 'astra' ),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 600,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
- ),
-
- /**
- * Option: Display Title
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
- 'type' => 'control',
- 'control' => 'ast-responsive-toggle-control',
- 'default' => astra_get_option( 'display-site-title-responsive' ),
- 'section' => 'title_tagline',
- 'title' => __( 'Display Site Title', 'astra' ),
- 'priority' => 7,
- 'transport' => 'postMessage',
- 'partial' => array(
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
-
- /**
- * Option: Divider
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-site-title-tagline-divider]',
- 'type' => 'control',
- 'section' => $_section,
- 'control' => 'ast-divider',
- 'priority' => 13,
- 'settings' => array(),
- 'context' => array( Astra_Builder_Helper::$general_tab_config ),
- ),
-
- /**
- * Option: Display Tagline
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]',
- 'type' => 'control',
- 'control' => 'ast-responsive-toggle-control',
- 'default' => astra_get_option( 'display-site-tagline-responsive' ),
- 'section' => 'title_tagline',
- 'priority' => 11,
- 'title' => __( 'Display Site Tagline', 'astra' ),
- 'transport' => 'postMessage',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
- 'partial' => array(
-
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
-
- /**
- * Option: Logo inline title.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[logo-title-inline]',
- 'default' => astra_get_option( 'logo-title-inline' ),
- 'type' => 'control',
- 'context' => array( Astra_Builder_Helper::$general_tab_config ),
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- 'section' => $_section,
- 'title' => __( 'Inline Logo & Site Title', 'astra' ),
- 'priority' => 8,
- 'transport' => 'postMessage',
- 'partial' => array(
- 'selector' => '.site-branding',
- 'container_inclusive' => false,
- 'render_callback' => 'Astra_Builder_Header::site_identity',
- ),
- ),
- );
-
- /**
- * We adding this control only to maintain backwards. Remove this condition after 2-3 updates of add-on.
- * Moving Site Title color & Tagline color option into theme.
- *
- * @since 3.5.0
- */
- $load_site_tagline_color_controls = true;
- if ( is_astra_addon_3_5_0_version() ) {
- $load_site_tagline_color_controls = false;
- }
-
- if ( $load_site_tagline_color_controls ) {
- $_configs = array_merge(
- $_configs,
- array(
- // Color Group control for site title colors.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
- 'default' => astra_get_option( 'site-identity-title-color-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => Astra_Builder_Helper::$is_header_footer_builder_active ? __( 'Title Color', 'astra' ) : __( 'Colors', 'astra' ),
- 'section' => $_section,
- 'responsive' => false,
- 'transport' => 'postMessage',
- 'priority' => 8,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
- ),
-
- // Option: Site Title Color.
- array(
- 'name' => 'header-color-site-title',
- 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
- 'section' => 'title_tagline',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'priority' => 5,
- 'default' => astra_get_option( 'header-color-site-title' ),
- 'transport' => 'postMessage',
- 'title' => __( 'Normal', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Site Title Hover Color.
- array(
- 'name' => 'header-color-h-site-title',
- 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
- 'section' => 'title_tagline',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'priority' => 10,
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-color-h-site-title' ),
- 'title' => __( 'Hover', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Site Tagline Color.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[header-color-site-tagline]',
- 'type' => 'control',
- 'control' => 'ast-color',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'header-color-site-tagline' ),
- 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline', 'astra' ) : __( 'Color', 'astra' ),
- 'section' => 'title_tagline',
- 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 8 : 12,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
- ),
- )
- );
- }
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
-
- $_configs = array_merge(
- $_configs,
- array(
- /**
- * Notice - Transparent meta header enabled on page.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-meta-enabled]',
- 'type' => 'control',
- 'control' => 'ast-description',
- 'section' => 'section-header-builder-layout',
- 'priority' => 1,
- 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
- 'help' => $this->get_help_text_notice( 'transparent-meta' ),
- ),
-
- /**
- * Notice Link - Transparent meta header enabled on page.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-meta-link]',
- 'type' => 'control',
- 'control' => 'ast-customizer-link',
- 'section' => 'section-header-builder-layout',
- 'priority' => 1,
- 'link_type' => 'section',
- 'linked' => 'section-transparent-header',
- 'link_text' => '<u>' . __( 'Customize Transparent Header.', 'astra' ) . '</u>',
- 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
- ),
- )
- );
- }
-
- if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
-
- $new_configs = array(
-
- /**
- * Option: Header Site Title.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-title-typography]',
- 'default' => astra_get_option( 'site-title-typography' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Title Font', 'astra' ) : __( 'Typography', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
- ),
-
- /**
- * Options: Site Tagline.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]',
- 'default' => astra_get_option( 'site-tagline-typography' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline Font', 'astra' ) : __( 'Typography', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 11,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
- ),
- );
-
- $_configs = array_merge( $_configs, $new_configs );
- }
-
- $configurations = array_merge( $configurations, $_configs );
- return $configurations;
-
- }
-
- /**
- * Check if transparent header is enabled on the page being previewed.
- *
- * @since 2.4.5
- * @return boolean True - If Transparent Header is enabled, False if not.
- */
- public function is_transparent_header_enabled() {
- $status = Astra_Ext_Transparent_Header_Markup::is_transparent_header();
- return ( true === $status ? true : false );
- }
-
- /**
- * Help notice message to be displayed when the page that is being previewed has Logo set from Transparent Header.
- *
- * @since 2.4.5
- * @param String $context Type of notice message to be returned.
- * @return String HTML Markup for the help notice.
- */
- private function get_help_text_notice( $context ) {
-
- switch ( $context ) {
- case 'transparent-header':
- $notice = '<div class="ast-customizer-notice wp-ui-highlight"><p>The Logo on this page is set from the Transparent Header Section. Please click the link below to customize Transparent Header Logo.</p></div>';
- break;
- case 'transparent-meta':
- $notice = '<div class="ast-customizer-notice wp-ui-highlight"><p>The header on this page is set from the Transparent Header.</p> <p> Please click the link below to customize Transparent Header </p></div>';
- break;
- default:
- $notice = '';
- }
- return $notice;
- }
- }
-}
-
-
-new Astra_Site_Identity_Configs();
+<?php
+/**
+ * Bottom Footer Options for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Site_Identity_Configs' ) ) {
+
+ /**
+ * Register Astra Customizerr Site identity Customizer Configurations.
+ */
+ class Astra_Site_Identity_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Astra Customizerr Site identity Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_section = 'title_tagline';
+ $retina_logo_divider = 6;
+ $retina_logo_togglecontrol = 5;
+
+ /**
+ * Priorities updated based on is new header-footer builder active or not.
+ */
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $retina_logo_divider = 4;
+ $retina_logo_togglecontrol = 4;
+ }
+
+ $_configs = array(
+
+ /**
+ * Notice for Colors - Transparent header enabled on page.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => $_section,
+ 'priority' => 1,
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
+ 'help' => $this->get_help_text_notice( 'transparent-header' ),
+ ),
+
+ /**
+ * Option: Transparent Header Section - Link.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-logo-link]',
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => $_section,
+ 'priority' => 1,
+ 'link_type' => 'control',
+ 'linked' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]',
+ 'context' => array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
+ 'operator' => '==',
+ 'value' => true,
+ ),
+ ),
+ 'link_text' => '<u>' . __( 'Customize Transparent Header.', 'astra' ) . '</u>',
+ 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
+ ),
+
+
+ /**
+ * Option: Different retina logo
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[different-retina-logo]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'section' => $_section,
+ 'title' => __( 'Different Logo For Retina Devices?', 'astra' ),
+ 'default' => astra_get_option( 'different-retina-logo' ),
+ 'priority' => 5,
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'context' => array(
+ array(
+ 'setting' => 'custom_logo',
+ 'operator' => '!=',
+ 'value' => '',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'partial' => array(
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+
+ /**
+ * Option: Retina logo selector
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-header-retina-logo]',
+ 'default' => astra_get_option( 'ast-header-retina-logo' ),
+ 'type' => 'control',
+ 'control' => 'image',
+ 'sanitize_callback' => 'esc_url_raw',
+ 'section' => 'title_tagline',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[different-retina-logo]',
+ 'operator' => '!=',
+ 'value' => 0,
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'priority' => 6,
+ 'title' => __( 'Retina Logo', 'astra' ),
+ 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+
+ /**
+ * Option: Inherit Desktop logo
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]',
+ 'type' => 'control',
+ 'control' => 'ast-toggle-control',
+ 'default' => astra_get_option( 'different-mobile-logo' ),
+ 'section' => 'title_tagline',
+ 'title' => __( 'Different Logo For Mobile Devices?', 'astra' ),
+ 'priority' => 5,
+ 'context' => array(
+ array(
+ 'setting' => 'custom_logo',
+ 'operator' => '!=',
+ 'value' => '',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => 'ast_selected_device',
+ 'operator' => 'in',
+ 'value' => array( 'tablet', 'mobile' ),
+ ),
+ ),
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+
+ /**
+ * Option: Mobile header logo
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[mobile-header-logo]',
+ 'default' => astra_get_option( 'mobile-header-logo' ),
+ 'type' => 'control',
+ 'control' => 'image',
+ 'sanitize_callback' => 'esc_url_raw',
+ 'section' => 'title_tagline',
+ 'priority' => 5.5,
+ 'title' => __( 'Mobile Logo (optional)', 'astra' ),
+ 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[different-mobile-logo]',
+ 'operator' => '==',
+ 'value' => '1',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => 'ast_selected_device',
+ 'operator' => 'in',
+ 'value' => array( 'tablet', 'mobile' ),
+ ),
+ ),
+ ),
+
+ /**
+ * Option: Logo Width
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-header-responsive-logo-width]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'ast-header-responsive-logo-width' ),
+ 'priority' => 7,
+ 'title' => __( 'Logo Width', 'astra' ),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 0,
+ 'step' => 1,
+ 'max' => 600,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+ /**
+ * Option: Display Title
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-toggle-control',
+ 'default' => astra_get_option( 'display-site-title-responsive' ),
+ 'section' => 'title_tagline',
+ 'title' => __( 'Display Site Title', 'astra' ),
+ 'priority' => 7,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+
+ /**
+ * Option: Divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-site-title-tagline-divider]',
+ 'type' => 'control',
+ 'section' => $_section,
+ 'control' => 'ast-divider',
+ 'priority' => 13,
+ 'settings' => array(),
+ 'context' => array( Astra_Builder_Helper::$general_tab_config ),
+ ),
+
+ /**
+ * Option: Display Tagline
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-toggle-control',
+ 'default' => astra_get_option( 'display-site-tagline-responsive' ),
+ 'section' => 'title_tagline',
+ 'priority' => 11,
+ 'title' => __( 'Display Site Tagline', 'astra' ),
+ 'transport' => 'postMessage',
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ 'partial' => array(
+
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+
+ /**
+ * Option: Logo inline title.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[logo-title-inline]',
+ 'default' => astra_get_option( 'logo-title-inline' ),
+ 'type' => 'control',
+ 'context' => array( Astra_Builder_Helper::$general_tab_config ),
+ 'control' => 'ast-toggle-control',
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ 'section' => $_section,
+ 'title' => __( 'Inline Logo & Site Title', 'astra' ),
+ 'priority' => 8,
+ 'transport' => 'postMessage',
+ 'partial' => array(
+ 'selector' => '.site-branding',
+ 'container_inclusive' => false,
+ 'render_callback' => 'Astra_Builder_Header::site_identity',
+ ),
+ ),
+ );
+
+ /**
+ * We adding this control only to maintain backwards. Remove this condition after 2-3 updates of add-on.
+ * Moving Site Title color & Tagline color option into theme.
+ *
+ * @since 3.5.0
+ */
+ $load_site_tagline_color_controls = true;
+ if ( is_astra_addon_3_5_0_version() ) {
+ $load_site_tagline_color_controls = false;
+ }
+
+ if ( $load_site_tagline_color_controls ) {
+ $_configs = array_merge(
+ $_configs,
+ array(
+ // Color Group control for site title colors.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
+ 'default' => astra_get_option( 'site-identity-title-color-group' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => Astra_Builder_Helper::$is_header_footer_builder_active ? __( 'Title Color', 'astra' ) : __( 'Colors', 'astra' ),
+ 'section' => $_section,
+ 'responsive' => false,
+ 'transport' => 'postMessage',
+ 'priority' => 8,
+ 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
+ ),
+
+ // Option: Site Title Color.
+ array(
+ 'name' => 'header-color-site-title',
+ 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
+ 'section' => 'title_tagline',
+ 'type' => 'sub-control',
+ 'control' => 'ast-color',
+ 'priority' => 5,
+ 'default' => astra_get_option( 'header-color-site-title' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Normal', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Site Title Hover Color.
+ array(
+ 'name' => 'header-color-h-site-title',
+ 'parent' => ASTRA_THEME_SETTINGS . '[site-identity-title-color-group]',
+ 'section' => 'title_tagline',
+ 'type' => 'sub-control',
+ 'control' => 'ast-color',
+ 'priority' => 10,
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-color-h-site-title' ),
+ 'title' => __( 'Hover', 'astra' ),
+ 'context' => Astra_Builder_Helper::$design_tab,
+ ),
+
+ // Option: Site Tagline Color.
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[header-color-site-tagline]',
+ 'type' => 'control',
+ 'control' => 'ast-color',
+ 'transport' => 'postMessage',
+ 'default' => astra_get_option( 'header-color-site-tagline' ),
+ 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline', 'astra' ) : __( 'Color', 'astra' ),
+ 'section' => 'title_tagline',
+ 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 8 : 12,
+ 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
+ ),
+ )
+ );
+ }
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+
+ $_configs = array_merge(
+ $_configs,
+ array(
+ /**
+ * Notice - Transparent meta header enabled on page.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-meta-enabled]',
+ 'type' => 'control',
+ 'control' => 'ast-description',
+ 'section' => 'section-header-builder-layout',
+ 'priority' => 1,
+ 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
+ 'help' => $this->get_help_text_notice( 'transparent-meta' ),
+ ),
+
+ /**
+ * Notice Link - Transparent meta header enabled on page.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-header-transparent-header-meta-link]',
+ 'type' => 'control',
+ 'control' => 'ast-customizer-link',
+ 'section' => 'section-header-builder-layout',
+ 'priority' => 1,
+ 'link_type' => 'section',
+ 'linked' => 'section-transparent-header',
+ 'link_text' => '<u>' . __( 'Customize Transparent Header.', 'astra' ) . '</u>',
+ 'active_callback' => array( $this, 'is_transparent_header_enabled' ),
+ ),
+ )
+ );
+ }
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) {
+
+ $new_configs = array(
+
+ /**
+ * Option: Header Site Title.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-title-typography]',
+ 'default' => astra_get_option( 'site-title-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Title Font', 'astra' ) : __( 'Typography', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8,
+ 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
+ ),
+
+ /**
+ * Options: Site Tagline.
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]',
+ 'default' => astra_get_option( 'site-tagline-typography' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? __( 'Tagline Font', 'astra' ) : __( 'Typography', 'astra' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 11,
+ 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( Astra_Builder_Helper::$design_tab_config ) : '',
+ ),
+ );
+
+ $_configs = array_merge( $_configs, $new_configs );
+ }
+
+ $configurations = array_merge( $configurations, $_configs );
+ return $configurations;
+
+ }
+
+ /**
+ * Check if transparent header is enabled on the page being previewed.
+ *
+ * @since 2.4.5
+ * @return boolean True - If Transparent Header is enabled, False if not.
+ */
+ public function is_transparent_header_enabled() {
+ $status = Astra_Ext_Transparent_Header_Markup::is_transparent_header();
+ return ( true === $status ? true : false );
+ }
+
+ /**
+ * Help notice message to be displayed when the page that is being previewed has Logo set from Transparent Header.
+ *
+ * @since 2.4.5
+ * @param String $context Type of notice message to be returned.
+ * @return String HTML Markup for the help notice.
+ */
+ private function get_help_text_notice( $context ) {
+
+ switch ( $context ) {
+ case 'transparent-header':
+ $notice = '<div class="ast-customizer-notice wp-ui-highlight"><p>The Logo on this page is set from the Transparent Header Section. Please click the link below to customize Transparent Header Logo.</p></div>';
+ break;
+ case 'transparent-meta':
+ $notice = '<div class="ast-customizer-notice wp-ui-highlight"><p>The header on this page is set from the Transparent Header.</p> <p> Please click the link below to customize Transparent Header </p></div>';
+ break;
+ default:
+ $notice = '';
+ }
+ return $notice;
+ }
+ }
+}
+
+
+new Astra_Site_Identity_Configs();
diff --git a/inc/customizer/configurations/layout/class-astra-site-layout-configs.php b/inc/customizer/configurations/layout/class-astra-site-layout-configs.php
index caf3e85..e8af125 100644
--- a/inc/customizer/configurations/layout/class-astra-site-layout-configs.php
+++ b/inc/customizer/configurations/layout/class-astra-site-layout-configs.php
@@ -1,69 +1,69 @@
-<?php
-/**
- * Site Layout Option for Astra Theme.
- *
- * @package Astra
- * @author Astra
- * @copyright Copyright (c) 2020, Astra
- * @link https://wpastra.com/
- * @since Astra 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Site_Layout_Configs' ) ) {
-
- /**
- * Register Site Layout Customizer Configurations.
- */
- class Astra_Site_Layout_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Site Layout Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.4.3
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[site-content-width]',
- 'type' => 'control',
- 'control' => 'ast-slider',
- 'default' => astra_get_option( 'site-content-width' ),
- 'section' => 'section-container-layout',
- 'priority' => 10,
- 'title' => __( 'Container Width', 'astra' ),
- 'context' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'site-layouts' ) ) ? array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
- 'operator' => '==',
- 'value' => 'ast-full-width-layout',
- ),
- ) : array(),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 768,
- 'step' => 1,
- 'max' => 1920,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
- );
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Site_Layout_Configs();
+<?php
+/**
+ * Site Layout Option for Astra Theme.
+ *
+ * @package Astra
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since Astra 1.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Site_Layout_Configs' ) ) {
+
+ /**
+ * Register Site Layout Customizer Configurations.
+ */
+ class Astra_Site_Layout_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Site Layout Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[site-content-width]',
+ 'type' => 'control',
+ 'control' => 'ast-slider',
+ 'default' => astra_get_option( 'site-content-width' ),
+ 'section' => 'section-container-layout',
+ 'priority' => 10,
+ 'title' => __( 'Container Width', 'astra' ),
+ 'context' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'site-layouts' ) ) ? array(
+ Astra_Builder_Helper::$general_tab_config,
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[site-layout]',
+ 'operator' => '==',
+ 'value' => 'ast-full-width-layout',
+ ),
+ ) : array(),
+ 'suffix' => 'px',
+ 'input_attrs' => array(
+ 'min' => 768,
+ 'step' => 1,
+ 'max' => 1920,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+ );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+}
+
+/**
+ * Kicking this off by calling 'get_instance()' method
+ */
+new Astra_Site_Layout_Configs();