summaryrefslogtreecommitdiff
path: root/inc/addons/breadcrumbs/customizer
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 16:19:29 -0500
committerZach van Rijn <me@zv.io>2021-07-21 16:19:29 -0500
commit69c17f9c1942fd0d6a5ea941636e87723b8a6fe2 (patch)
treee1d0212147048204b0eede0aa6ff79849ed479da /inc/addons/breadcrumbs/customizer
parent74a7109a2a5ab0d191f26c917ae69e46f0d83b32 (diff)
downloadblog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.gz
blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.bz2
blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.tar.xz
blog-ng-69c17f9c1942fd0d6a5ea941636e87723b8a6fe2.zip
dos2unix on all .php files, begin paring down admin page and site branding.
Diffstat (limited to 'inc/addons/breadcrumbs/customizer')
-rw-r--r--inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-color-configs.php412
-rw-r--r--inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php1006
-rw-r--r--inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php358
3 files changed, 888 insertions, 888 deletions
diff --git a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-color-configs.php b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-color-configs.php
index a5a2ddd..28a7272 100644
--- a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-color-configs.php
+++ b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-color-configs.php
@@ -1,206 +1,206 @@
-<?php
-/**
- * Colors - Breadcrumbs Options for theme.
- *
- * @package Astra
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.7.0
- */
-
-// Block direct access to the file.
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-// Bail if Customizer config base class does not exist.
-if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
- return;
-}
-
-/**
- * Customizer Sanitizes
- *
- * @since 1.7.0
- */
-if ( ! class_exists( 'Astra_Breadcrumbs_Color_Configs' ) ) {
-
- /**
- * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
- */
- class Astra_Breadcrumbs_Color_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.7.0
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $content_colors_control_title = __( 'Content', 'astra' );
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $content_colors_control_title = __( 'Content Colors', 'astra' );
- }
-
- $_configs = array(
-
- /*
- * Breadcrumb Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-bg-color]',
- 'type' => 'control',
- 'default' => astra_get_option( 'breadcrumb-bg-color' ),
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Background Color', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- 'priority' => 72,
- ),
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-active-color-responsive]',
- 'default' => astra_get_option( 'breadcrumb-active-color-responsive' ),
- 'type' => 'control',
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Text Color', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- 'priority' => 72,
- ),
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator-color]',
- 'default' => astra_get_option( 'breadcrumb-separator-color' ),
- 'type' => 'control',
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Separator Color', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- 'priority' => 72,
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
- 'default' => astra_get_option( 'section-breadcrumb-color' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Content Link Color', 'astra' ),
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'priority' => 72,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- 'responsive' => true,
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- array(
- 'name' => 'breadcrumb-text-color-responsive',
- 'default' => astra_get_option( 'breadcrumb-text-color-responsive' ),
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'tab' => __( 'Normal', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 15,
- ),
-
- array(
- 'name' => 'breadcrumb-hover-color-responsive',
- 'default' => astra_get_option( 'breadcrumb-hover-color-responsive' ),
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'tab' => __( 'Hover', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Hover', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 20,
- ),
- );
-
- if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- array_push(
- $_configs,
- /**
- * Option: Divider
- * Option: breadcrumb color Section divider
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-color-divider]',
- 'type' => 'control',
- 'control' => 'ast-heading',
- 'section' => 'section-breadcrumb',
- 'title' => __( 'Colors', 'astra' ),
- 'priority' => 71,
- 'settings' => array(),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- )
- );
- }
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Breadcrumbs_Color_Configs();
+<?php
+/**
+ * Colors - Breadcrumbs Options for theme.
+ *
+ * @package Astra
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since Astra 1.7.0
+ */
+
+// Block direct access to the file.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+// Bail if Customizer config base class does not exist.
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Customizer Sanitizes
+ *
+ * @since 1.7.0
+ */
+if ( ! class_exists( 'Astra_Breadcrumbs_Color_Configs' ) ) {
+
+ /**
+ * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
+ */
+ class Astra_Breadcrumbs_Color_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.7.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $content_colors_control_title = __( 'Content', 'astra' );
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $content_colors_control_title = __( 'Content Colors', 'astra' );
+ }
+
+ $_configs = array(
+
+ /*
+ * Breadcrumb Color
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-bg-color]',
+ 'type' => 'control',
+ 'default' => astra_get_option( 'breadcrumb-bg-color' ),
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'title' => __( 'Background Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'priority' => 72,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-active-color-responsive]',
+ 'default' => astra_get_option( 'breadcrumb-active-color-responsive' ),
+ 'type' => 'control',
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'title' => __( 'Text Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'priority' => 72,
+ ),
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator-color]',
+ 'default' => astra_get_option( 'breadcrumb-separator-color' ),
+ 'type' => 'control',
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-color',
+ 'title' => __( 'Separator Color', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'priority' => 72,
+ ),
+
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
+ 'default' => astra_get_option( 'section-breadcrumb-color' ),
+ 'type' => 'control',
+ 'control' => 'ast-color-group',
+ 'title' => __( 'Content Link Color', 'astra' ),
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'priority' => 72,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'responsive' => true,
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ array(
+ 'name' => 'breadcrumb-text-color-responsive',
+ 'default' => astra_get_option( 'breadcrumb-text-color-responsive' ),
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Normal', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'title' => __( 'Normal', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 15,
+ ),
+
+ array(
+ 'name' => 'breadcrumb-hover-color-responsive',
+ 'default' => astra_get_option( 'breadcrumb-hover-color-responsive' ),
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-link-color]',
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'tab' => __( 'Hover', 'astra' ),
+ 'control' => 'ast-responsive-color',
+ 'title' => __( 'Hover', 'astra' ),
+ 'responsive' => true,
+ 'rgba' => true,
+ 'priority' => 20,
+ ),
+ );
+
+ if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ array_push(
+ $_configs,
+ /**
+ * Option: Divider
+ * Option: breadcrumb color Section divider
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-color-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-heading',
+ 'section' => 'section-breadcrumb',
+ 'title' => __( 'Colors', 'astra' ),
+ 'priority' => 71,
+ 'settings' => array(),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ )
+ );
+ }
+ return array_merge( $configurations, $_configs );
+ }
+ }
+}
+
+/**
+ * Kicking this off by calling 'get_instance()' method
+ */
+new Astra_Breadcrumbs_Color_Configs();
diff --git a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php
index e4f60a8..e1800dd 100644
--- a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php
+++ b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php
@@ -1,503 +1,503 @@
-<?php
-/**
- * Breadcrumbs Options for Astra theme.
- *
- * @package Astra
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.7.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-if ( ! class_exists( 'Astra_Breadcrumbs_Configs' ) ) {
-
- /**
- * Customizer Sanitizes Initial setup
- */
- class Astra_Breadcrumbs_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Astra-Breadcrumbs Settings.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.7.0
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $breadcrumb_source_list = apply_filters(
- 'astra_breadcrumb_source_list',
- array(
- 'default' => __( 'Default', 'astra' ),
- ),
- 'breadcrumb-list'
- );
-
- $_section = 'section-breadcrumb';
-
- $positions = array(
- 'none' => __( 'None', 'astra' ),
- 'astra_masthead_content' => __( 'Inside', 'astra' ),
- 'astra_header_markup_after' => __( 'After Header', 'astra' ),
- 'astra_entry_top' => __( 'Before Title', 'astra' ),
- );
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $positions = array(
- 'none' => __( 'None', 'astra' ),
- 'astra_header_primary_container_after' => __( 'Inside', 'astra' ),
- 'astra_header_after' => __( 'After', 'astra' ),
- 'astra_entry_top' => __( 'Before Title', 'astra' ),
- );
- }
-
- $_configs = array(
-
- /*
- * Breadcrumb
- */
- array(
- 'name' => $_section,
- 'type' => 'section',
- 'priority' => 20,
- 'title' => __( 'Breadcrumb', 'astra' ),
- 'description_hidden' => true,
- 'description' => $this->section_get_description(
- array(
- 'description' => '<p><b>' . __( 'Helpful Information', 'astra' ) . '</b></p>',
- 'links' => array(
- array(
- 'text' => __( 'Breadcrumb Overview', 'astra' ) . ' &#187;',
- 'attrs' => array(
- 'href' => astra_get_pro_url( 'https://wpastra.com/docs/add-breadcrumbs-with-astra/', 'customizer', 'sidebar', 'helpful-information' ),
- ),
- ),
- ),
- )
- ),
- ),
-
- /**
- * Option: Breadcrumb Position
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'default' => astra_get_option( 'breadcrumb-position', 'none' ),
- 'section' => $_section,
- 'title' => __( 'Header Position', 'astra' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'priority' => 5,
- 'choices' => $positions,
- 'partial' => array(
- 'selector' => '.ast-breadcrumbs-wrapper .ast-breadcrumbs .trail-items',
- 'container_inclusive' => false,
- ),
- 'context' => Astra_Builder_Helper::$general_tab,
- 'responsive' => false,
- 'renderAs' => 'text',
- ),
-
- /**
- * Option: Disable Breadcrumb on Categories
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-home-page]',
- 'default' => astra_get_option( 'breadcrumb-disable-home-page' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Disable on Home Page?', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
- ),
-
-
- /**
- * Option: Disable Breadcrumb on Categories
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-blog-posts-page]',
- 'default' => astra_get_option( 'breadcrumb-disable-blog-posts-page' ),
- 'type' => 'control',
- 'section' => $_section,
- 'description' => __( 'Latest posts page or when any page is selected as blog page', 'astra' ),
- 'title' => __( 'Disable on Blog / Posts Page?', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on Search
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-search]',
- 'default' => astra_get_option( 'breadcrumb-disable-search' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Disable on Search?', 'astra' ),
- 'priority' => 30,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on Archive
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-archive]',
- 'default' => astra_get_option( 'breadcrumb-disable-archive' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Disable on Archive?', 'astra' ),
- 'priority' => 35,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on Single Page
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-single-page]',
- 'default' => astra_get_option( 'breadcrumb-disable-single-page' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Disable on Single Page?', 'astra' ),
- 'priority' => 40,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on Single Post
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-single-post]',
- 'default' => astra_get_option( 'breadcrumb-disable-single-post' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Disable on Single Post?', 'astra' ),
- 'priority' => 45,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on Singular
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-singular]',
- 'default' => astra_get_option( 'breadcrumb-disable-singular' ),
- 'type' => 'control',
- 'section' => $_section,
- 'description' => __( 'All Pages, All Posts, All Attachments', 'astra' ),
- 'title' => __( 'Disable on Singular?', 'astra' ),
- 'priority' => 50,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Breadcrumb on 404 Page
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-404-page]',
- 'default' => astra_get_option( 'breadcrumb-disable-404-page' ),
- 'type' => 'control',
- 'section' => $_section,
-
- 'title' => __( 'Disable on 404 Page?', 'astra' ),
- 'priority' => 55,
- 'control' => 'ast-toggle-control',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Breadcrumb Alignment
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-alignment]',
- 'default' => astra_get_option( 'breadcrumb-alignment', 'left' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'title' => __( 'Alignment', 'astra' ),
- 'type' => 'control',
- 'control' => 'ast-selector',
- 'priority' => 65,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'choices' => array(
- 'left' => 'align-left',
- 'center' => 'align-center',
- 'right' => 'align-right',
- ),
- 'responsive' => false,
- ),
-
- /**
- * Option: Breadcrumb Spacing
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-spacing]',
- 'default' => astra_get_option( 'breadcrumb-spacing' ),
- 'type' => 'control',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-spacing',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
- 'priority' => 83,
- 'title' => __( 'Spacing', 'astra' ),
- 'linked_choices' => true,
- 'unit_choices' => array( 'px', 'em', '%' ),
- 'choices' => array(
- 'top' => __( 'Top', 'astra' ),
- 'right' => __( 'Right', 'astra' ),
- 'bottom' => __( 'Bottom', 'astra' ),
- 'left' => __( 'Left', 'astra' ),
- ),
-
- 'section' => $_section,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- ),
- );
-
-
- if ( $this->is_third_party_breadcrumb_active() ) {
-
- $_configs[] = array(
- 'name' => ASTRA_THEME_SETTINGS . '[select-breadcrumb-source]',
- 'default' => astra_get_option( 'select-breadcrumb-source', 'default' ),
- 'section' => $_section,
- 'title' => __( 'Breadcrumb Source', 'astra' ),
- 'type' => 'control',
- 'control' => 'ast-select',
- 'priority' => 10,
- 'choices' => $breadcrumb_source_list,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- );
- }
-
- if ( $this->is_selected_breadcrumb_active() ) {
-
- $_configs[] = array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator-divider]',
- 'type' => 'control',
- 'control' => 'ast-divider',
- 'section' => $_section,
- 'settings' => array(),
- 'priority' => 15,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- );
- $_configs[] = array(
- 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator]',
- 'type' => 'control',
- 'control' => 'text',
- 'section' => $_section,
- 'default' => astra_get_option( 'breadcrumb-separator' ) ? astra_get_option( 'breadcrumb-separator' ) : '\00bb',
- 'priority' => 15,
- 'title' => __( 'Separator', 'astra' ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- Astra_Builder_Helper::$general_tab_config,
- ),
- 'transport' => 'postMessage',
- );
- }
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
-
- $_configs[] = array(
- 'name' => $_section . '-ast-context-tabs',
- 'section' => $_section,
- 'type' => 'control',
- 'control' => 'ast-builder-header-control',
- 'priority' => 0,
- 'description' => '',
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ),
- );
-
- }
-
-
- return array_merge( $configurations, $_configs );
-
- }
-
- /**
- * Is third-party breadcrumb active.
- * Decide if the Source option should be visible depending on third party plugins.
- *
- * @return boolean True - If the option should be displayed, False - If the option should be hidden.
- */
- public function is_third_party_breadcrumb_active() {
-
- // Check if breadcrumb is turned on from WPSEO option.
- $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false;
- $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable;
- if ( ! is_array( $wpseo_option ) ) {
- unset( $wpseo_option );
- $wpseo_option = array(
- 'breadcrumbs-enable' => $breadcrumb_enable,
- );
- }
-
- if ( function_exists( 'yoast_breadcrumb' ) && true === $wpseo_option['breadcrumbs-enable'] ) {
- // Check if breadcrumb is turned on from SEO Yoast plugin.
- return true;
- } elseif ( function_exists( 'bcn_display' ) ) {
- // Check if breadcrumb is turned on from Breadcrumb NavXT plugin.
- return true;
- } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) ) {
- // Check if breadcrumb is turned on from Rank Math plugin.
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Is selected third-party breadcrumb active.
- * Decide if the Separator option should be visible depending on third party plugins.
- *
- * @return boolean True - If the option should be displayed, False - If the option should be hidden.
- */
- public function is_selected_breadcrumb_active() {
-
- // Check if breadcrumb is turned on from WPSEO option.
- $selected_breadcrumb_source = astra_get_option( 'select-breadcrumb-source' );
- $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false;
- $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable;
- if ( ! is_array( $wpseo_option ) ) {
-
- unset( $wpseo_option );
- $wpseo_option = array(
- 'breadcrumbs-enable' => $breadcrumb_enable,
- );
- }
-
- if ( function_exists( 'yoast_breadcrumb' ) && true === $wpseo_option['breadcrumbs-enable'] && 'yoast-seo-breadcrumbs' === $selected_breadcrumb_source ) {
- // Check if breadcrumb is turned on from SEO Yoast plugin.
- return false;
- } elseif ( function_exists( 'bcn_display' ) && 'breadcrumb-navxt' === $selected_breadcrumb_source ) {
- // Check if breadcrumb is turned on from Breadcrumb NavXT plugin.
- return false;
- } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) && 'rank-math' === $selected_breadcrumb_source ) {
- // Check if breadcrumb is turned on from Rank Math plugin.
- return false;
- } else {
- return true;
- }
- }
- }
-}
-
-new Astra_Breadcrumbs_Configs();
+<?php
+/**
+ * Breadcrumbs Options for Astra theme.
+ *
+ * @package Astra
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since Astra 1.7.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Breadcrumbs_Configs' ) ) {
+
+ /**
+ * Customizer Sanitizes Initial setup
+ */
+ class Astra_Breadcrumbs_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Astra-Breadcrumbs Settings.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.7.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $breadcrumb_source_list = apply_filters(
+ 'astra_breadcrumb_source_list',
+ array(
+ 'default' => __( 'Default', 'astra' ),
+ ),
+ 'breadcrumb-list'
+ );
+
+ $_section = 'section-breadcrumb';
+
+ $positions = array(
+ 'none' => __( 'None', 'astra' ),
+ 'astra_masthead_content' => __( 'Inside', 'astra' ),
+ 'astra_header_markup_after' => __( 'After Header', 'astra' ),
+ 'astra_entry_top' => __( 'Before Title', 'astra' ),
+ );
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $positions = array(
+ 'none' => __( 'None', 'astra' ),
+ 'astra_header_primary_container_after' => __( 'Inside', 'astra' ),
+ 'astra_header_after' => __( 'After', 'astra' ),
+ 'astra_entry_top' => __( 'Before Title', 'astra' ),
+ );
+ }
+
+ $_configs = array(
+
+ /*
+ * Breadcrumb
+ */
+ array(
+ 'name' => $_section,
+ 'type' => 'section',
+ 'priority' => 20,
+ 'title' => __( 'Breadcrumb', 'astra' ),
+ 'description_hidden' => true,
+ 'description' => $this->section_get_description(
+ array(
+ 'description' => '<p><b>' . __( 'Helpful Information', 'astra' ) . '</b></p>',
+ 'links' => array(
+ array(
+ 'text' => __( 'Breadcrumb Overview', 'astra' ) . ' &#187;',
+ 'attrs' => array(
+ 'href' => astra_get_pro_url( 'https://wpastra.com/docs/add-breadcrumbs-with-astra/', 'customizer', 'sidebar', 'helpful-information' ),
+ ),
+ ),
+ ),
+ )
+ ),
+ ),
+
+ /**
+ * Option: Breadcrumb Position
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'default' => astra_get_option( 'breadcrumb-position', 'none' ),
+ 'section' => $_section,
+ 'title' => __( 'Header Position', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'priority' => 5,
+ 'choices' => $positions,
+ 'partial' => array(
+ 'selector' => '.ast-breadcrumbs-wrapper .ast-breadcrumbs .trail-items',
+ 'container_inclusive' => false,
+ ),
+ 'context' => Astra_Builder_Helper::$general_tab,
+ 'responsive' => false,
+ 'renderAs' => 'text',
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Categories
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-home-page]',
+ 'default' => astra_get_option( 'breadcrumb-disable-home-page' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Disable on Home Page?', 'astra' ),
+ 'priority' => 25,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
+ ),
+
+
+ /**
+ * Option: Disable Breadcrumb on Categories
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-blog-posts-page]',
+ 'default' => astra_get_option( 'breadcrumb-disable-blog-posts-page' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'description' => __( 'Latest posts page or when any page is selected as blog page', 'astra' ),
+ 'title' => __( 'Disable on Blog / Posts Page?', 'astra' ),
+ 'priority' => 25,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Search
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-search]',
+ 'default' => astra_get_option( 'breadcrumb-disable-search' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Disable on Search?', 'astra' ),
+ 'priority' => 30,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Archive
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-archive]',
+ 'default' => astra_get_option( 'breadcrumb-disable-archive' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Disable on Archive?', 'astra' ),
+ 'priority' => 35,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Single Page
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-single-page]',
+ 'default' => astra_get_option( 'breadcrumb-disable-single-page' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Disable on Single Page?', 'astra' ),
+ 'priority' => 40,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Single Post
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-single-post]',
+ 'default' => astra_get_option( 'breadcrumb-disable-single-post' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'title' => __( 'Disable on Single Post?', 'astra' ),
+ 'priority' => 45,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on Singular
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-singular]',
+ 'default' => astra_get_option( 'breadcrumb-disable-singular' ),
+ 'type' => 'control',
+ 'section' => $_section,
+ 'description' => __( 'All Pages, All Posts, All Attachments', 'astra' ),
+ 'title' => __( 'Disable on Singular?', 'astra' ),
+ 'priority' => 50,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Disable Breadcrumb on 404 Page
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-disable-404-page]',
+ 'default' => astra_get_option( 'breadcrumb-disable-404-page' ),
+ 'type' => 'control',
+ 'section' => $_section,
+
+ 'title' => __( 'Disable on 404 Page?', 'astra' ),
+ 'priority' => 55,
+ 'control' => 'ast-toggle-control',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Breadcrumb Alignment
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-alignment]',
+ 'default' => astra_get_option( 'breadcrumb-alignment', 'left' ),
+ 'section' => $_section,
+ 'transport' => 'postMessage',
+ 'title' => __( 'Alignment', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-selector',
+ 'priority' => 65,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'choices' => array(
+ 'left' => 'align-left',
+ 'center' => 'align-center',
+ 'right' => 'align-right',
+ ),
+ 'responsive' => false,
+ ),
+
+ /**
+ * Option: Breadcrumb Spacing
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-spacing]',
+ 'default' => astra_get_option( 'breadcrumb-spacing' ),
+ 'type' => 'control',
+ 'transport' => 'postMessage',
+ 'control' => 'ast-responsive-spacing',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
+ 'priority' => 83,
+ 'title' => __( 'Spacing', 'astra' ),
+ 'linked_choices' => true,
+ 'unit_choices' => array( 'px', 'em', '%' ),
+ 'choices' => array(
+ 'top' => __( 'Top', 'astra' ),
+ 'right' => __( 'Right', 'astra' ),
+ 'bottom' => __( 'Bottom', 'astra' ),
+ 'left' => __( 'Left', 'astra' ),
+ ),
+
+ 'section' => $_section,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ ),
+ );
+
+
+ if ( $this->is_third_party_breadcrumb_active() ) {
+
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[select-breadcrumb-source]',
+ 'default' => astra_get_option( 'select-breadcrumb-source', 'default' ),
+ 'section' => $_section,
+ 'title' => __( 'Breadcrumb Source', 'astra' ),
+ 'type' => 'control',
+ 'control' => 'ast-select',
+ 'priority' => 10,
+ 'choices' => $breadcrumb_source_list,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-top-divider' ),
+ );
+ }
+
+ if ( $this->is_selected_breadcrumb_active() ) {
+
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator-divider]',
+ 'type' => 'control',
+ 'control' => 'ast-divider',
+ 'section' => $_section,
+ 'settings' => array(),
+ 'priority' => 15,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ );
+ $_configs[] = array(
+ 'name' => ASTRA_THEME_SETTINGS . '[breadcrumb-separator]',
+ 'type' => 'control',
+ 'control' => 'text',
+ 'section' => $_section,
+ 'default' => astra_get_option( 'breadcrumb-separator' ) ? astra_get_option( 'breadcrumb-separator' ) : '\00bb',
+ 'priority' => 15,
+ 'title' => __( 'Separator', 'astra' ),
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'transport' => 'postMessage',
+ );
+ }
+
+ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+
+ $_configs[] = array(
+ 'name' => $_section . '-ast-context-tabs',
+ 'section' => $_section,
+ 'type' => 'control',
+ 'control' => 'ast-builder-header-control',
+ 'priority' => 0,
+ 'description' => '',
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ),
+ );
+
+ }
+
+
+ return array_merge( $configurations, $_configs );
+
+ }
+
+ /**
+ * Is third-party breadcrumb active.
+ * Decide if the Source option should be visible depending on third party plugins.
+ *
+ * @return boolean True - If the option should be displayed, False - If the option should be hidden.
+ */
+ public function is_third_party_breadcrumb_active() {
+
+ // Check if breadcrumb is turned on from WPSEO option.
+ $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false;
+ $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable;
+ if ( ! is_array( $wpseo_option ) ) {
+ unset( $wpseo_option );
+ $wpseo_option = array(
+ 'breadcrumbs-enable' => $breadcrumb_enable,
+ );
+ }
+
+ if ( function_exists( 'yoast_breadcrumb' ) && true === $wpseo_option['breadcrumbs-enable'] ) {
+ // Check if breadcrumb is turned on from SEO Yoast plugin.
+ return true;
+ } elseif ( function_exists( 'bcn_display' ) ) {
+ // Check if breadcrumb is turned on from Breadcrumb NavXT plugin.
+ return true;
+ } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) ) {
+ // Check if breadcrumb is turned on from Rank Math plugin.
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Is selected third-party breadcrumb active.
+ * Decide if the Separator option should be visible depending on third party plugins.
+ *
+ * @return boolean True - If the option should be displayed, False - If the option should be hidden.
+ */
+ public function is_selected_breadcrumb_active() {
+
+ // Check if breadcrumb is turned on from WPSEO option.
+ $selected_breadcrumb_source = astra_get_option( 'select-breadcrumb-source' );
+ $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false;
+ $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable;
+ if ( ! is_array( $wpseo_option ) ) {
+
+ unset( $wpseo_option );
+ $wpseo_option = array(
+ 'breadcrumbs-enable' => $breadcrumb_enable,
+ );
+ }
+
+ if ( function_exists( 'yoast_breadcrumb' ) && true === $wpseo_option['breadcrumbs-enable'] && 'yoast-seo-breadcrumbs' === $selected_breadcrumb_source ) {
+ // Check if breadcrumb is turned on from SEO Yoast plugin.
+ return false;
+ } elseif ( function_exists( 'bcn_display' ) && 'breadcrumb-navxt' === $selected_breadcrumb_source ) {
+ // Check if breadcrumb is turned on from Breadcrumb NavXT plugin.
+ return false;
+ } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) && 'rank-math' === $selected_breadcrumb_source ) {
+ // Check if breadcrumb is turned on from Rank Math plugin.
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+}
+
+new Astra_Breadcrumbs_Configs();
diff --git a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php
index 2afd280..51f879b 100644
--- a/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php
+++ b/inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-typo-configs.php
@@ -1,179 +1,179 @@
-<?php
-/**
- * Typography - Breadcrumbs Options for theme.
- *
- * @package Astra
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.7.0
- */
-
-// Block direct access to the file.
-if ( ! defined( 'ABSPATH' ) ) {
- exit;
-}
-
-// Bail if Customizer config base class does not exist.
-if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
- return;
-}
-
-/**
- * Customizer Sanitizes
- *
- * @since 1.7.0
- */
-if ( ! class_exists( 'Astra_Breadcrumbs_Typo_Configs' ) ) {
-
- /**
- * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
- */
- class Astra_Breadcrumbs_Typo_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
- *
- * @param Array $configurations Astra Customizer Configurations.
- * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
- * @since 1.7.0
- * @return Array Astra Customizer Configurations with updated configurations.
- */
- public function register_configuration( $configurations, $wp_customize ) {
-
- $_configs = array(
-
- /*
- * Breadcrumb Typography
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'default' => astra_get_option( 'section-breadcrumb-typo' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => __( 'Content Font', 'astra' ),
- 'section' => 'section-breadcrumb',
- 'transport' => 'postMessage',
- 'priority' => 73,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
- Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Font Family
- */
- array(
- 'name' => 'breadcrumb-font-family',
- 'default' => astra_get_option( 'breadcrumb-font-family' ),
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'section' => 'section-breadcrumb',
- 'control' => 'ast-font',
- 'font_type' => 'ast-font-family',
- 'title' => __( 'Family', 'astra' ),
- 'connect' => 'breadcrumb-font-weight',
- 'priority' => 5,
- ),
-
- /**
- * Option: Font Size
- */
- array(
- 'name' => 'breadcrumb-font-size',
- 'control' => 'ast-responsive',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'section' => 'section-breadcrumb',
- 'default' => astra_get_option( 'breadcrumb-font-size' ),
- 'transport' => 'postMessage',
- 'title' => __( 'Size', 'astra' ),
- 'priority' => 10,
- 'input_attrs' => array(
- 'min' => 0,
- ),
- 'units' => array(
- 'px' => 'px',
- 'em' => 'em',
- ),
- ),
-
- /**
- * Option: Font Weight
- */
- array(
- 'name' => 'breadcrumb-font-weight',
- 'control' => 'ast-font',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'section' => 'section-breadcrumb',
- 'font_type' => 'ast-font-weight',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ),
- 'default' => astra_get_option( 'breadcrumb-font-weight' ),
- 'title' => __( 'Weight', 'astra' ),
- 'connect' => 'breadcrumb-font-family',
- 'priority' => 15,
- ),
-
- /**
- * Option: Text Transform
- */
- array(
- 'name' => 'breadcrumb-text-transform',
- 'control' => 'ast-select',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'section' => 'section-breadcrumb',
- 'default' => astra_get_option( 'breadcrumb-text-transform' ),
- 'title' => __( 'Text Transform', 'astra' ),
- 'transport' => 'postMessage',
- 'priority' => 20,
- 'choices' => array(
- '' => __( 'Inherit', 'astra' ),
- 'none' => __( 'None', 'astra' ),
- 'capitalize' => __( 'Capitalize', 'astra' ),
- 'uppercase' => __( 'Uppercase', 'astra' ),
- 'lowercase' => __( 'Lowercase', 'astra' ),
- ),
- ),
-
- /**
- * Option: Line Height
- */
- array(
- 'name' => 'breadcrumb-line-height',
- 'control' => 'ast-slider',
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'default' => astra_get_option( 'breadcrumb-line-height' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
- 'section' => 'section-breadcrumb',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
- 'title' => __( 'Line Height', 'astra' ),
- 'suffix' => 'em',
- 'priority' => 25,
- 'input_attrs' => array(
- 'min' => 1,
- 'step' => 0.01,
- 'max' => 5,
- ),
- ),
-
- );
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Breadcrumbs_Typo_Configs();
+<?php
+/**
+ * Typography - Breadcrumbs Options for theme.
+ *
+ * @package Astra
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since Astra 1.7.0
+ */
+
+// Block direct access to the file.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+// Bail if Customizer config base class does not exist.
+if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) {
+ return;
+}
+
+/**
+ * Customizer Sanitizes
+ *
+ * @since 1.7.0
+ */
+if ( ! class_exists( 'Astra_Breadcrumbs_Typo_Configs' ) ) {
+
+ /**
+ * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
+ */
+ class Astra_Breadcrumbs_Typo_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Colors and Background - Breadcrumbs Options Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.7.0
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ $_configs = array(
+
+ /*
+ * Breadcrumb Typography
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'default' => astra_get_option( 'section-breadcrumb-typo' ),
+ 'type' => 'control',
+ 'control' => 'ast-settings-group',
+ 'title' => __( 'Content Font', 'astra' ),
+ 'section' => 'section-breadcrumb',
+ 'transport' => 'postMessage',
+ 'priority' => 73,
+ 'context' => array(
+ array(
+ 'setting' => ASTRA_THEME_SETTINGS . '[breadcrumb-position]',
+ 'operator' => '!=',
+ 'value' => 'none',
+ ),
+ ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ?
+ Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Font Family
+ */
+ array(
+ 'name' => 'breadcrumb-font-family',
+ 'default' => astra_get_option( 'breadcrumb-font-family' ),
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'section' => 'section-breadcrumb',
+ 'control' => 'ast-font',
+ 'font_type' => 'ast-font-family',
+ 'title' => __( 'Family', 'astra' ),
+ 'connect' => 'breadcrumb-font-weight',
+ 'priority' => 5,
+ ),
+
+ /**
+ * Option: Font Size
+ */
+ array(
+ 'name' => 'breadcrumb-font-size',
+ 'control' => 'ast-responsive',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'section' => 'section-breadcrumb',
+ 'default' => astra_get_option( 'breadcrumb-font-size' ),
+ 'transport' => 'postMessage',
+ 'title' => __( 'Size', 'astra' ),
+ 'priority' => 10,
+ 'input_attrs' => array(
+ 'min' => 0,
+ ),
+ 'units' => array(
+ 'px' => 'px',
+ 'em' => 'em',
+ ),
+ ),
+
+ /**
+ * Option: Font Weight
+ */
+ array(
+ 'name' => 'breadcrumb-font-weight',
+ 'control' => 'ast-font',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'section' => 'section-breadcrumb',
+ 'font_type' => 'ast-font-weight',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ),
+ 'default' => astra_get_option( 'breadcrumb-font-weight' ),
+ 'title' => __( 'Weight', 'astra' ),
+ 'connect' => 'breadcrumb-font-family',
+ 'priority' => 15,
+ ),
+
+ /**
+ * Option: Text Transform
+ */
+ array(
+ 'name' => 'breadcrumb-text-transform',
+ 'control' => 'ast-select',
+ 'type' => 'sub-control',
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'section' => 'section-breadcrumb',
+ 'default' => astra_get_option( 'breadcrumb-text-transform' ),
+ 'title' => __( 'Text Transform', 'astra' ),
+ 'transport' => 'postMessage',
+ 'priority' => 20,
+ 'choices' => array(
+ '' => __( 'Inherit', 'astra' ),
+ 'none' => __( 'None', 'astra' ),
+ 'capitalize' => __( 'Capitalize', 'astra' ),
+ 'uppercase' => __( 'Uppercase', 'astra' ),
+ 'lowercase' => __( 'Lowercase', 'astra' ),
+ ),
+ ),
+
+ /**
+ * Option: Line Height
+ */
+ array(
+ 'name' => 'breadcrumb-line-height',
+ 'control' => 'ast-slider',
+ 'transport' => 'postMessage',
+ 'type' => 'sub-control',
+ 'default' => astra_get_option( 'breadcrumb-line-height' ),
+ 'parent' => ASTRA_THEME_SETTINGS . '[section-breadcrumb-typo]',
+ 'section' => 'section-breadcrumb',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ),
+ 'title' => __( 'Line Height', 'astra' ),
+ 'suffix' => 'em',
+ 'priority' => 25,
+ 'input_attrs' => array(
+ 'min' => 1,
+ 'step' => 0.01,
+ 'max' => 5,
+ ),
+ ),
+
+ );
+
+ return array_merge( $configurations, $_configs );
+ }
+ }
+}
+
+/**
+ * Kicking this off by calling 'get_instance()' method
+ */
+new Astra_Breadcrumbs_Typo_Configs();