diff options
Diffstat (limited to 'inc/addons/transparent-header/classes')
9 files changed, 3200 insertions, 3200 deletions
diff --git a/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-loader.php b/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-loader.php index ea7143c..088fb81 100644 --- a/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-loader.php +++ b/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-loader.php @@ -1,214 +1,214 @@ -<?php
-/**
- * Sticky Header - Customizer.
- *
- * @package Astra Addon
- * @since 1.0.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
-}
-
-if ( ! class_exists( 'Astra_Ext_Transparent_Header_Loader' ) ) {
-
- /**
- * Customizer Initialization
- *
- * @since 1.0.0
- */
- class Astra_Ext_Transparent_Header_Loader {
-
- /**
- * Member Variable
- *
- * @var instance
- */
- private static $instance;
-
- /**
- * Initiator
- */
- public static function get_instance() {
- if ( ! isset( self::$instance ) ) {
- self::$instance = new self();
- }
- return self::$instance;
- }
-
- /**
- * Constructor
- */
- public function __construct() {
-
- add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) );
- add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) );
- add_action( 'customize_register', array( $this, 'customize_register' ), 2 );
-
- }
-
- /**
- * Set Options Default Values
- *
- * @param array $defaults Astra options default value array.
- * @return array
- */
- public function theme_defaults( $defaults ) {
-
- // Header - Transparent.
- $defaults['transparent-header-logo'] = '';
- $defaults['transparent-header-retina-logo'] = '';
- $defaults['different-transparent-logo'] = 0;
- $defaults['different-transparent-retina-logo'] = 0;
- $defaults['transparent-header-logo-width'] = array(
- 'desktop' => 150,
- 'tablet' => 120,
- 'mobile' => 100,
- );
- $defaults['transparent-header-enable'] = 0;
- $defaults['transparent-header-disable-archive'] = 1;
- $defaults['transparent-header-disable-latest-posts-index'] = 1;
- $defaults['transparent-header-on-devices'] = 'both';
- $defaults['transparent-header-main-sep'] = '';
- $defaults['transparent-header-main-sep-color'] = '';
-
- /**
- * Transparent Header
- */
- $defaults['transparent-header-bg-color'] = '';
- $defaults['transparent-header-color-site-title'] = '';
- $defaults['transparent-header-color-h-site-title'] = '';
- $defaults['transparent-menu-bg-color'] = '';
- $defaults['transparent-menu-color'] = '';
- $defaults['transparent-menu-h-color'] = '';
- $defaults['transparent-submenu-bg-color'] = '';
- $defaults['transparent-submenu-color'] = '';
- $defaults['transparent-submenu-h-color'] = '';
-
- /**
- * Transparent Header Responsive Colors
- */
- $defaults['transparent-header-bg-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-header-color-site-title-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-header-color-h-site-title-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-menu-bg-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-menu-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-menu-h-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-submenu-bg-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-submenu-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-submenu-h-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- $defaults['transparent-content-section-text-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
- $defaults['transparent-content-section-link-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
- $defaults['transparent-content-section-link-h-color-responsive'] = array(
- 'desktop' => '',
- 'tablet' => '',
- 'mobile' => '',
- );
-
- return $defaults;
- }
-
- /**
- * Add postMessage support for site title and description for the Theme Customizer.
- *
- * @param WP_Customize_Manager $wp_customize Theme Customizer object.
- */
- public function customize_register( $wp_customize ) {
-
- // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
- /**
- * Register Panel & Sections
- */
- require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/class-astra-transparent-header-panels-and-sections.php';
-
- /**
- * Sections
- */
- require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-colors-transparent-header-configs.php';
- // Check Transparent Header is activated.
- require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-transparent-header-configs.php';
- // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
- }
-
- /**
- * Customizer Preview
- */
- public function preview_scripts() {
- /**
- * Load unminified if SCRIPT_DEBUG is true.
- */
- /* Directory and Extension */
- $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
- $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
- wp_enqueue_script( 'astra-transparent-header-customizer-preview-js', ASTRA_THEME_TRANSPARENT_HEADER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );
-
- // Localize variables for further JS.
- wp_localize_script(
- 'astra-transparent-header-customizer-preview-js',
- 'AstraBuilderTransparentData',
- array(
- 'is_astra_hf_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active,
- 'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(),
- )
- );
- }
- }
-}
-
-/**
-* Kicking this off by calling 'get_instance()' method
-*/
-Astra_Ext_Transparent_Header_Loader::get_instance();
+<?php +/** + * Sticky Header - Customizer. + * + * @package Astra Addon + * @since 1.0.0 + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + +if ( ! class_exists( 'Astra_Ext_Transparent_Header_Loader' ) ) { + + /** + * Customizer Initialization + * + * @since 1.0.0 + */ + class Astra_Ext_Transparent_Header_Loader { + + /** + * Member Variable + * + * @var instance + */ + private static $instance; + + /** + * Initiator + */ + public static function get_instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Constructor + */ + public function __construct() { + + add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); + add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) ); + add_action( 'customize_register', array( $this, 'customize_register' ), 2 ); + + } + + /** + * Set Options Default Values + * + * @param array $defaults Astra options default value array. + * @return array + */ + public function theme_defaults( $defaults ) { + + // Header - Transparent. + $defaults['transparent-header-logo'] = ''; + $defaults['transparent-header-retina-logo'] = ''; + $defaults['different-transparent-logo'] = 0; + $defaults['different-transparent-retina-logo'] = 0; + $defaults['transparent-header-logo-width'] = array( + 'desktop' => 150, + 'tablet' => 120, + 'mobile' => 100, + ); + $defaults['transparent-header-enable'] = 0; + $defaults['transparent-header-disable-archive'] = 1; + $defaults['transparent-header-disable-latest-posts-index'] = 1; + $defaults['transparent-header-on-devices'] = 'both'; + $defaults['transparent-header-main-sep'] = ''; + $defaults['transparent-header-main-sep-color'] = ''; + + /** + * Transparent Header + */ + $defaults['transparent-header-bg-color'] = ''; + $defaults['transparent-header-color-site-title'] = ''; + $defaults['transparent-header-color-h-site-title'] = ''; + $defaults['transparent-menu-bg-color'] = ''; + $defaults['transparent-menu-color'] = ''; + $defaults['transparent-menu-h-color'] = ''; + $defaults['transparent-submenu-bg-color'] = ''; + $defaults['transparent-submenu-color'] = ''; + $defaults['transparent-submenu-h-color'] = ''; + + /** + * Transparent Header Responsive Colors + */ + $defaults['transparent-header-bg-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-header-color-site-title-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-header-color-h-site-title-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-menu-bg-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-menu-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-menu-h-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-submenu-bg-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-submenu-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-submenu-h-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + $defaults['transparent-content-section-text-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + $defaults['transparent-content-section-link-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + $defaults['transparent-content-section-link-h-color-responsive'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + ); + + return $defaults; + } + + /** + * Add postMessage support for site title and description for the Theme Customizer. + * + * @param WP_Customize_Manager $wp_customize Theme Customizer object. + */ + public function customize_register( $wp_customize ) { + + // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + /** + * Register Panel & Sections + */ + require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/class-astra-transparent-header-panels-and-sections.php'; + + /** + * Sections + */ + require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-colors-transparent-header-configs.php'; + // Check Transparent Header is activated. + require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-transparent-header-configs.php'; + // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + } + + /** + * Customizer Preview + */ + public function preview_scripts() { + /** + * Load unminified if SCRIPT_DEBUG is true. + */ + /* Directory and Extension */ + $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; + $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; + wp_enqueue_script( 'astra-transparent-header-customizer-preview-js', ASTRA_THEME_TRANSPARENT_HEADER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); + + // Localize variables for further JS. + wp_localize_script( + 'astra-transparent-header-customizer-preview-js', + 'AstraBuilderTransparentData', + array( + 'is_astra_hf_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active, + 'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(), + ) + ); + } + } +} + +/** +* Kicking this off by calling 'get_instance()' method +*/ +Astra_Ext_Transparent_Header_Loader::get_instance(); diff --git a/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php b/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php index 4c1462e..bd6a0a0 100644 --- a/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php +++ b/inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php @@ -1,386 +1,386 @@ -<?php
-/**
- * Sticky Header Markup
- *
- * @package Astra Addon
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
-}
-
-if ( ! class_exists( 'Astra_ExtTransparenty_Header_Markup' ) ) {
-
- /**
- * Sticky Header Markup Initial Setup
- *
- * @since 1.0.0
- */
- class Astra_Ext_Transparent_Header_Markup {
-
- /**
- * Member Variable
- *
- * @var object instance
- */
- private static $instance;
-
- /**
- * Initiator
- */
- public static function get_instance() {
- if ( ! isset( self::$instance ) ) {
- self::$instance = new self();
- }
- return self::$instance;
- }
-
- /**
- * Constructor
- */
- public function __construct() {
-
- add_action( 'body_class', array( $this, 'add_body_class' ) );
-
- /* Fixed header markup */
- add_action( 'astra_header', array( $this, 'transparent_header_logo' ), 1 );
-
- /**
- * Metabox setup
- */
- add_filter( 'astra_meta_box_options', array( $this, 'add_options' ) );
- add_action( 'astra_meta_box_markup_after', array( $this, 'add_options_markup' ) );
-
- add_action( 'astra_customizer_save', array( $this, 'customizer_save' ) );
- }
-
- /**
- * Add Body Classes
- *
- * @param array $classes Body Class Array.
- * @return array
- */
- public function add_body_class( $classes ) {
-
- $inherit_desk_logo = astra_get_option( 'different-transparent-logo', false );
- $transparent_header_logo = astra_get_option( 'transparent-header-logo', true );
- $transparent_header_logo_retina = astra_get_option( 'transparent-header-retina-logo', true );
-
- if ( '1' == $inherit_desk_logo && ( '' !== $transparent_header_logo || '' !== $transparent_header_logo_retina ) ) {
- $classes[] = 'ast-replace-site-logo-transparent';
- }
-
- if ( '1' !== $inherit_desk_logo ) {
- $classes[] = 'ast-inherit-site-logo-transparent';
- }
-
- /**
- * Add class 'ast-theme-transparent-header'
- */
-
- if ( self::is_transparent_header() ) {
- $classes[] = 'ast-theme-transparent-header';
- }
-
- return $classes;
- }
-
- /**
- * Astra check if transparent header is enabled.
- *
- * @return boolean true/false.
- */
- public static function is_transparent_header() {
-
- // Transparent Header.
- $enable_trans_header = astra_get_option( 'transparent-header-enable' );
- $trans_meta_option = astra_get_option_meta( 'theme-transparent-header-meta', 'default' );
-
- if ( $enable_trans_header ) {
-
- if ( ( is_archive() || is_search() || is_404() ) && '1' == astra_get_option( 'transparent-header-disable-archive' ) ) {
- $enable_trans_header = false;
- }
-
- if ( is_home() && '1' == astra_get_option( 'transparent-header-disable-index' ) && ( 'posts' !== get_option( 'show_on_front' ) ) ) {
- $enable_trans_header = false;
- }
-
- if ( is_front_page() && 'posts' == get_option( 'show_on_front' ) && '1' == astra_get_option( 'transparent-header-disable-latest-posts-index' ) ) {
- $enable_trans_header = false;
- }
-
- if ( is_page() && '1' == astra_get_option( 'transparent-header-disable-page' ) ) {
- $enable_trans_header = false;
- }
-
- if ( is_single() && '1' == astra_get_option( 'transparent-header-disable-posts' ) ) {
- $enable_trans_header = false;
- }
- }
-
- if ( class_exists( 'Astra_Woocommerce' ) ) {
- if ( is_product() && '1' == astra_get_option( 'transparent-header-disable-woo-products' ) ) {
- $enable_trans_header = false;
- }
- }
-
- // Force Meta settings to override global settings.
- if ( 'enabled' === $trans_meta_option ) {
- $enable_trans_header = true;
- } elseif ( 'disabled' === $trans_meta_option ) {
- $enable_trans_header = false;
- }
-
- return apply_filters( 'astra_is_transparent_header', $enable_trans_header );
- }
-
- /**
- * Site Header - <header>
- *
- * @since 1.0.0
- */
- public function transparent_header_logo() {
-
- $inherit_desk_logo = astra_get_option( 'different-transparent-logo', false );
- $transparent_header_logo = astra_get_option( 'transparent-header-logo' );
-
- if ( self::is_transparent_header() && '1' == $inherit_desk_logo && '' !== $transparent_header_logo ) {
- // Logo For None Effect.
- add_filter( 'astra_has_custom_logo', '__return_true' );
- add_filter( 'get_custom_logo', array( $this, 'transparent_custom_logo' ), 10, 2 );
- }
- }
-
-
- /**
- * Replace transparent header logo.
- *
- * @param sting $html Size name.
- * @param int $blog_id Icon.
- *
- * @return string html markup of logo.
- */
- public function transparent_custom_logo( $html, $blog_id ) {
-
- $trans_logo = astra_get_option( 'transparent-header-logo' );
- $transparent_header_devices = astra_get_option( 'transparent-header-on-devices' );
-
- if ( '' !== $trans_logo ) {
-
- /* Replace transparent header logo and width */
- add_filter( 'wp_get_attachment_image_attributes', array( $this, 'replace_trans_header_attr' ), 10, 3 );
-
- $custom_logo_id = attachment_url_to_postid( $trans_logo );
-
- $size = 'ast-transparent-logo-size';
-
- if ( is_customize_preview() ) {
- $size = 'full';
- }
-
- $html = sprintf(
- '<a href="%1$s" class="custom-logo-link transparent-custom-logo" rel="home" itemprop="url">%2$s</a>',
- esc_url( home_url( '/' ) ),
- wp_get_attachment_image(
- $custom_logo_id,
- $size,
- false,
- array(
- 'class' => 'custom-logo',
- )
- )
- );
-
- if ( 'mobile' === $transparent_header_devices ) {
-
- $html .= sprintf(
- '<a href="%1$s" class="custom-logo-link ast-transparent-desktop-logo" rel="home" itemprop="url">%2$s</a>',
- esc_url( home_url( '/' ) ),
- wp_get_attachment_image(
- get_theme_mod( 'custom_logo' ),
- $size,
- false,
- array(
- 'class' => 'custom-logo',
- )
- )
- );
- }
-
- if ( 'desktop' === $transparent_header_devices ) {
-
- $html .= sprintf(
- '<a href="%1$s" class="custom-logo-link ast-transparent-mobile-logo" rel="home" itemprop="url">%2$s</a>',
- esc_url( home_url( '/' ) ),
- wp_get_attachment_image(
- get_theme_mod( 'custom_logo' ),
- $size,
- false,
- array(
- 'class' => 'custom-logo',
- )
- )
- );
- }
-
- remove_filter( 'wp_get_attachment_image_attributes', array( $this, 'replace_trans_header_attr' ) );
- }
-
- return $html;
- }
-
-
-
- /**
- * Replace transparent header logo.
- *
- * @param array $attr Image.
- * @param object $attachment Image obj.
- * @param sting $size Size name.
- *
- * @return array Image attr.
- */
- public function replace_trans_header_attr( $attr, $attachment, $size ) {
-
- $trans_logo = astra_get_option( 'transparent-header-logo' );
- $custom_logo_id = attachment_url_to_postid( $trans_logo );
-
- if ( $custom_logo_id == $attachment->ID ) {
-
- $attach_data = array();
- if ( ! is_customize_preview() ) {
- $attach_data = wp_get_attachment_image_src( $attachment->ID, 'ast-transparent-logo-size' );
- if ( isset( $attach_data[0] ) ) {
- $attr['src'] = $attach_data[0];
- }
- }
-
- $file_type = wp_check_filetype( $attr['src'] );
- $file_extension = $file_type['ext'];
-
- if ( 'svg' == $file_extension ) {
- $attr['class'] = 'astra-logo-svg';
- }
-
- $diff_retina_logo = astra_get_option( 'different-transparent-retina-logo' );
-
- if ( '1' == $diff_retina_logo ) {
-
- $retina_logo = astra_get_option( 'transparent-header-retina-logo' );
-
- $attr['srcset'] = '';
-
- if ( apply_filters( 'astra_transparent_header_retina', true ) && '' !== $retina_logo ) {
- $cutom_logo = wp_get_attachment_image_src( $custom_logo_id, 'full' );
- $cutom_logo_url = $cutom_logo[0];
-
- if ( astra_check_is_ie() ) {
- // Replace header logo url to retina logo url.
- $attr['src'] = $retina_logo;
- }
-
- $attr['srcset'] = $cutom_logo_url . ' 1x, ' . $retina_logo . ' 2x';
-
- }
- }
- }
-
- return $attr;
- }
-
- /**
- * Add Meta Options
- *
- * @param array $meta_option Page Meta.
- * @return array
- */
- public function add_options( $meta_option ) {
-
- $meta_option['theme-transparent-header-meta'] = array(
- 'sanitize' => 'FILTER_DEFAULT',
- );
-
- return $meta_option;
- }
-
- /**
- * Transparent Header Meta Field markup
- *
- * Loads appropriate template file based on the style option selected in options panel.
- *
- * @param array $meta Page Meta.
- * @since 1.0.0
- */
- public function add_options_markup( $meta ) {
-
- /**
- * Get options
- */
- $trans_header_meta = ( isset( $meta['theme-transparent-header-meta']['default'] ) ) ? $meta['theme-transparent-header-meta']['default'] : 'default';
- $show_meta_field = ! astra_check_is_bb_themer_layout();
- ?>
-
- <?php if ( $show_meta_field ) { ?>
- <div class="transparent-header-wrapper">
- <p class="post-attributes-label-wrapper">
- <strong> <?php esc_html_e( 'Transparent Header', 'astra' ); ?> </strong><br/>
- </p>
- <select name="theme-transparent-header-meta" id="theme-transparent-header-meta">
- <option value="default" <?php selected( $trans_header_meta, 'default' ); ?>> <?php esc_html_e( 'Customizer Setting', 'astra' ); ?> </option>
- <option value="enabled" <?php selected( $trans_header_meta, 'enabled' ); ?>> <?php esc_html_e( 'Enabled', 'astra' ); ?> </option>
- <option value="disabled" <?php selected( $trans_header_meta, 'disabled' ); ?>> <?php esc_html_e( 'Disabled', 'astra' ); ?> </option>
- </select>
- </div>
- <?php } ?>
-
- <?php
- }
-
- /**
- * Add Styles Callback
- */
- public function customizer_save() {
-
- /* Generate Transparent Header Logo */
- $trans_logo = astra_get_option( 'transparent-header-logo' );
-
- if ( '' !== $trans_logo ) {
- add_filter( 'intermediate_image_sizes_advanced', array( $this, 'transparent_logo_image_sizes' ), 10, 2 );
- $trans_logo_id = attachment_url_to_postid( $trans_logo );
- Astra_Customizer::generate_logo_by_width( $trans_logo_id );
- remove_filter( 'intermediate_image_sizes_advanced', array( $this, 'transparent_logo_image_sizes' ), 10 );
- }
- }
-
- /**
- * Add logo image sizes in filter.
- *
- * @since 1.0.0
- * @param array $sizes Sizes.
- * @param array $metadata attachment data.
- *
- * @return array
- */
- public function transparent_logo_image_sizes( $sizes, $metadata ) {
-
- $logo_width = astra_get_option( 'transparent-header-logo-width' );
-
- if ( is_array( $sizes ) && '' != $logo_width['desktop'] ) {
- $max_value = max( $logo_width );
- $sizes['ast-transparent-logo-size'] = array(
- 'width' => (int) $max_value,
- 'height' => 0,
- 'crop' => false,
- );
- }
-
- return $sizes;
- }
- }
-}
-
-/**
-* Kicking this off by calling 'get_instance()' method
-*/
-Astra_Ext_Transparent_Header_Markup::get_instance();
+<?php +/** + * Sticky Header Markup + * + * @package Astra Addon + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + +if ( ! class_exists( 'Astra_ExtTransparenty_Header_Markup' ) ) { + + /** + * Sticky Header Markup Initial Setup + * + * @since 1.0.0 + */ + class Astra_Ext_Transparent_Header_Markup { + + /** + * Member Variable + * + * @var object instance + */ + private static $instance; + + /** + * Initiator + */ + public static function get_instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Constructor + */ + public function __construct() { + + add_action( 'body_class', array( $this, 'add_body_class' ) ); + + /* Fixed header markup */ + add_action( 'astra_header', array( $this, 'transparent_header_logo' ), 1 ); + + /** + * Metabox setup + */ + add_filter( 'astra_meta_box_options', array( $this, 'add_options' ) ); + add_action( 'astra_meta_box_markup_after', array( $this, 'add_options_markup' ) ); + + add_action( 'astra_customizer_save', array( $this, 'customizer_save' ) ); + } + + /** + * Add Body Classes + * + * @param array $classes Body Class Array. + * @return array + */ + public function add_body_class( $classes ) { + + $inherit_desk_logo = astra_get_option( 'different-transparent-logo', false ); + $transparent_header_logo = astra_get_option( 'transparent-header-logo', true ); + $transparent_header_logo_retina = astra_get_option( 'transparent-header-retina-logo', true ); + + if ( '1' == $inherit_desk_logo && ( '' !== $transparent_header_logo || '' !== $transparent_header_logo_retina ) ) { + $classes[] = 'ast-replace-site-logo-transparent'; + } + + if ( '1' !== $inherit_desk_logo ) { + $classes[] = 'ast-inherit-site-logo-transparent'; + } + + /** + * Add class 'ast-theme-transparent-header' + */ + + if ( self::is_transparent_header() ) { + $classes[] = 'ast-theme-transparent-header'; + } + + return $classes; + } + + /** + * Astra check if transparent header is enabled. + * + * @return boolean true/false. + */ + public static function is_transparent_header() { + + // Transparent Header. + $enable_trans_header = astra_get_option( 'transparent-header-enable' ); + $trans_meta_option = astra_get_option_meta( 'theme-transparent-header-meta', 'default' ); + + if ( $enable_trans_header ) { + + if ( ( is_archive() || is_search() || is_404() ) && '1' == astra_get_option( 'transparent-header-disable-archive' ) ) { + $enable_trans_header = false; + } + + if ( is_home() && '1' == astra_get_option( 'transparent-header-disable-index' ) && ( 'posts' !== get_option( 'show_on_front' ) ) ) { + $enable_trans_header = false; + } + + if ( is_front_page() && 'posts' == get_option( 'show_on_front' ) && '1' == astra_get_option( 'transparent-header-disable-latest-posts-index' ) ) { + $enable_trans_header = false; + } + + if ( is_page() && '1' == astra_get_option( 'transparent-header-disable-page' ) ) { + $enable_trans_header = false; + } + + if ( is_single() && '1' == astra_get_option( 'transparent-header-disable-posts' ) ) { + $enable_trans_header = false; + } + } + + if ( class_exists( 'Astra_Woocommerce' ) ) { + if ( is_product() && '1' == astra_get_option( 'transparent-header-disable-woo-products' ) ) { + $enable_trans_header = false; + } + } + + // Force Meta settings to override global settings. + if ( 'enabled' === $trans_meta_option ) { + $enable_trans_header = true; + } elseif ( 'disabled' === $trans_meta_option ) { + $enable_trans_header = false; + } + + return apply_filters( 'astra_is_transparent_header', $enable_trans_header ); + } + + /** + * Site Header - <header> + * + * @since 1.0.0 + */ + public function transparent_header_logo() { + + $inherit_desk_logo = astra_get_option( 'different-transparent-logo', false ); + $transparent_header_logo = astra_get_option( 'transparent-header-logo' ); + + if ( self::is_transparent_header() && '1' == $inherit_desk_logo && '' !== $transparent_header_logo ) { + // Logo For None Effect. + add_filter( 'astra_has_custom_logo', '__return_true' ); + add_filter( 'get_custom_logo', array( $this, 'transparent_custom_logo' ), 10, 2 ); + } + } + + + /** + * Replace transparent header logo. + * + * @param sting $html Size name. + * @param int $blog_id Icon. + * + * @return string html markup of logo. + */ + public function transparent_custom_logo( $html, $blog_id ) { + + $trans_logo = astra_get_option( 'transparent-header-logo' ); + $transparent_header_devices = astra_get_option( 'transparent-header-on-devices' ); + + if ( '' !== $trans_logo ) { + + /* Replace transparent header logo and width */ + add_filter( 'wp_get_attachment_image_attributes', array( $this, 'replace_trans_header_attr' ), 10, 3 ); + + $custom_logo_id = attachment_url_to_postid( $trans_logo ); + + $size = 'ast-transparent-logo-size'; + + if ( is_customize_preview() ) { + $size = 'full'; + } + + $html = sprintf( + '<a href="%1$s" class="custom-logo-link transparent-custom-logo" rel="home" itemprop="url">%2$s</a>', + esc_url( home_url( '/' ) ), + wp_get_attachment_image( + $custom_logo_id, + $size, + false, + array( + 'class' => 'custom-logo', + ) + ) + ); + + if ( 'mobile' === $transparent_header_devices ) { + + $html .= sprintf( + '<a href="%1$s" class="custom-logo-link ast-transparent-desktop-logo" rel="home" itemprop="url">%2$s</a>', + esc_url( home_url( '/' ) ), + wp_get_attachment_image( + get_theme_mod( 'custom_logo' ), + $size, + false, + array( + 'class' => 'custom-logo', + ) + ) + ); + } + + if ( 'desktop' === $transparent_header_devices ) { + + $html .= sprintf( + '<a href="%1$s" class="custom-logo-link ast-transparent-mobile-logo" rel="home" itemprop="url">%2$s</a>', + esc_url( home_url( '/' ) ), + wp_get_attachment_image( + get_theme_mod( 'custom_logo' ), + $size, + false, + array( + 'class' => 'custom-logo', + ) + ) + ); + } + + remove_filter( 'wp_get_attachment_image_attributes', array( $this, 'replace_trans_header_attr' ) ); + } + + return $html; + } + + + + /** + * Replace transparent header logo. + * + * @param array $attr Image. + * @param object $attachment Image obj. + * @param sting $size Size name. + * + * @return array Image attr. + */ + public function replace_trans_header_attr( $attr, $attachment, $size ) { + + $trans_logo = astra_get_option( 'transparent-header-logo' ); + $custom_logo_id = attachment_url_to_postid( $trans_logo ); + + if ( $custom_logo_id == $attachment->ID ) { + + $attach_data = array(); + if ( ! is_customize_preview() ) { + $attach_data = wp_get_attachment_image_src( $attachment->ID, 'ast-transparent-logo-size' ); + if ( isset( $attach_data[0] ) ) { + $attr['src'] = $attach_data[0]; + } + } + + $file_type = wp_check_filetype( $attr['src'] ); + $file_extension = $file_type['ext']; + + if ( 'svg' == $file_extension ) { + $attr['class'] = 'astra-logo-svg'; + } + + $diff_retina_logo = astra_get_option( 'different-transparent-retina-logo' ); + + if ( '1' == $diff_retina_logo ) { + + $retina_logo = astra_get_option( 'transparent-header-retina-logo' ); + + $attr['srcset'] = ''; + + if ( apply_filters( 'astra_transparent_header_retina', true ) && '' !== $retina_logo ) { + $cutom_logo = wp_get_attachment_image_src( $custom_logo_id, 'full' ); + $cutom_logo_url = $cutom_logo[0]; + + if ( astra_check_is_ie() ) { + // Replace header logo url to retina logo url. + $attr['src'] = $retina_logo; + } + + $attr['srcset'] = $cutom_logo_url . ' 1x, ' . $retina_logo . ' 2x'; + + } + } + } + + return $attr; + } + + /** + * Add Meta Options + * + * @param array $meta_option Page Meta. + * @return array + */ + public function add_options( $meta_option ) { + + $meta_option['theme-transparent-header-meta'] = array( + 'sanitize' => 'FILTER_DEFAULT', + ); + + return $meta_option; + } + + /** + * Transparent Header Meta Field markup + * + * Loads appropriate template file based on the style option selected in options panel. + * + * @param array $meta Page Meta. + * @since 1.0.0 + */ + public function add_options_markup( $meta ) { + + /** + * Get options + */ + $trans_header_meta = ( isset( $meta['theme-transparent-header-meta']['default'] ) ) ? $meta['theme-transparent-header-meta']['default'] : 'default'; + $show_meta_field = ! astra_check_is_bb_themer_layout(); + ?> + + <?php if ( $show_meta_field ) { ?> + <div class="transparent-header-wrapper"> + <p class="post-attributes-label-wrapper"> + <strong> <?php esc_html_e( 'Transparent Header', 'astra' ); ?> </strong><br/> + </p> + <select name="theme-transparent-header-meta" id="theme-transparent-header-meta"> + <option value="default" <?php selected( $trans_header_meta, 'default' ); ?>> <?php esc_html_e( 'Customizer Setting', 'astra' ); ?> </option> + <option value="enabled" <?php selected( $trans_header_meta, 'enabled' ); ?>> <?php esc_html_e( 'Enabled', 'astra' ); ?> </option> + <option value="disabled" <?php selected( $trans_header_meta, 'disabled' ); ?>> <?php esc_html_e( 'Disabled', 'astra' ); ?> </option> + </select> + </div> + <?php } ?> + + <?php + } + + /** + * Add Styles Callback + */ + public function customizer_save() { + + /* Generate Transparent Header Logo */ + $trans_logo = astra_get_option( 'transparent-header-logo' ); + + if ( '' !== $trans_logo ) { + add_filter( 'intermediate_image_sizes_advanced', array( $this, 'transparent_logo_image_sizes' ), 10, 2 ); + $trans_logo_id = attachment_url_to_postid( $trans_logo ); + Astra_Customizer::generate_logo_by_width( $trans_logo_id ); + remove_filter( 'intermediate_image_sizes_advanced', array( $this, 'transparent_logo_image_sizes' ), 10 ); + } + } + + /** + * Add logo image sizes in filter. + * + * @since 1.0.0 + * @param array $sizes Sizes. + * @param array $metadata attachment data. + * + * @return array + */ + public function transparent_logo_image_sizes( $sizes, $metadata ) { + + $logo_width = astra_get_option( 'transparent-header-logo-width' ); + + if ( is_array( $sizes ) && '' != $logo_width['desktop'] ) { + $max_value = max( $logo_width ); + $sizes['ast-transparent-logo-size'] = array( + 'width' => (int) $max_value, + 'height' => 0, + 'crop' => false, + ); + } + + return $sizes; + } + } +} + +/** +* Kicking this off by calling 'get_instance()' method +*/ +Astra_Ext_Transparent_Header_Markup::get_instance(); diff --git a/inc/addons/transparent-header/classes/class-astra-transparent-header-panels-and-sections.php b/inc/addons/transparent-header/classes/class-astra-transparent-header-panels-and-sections.php index 42a8bc3..724cfa0 100644 --- a/inc/addons/transparent-header/classes/class-astra-transparent-header-panels-and-sections.php +++ b/inc/addons/transparent-header/classes/class-astra-transparent-header-panels-and-sections.php @@ -1,71 +1,71 @@ -<?php
-/**
- * Transparent Header Options for our theme.
- *
- * @package Astra Addon
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.4.3
- */
-
-// 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.4.3
- */
-if ( ! class_exists( 'Astra_Transparent_Header_Panels_And_Sections' ) ) {
-
- /**
- * Register Transparent Header Customizer Configurations.
- */
- class Astra_Transparent_Header_Panels_And_Sections extends Astra_Customizer_Config_Base {
-
- /**
- * Register Transparent Header 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' => 'section-transparent-header',
- 'title' => __( 'Transparent Header', 'astra' ),
- 'panel' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 'panel-header-builder-group' : 'panel-header-group',
- 'type' => 'section',
- 'priority' => 33,
- ),
-
- array(
- 'name' => 'section-colors-header-group',
- 'type' => 'section',
- 'title' => __( 'Header', 'astra' ),
- 'panel' => 'panel-colors-background',
- 'priority' => 20,
- ),
- );
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Transparent_Header_Panels_And_Sections();
+<?php +/** + * Transparent Header Options for our theme. + * + * @package Astra Addon + * @author Brainstorm Force + * @copyright Copyright (c) 2020, Brainstorm Force + * @link https://www.brainstormforce.com + * @since Astra 1.4.3 + */ + +// 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.4.3 + */ +if ( ! class_exists( 'Astra_Transparent_Header_Panels_And_Sections' ) ) { + + /** + * Register Transparent Header Customizer Configurations. + */ + class Astra_Transparent_Header_Panels_And_Sections extends Astra_Customizer_Config_Base { + + /** + * Register Transparent Header 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' => 'section-transparent-header', + 'title' => __( 'Transparent Header', 'astra' ), + 'panel' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 'panel-header-builder-group' : 'panel-header-group', + 'type' => 'section', + 'priority' => 33, + ), + + array( + 'name' => 'section-colors-header-group', + 'type' => 'section', + 'title' => __( 'Header', 'astra' ), + 'panel' => 'panel-colors-background', + 'priority' => 20, + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Transparent_Header_Panels_And_Sections(); diff --git a/inc/addons/transparent-header/classes/dynamic-css/dynamic.css.php b/inc/addons/transparent-header/classes/dynamic-css/dynamic.css.php index 3f8cb0b..7de0a50 100644 --- a/inc/addons/transparent-header/classes/dynamic-css/dynamic.css.php +++ b/inc/addons/transparent-header/classes/dynamic-css/dynamic.css.php @@ -1,498 +1,498 @@ -<?php
-/**
- * Transparent Header - Dynamic CSS
- *
- * @package Astra Addon
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
-}
-
-add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_header_dynamic_css' );
-
-/**
- * Dynamic CSS
- *
- * @param String $dynamic_css Astra Dynamic CSS.
- * @param String $dynamic_css_filtered Astra Dynamic CSS Filters.
- * @return String Dynamic CSS.
- */
-function astra_ext_transparent_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) {
-
- if ( true != Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) {
- return $dynamic_css;
- }
-
- /**
- * Set colors
- *
- * If colors extension is_active then get color from it.
- * Else set theme default colors.
- */
- $transparent_header_separator = astra_get_option( 'transparent-header-main-sep' );
- $transparent_header_separator_color = astra_get_option( 'transparent-header-main-sep-color' );
-
- $transparent_header_logo_width = astra_get_option( 'transparent-header-logo-width' );
-
- $transparent_header_inherit = astra_get_option( 'different-transparent-logo' );
- $transparent_header_logo = astra_get_option( 'transparent-header-logo' );
-
- $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' );
- $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet', $transparent_bg_color_desktop );
- $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile', ( $transparent_bg_color_tablet ) ? $transparent_bg_color_tablet : $transparent_bg_color_desktop );
-
- $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' );
- $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' );
- $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' );
-
- $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' );
- $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' );
- $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' );
-
- $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' );
- $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' );
- $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' );
-
- $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' );
- $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' );
- $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' );
-
- $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' );
- $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' );
- $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' );
-
- $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' );
- $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' );
- $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' );
-
- $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' );
- $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' );
- $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' );
-
- $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' );
- $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' );
- $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' );
-
- $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' );
- $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' );
- $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' );
-
- $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' );
- $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' );
- $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' );
-
- $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' );
- $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' );
- $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' );
-
- $transparent_header_devices = astra_get_option( 'transparent-header-on-devices' );
-
- /**
- * Generate Dynamic CSS
- */
-
- $css = '';
-
- if ( '0' === $transparent_header_inherit && '' != $transparent_header_logo ) {
- $css_output = array(
- '.ast-theme-transparent-header .site-logo-img .custom-logo-link' => array(
- 'display' => 'none',
- ),
- );
- $css .= astra_parse_css( $css_output );
- }
-
- // Desktop Transparent Heder Logo Width.
- $css_output = array(
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array(
- 'width' => astra_get_css_value( $transparent_header_logo_width['desktop'], 'px' ),
- 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['desktop-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['desktop-svg-height'] : '', 'px' ),
- ),
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array(
- ' max-width' => astra_get_css_value( $transparent_header_logo_width['desktop'], 'px' ),
- ),
- );
- $css .= astra_parse_css( $css_output );
-
- // Tablet Transparent Heder Logo Width.
- $tablet_css_output = array(
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array(
- 'width' => astra_get_css_value( $transparent_header_logo_width['tablet'], 'px' ),
- 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['tablet-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['tablet-svg-height'] : '', 'px' ),
- ),
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array(
- ' max-width' => astra_get_css_value( $transparent_header_logo_width['tablet'], 'px' ),
- ),
- );
- $css .= astra_parse_css( $tablet_css_output, '', astra_get_tablet_breakpoint() );
-
- // Mobile Transparent Heder Logo Width.
- $mobile_css_output = array(
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array(
- 'width' => astra_get_css_value( $transparent_header_logo_width['mobile'], 'px' ),
- 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['mobile-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['mobile-svg-height'] : '', 'px' ),
- ),
- '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array(
- ' max-width' => astra_get_css_value( $transparent_header_logo_width['mobile'], 'px' ),
- ),
- );
- $css .= astra_parse_css( $mobile_css_output, '', astra_get_mobile_breakpoint( 1 ) );
-
- $transparent_header_base = array(
- '.ast-theme-transparent-header #masthead' => array(
- 'position' => 'absolute',
- 'left' => '0',
- 'right' => '0',
- ),
-
- '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar' => array(
- 'background' => 'none',
- ),
-
- 'body.elementor-editor-active.ast-theme-transparent-header #masthead, .fl-builder-edit .ast-theme-transparent-header #masthead, body.vc_editor.ast-theme-transparent-header #masthead, body.brz-ed.ast-theme-transparent-header #masthead' => array(
- 'z-index' => '0',
- ),
-
- '.ast-header-break-point.ast-replace-site-logo-transparent.ast-theme-transparent-header .custom-mobile-logo-link' => array(
- 'display' => 'none',
- ),
-
- '.ast-header-break-point.ast-replace-site-logo-transparent.ast-theme-transparent-header .transparent-custom-logo' => array(
- 'display' => 'inline-block',
- ),
-
- '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar' => array(
- 'background-image' => 'none',
- 'background-color' => 'transparent',
- ),
-
- '.ast-theme-transparent-header .ast-below-header' => array(
- 'background-image' => 'none',
- 'background-color' => 'transparent',
- ),
- );
-
- /**
- * Transparent Header Colors
- */
- $transparent_header_desktop = array(
-
- '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited' => array(
- 'color' => esc_attr( $transparent_color_site_title_desktop ),
- ),
- '.ast-theme-transparent-header .site-header .site-title a:hover' => array(
- 'color' => esc_attr( $transparent_color_h_site_title_desktop ),
- ),
-
- '.ast-theme-transparent-header .site-header .site-description' => array(
- 'color' => esc_attr( $transparent_color_site_title_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_desktop ),
- ),
- // Content Section text color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_desktop ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_desktop ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ),
- ),
- );
-
- $transparent_header_tablet = array(
-
- '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:hover, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:focus, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:visited' => array(
- 'color' => esc_attr( $transparent_color_site_title_tablet ),
- ),
- '.ast-theme-transparent-header .site-header .site-title a:hover' => array(
- 'color' => esc_attr( $transparent_color_h_site_title_tablet ),
- ),
-
- '.ast-theme-transparent-header .site-header .site-description' => array(
- 'color' => esc_attr( $transparent_color_site_title_tablet ),
- ),
-
- '.ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_tablet ),
- ),
- // Content Section text color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_tablet ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_tablet ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ),
- ),
- );
-
- $transparent_header_mobile = array(
-
- '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:hover, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:focus, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:visited' => array(
- 'color' => esc_attr( $transparent_color_site_title_mobile ),
- ),
- '.ast-theme-transparent-header .site-header .site-title a:hover' => array(
- 'color' => esc_attr( $transparent_color_h_site_title_mobile ),
- ),
-
- '.ast-theme-transparent-header .site-header .site-description' => array(
- 'color' => esc_attr( $transparent_color_site_title_mobile ),
- ),
-
- '.ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_mobile ),
- ),
- // Content Section text color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_mobile ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_mobile ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ),
- ),
- );
-
- /* Parse CSS from array() */
- if ( 'both' === $transparent_header_devices || 'desktop' === $transparent_header_devices ) {
- $css .= astra_parse_css( $transparent_header_base, astra_get_tablet_breakpoint() );
-
- // If Transparent header is active on mobile + desktop, enqueue CSS without media queeries.
- // If only for desktop add media query for the transparent header.
- if ( 'both' === $transparent_header_devices ) {
- $css .= astra_parse_css( $transparent_header_desktop );
- } else {
- $css .= astra_parse_css( $transparent_header_desktop, astra_get_tablet_breakpoint( '', 1 ) );
- }
- }
-
- if ( 'mobile' === $transparent_header_devices ) {
- $css .= astra_parse_css(
- array(
- '.transparent-custom-logo' => array(
- 'display' => 'none',
- ),
- ),
- astra_get_tablet_breakpoint()
- );
-
- $css .= astra_parse_css(
- array(
- '.transparent-custom-logo' => array(
- 'display' => 'block',
- ),
- ),
- '',
- astra_get_tablet_breakpoint()
- );
-
- $css .= astra_parse_css(
- array(
- '.ast-transparent-desktop-logo' => array(
- 'display' => 'none',
- ),
- ),
- '',
- astra_get_tablet_breakpoint()
- );
- }
-
- if ( 'desktop' === $transparent_header_devices ) {
- $css .= astra_parse_css(
- array(
- '.transparent-custom-logo' => array(
- 'display' => 'none',
- ),
- ),
- '',
- astra_get_tablet_breakpoint()
- );
-
- $css .= astra_parse_css(
- array(
- '.ast-transparent-mobile-logo' => array(
- 'display' => 'none',
- ),
- ),
- astra_get_tablet_breakpoint()
- );
-
- $css .= astra_parse_css(
- array(
- '.ast-transparent-mobile-logo' => array(
- 'display' => 'block',
- ),
- ),
- '',
- astra_get_tablet_breakpoint()
- );
- }
-
- if ( 'both' === $transparent_header_devices || 'mobile' === $transparent_header_devices ) {
- $css .= astra_parse_css( $transparent_header_base, '', astra_get_tablet_breakpoint() );
- $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() );
- $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() );
- }
-
- $mobile_header_type = astra_get_option( 'mobile-header-type' );
-
- if ( 'dropdown' === $mobile_header_type || is_customize_preview() ) {
- $header_child_selector = '[CLASS*="-header-wrap"]:nth-last-child(2) > [CLASS*="-header-bar"]';
- } else {
- $header_child_selector = '[CLASS*="-header-wrap"]:last-child > [CLASS*="-header-bar"]';
- }
-
- if ( 'both' === $transparent_header_devices && $transparent_header_separator ) {
-
- $selector = '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar';
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $selector = '.ast-theme-transparent-header #ast-desktop-header > ' . $header_child_selector . ', .ast-theme-transparent-header.ast-header-break-point #ast-mobile-header > ' . $header_child_selector;
- }
-
- $css .= astra_parse_css(
- array(
- $selector => array(
- 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ),
- 'border-bottom-style' => 'solid',
- 'border-bottom-color' => esc_attr( $transparent_header_separator_color ),
- ),
- )
- );
- }
-
- if ( 'mobile' === $transparent_header_devices && $transparent_header_separator ) {
-
- $selector = '.ast-theme-transparent-header.ast-header-break-point .main-header-bar';
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $selector = '.ast-theme-transparent-header.ast-header-break-point #ast-mobile-header > ' . $header_child_selector;
- }
-
- $css .= astra_parse_css(
- array(
- $selector => array(
- 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ),
- 'border-bottom-style' => 'solid',
- 'border-bottom-color' => esc_attr( $transparent_header_separator_color ),
- ),
- ),
- '',
- astra_get_tablet_breakpoint()
- );
- }
-
- if ( 'desktop' === $transparent_header_devices && $transparent_header_separator ) {
-
- $selector = '.ast-theme-transparent-header .main-header-bar';
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $selector = '.ast-theme-transparent-header #ast-desktop-header > ' . $header_child_selector;
- }
-
- $css .= astra_parse_css(
- array(
- $selector => array(
- 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ),
- 'border-bottom-style' => 'solid',
- 'border-bottom-color' => esc_attr( $transparent_header_separator_color ),
- ),
- ),
- astra_get_tablet_breakpoint()
- );
- }
-
- $dynamic_css .= $css;
-
- return $dynamic_css;
-}
+<?php +/** + * Transparent Header - Dynamic CSS + * + * @package Astra Addon + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + +add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_header_dynamic_css' ); + +/** + * Dynamic CSS + * + * @param String $dynamic_css Astra Dynamic CSS. + * @param String $dynamic_css_filtered Astra Dynamic CSS Filters. + * @return String Dynamic CSS. + */ +function astra_ext_transparent_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { + + if ( true != Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) { + return $dynamic_css; + } + + /** + * Set colors + * + * If colors extension is_active then get color from it. + * Else set theme default colors. + */ + $transparent_header_separator = astra_get_option( 'transparent-header-main-sep' ); + $transparent_header_separator_color = astra_get_option( 'transparent-header-main-sep-color' ); + + $transparent_header_logo_width = astra_get_option( 'transparent-header-logo-width' ); + + $transparent_header_inherit = astra_get_option( 'different-transparent-logo' ); + $transparent_header_logo = astra_get_option( 'transparent-header-logo' ); + + $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' ); + $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet', $transparent_bg_color_desktop ); + $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile', ( $transparent_bg_color_tablet ) ? $transparent_bg_color_tablet : $transparent_bg_color_desktop ); + + $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' ); + $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' ); + $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' ); + + $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' ); + $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' ); + $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' ); + + $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' ); + $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' ); + $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' ); + + $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' ); + $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' ); + $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' ); + + $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' ); + $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' ); + $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' ); + + $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' ); + $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' ); + $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' ); + + $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' ); + $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' ); + $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' ); + + $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' ); + $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' ); + $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' ); + + $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' ); + $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' ); + $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' ); + + $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' ); + $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' ); + $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' ); + + $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' ); + $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' ); + $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' ); + + $transparent_header_devices = astra_get_option( 'transparent-header-on-devices' ); + + /** + * Generate Dynamic CSS + */ + + $css = ''; + + if ( '0' === $transparent_header_inherit && '' != $transparent_header_logo ) { + $css_output = array( + '.ast-theme-transparent-header .site-logo-img .custom-logo-link' => array( + 'display' => 'none', + ), + ); + $css .= astra_parse_css( $css_output ); + } + + // Desktop Transparent Heder Logo Width. + $css_output = array( + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array( + 'width' => astra_get_css_value( $transparent_header_logo_width['desktop'], 'px' ), + 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['desktop-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['desktop-svg-height'] : '', 'px' ), + ), + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array( + ' max-width' => astra_get_css_value( $transparent_header_logo_width['desktop'], 'px' ), + ), + ); + $css .= astra_parse_css( $css_output ); + + // Tablet Transparent Heder Logo Width. + $tablet_css_output = array( + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array( + 'width' => astra_get_css_value( $transparent_header_logo_width['tablet'], 'px' ), + 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['tablet-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['tablet-svg-height'] : '', 'px' ), + ), + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array( + ' max-width' => astra_get_css_value( $transparent_header_logo_width['tablet'], 'px' ), + ), + ); + $css .= astra_parse_css( $tablet_css_output, '', astra_get_tablet_breakpoint() ); + + // Mobile Transparent Heder Logo Width. + $mobile_css_output = array( + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo .astra-logo-svg' => array( + 'width' => astra_get_css_value( $transparent_header_logo_width['mobile'], 'px' ), + 'height' => astra_get_css_value( ( ! empty( $transparent_header_logo_width['mobile-svg-height'] ) && ! is_customize_preview() ) ? $transparent_header_logo_width['mobile-svg-height'] : '', 'px' ), + ), + '.ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img' => array( + ' max-width' => astra_get_css_value( $transparent_header_logo_width['mobile'], 'px' ), + ), + ); + $css .= astra_parse_css( $mobile_css_output, '', astra_get_mobile_breakpoint( 1 ) ); + + $transparent_header_base = array( + '.ast-theme-transparent-header #masthead' => array( + 'position' => 'absolute', + 'left' => '0', + 'right' => '0', + ), + + '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar' => array( + 'background' => 'none', + ), + + 'body.elementor-editor-active.ast-theme-transparent-header #masthead, .fl-builder-edit .ast-theme-transparent-header #masthead, body.vc_editor.ast-theme-transparent-header #masthead, body.brz-ed.ast-theme-transparent-header #masthead' => array( + 'z-index' => '0', + ), + + '.ast-header-break-point.ast-replace-site-logo-transparent.ast-theme-transparent-header .custom-mobile-logo-link' => array( + 'display' => 'none', + ), + + '.ast-header-break-point.ast-replace-site-logo-transparent.ast-theme-transparent-header .transparent-custom-logo' => array( + 'display' => 'inline-block', + ), + + '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar' => array( + 'background-image' => 'none', + 'background-color' => 'transparent', + ), + + '.ast-theme-transparent-header .ast-below-header' => array( + 'background-image' => 'none', + 'background-color' => 'transparent', + ), + ); + + /** + * Transparent Header Colors + */ + $transparent_header_desktop = array( + + '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + + '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited' => array( + 'color' => esc_attr( $transparent_color_site_title_desktop ), + ), + '.ast-theme-transparent-header .site-header .site-title a:hover' => array( + 'color' => esc_attr( $transparent_color_h_site_title_desktop ), + ), + + '.ast-theme-transparent-header .site-header .site-description' => array( + 'color' => esc_attr( $transparent_color_site_title_desktop ), + ), + + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_color_desktop ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'color' => esc_attr( $transparent_menu_color_desktop ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_desktop ), + ), + // Content Section text color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array( + 'color' => esc_attr( $transparent_content_section_text_color_desktop ), + ), + // Content Section link color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_desktop ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ), + ), + ); + + $transparent_header_tablet = array( + + '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + + '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:hover, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:focus, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:visited' => array( + 'color' => esc_attr( $transparent_color_site_title_tablet ), + ), + '.ast-theme-transparent-header .site-header .site-title a:hover' => array( + 'color' => esc_attr( $transparent_color_h_site_title_tablet ), + ), + + '.ast-theme-transparent-header .site-header .site-description' => array( + 'color' => esc_attr( $transparent_color_site_title_tablet ), + ), + + '.ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_color_tablet ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'color' => esc_attr( $transparent_menu_color_tablet ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_tablet ), + ), + // Content Section text color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array( + 'color' => esc_attr( $transparent_content_section_text_color_tablet ), + ), + // Content Section link color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_tablet ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ), + ), + ); + + $transparent_header_mobile = array( + + '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .main-header-bar-wrap .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .ast-mobile-header-wrap .main-header-bar' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + '.ast-theme-transparent-header .main-header-bar .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-above-header, .ast-theme-transparent-header .ast-above-header.ast-above-header-bar, .ast-theme-transparent-header .ast-below-header, .ast-header-break-point.ast-theme-transparent-header .ast-above-header, .ast-header-break-point.ast-theme-transparent-header .ast-below-header' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + + '.ast-theme-transparent-header .site-title a, .ast-theme-transparent-header .site-title a:focus, .ast-theme-transparent-header .site-title a:hover, .ast-theme-transparent-header .site-title a:visited, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:hover, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:focus, .ast-theme-transparent-header .ast-builder-layout-element .ast-site-identity .site-title a:visited' => array( + 'color' => esc_attr( $transparent_color_site_title_mobile ), + ), + '.ast-theme-transparent-header .site-header .site-title a:hover' => array( + 'color' => esc_attr( $transparent_color_h_site_title_mobile ), + ), + + '.ast-theme-transparent-header .site-header .site-description' => array( + 'color' => esc_attr( $transparent_color_site_title_mobile ), + ), + + '.ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu .sub-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-builder-menu .main-header-bar-wrap .main-header-menu, .ast-flyout-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-fullscreen-menu-enable.ast-header-break-point.ast-theme-transparent-header .main-header-bar-navigation #site-navigation, .ast-flyout-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap .ast-above-header-navigation, .ast-flyout-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap .ast-below-header-actual-nav, .ast-fullscreen-above-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation-wrap, .ast-fullscreen-below-menu-enable.ast-header-break-point.ast-theme-transparent-header .ast-below-header-navigation-wrap, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .ast-builder-menu .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header.astra-hfb-header .ast-builder-menu [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.astra-hfb-header .ast-builder-menu .main-header-bar-navigation [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_color_mobile ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-link:hover,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.current-menu-item > .ast-menu-toggle,.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item.focus > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item .sub-menu .menu-item:hover > .menu-link, .ast-header-break-point.ast-flyout-menu-enable.ast-header-break-point .main-header-bar-navigation .main-header-menu .menu-item .sub-menu .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, .ast-theme-transparent-header .ast-masthead-custom-menu-items, .ast-theme-transparent-header .ast-masthead-custom-menu-items a, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-link' => array( + 'color' => esc_attr( $transparent_menu_color_mobile ), + ), + '.ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-builder-menu .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .menu-link, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link, .ast-theme-transparent-header .main-header-menu .current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_mobile ), + ), + // Content Section text color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget-title, .ast-theme-transparent-header .site-header-section [CLASS*="ast-header-html-"] .ast-builder-html-element' => array( + 'color' => esc_attr( $transparent_content_section_text_color_mobile ), + ), + // Content Section link color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_mobile ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header div.ast-masthead-custom-menu-items a:hover, .ast-theme-transparent-header div.ast-masthead-custom-menu-items .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ), + ), + ); + + /* Parse CSS from array() */ + if ( 'both' === $transparent_header_devices || 'desktop' === $transparent_header_devices ) { + $css .= astra_parse_css( $transparent_header_base, astra_get_tablet_breakpoint() ); + + // If Transparent header is active on mobile + desktop, enqueue CSS without media queeries. + // If only for desktop add media query for the transparent header. + if ( 'both' === $transparent_header_devices ) { + $css .= astra_parse_css( $transparent_header_desktop ); + } else { + $css .= astra_parse_css( $transparent_header_desktop, astra_get_tablet_breakpoint( '', 1 ) ); + } + } + + if ( 'mobile' === $transparent_header_devices ) { + $css .= astra_parse_css( + array( + '.transparent-custom-logo' => array( + 'display' => 'none', + ), + ), + astra_get_tablet_breakpoint() + ); + + $css .= astra_parse_css( + array( + '.transparent-custom-logo' => array( + 'display' => 'block', + ), + ), + '', + astra_get_tablet_breakpoint() + ); + + $css .= astra_parse_css( + array( + '.ast-transparent-desktop-logo' => array( + 'display' => 'none', + ), + ), + '', + astra_get_tablet_breakpoint() + ); + } + + if ( 'desktop' === $transparent_header_devices ) { + $css .= astra_parse_css( + array( + '.transparent-custom-logo' => array( + 'display' => 'none', + ), + ), + '', + astra_get_tablet_breakpoint() + ); + + $css .= astra_parse_css( + array( + '.ast-transparent-mobile-logo' => array( + 'display' => 'none', + ), + ), + astra_get_tablet_breakpoint() + ); + + $css .= astra_parse_css( + array( + '.ast-transparent-mobile-logo' => array( + 'display' => 'block', + ), + ), + '', + astra_get_tablet_breakpoint() + ); + } + + if ( 'both' === $transparent_header_devices || 'mobile' === $transparent_header_devices ) { + $css .= astra_parse_css( $transparent_header_base, '', astra_get_tablet_breakpoint() ); + $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() ); + $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() ); + } + + $mobile_header_type = astra_get_option( 'mobile-header-type' ); + + if ( 'dropdown' === $mobile_header_type || is_customize_preview() ) { + $header_child_selector = '[CLASS*="-header-wrap"]:nth-last-child(2) > [CLASS*="-header-bar"]'; + } else { + $header_child_selector = '[CLASS*="-header-wrap"]:last-child > [CLASS*="-header-bar"]'; + } + + if ( 'both' === $transparent_header_devices && $transparent_header_separator ) { + + $selector = '.ast-theme-transparent-header .main-header-bar, .ast-theme-transparent-header.ast-header-break-point .main-header-bar'; + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + $selector = '.ast-theme-transparent-header #ast-desktop-header > ' . $header_child_selector . ', .ast-theme-transparent-header.ast-header-break-point #ast-mobile-header > ' . $header_child_selector; + } + + $css .= astra_parse_css( + array( + $selector => array( + 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ), + 'border-bottom-style' => 'solid', + 'border-bottom-color' => esc_attr( $transparent_header_separator_color ), + ), + ) + ); + } + + if ( 'mobile' === $transparent_header_devices && $transparent_header_separator ) { + + $selector = '.ast-theme-transparent-header.ast-header-break-point .main-header-bar'; + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + $selector = '.ast-theme-transparent-header.ast-header-break-point #ast-mobile-header > ' . $header_child_selector; + } + + $css .= astra_parse_css( + array( + $selector => array( + 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ), + 'border-bottom-style' => 'solid', + 'border-bottom-color' => esc_attr( $transparent_header_separator_color ), + ), + ), + '', + astra_get_tablet_breakpoint() + ); + } + + if ( 'desktop' === $transparent_header_devices && $transparent_header_separator ) { + + $selector = '.ast-theme-transparent-header .main-header-bar'; + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + $selector = '.ast-theme-transparent-header #ast-desktop-header > ' . $header_child_selector; + } + + $css .= astra_parse_css( + array( + $selector => array( + 'border-bottom-width' => astra_get_css_value( $transparent_header_separator, 'px' ), + 'border-bottom-style' => 'solid', + 'border-bottom-color' => esc_attr( $transparent_header_separator_color ), + ), + ), + astra_get_tablet_breakpoint() + ); + } + + $dynamic_css .= $css; + + return $dynamic_css; +} diff --git a/inc/addons/transparent-header/classes/dynamic-css/header-sections-dynamic.css.php b/inc/addons/transparent-header/classes/dynamic-css/header-sections-dynamic.css.php index 25acf32..a2dcecf 100644 --- a/inc/addons/transparent-header/classes/dynamic-css/header-sections-dynamic.css.php +++ b/inc/addons/transparent-header/classes/dynamic-css/header-sections-dynamic.css.php @@ -1,561 +1,561 @@ -<?php
-/**
- * Transparent Header - Dynamic CSS
- *
- * @package Astra Addon
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
-}
-
-/**
- * Transparent Above Header
- */
-add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_above_header_sections_dynamic_css' );
-
-/**
- * Dynamic CSS
- *
- * @param string $dynamic_css Astra Dynamic CSS.
- * @param string $dynamic_css_filtered Astra Dynamic CSS Filters.
- * @return String Generated dynamic CSS for above header transparent header.
- */
-function astra_ext_transparent_above_header_sections_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) {
-
- $above_header_layout = astra_get_option( 'above-header-layout', 'disabled' );
-
- if ( 'disabled' === $above_header_layout ) {
- return $dynamic_css;
- }
-
- if ( false == Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) {
- return $dynamic_css;
- }
-
- /**
- * Set colors
- */
-
- $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' );
- $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet' );
- $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile' );
-
- $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' );
- $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' );
- $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' );
-
- $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' );
- $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' );
- $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' );
-
- $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' );
- $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' );
- $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' );
-
- $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' );
- $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' );
- $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' );
-
- $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' );
- $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' );
- $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' );
-
- $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' );
- $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' );
- $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' );
-
- $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' );
- $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' );
- $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' );
-
- $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' );
- $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' );
- $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' );
-
- $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' );
- $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' );
- $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' );
-
- $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' );
- $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' );
- $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' );
-
- $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' );
- $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' );
- $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' );
-
- /**
- * Generate Dynamic CSS
- */
-
- $css = '';
- /**
- * Transparent Header Colors
- */
- $transparent_header_desktop = array(
- '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_desktop ),
- ),
-
- // Content Section text color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_desktop ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_desktop ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ),
- ),
-
- );
-
- $transparent_header_tablet = array(
- '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-section-separated .ast-below-header-actual-nav' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_tablet ),
- ),
-
- // Content Section text color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_tablet ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_tablet ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ),
- ),
- );
-
- $transparent_header_mobile = array(
- '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-section-separated .ast-below-header-actual-nav' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_mobile ),
- ),
-
- // Content Section text color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_mobile ),
- ),
- // Content Section link color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_mobile ),
- ),
- // Content Section link hover color.
- '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ),
- ),
- );
-
- /* Parse CSS from array() */
- $css .= astra_parse_css( $transparent_header_desktop );
- $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() );
- $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() );
-
- return $dynamic_css . $css;
-
-}
-
-
-
-/**
- * Transparent Below Header
- */
-add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_below_header_sections_dynamic_css' );
-
-/**
- * Dynamic CSS
- *
- * @param string $dynamic_css Astra Dynamic CSS.
- * @param string $dynamic_css_filtered Astra Dynamic CSS Filters.
- * @return String Generated dynamic CSS.
- */
-function astra_ext_transparent_below_header_sections_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) {
-
- // set page width depending on site layout.
- $below_header_layout = astra_get_option( 'below-header-layout', 'disabled' );
-
- if ( 'disabled' === $below_header_layout ) {
- return $dynamic_css;
- }
-
- if ( false == Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) {
- return $dynamic_css;
- }
-
- /**
- * Set colors
- */
-
- $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' );
- $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet' );
- $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile' );
-
- $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' );
- $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' );
- $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' );
-
- $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' );
- $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' );
- $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' );
-
- $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' );
- $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' );
- $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' );
-
- $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' );
- $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' );
- $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' );
-
- $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' );
- $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' );
- $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' );
-
- $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' );
- $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' );
- $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' );
-
- $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' );
- $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' );
- $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' );
-
- $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' );
- $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' );
- $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' );
-
- $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' );
- $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' );
- $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' );
-
- $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' );
- $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' );
- $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' );
-
- $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' );
- $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' );
- $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' );
-
- /**
- * Generate Dynamic CSS
- */
-
- $css = '';
- /**
- * Transparent Header Colors
- */
- $transparent_header_desktop = array(
- '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_desktop ),
- ),
- /**
- * Below Header Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array(
- 'color' => esc_attr( $transparent_menu_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_h_color_desktop ),
- ),
-
- /**
- * Below Header Dropdown Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_desktop ),
- ),
-
- /**
- * Content Colors & Typography
- */
- '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_desktop ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ),
- ),
- );
-
- $transparent_header_tablet = array(
-
- '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_tablet ),
- ),
- /**
- * Below Header Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array(
- 'color' => esc_attr( $transparent_menu_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_h_color_tablet ),
- ),
-
- /**
- * Below Header Dropdown Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_tablet ),
- ),
-
- /**
- * Content Colors & Typography
- */
- '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_tablet ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ),
- ),
- );
-
- $transparent_header_mobile = array(
-
- '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array(
- 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array(
- 'background-color' => esc_attr( $transparent_bg_color_mobile ),
- ),
- /**
- * Below Header Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array(
- 'color' => esc_attr( $transparent_menu_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_menu_h_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array(
- 'color' => esc_attr( $transparent_menu_h_color_mobile ),
- ),
-
- /**
- * Below Header Dropdown Navigation
- */
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array(
- 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array(
- 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array(
- 'color' => esc_attr( $transparent_sub_menu_color_mobile ),
- ),
-
- /**
- * Content Colors & Typography
- */
- '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array(
- 'color' => esc_attr( $transparent_content_section_text_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array(
- 'color' => esc_attr( $transparent_content_section_link_color_mobile ),
- ),
-
- '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array(
- 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ),
- ),
- );
-
- /* Parse CSS from array() */
- $css .= astra_parse_css( $transparent_header_desktop );
- $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() );
- $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() );
-
- return $dynamic_css . $css;
-}
+<?php +/** + * Transparent Header - Dynamic CSS + * + * @package Astra Addon + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + +/** + * Transparent Above Header + */ +add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_above_header_sections_dynamic_css' ); + +/** + * Dynamic CSS + * + * @param string $dynamic_css Astra Dynamic CSS. + * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. + * @return String Generated dynamic CSS for above header transparent header. + */ +function astra_ext_transparent_above_header_sections_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { + + $above_header_layout = astra_get_option( 'above-header-layout', 'disabled' ); + + if ( 'disabled' === $above_header_layout ) { + return $dynamic_css; + } + + if ( false == Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) { + return $dynamic_css; + } + + /** + * Set colors + */ + + $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' ); + $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet' ); + $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile' ); + + $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' ); + $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' ); + $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' ); + + $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' ); + $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' ); + $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' ); + + $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' ); + $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' ); + $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' ); + + $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' ); + $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' ); + $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' ); + + $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' ); + $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' ); + $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' ); + + $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' ); + $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' ); + $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' ); + + $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' ); + $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' ); + $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' ); + + $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' ); + $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' ); + $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' ); + + $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' ); + $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' ); + $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' ); + + $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' ); + $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' ); + $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' ); + + $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' ); + $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' ); + $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' ); + + /** + * Generate Dynamic CSS + */ + + $css = ''; + /** + * Transparent Header Colors + */ + $transparent_header_desktop = array( + '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_desktop ), + ), + + // Content Section text color. + '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_desktop ), + ), + // Content Section link color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_desktop ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ), + ), + + ); + + $transparent_header_tablet = array( + '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-section-separated .ast-below-header-actual-nav' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_tablet ), + ), + + // Content Section text color. + '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_tablet ), + ), + // Content Section link color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_tablet ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ), + ), + ); + + $transparent_header_mobile = array( + '.ast-theme-transparent-header .ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-above-header-section-separated .ast-above-header-navigation ul.ast-above-header-menu, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-section-separated .ast-below-header-actual-nav' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-item > .menu-link,.ast-theme-transparent-header .ast-above-header-navigation .menu-item.current-menu-ancestor > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header-navigation .menu-item:hover > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation a, .ast-header-break-point.ast-theme-transparent-header .ast-above-header-navigation > ul.ast-above-header-menu > .menu-item-has-children:not(.current-menu-item) > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .menu-item,.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-above-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-above-header-menu .sub-menu, .ast-theme-transparent-header .ast-above-header-navigation .ast-above-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_mobile ), + ), + + // Content Section text color. + '.ast-theme-transparent-header .ast-above-header-section .user-select, .ast-theme-transparent-header .ast-above-header-section .widget, .ast-theme-transparent-header .ast-above-header-section .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_mobile ), + ), + // Content Section link color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a, .ast-theme-transparent-header .ast-above-header-section .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_mobile ), + ), + // Content Section link hover color. + '.ast-theme-transparent-header .ast-above-header-section .user-select a:hover, .ast-theme-transparent-header .ast-above-header-section .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ), + ), + ); + + /* Parse CSS from array() */ + $css .= astra_parse_css( $transparent_header_desktop ); + $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() ); + $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() ); + + return $dynamic_css . $css; + +} + + + +/** + * Transparent Below Header + */ +add_filter( 'astra_dynamic_theme_css', 'astra_ext_transparent_below_header_sections_dynamic_css' ); + +/** + * Dynamic CSS + * + * @param string $dynamic_css Astra Dynamic CSS. + * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. + * @return String Generated dynamic CSS. + */ +function astra_ext_transparent_below_header_sections_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { + + // set page width depending on site layout. + $below_header_layout = astra_get_option( 'below-header-layout', 'disabled' ); + + if ( 'disabled' === $below_header_layout ) { + return $dynamic_css; + } + + if ( false == Astra_Ext_Transparent_Header_Markup::is_transparent_header() ) { + return $dynamic_css; + } + + /** + * Set colors + */ + + $transparent_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'desktop' ); + $transparent_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'tablet' ); + $transparent_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-header-bg-color-responsive' ), 'mobile' ); + + $transparent_color_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'desktop' ); + $transparent_color_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'tablet' ); + $transparent_color_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-site-title-responsive' ), 'mobile' ); + + $transparent_color_h_site_title_desktop = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'desktop' ); + $transparent_color_h_site_title_tablet = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'tablet' ); + $transparent_color_h_site_title_mobile = astra_get_prop( astra_get_option( 'transparent-header-color-h-site-title-responsive' ), 'mobile' ); + + $transparent_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'desktop' ); + $transparent_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'desktop' ); + $transparent_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'desktop' ); + + $transparent_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'tablet' ); + $transparent_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'tablet' ); + $transparent_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'tablet' ); + + $transparent_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-bg-color-responsive' ), 'mobile' ); + $transparent_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-color-responsive' ), 'mobile' ); + $transparent_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-menu-h-color-responsive' ), 'mobile' ); + + $transparent_sub_menu_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'desktop' ); + $transparent_sub_menu_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'desktop' ); + $transparent_sub_menu_bg_color_desktop = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'desktop' ); + + $transparent_sub_menu_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'tablet' ); + $transparent_sub_menu_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'tablet' ); + $transparent_sub_menu_bg_color_tablet = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'tablet' ); + + $transparent_sub_menu_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-color-responsive' ), 'mobile' ); + $transparent_sub_menu_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-h-color-responsive' ), 'mobile' ); + $transparent_sub_menu_bg_color_mobile = astra_get_prop( astra_get_option( 'transparent-submenu-bg-color-responsive' ), 'mobile' ); + + $transparent_content_section_text_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'desktop' ); + $transparent_content_section_link_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'desktop' ); + $transparent_content_section_link_h_color_desktop = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'desktop' ); + + $transparent_content_section_text_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'tablet' ); + $transparent_content_section_link_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'tablet' ); + $transparent_content_section_link_h_color_tablet = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'tablet' ); + + $transparent_content_section_text_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-text-color-responsive' ), 'mobile' ); + $transparent_content_section_link_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-color-responsive' ), 'mobile' ); + $transparent_content_section_link_h_color_mobile = astra_get_prop( astra_get_option( 'transparent-content-section-link-h-color-responsive' ), 'mobile' ); + + /** + * Generate Dynamic CSS + */ + + $css = ''; + /** + * Transparent Header Colors + */ + $transparent_header_desktop = array( + '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_desktop ), + ), + /** + * Below Header Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array( + 'color' => esc_attr( $transparent_menu_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_h_color_desktop ), + ), + + /** + * Below Header Dropdown Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_desktop ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_desktop ), + ), + + /** + * Content Colors & Typography + */ + '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_desktop ), + ), + + '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_desktop ), + ), + + '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_desktop ), + ), + ); + + $transparent_header_tablet = array( + + '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_tablet ), + ), + /** + * Below Header Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array( + 'color' => esc_attr( $transparent_menu_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_h_color_tablet ), + ), + + /** + * Below Header Dropdown Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_tablet ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_tablet ), + ), + + /** + * Content Colors & Typography + */ + '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_tablet ), + ), + + '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_tablet ), + ), + + '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_tablet ), + ), + ); + + $transparent_header_mobile = array( + + '.ast-theme-transparent-header.ast-no-toggle-below-menu-enable.ast-header-break-point .ast-below-header-navigation-wrap, .ast-theme-transparent-header .ast-below-header-actual-nav, .ast-theme-transparent-header.ast-header-break-point .ast-below-header-actual-nav' => array( + 'background-color' => esc_attr( $transparent_menu_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-below-header .ast-search-menu-icon form' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + '.ast-theme-transparent-header .ast-below-header .slide-search .search-field:focus' => array( + 'background-color' => esc_attr( $transparent_bg_color_mobile ), + ), + /** + * Below Header Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu, .ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu a, .ast-header-break-point.ast-theme-transparent-header .ast-below-header-menu' => array( + 'color' => esc_attr( $transparent_menu_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_menu_h_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-ancestor > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .menu-item.current-menu-item > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .ast-menu-toggle, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .ast-menu-toggle' => array( + 'color' => esc_attr( $transparent_menu_h_color_mobile ), + ), + + /** + * Below Header Dropdown Navigation + */ + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:hover > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item:focus > .menu-item, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.focus > .menu-item' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-ancestor.focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:hover > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item:focus > .menu-link, .ast-theme-transparent-header .ast-below-header-menu .sub-menu .menu-item.current-menu-item.focus > .menu-link' => array( + 'color' => esc_attr( $transparent_sub_menu_h_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu' => array( + 'background-color' => esc_attr( $transparent_sub_menu_bg_color_mobile ), + ), + + '.ast-theme-transparent-header .ast-below-header-menu .sub-menu, .ast-theme-transparent-header .ast-below-header-menu .sub-menu a' => array( + 'color' => esc_attr( $transparent_sub_menu_color_mobile ), + ), + + /** + * Content Colors & Typography + */ + '.ast-theme-transparent-header .below-header-user-select, .ast-theme-transparent-header .below-header-user-select .widget,.ast-theme-transparent-header .below-header-user-select .widget-title' => array( + 'color' => esc_attr( $transparent_content_section_text_color_mobile ), + ), + + '.ast-theme-transparent-header .below-header-user-select a, .ast-theme-transparent-header .below-header-user-select .widget a' => array( + 'color' => esc_attr( $transparent_content_section_link_color_mobile ), + ), + + '.ast-theme-transparent-header .below-header-user-select a:hover, .ast-theme-transparent-header .below-header-user-select .widget a:hover' => array( + 'color' => esc_attr( $transparent_content_section_link_h_color_mobile ), + ), + ); + + /* Parse CSS from array() */ + $css .= astra_parse_css( $transparent_header_desktop ); + $css .= astra_parse_css( $transparent_header_tablet, '', astra_get_tablet_breakpoint() ); + $css .= astra_parse_css( $transparent_header_mobile, '', astra_get_mobile_breakpoint() ); + + return $dynamic_css . $css; +} diff --git a/inc/addons/transparent-header/classes/index.php b/inc/addons/transparent-header/classes/index.php index 02f2fd6..7860b5b 100644 --- a/inc/addons/transparent-header/classes/index.php +++ b/inc/addons/transparent-header/classes/index.php @@ -1,9 +1,9 @@ -<?php
-/**
- * Index file
- *
- * @package Astra Addon
- * @since Astra 1.0.0
- */
-
-/* Silence is golden, and we agree. */
+<?php +/** + * Index file + * + * @package Astra Addon + * @since Astra 1.0.0 + */ + +/* Silence is golden, and we agree. */ diff --git a/inc/addons/transparent-header/classes/sections/class-astra-customizer-colors-transparent-header-configs.php b/inc/addons/transparent-header/classes/sections/class-astra-customizer-colors-transparent-header-configs.php index a6ddb1a..28aae9e 100644 --- a/inc/addons/transparent-header/classes/sections/class-astra-customizer-colors-transparent-header-configs.php +++ b/inc/addons/transparent-header/classes/sections/class-astra-customizer-colors-transparent-header-configs.php @@ -1,252 +1,252 @@ -<?php
-/**
- * Colors and Background - Header Options for our theme.
- *
- * @package Astra Addon
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.4.3
- */
-
-// 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.4.3
- */
-if ( ! class_exists( 'Astra_Customizer_Colors_Transparent_Header_Configs' ) ) {
-
- /**
- * Register Colors and Background - Header Options Customizer Configurations.
- */
- class Astra_Customizer_Colors_Transparent_Header_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Colors and Background - Header Options 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 background overlay color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-bg-color-responsive]',
- 'default' => astra_get_option( 'transparent-header-bg-color-responsive' ),
- 'section' => 'section-transparent-header',
- 'type' => 'control',
- 'priority' => 34,
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Background Overlay', 'astra' ),
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Site Title Color
- */
- array(
- 'name' => 'transparent-header-color-site-title-responsive',
- 'default' => astra_get_option( 'transparent-header-color-site-title-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 1,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'title' => __( 'Normal', 'astra' ),
- 'tab' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Site Title Hover Color
- */
- array(
- 'name' => 'transparent-header-color-h-site-title-responsive',
- 'default' => astra_get_option( 'transparent-header-color-h-site-title-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 1,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'title' => __( 'Hover', 'astra' ),
- 'tab' => __( 'Hover', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Primary Menu Color
- */
- array(
- 'name' => 'transparent-menu-color-responsive',
- 'default' => astra_get_option( 'transparent-menu-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 2,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Menu Background Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-menu-bg-color-responsive]',
- 'default' => astra_get_option( 'transparent-menu-bg-color-responsive' ),
- 'type' => 'control',
- 'priority' => 36,
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Background', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- ),
-
- /**
- * Option: Menu Hover Color
- */
- array(
- 'name' => 'transparent-menu-h-color-responsive',
- 'default' => astra_get_option( 'transparent-menu-h-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 3,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Hover', 'astra' ),
- 'title' => __( 'Hover / Active', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Sub menu text color.
- */
- array(
- 'name' => 'transparent-submenu-color-responsive',
- 'default' => astra_get_option( 'transparent-submenu-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 3,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Sub menu background color.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-submenu-bg-color-responsive]',
- 'default' => astra_get_option( 'transparent-submenu-bg-color-responsive' ),
- 'type' => 'control',
- 'priority' => 38,
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Background', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- ),
-
- /**
- * Option: Sub menu active hover color.
- */
- array(
- 'name' => 'transparent-submenu-h-color-responsive',
- 'default' => astra_get_option( 'transparent-submenu-h-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 3,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Hover', 'astra' ),
- 'title' => __( 'Hover / Active', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Content Section Link color.
- */
- array(
- 'name' => 'transparent-content-section-link-color-responsive',
- 'default' => astra_get_option( 'transparent-content-section-link-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 4,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]',
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
-
- /**
- * Option: Content Section Link Hover color.
- */
- array(
- 'name' => 'transparent-content-section-link-h-color-responsive',
- 'default' => astra_get_option( 'transparent-content-section-link-h-color-responsive' ),
- 'type' => 'sub-control',
- 'priority' => 4,
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]',
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'tab' => __( 'Hover', 'astra' ),
- 'title' => __( 'Hover', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- ),
- );
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Customizer_Colors_Transparent_Header_Configs();
+<?php +/** + * Colors and Background - Header Options for our theme. + * + * @package Astra Addon + * @author Brainstorm Force + * @copyright Copyright (c) 2020, Brainstorm Force + * @link https://www.brainstormforce.com + * @since Astra 1.4.3 + */ + +// 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.4.3 + */ +if ( ! class_exists( 'Astra_Customizer_Colors_Transparent_Header_Configs' ) ) { + + /** + * Register Colors and Background - Header Options Customizer Configurations. + */ + class Astra_Customizer_Colors_Transparent_Header_Configs extends Astra_Customizer_Config_Base { + + /** + * Register Colors and Background - Header Options 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 background overlay color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-bg-color-responsive]', + 'default' => astra_get_option( 'transparent-header-bg-color-responsive' ), + 'section' => 'section-transparent-header', + 'type' => 'control', + 'priority' => 34, + 'transport' => 'postMessage', + 'control' => 'ast-responsive-color', + 'title' => __( 'Background Overlay', 'astra' ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Site Title Color + */ + array( + 'name' => 'transparent-header-color-site-title-responsive', + 'default' => astra_get_option( 'transparent-header-color-site-title-responsive' ), + 'type' => 'sub-control', + 'priority' => 1, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'title' => __( 'Normal', 'astra' ), + 'tab' => __( 'Normal', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Site Title Hover Color + */ + array( + 'name' => 'transparent-header-color-h-site-title-responsive', + 'default' => astra_get_option( 'transparent-header-color-h-site-title-responsive' ), + 'type' => 'sub-control', + 'priority' => 1, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'title' => __( 'Hover', 'astra' ), + 'tab' => __( 'Hover', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Primary Menu Color + */ + array( + 'name' => 'transparent-menu-color-responsive', + 'default' => astra_get_option( 'transparent-menu-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 2, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Normal', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Menu Background Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-menu-bg-color-responsive]', + 'default' => astra_get_option( 'transparent-menu-bg-color-responsive' ), + 'type' => 'control', + 'priority' => 36, + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'control' => 'ast-responsive-color', + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Background', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Menu Hover Color + */ + array( + 'name' => 'transparent-menu-h-color-responsive', + 'default' => astra_get_option( 'transparent-menu-h-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 3, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Hover', 'astra' ), + 'title' => __( 'Hover / Active', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Sub menu text color. + */ + array( + 'name' => 'transparent-submenu-color-responsive', + 'default' => astra_get_option( 'transparent-submenu-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 3, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Normal', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Sub menu background color. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-submenu-bg-color-responsive]', + 'default' => astra_get_option( 'transparent-submenu-bg-color-responsive' ), + 'type' => 'control', + 'priority' => 38, + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Background', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Sub menu active hover color. + */ + array( + 'name' => 'transparent-submenu-h-color-responsive', + 'default' => astra_get_option( 'transparent-submenu-h-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 3, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Hover', 'astra' ), + 'title' => __( 'Hover / Active', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Content Section Link color. + */ + array( + 'name' => 'transparent-content-section-link-color-responsive', + 'default' => astra_get_option( 'transparent-content-section-link-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 4, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]', + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'control' => 'ast-responsive-color', + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Normal', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + + /** + * Option: Content Section Link Hover color. + */ + array( + 'name' => 'transparent-content-section-link-h-color-responsive', + 'default' => astra_get_option( 'transparent-content-section-link-h-color-responsive' ), + 'type' => 'sub-control', + 'priority' => 4, + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]', + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'control' => 'ast-responsive-color', + 'tab' => __( 'Hover', 'astra' ), + 'title' => __( 'Hover', 'astra' ), + 'responsive' => true, + 'rgba' => true, + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Customizer_Colors_Transparent_Header_Configs(); diff --git a/inc/addons/transparent-header/classes/sections/class-astra-customizer-transparent-header-configs.php b/inc/addons/transparent-header/classes/sections/class-astra-customizer-transparent-header-configs.php index fc820fb..693c2b2 100644 --- a/inc/addons/transparent-header/classes/sections/class-astra-customizer-transparent-header-configs.php +++ b/inc/addons/transparent-header/classes/sections/class-astra-customizer-transparent-header-configs.php @@ -1,1200 +1,1200 @@ -<?php
-/**
- * Transparent Header Options for our theme.
- *
- * @package Astra Addon
- * @author Brainstorm Force
- * @copyright Copyright (c) 2020, Brainstorm Force
- * @link https://www.brainstormforce.com
- * @since Astra 1.4.3
- */
-
-// 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.4.3
- */
-if ( ! class_exists( 'Astra_Customizer_Transparent_Header_Configs' ) ) {
-
- /**
- * Register Transparent Header Customizer Configurations.
- */
- class Astra_Customizer_Transparent_Header_Configs extends Astra_Customizer_Config_Base {
-
- /**
- * Register Transparent Header 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 = 'section-transparent-header';
-
- $_configs = array(
-
- /**
- * Option: Enable Transparent Header
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'default' => astra_get_option( 'transparent-header-enable' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Enable on Complete Website', 'astra' ),
- 'priority' => 20,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Transparent Header on Archive Pages
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-archive]',
- 'default' => astra_get_option( 'transparent-header-disable-archive' ),
- 'type' => 'control',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'operator' => '==',
- 'value' => '1',
- ),
- ),
- 'title' => __( 'Disable on 404, Search & Archives?', 'astra' ),
- 'description' => __( 'This setting is generally not recommended on special pages such as archive, search, 404, etc. If you would like to enable it, uncheck this option', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Disable Transparent Header on Archive Pages
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-index]',
- 'default' => astra_get_option( 'transparent-header-disable-index' ),
- 'type' => 'control',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'operator' => '==',
- 'value' => '1',
- ),
- ),
- 'title' => __( 'Disable on Blog page?', 'astra' ),
- 'description' => __( 'Blog Page is when Latest Posts are selected to be displayed on a particular page.', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
-
- /**
- * Option: Disable Transparent Header on Your latest posts index Page
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-latest-posts-index]',
- 'default' => astra_get_option( 'transparent-header-disable-latest-posts-index' ),
- 'type' => 'control',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'operator' => '==',
- 'value' => '1',
- ),
- ),
- 'title' => __( 'Disable on Latest Posts Page?', 'astra' ),
- 'description' => __( "Latest Posts page is your site's front page when the latest posts are displayed on the home page.", 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
-
- /**
- * Option: Disable Transparent Header on Pages
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-page]',
- 'default' => astra_get_option( 'transparent-header-disable-page' ),
- 'type' => 'control',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'operator' => '==',
- 'value' => '1',
- ),
- ),
- 'title' => __( 'Disable on Pages?', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
-
- /**
- * Option: Disable Transparent Header on Posts
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-posts]',
- 'default' => astra_get_option( 'transparent-header-disable-posts' ),
- 'type' => 'control',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]',
- 'operator' => '==',
- 'value' => '1',
- ),
- ),
- 'title' => __( 'Disable on Posts?', 'astra' ),
- 'priority' => 25,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Sticky Header Display On
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-on-devices]',
- 'default' => astra_get_option( 'transparent-header-on-devices' ),
- 'type' => 'control',
- 'section' => $_section,
- 'priority' => 27,
- 'title' => __( 'Enable On', 'astra' ),
- 'control' => 'ast-selector',
- 'choices' => array(
- 'desktop' => __( 'Desktop', 'astra' ),
- 'mobile' => __( 'Mobile', 'astra' ),
- 'both' => __( 'Desktop + Mobile', 'astra' ),
- ),
- 'responsive' => false,
- 'renderAs' => 'text',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'default' => astra_get_option( 'different-transparent-logo', false ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Different Logo for Transparent Header?', 'astra' ),
- 'priority' => 30,
- 'control' => 'ast-toggle-control',
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-logo-separator]',
- 'type' => 'control',
- 'section' => $_section,
- 'settings' => array(),
- 'priority' => 30,
- 'control' => 'ast-divider',
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- ),
-
- /**
- * Option: Transparent header logo selector
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]',
- 'default' => astra_get_option( 'transparent-header-logo' ),
- 'type' => 'control',
- 'control' => 'image',
- 'sanitize_callback' => 'esc_url_raw',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'priority' => 30.1,
- 'title' => __( 'Logo', 'astra' ),
- 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
- 'partial' => array(
- 'selector' => '.ast-replace-site-logo-transparent .site-branding .site-logo-img',
- 'container_inclusive' => false,
- ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Different retina logo
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-retina-logo]',
- 'default' => astra_get_option( 'different-transparent-retina-logo' ),
- 'type' => 'control',
- 'section' => $_section,
- 'title' => __( 'Different Logo For Retina Devices?', 'astra' ),
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'priority' => 30.2,
- 'control' => 'ast-toggle-control',
- 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ),
- ),
-
- /**
- * Option: Transparent header logo selector
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-retina-logo]',
- 'default' => astra_get_option( 'transparent-header-retina-logo' ),
- 'type' => 'control',
- 'control' => 'image',
- 'sanitize_callback' => 'esc_url_raw',
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-retina-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'priority' => 30.3,
- 'title' => __( 'Retina Logo', 'astra' ),
- 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ),
- 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
- ),
-
- /**
- * Option: Transparent header logo width
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-logo-width]',
- 'default' => astra_get_option( 'transparent-header-logo-width' ),
- 'type' => 'control',
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-slider',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
- 'section' => $_section,
- 'context' => array(
- Astra_Builder_Helper::$general_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]',
- 'operator' => '==',
- 'value' => true,
- ),
- ),
- 'suffix' => 'px',
- 'priority' => 30.4,
- 'title' => __( 'Logo Width', 'astra' ),
- 'input_attrs' => array(
- 'min' => 50,
- 'step' => 1,
- 'max' => 600,
- ),
- ),
-
- /**
- * Option: Bottom Border Size
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep]',
- 'default' => astra_get_option( 'transparent-header-main-sep' ),
- 'type' => 'control',
- 'transport' => 'postMessage',
- 'control' => 'ast-slider',
- 'section' => $_section,
- 'priority' => 32,
- 'title' => __( 'Bottom Border Size', 'astra' ),
- 'suffix' => 'px',
- 'input_attrs' => array(
- 'min' => 0,
- 'step' => 1,
- 'max' => 600,
- ),
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- ),
-
- /**
- * Option: Bottom Border Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep-color]',
- 'default' => astra_get_option( 'transparent-header-main-sep-color' ),
- 'type' => 'control',
- 'transport' => 'postMessage',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => $_section,
- 'priority' => 32,
- 'title' => __( 'Bottom Border Color', 'astra' ),
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep]',
- 'operator' => '>=',
- 'value' => 1,
- ),
- ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config,
- ),
- ),
-
- /**
- * Option: Transparent Header Styling
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[divider-sec-transparent-styling]',
- 'type' => 'control',
- 'control' => 'ast-heading',
- 'section' => $_section,
- 'title' => __( 'Colors & Background', 'astra' ),
- 'priority' => 32,
- 'settings' => array(),
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]',
- 'default' => astra_get_option( 'transparent-header-colors' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Site Title', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 34,
- 'context' => ( Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- 'responsive' => true,
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- ),
-
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]',
- 'default' => astra_get_option( 'transparent-header-colors-menu' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Text / Link', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 35,
- 'context' => ( Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- 'responsive' => true,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Menu Color', 'astra' ),
- ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]',
- 'default' => astra_get_option( 'transparent-header-colors-submenu' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Text / Link', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 37,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- 'responsive' => true,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Submenu Color', 'astra' ),
- ),
- ),
- );
-
- if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
- $_hfb_configs = array(
- /**
- * Option: Header Builder Tabs
- */
- array(
- 'name' => $_section . '-ast-context-tabs',
- 'section' => $_section,
- 'type' => 'control',
- 'control' => 'ast-builder-header-control',
- 'priority' => 0,
- 'description' => '',
- ),
-
- /**
- * Option: Transparent Header Builder - Social Element configs.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]',
- 'default' => astra_get_option( 'transparent-header-social-colors-content' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Text', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 40,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'responsive' => true,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Social Color', 'astra' ),
- ),
- ),
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]',
- 'default' => astra_get_option( 'transparent-header-social-colors-content' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Background', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 40,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'responsive' => true,
- ),
-
-
- /**
- * Option: Social Text Color
- */
- array(
- 'name' => 'transparent-header-social-icons-color',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'transparent-header-social-icons-color' ),
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Normal', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 5,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'title' => __( 'Normal', 'astra' ),
- ),
-
- /**
- * Option: Social Text Hover Color
- */
- array(
- 'name' => 'transparent-header-social-icons-h-color',
- 'default' => astra_get_option( 'transparent-header-social-icons-h-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Hover', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 7,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'title' => __( 'Hover', 'astra' ),
- ),
-
- /**
- * Option: Social Background Color
- */
- array(
- 'name' => 'transparent-header-social-icons-bg-color',
- 'default' => astra_get_option( 'transparent-header-social-icons-bg-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Normal', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 9,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'title' => __( 'Normal', 'astra' ),
- ),
-
- /**
- * Option: Social Background Hover Color
- */
- array(
- 'name' => 'transparent-header-social-icons-bg-h-color',
- 'default' => astra_get_option( 'transparent-header-social-icons-bg-h-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Hover', 'astra' ),
- 'control' => 'ast-responsive-color',
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 11,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'title' => __( 'Hover', 'astra' ),
- ),
-
- /**
- * Option: Transparent Header Builder - HTML Elements configs.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]',
- 'default' => astra_get_option( 'transparent-header-html-colors-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Link', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 75,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: HTML Text Color.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-html-text-color]',
- 'default' => astra_get_option( 'transparent-header-html-text-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 74,
- 'title' => __( 'Text', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'HTML Color', 'astra' ),
- ),
- ),
-
- // Option: HTML Link Color.
- array(
- 'name' => 'transparent-header-html-link-color',
- 'default' => astra_get_option( 'transparent-header-html-link-color' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 5,
- 'title' => __( 'Normal', 'astra' ),
- 'context' => Astra_Builder_Helper::$general_tab,
- ),
-
- // Option: HTML Link Hover Color.
- array(
- 'name' => 'transparent-header-html-link-h-color',
- 'default' => astra_get_option( 'transparent-header-html-link-h-color' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 5,
- 'title' => __( 'Hover', 'astra' ),
- 'context' => Astra_Builder_Helper::$general_tab,
- ),
-
- /**
- * Option: Transparent Header Builder - Search Elements configs.
- */
-
- // Option: Search Color.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-icon-color]',
- 'default' => astra_get_option( 'transparent-header-search-icon-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 45,
- 'title' => __( 'Icon', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
-
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Search Color', 'astra' ),
- ),
- ),
-
- /**
- * Search Box Background Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-box-background-color]',
- 'default' => astra_get_option( 'transparent-header-search-box-background-color' ),
- 'type' => 'control',
- 'section' => 'section-transparent-header',
- 'priority' => 45,
- 'transport' => 'postMessage',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'title' => __( 'Box Background', 'astra' ),
- 'context' => array(
- Astra_Builder_Helper::$design_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-search-box-type]',
- 'operator' => 'in',
- 'value' => array( 'slide-search', 'search-box' ),
- ),
- ),
- ),
-
- /**
- * Option: Transparent Header Builder - Widget Elements configs.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]',
- 'default' => astra_get_option( 'transparent-header-widget-colors-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Link', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 50,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Widget Title Color.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-title-color]',
- 'default' => astra_get_option( 'transparent-header-widget-title-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 49,
- 'title' => __( 'Title', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Widget Color', 'astra' ),
- ),
- ),
-
- // Option: Widget Content Color.
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-content-color]',
- 'default' => astra_get_option( 'transparent-header-widget-content-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 49,
- 'title' => __( 'Content', 'astra' ),
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Widget Link Color.
- array(
- 'name' => 'transparent-header-widget-link-color',
- 'default' => astra_get_option( 'transparent-header-widget-link-color' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 15,
- 'tab' => __( 'Normal', 'astra' ),
- 'title' => __( 'Normal', 'astra' ),
- 'context' => Astra_Builder_Helper::$general_tab,
- ),
-
- // Option: Widget Link Hover Color.
- array(
- 'name' => 'transparent-header-widget-link-h-color',
- 'default' => astra_get_option( 'transparent-header-widget-link-h-color' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]',
- 'type' => 'sub-control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'tab' => __( 'Hover', 'astra' ),
- 'priority' => 20,
- 'title' => __( 'Hover', 'astra' ),
- 'context' => Astra_Builder_Helper::$general_tab,
- ),
-
- /**
- * Group: Transparent Header Button Colors Group
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]',
- 'default' => astra_get_option( 'transparent-header-buttons-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Text', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 60,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'HTML Color', 'astra' ),
- ),
- ),
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]',
- 'default' => astra_get_option( 'transparent-header-buttons-group' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Background', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 60,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- /**
- * Option: Button Text Color
- */
- array(
- 'name' => 'transparent-header-button-text-color',
- 'transport' => 'postMessage',
- 'default' => astra_get_option( 'transparent-header-button-text-color' ),
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Normal', 'astra' ),
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'priority' => 5,
- 'title' => __( 'Normal', 'astra' ),
- ),
-
- /**
- * Option: Button Text Hover Color
- */
- array(
- 'name' => 'transparent-header-button-text-h-color',
- 'default' => astra_get_option( 'transparent-header-button-text-h-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Hover', 'astra' ),
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'priority' => 7,
- 'title' => __( 'Hover', 'astra' ),
- ),
-
- /**
- * Option: Button Background Color
- */
- array(
- 'name' => 'transparent-header-button-bg-color',
- 'default' => astra_get_option( 'transparent-header-button-bg-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Normal', 'astra' ),
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'priority' => 9,
- 'title' => __( 'Normal', 'astra' ),
- ),
-
- /**
- * Option: Button Button Hover Color
- */
- array(
- 'name' => 'transparent-header-button-bg-h-color',
- 'default' => astra_get_option( 'transparent-header-button-bg-h-color' ),
- 'transport' => 'postMessage',
- 'type' => 'sub-control',
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]',
- 'section' => 'section-transparent-header',
- 'tab' => __( 'Hover', 'astra' ),
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'priority' => 11,
- 'title' => __( 'Hover', 'astra' ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-icon-color]',
- 'default' => astra_get_option( 'transparent-account-icon-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 65,
- 'title' => __( 'Icon', 'astra' ),
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Account', 'astra' ),
- ),
- 'context' => array(
- Astra_Builder_Helper::$design_tab_config,
- array(
- 'relation' => 'OR',
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
- 'operator' => '==',
- 'value' => 'icon',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
- 'operator' => '==',
- 'value' => 'text',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ),
- ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-type-text-color]',
- 'default' => astra_get_option( 'transparent-account-type-text-color' ),
- 'type' => 'control',
- 'section' => $_section,
- 'priority' => 65,
- 'transport' => 'postMessage',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'title' => __( 'Text', 'astra' ),
- 'context' => array(
- Astra_Builder_Helper::$design_tab_config,
- array(
- 'relation' => 'OR',
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
- 'operator' => '==',
- 'value' => 'icon',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]',
- 'operator' => '==',
- 'value' => 'text',
- ),
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]',
- 'operator' => '!=',
- 'value' => 'none',
- ),
- ),
- ),
- ),
-
- /**
- * Option: Toggle Button Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-btn-color]',
- 'default' => astra_get_option( 'transparent-header-toggle-btn-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'title' => __( 'Icon', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 70,
- 'context' => Astra_Builder_Helper::$design_tab,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Toggle Color', 'astra' ),
- ),
- ),
-
- /**
- * Option: Toggle Button Bg Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-btn-bg-color]',
- 'default' => astra_get_option( 'transparent-header-toggle-btn-bg-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'title' => __( 'Background', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 70,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- /**
- * Option: Toggle Button Border Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-border-color]',
- 'default' => astra_get_option( 'transparent-header-toggle-border-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'title' => __( 'Border', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 70,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
- );
-
- $_configs = array_merge( $_configs, $_hfb_configs );
-
- } else {
- $_old_content_configs = array(
-
- /**
- * Option: Content Section Text color.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-content-section-text-color-responsive]',
- 'default' => astra_get_option( 'transparent-content-section-text-color-responsive' ),
- 'type' => 'control',
- 'priority' => 39,
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'control' => 'ast-responsive-color',
- 'title' => __( 'Text', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'divider' => array(
- 'ast_class' => 'ast-top-divider',
- 'ast_title' => __( 'Content', 'astra' ),
- ),
- ),
- /**
- * Option: Header Builder Tabs
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]',
- 'default' => astra_get_option( 'transparent-header-colors-content' ),
- 'type' => 'control',
- 'control' => 'ast-color-group',
- 'title' => __( 'Link', 'astra' ),
- 'section' => $_section,
- 'transport' => 'postMessage',
- 'priority' => 39,
- 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab,
- 'responsive' => true,
- ),
- );
-
- $_configs = array_merge( $_configs, $_old_content_configs );
- }
-
- if ( defined( 'ASTRA_EXT_VER' ) && ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ) {
-
- $pro_elements_transparent_config = array(
-
- /**
- * Search Box Background Color
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-box-placeholder-color]',
- 'default' => astra_get_option( 'transparent-header-search-box-placeholder-color' ),
- 'type' => 'control',
- 'section' => 'section-transparent-header',
- 'priority' => 45,
- 'transport' => 'postMessage',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'title' => __( 'Text / Placeholder', 'astra' ),
- 'context' => array(
- Astra_Builder_Helper::$design_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-search-box-type]',
- 'operator' => 'in',
- 'value' => array( 'slide-search', 'search-box' ),
- ),
- ),
- ),
-
- /**
- * Option: Transparent Header Builder - Divider Elements configs.
- */
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-divider-color]',
- 'default' => astra_get_option( 'transparent-header-divider-color' ),
- 'type' => 'control',
- 'control' => 'ast-color',
- 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
- 'transport' => 'postMessage',
- 'priority' => 64,
- 'title' => __( 'Divider', 'astra' ),
- 'section' => 'section-transparent-header',
- 'context' => Astra_Builder_Helper::$design_tab,
- 'divider' => array( 'ast_class' => 'ast-top-divider' ),
- ),
-
- array(
- 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'default' => astra_get_option( 'transparent-account-menu-colors' ),
- 'type' => 'control',
- 'control' => 'ast-settings-group',
- 'title' => __( 'Account Menu Color', 'astra' ),
- 'section' => 'section-transparent-header',
- 'transport' => 'postMessage',
- 'priority' => 66,
- 'context' => array(
- Astra_Builder_Helper::$design_tab_config,
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]',
- 'operator' => '==',
- 'value' => 'menu',
- ),
- ),
- ),
-
- // Option: Menu Color.
- array(
- 'name' => 'transparent-account-menu-color-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-color-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'type' => 'sub-control',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Normal', 'astra' ),
- 'section' => 'section-transparent-header',
- 'title' => __( 'Link / Text Color', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 7,
- 'context' => array(
- array(
- 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]',
- 'operator' => '==',
- 'value' => 'menu',
- ),
- Astra_Builder_Helper::$design_tab,
- ),
- ),
-
- // Option: Background Color.
- array(
- 'name' => 'transparent-account-menu-bg-obj-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-bg-obj-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'type' => 'sub-control',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'section' => 'section-transparent-header',
- 'title' => __( 'Background Color', 'astra' ),
- 'tab' => __( 'Normal', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 8,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Menu Hover Color.
- array(
- 'name' => 'transparent-account-menu-h-color-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-h-color-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'tab' => __( 'Hover', 'astra' ),
- 'type' => 'sub-control',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'title' => __( 'Link Color', 'astra' ),
- 'section' => 'section-transparent-header',
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 19,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Menu Hover Background Color.
- array(
- 'name' => 'transparent-account-menu-h-bg-color-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-h-bg-color-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'type' => 'sub-control',
- 'title' => __( 'Background Color', 'astra' ),
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Hover', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 21,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Active Menu Color.
- array(
- 'name' => 'transparent-account-menu-a-color-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-a-color-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'type' => 'sub-control',
- 'section' => 'section-transparent-header',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'tab' => __( 'Active', 'astra' ),
- 'title' => __( 'Link Color', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 31,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
-
- // Option: Active Menu Background Color.
- array(
- 'name' => 'transparent-account-menu-a-bg-color-responsive',
- 'default' => astra_get_option( 'transparent-account-menu-a-bg-color-responsive' ),
- 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]',
- 'type' => 'sub-control',
- 'control' => 'ast-responsive-color',
- 'transport' => 'postMessage',
- 'section' => 'section-transparent-header',
- 'title' => __( 'Background Color', 'astra' ),
- 'tab' => __( 'Active', 'astra' ),
- 'responsive' => true,
- 'rgba' => true,
- 'priority' => 33,
- 'context' => Astra_Builder_Helper::$design_tab,
- ),
- );
-
- $_configs = array_merge( $_configs, $pro_elements_transparent_config );
- }
-
- return array_merge( $configurations, $_configs );
- }
- }
-}
-
-/**
- * Kicking this off by calling 'get_instance()' method
- */
-new Astra_Customizer_Transparent_Header_Configs();
+<?php +/** + * Transparent Header Options for our theme. + * + * @package Astra Addon + * @author Brainstorm Force + * @copyright Copyright (c) 2020, Brainstorm Force + * @link https://www.brainstormforce.com + * @since Astra 1.4.3 + */ + +// 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.4.3 + */ +if ( ! class_exists( 'Astra_Customizer_Transparent_Header_Configs' ) ) { + + /** + * Register Transparent Header Customizer Configurations. + */ + class Astra_Customizer_Transparent_Header_Configs extends Astra_Customizer_Config_Base { + + /** + * Register Transparent Header 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 = 'section-transparent-header'; + + $_configs = array( + + /** + * Option: Enable Transparent Header + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'default' => astra_get_option( 'transparent-header-enable' ), + 'type' => 'control', + 'section' => $_section, + 'title' => __( 'Enable on Complete Website', 'astra' ), + 'priority' => 20, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Disable Transparent Header on Archive Pages + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-archive]', + 'default' => astra_get_option( 'transparent-header-disable-archive' ), + 'type' => 'control', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'operator' => '==', + 'value' => '1', + ), + ), + 'title' => __( 'Disable on 404, Search & Archives?', 'astra' ), + 'description' => __( 'This setting is generally not recommended on special pages such as archive, search, 404, etc. If you would like to enable it, uncheck this option', 'astra' ), + 'priority' => 25, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Disable Transparent Header on Archive Pages + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-index]', + 'default' => astra_get_option( 'transparent-header-disable-index' ), + 'type' => 'control', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'operator' => '==', + 'value' => '1', + ), + ), + 'title' => __( 'Disable on Blog page?', 'astra' ), + 'description' => __( 'Blog Page is when Latest Posts are selected to be displayed on a particular page.', 'astra' ), + 'priority' => 25, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + + /** + * Option: Disable Transparent Header on Your latest posts index Page + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-latest-posts-index]', + 'default' => astra_get_option( 'transparent-header-disable-latest-posts-index' ), + 'type' => 'control', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'operator' => '==', + 'value' => '1', + ), + ), + 'title' => __( 'Disable on Latest Posts Page?', 'astra' ), + 'description' => __( "Latest Posts page is your site's front page when the latest posts are displayed on the home page.", 'astra' ), + 'priority' => 25, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + + /** + * Option: Disable Transparent Header on Pages + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-page]', + 'default' => astra_get_option( 'transparent-header-disable-page' ), + 'type' => 'control', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'operator' => '==', + 'value' => '1', + ), + ), + 'title' => __( 'Disable on Pages?', 'astra' ), + 'priority' => 25, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + + /** + * Option: Disable Transparent Header on Posts + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-disable-posts]', + 'default' => astra_get_option( 'transparent-header-disable-posts' ), + 'type' => 'control', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-enable]', + 'operator' => '==', + 'value' => '1', + ), + ), + 'title' => __( 'Disable on Posts?', 'astra' ), + 'priority' => 25, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Sticky Header Display On + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-on-devices]', + 'default' => astra_get_option( 'transparent-header-on-devices' ), + 'type' => 'control', + 'section' => $_section, + 'priority' => 27, + 'title' => __( 'Enable On', 'astra' ), + 'control' => 'ast-selector', + 'choices' => array( + 'desktop' => __( 'Desktop', 'astra' ), + 'mobile' => __( 'Mobile', 'astra' ), + 'both' => __( 'Desktop + Mobile', 'astra' ), + ), + 'responsive' => false, + 'renderAs' => 'text', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + + array( + 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'default' => astra_get_option( 'different-transparent-logo', false ), + 'type' => 'control', + 'section' => $_section, + 'title' => __( 'Different Logo for Transparent Header?', 'astra' ), + 'priority' => 30, + 'control' => 'ast-toggle-control', + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-logo-separator]', + 'type' => 'control', + 'section' => $_section, + 'settings' => array(), + 'priority' => 30, + 'control' => 'ast-divider', + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + ), + + /** + * Option: Transparent header logo selector + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-logo]', + 'default' => astra_get_option( 'transparent-header-logo' ), + 'type' => 'control', + 'control' => 'image', + 'sanitize_callback' => 'esc_url_raw', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'priority' => 30.1, + 'title' => __( 'Logo', 'astra' ), + 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), + 'partial' => array( + 'selector' => '.ast-replace-site-logo-transparent .site-branding .site-logo-img', + 'container_inclusive' => false, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Different retina logo + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[different-transparent-retina-logo]', + 'default' => astra_get_option( 'different-transparent-retina-logo' ), + 'type' => 'control', + 'section' => $_section, + 'title' => __( 'Different Logo For Retina Devices?', 'astra' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'priority' => 30.2, + 'control' => 'ast-toggle-control', + 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), + ), + + /** + * Option: Transparent header logo selector + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-retina-logo]', + 'default' => astra_get_option( 'transparent-header-retina-logo' ), + 'type' => 'control', + 'control' => 'image', + 'sanitize_callback' => 'esc_url_raw', + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-retina-logo]', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'priority' => 30.3, + 'title' => __( 'Retina Logo', 'astra' ), + 'library_filter' => array( 'gif', 'jpg', 'jpeg', 'png', 'ico' ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Transparent header logo width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-logo-width]', + 'default' => astra_get_option( 'transparent-header-logo-width' ), + 'type' => 'control', + 'transport' => 'postMessage', + 'control' => 'ast-responsive-slider', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), + 'section' => $_section, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[different-transparent-logo]', + 'operator' => '==', + 'value' => true, + ), + ), + 'suffix' => 'px', + 'priority' => 30.4, + 'title' => __( 'Logo Width', 'astra' ), + 'input_attrs' => array( + 'min' => 50, + 'step' => 1, + 'max' => 600, + ), + ), + + /** + * Option: Bottom Border Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep]', + 'default' => astra_get_option( 'transparent-header-main-sep' ), + 'type' => 'control', + 'transport' => 'postMessage', + 'control' => 'ast-slider', + 'section' => $_section, + 'priority' => 32, + 'title' => __( 'Bottom Border Size', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 0, + 'step' => 1, + 'max' => 600, + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Bottom Border Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep-color]', + 'default' => astra_get_option( 'transparent-header-main-sep-color' ), + 'type' => 'control', + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => $_section, + 'priority' => 32, + 'title' => __( 'Bottom Border Color', 'astra' ), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[transparent-header-main-sep]', + 'operator' => '>=', + 'value' => 1, + ), + ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab_config : Astra_Builder_Helper::$general_tab_config, + ), + ), + + /** + * Option: Transparent Header Styling + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-sec-transparent-styling]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => $_section, + 'title' => __( 'Colors & Background', 'astra' ), + 'priority' => 32, + 'settings' => array(), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors]', + 'default' => astra_get_option( 'transparent-header-colors' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Site Title', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 34, + 'context' => ( Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + 'responsive' => true, + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + ), + + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-menu]', + 'default' => astra_get_option( 'transparent-header-colors-menu' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Text / Link', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 35, + 'context' => ( Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + 'responsive' => true, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Menu Color', 'astra' ), + ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-submenu]', + 'default' => astra_get_option( 'transparent-header-colors-submenu' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Text / Link', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 37, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + 'responsive' => true, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Submenu Color', 'astra' ), + ), + ), + ); + + if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { + $_hfb_configs = array( + /** + * Option: Header Builder Tabs + */ + array( + 'name' => $_section . '-ast-context-tabs', + 'section' => $_section, + 'type' => 'control', + 'control' => 'ast-builder-header-control', + 'priority' => 0, + 'description' => '', + ), + + /** + * Option: Transparent Header Builder - Social Element configs. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]', + 'default' => astra_get_option( 'transparent-header-social-colors-content' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Text', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 40, + 'context' => Astra_Builder_Helper::$design_tab, + 'responsive' => true, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Social Color', 'astra' ), + ), + ), + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]', + 'default' => astra_get_option( 'transparent-header-social-colors-content' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Background', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 40, + 'context' => Astra_Builder_Helper::$design_tab, + 'responsive' => true, + ), + + + /** + * Option: Social Text Color + */ + array( + 'name' => 'transparent-header-social-icons-color', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'transparent-header-social-icons-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-responsive-color', + 'responsive' => true, + 'rgba' => true, + 'priority' => 5, + 'context' => Astra_Builder_Helper::$design_tab, + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Social Text Hover Color + */ + array( + 'name' => 'transparent-header-social-icons-h-color', + 'default' => astra_get_option( 'transparent-header-social-icons-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-text-colors-content]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-responsive-color', + 'responsive' => true, + 'rgba' => true, + 'priority' => 7, + 'context' => Astra_Builder_Helper::$design_tab, + 'title' => __( 'Hover', 'astra' ), + ), + + /** + * Option: Social Background Color + */ + array( + 'name' => 'transparent-header-social-icons-bg-color', + 'default' => astra_get_option( 'transparent-header-social-icons-bg-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-responsive-color', + 'responsive' => true, + 'rgba' => true, + 'priority' => 9, + 'context' => Astra_Builder_Helper::$design_tab, + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Social Background Hover Color + */ + array( + 'name' => 'transparent-header-social-icons-bg-h-color', + 'default' => astra_get_option( 'transparent-header-social-icons-bg-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-social-background-colors-content]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-responsive-color', + 'responsive' => true, + 'rgba' => true, + 'priority' => 11, + 'context' => Astra_Builder_Helper::$design_tab, + 'title' => __( 'Hover', 'astra' ), + ), + + /** + * Option: Transparent Header Builder - HTML Elements configs. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]', + 'default' => astra_get_option( 'transparent-header-html-colors-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Link', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 75, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: HTML Text Color. + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-html-text-color]', + 'default' => astra_get_option( 'transparent-header-html-text-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 74, + 'title' => __( 'Text', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'HTML Color', 'astra' ), + ), + ), + + // Option: HTML Link Color. + array( + 'name' => 'transparent-header-html-link-color', + 'default' => astra_get_option( 'transparent-header-html-link-color' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 5, + 'title' => __( 'Normal', 'astra' ), + 'context' => Astra_Builder_Helper::$general_tab, + ), + + // Option: HTML Link Hover Color. + array( + 'name' => 'transparent-header-html-link-h-color', + 'default' => astra_get_option( 'transparent-header-html-link-h-color' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-html-colors-group]', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 5, + 'title' => __( 'Hover', 'astra' ), + 'context' => Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Transparent Header Builder - Search Elements configs. + */ + + // Option: Search Color. + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-icon-color]', + 'default' => astra_get_option( 'transparent-header-search-icon-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 45, + 'title' => __( 'Icon', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Search Color', 'astra' ), + ), + ), + + /** + * Search Box Background Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-box-background-color]', + 'default' => astra_get_option( 'transparent-header-search-box-background-color' ), + 'type' => 'control', + 'section' => 'section-transparent-header', + 'priority' => 45, + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'title' => __( 'Box Background', 'astra' ), + 'context' => array( + Astra_Builder_Helper::$design_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-search-box-type]', + 'operator' => 'in', + 'value' => array( 'slide-search', 'search-box' ), + ), + ), + ), + + /** + * Option: Transparent Header Builder - Widget Elements configs. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]', + 'default' => astra_get_option( 'transparent-header-widget-colors-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Link', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 50, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Widget Title Color. + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-title-color]', + 'default' => astra_get_option( 'transparent-header-widget-title-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 49, + 'title' => __( 'Title', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Widget Color', 'astra' ), + ), + ), + + // Option: Widget Content Color. + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-content-color]', + 'default' => astra_get_option( 'transparent-header-widget-content-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 49, + 'title' => __( 'Content', 'astra' ), + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Widget Link Color. + array( + 'name' => 'transparent-header-widget-link-color', + 'default' => astra_get_option( 'transparent-header-widget-link-color' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 15, + 'tab' => __( 'Normal', 'astra' ), + 'title' => __( 'Normal', 'astra' ), + 'context' => Astra_Builder_Helper::$general_tab, + ), + + // Option: Widget Link Hover Color. + array( + 'name' => 'transparent-header-widget-link-h-color', + 'default' => astra_get_option( 'transparent-header-widget-link-h-color' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-widget-link-colors-group]', + 'type' => 'sub-control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'tab' => __( 'Hover', 'astra' ), + 'priority' => 20, + 'title' => __( 'Hover', 'astra' ), + 'context' => Astra_Builder_Helper::$general_tab, + ), + + /** + * Group: Transparent Header Button Colors Group + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]', + 'default' => astra_get_option( 'transparent-header-buttons-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Text', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 60, + 'context' => Astra_Builder_Helper::$design_tab, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'HTML Color', 'astra' ), + ), + ), + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]', + 'default' => astra_get_option( 'transparent-header-buttons-group' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Background', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 60, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + /** + * Option: Button Text Color + */ + array( + 'name' => 'transparent-header-button-text-color', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'transparent-header-button-text-color' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 5, + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Button Text Hover Color + */ + array( + 'name' => 'transparent-header-button-text-h-color', + 'default' => astra_get_option( 'transparent-header-button-text-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-text-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 7, + 'title' => __( 'Hover', 'astra' ), + ), + + /** + * Option: Button Background Color + */ + array( + 'name' => 'transparent-header-button-bg-color', + 'default' => astra_get_option( 'transparent-header-button-bg-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Normal', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 9, + 'title' => __( 'Normal', 'astra' ), + ), + + /** + * Option: Button Button Hover Color + */ + array( + 'name' => 'transparent-header-button-bg-h-color', + 'default' => astra_get_option( 'transparent-header-button-bg-h-color' ), + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-header-buttons-background-group]', + 'section' => 'section-transparent-header', + 'tab' => __( 'Hover', 'astra' ), + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'priority' => 11, + 'title' => __( 'Hover', 'astra' ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-icon-color]', + 'default' => astra_get_option( 'transparent-account-icon-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 65, + 'title' => __( 'Icon', 'astra' ), + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Account', 'astra' ), + ), + 'context' => array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]', + 'operator' => '==', + 'value' => 'icon', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]', + 'operator' => '==', + 'value' => 'text', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', + 'operator' => '!=', + 'value' => 'none', + ), + ), + ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-type-text-color]', + 'default' => astra_get_option( 'transparent-account-type-text-color' ), + 'type' => 'control', + 'section' => $_section, + 'priority' => 65, + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'title' => __( 'Text', 'astra' ), + 'context' => array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]', + 'operator' => '==', + 'value' => 'icon', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]', + 'operator' => '==', + 'value' => 'text', + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', + 'operator' => '!=', + 'value' => 'none', + ), + ), + ), + ), + + /** + * Option: Toggle Button Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-btn-color]', + 'default' => astra_get_option( 'transparent-header-toggle-btn-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'title' => __( 'Icon', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 70, + 'context' => Astra_Builder_Helper::$design_tab, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Toggle Color', 'astra' ), + ), + ), + + /** + * Option: Toggle Button Bg Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-btn-bg-color]', + 'default' => astra_get_option( 'transparent-header-toggle-btn-bg-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'title' => __( 'Background', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 70, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + /** + * Option: Toggle Button Border Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-toggle-border-color]', + 'default' => astra_get_option( 'transparent-header-toggle-border-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'title' => __( 'Border', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 70, + 'context' => Astra_Builder_Helper::$design_tab, + ), + ); + + $_configs = array_merge( $_configs, $_hfb_configs ); + + } else { + $_old_content_configs = array( + + /** + * Option: Content Section Text color. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-content-section-text-color-responsive]', + 'default' => astra_get_option( 'transparent-content-section-text-color-responsive' ), + 'type' => 'control', + 'priority' => 39, + 'section' => $_section, + 'transport' => 'postMessage', + 'control' => 'ast-responsive-color', + 'title' => __( 'Text', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'divider' => array( + 'ast_class' => 'ast-top-divider', + 'ast_title' => __( 'Content', 'astra' ), + ), + ), + /** + * Option: Header Builder Tabs + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-colors-content]', + 'default' => astra_get_option( 'transparent-header-colors-content' ), + 'type' => 'control', + 'control' => 'ast-color-group', + 'title' => __( 'Link', 'astra' ), + 'section' => $_section, + 'transport' => 'postMessage', + 'priority' => 39, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + 'responsive' => true, + ), + ); + + $_configs = array_merge( $_configs, $_old_content_configs ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ) { + + $pro_elements_transparent_config = array( + + /** + * Search Box Background Color + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-search-box-placeholder-color]', + 'default' => astra_get_option( 'transparent-header-search-box-placeholder-color' ), + 'type' => 'control', + 'section' => 'section-transparent-header', + 'priority' => 45, + 'transport' => 'postMessage', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'title' => __( 'Text / Placeholder', 'astra' ), + 'context' => array( + Astra_Builder_Helper::$design_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-search-box-type]', + 'operator' => 'in', + 'value' => array( 'slide-search', 'search-box' ), + ), + ), + ), + + /** + * Option: Transparent Header Builder - Divider Elements configs. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-header-divider-color]', + 'default' => astra_get_option( 'transparent-header-divider-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'transport' => 'postMessage', + 'priority' => 64, + 'title' => __( 'Divider', 'astra' ), + 'section' => 'section-transparent-header', + 'context' => Astra_Builder_Helper::$design_tab, + 'divider' => array( 'ast_class' => 'ast-top-divider' ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'default' => astra_get_option( 'transparent-account-menu-colors' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Account Menu Color', 'astra' ), + 'section' => 'section-transparent-header', + 'transport' => 'postMessage', + 'priority' => 66, + 'context' => array( + Astra_Builder_Helper::$design_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', + 'operator' => '==', + 'value' => 'menu', + ), + ), + ), + + // Option: Menu Color. + array( + 'name' => 'transparent-account-menu-color-responsive', + 'default' => astra_get_option( 'transparent-account-menu-color-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'type' => 'sub-control', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Normal', 'astra' ), + 'section' => 'section-transparent-header', + 'title' => __( 'Link / Text Color', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'priority' => 7, + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', + 'operator' => '==', + 'value' => 'menu', + ), + Astra_Builder_Helper::$design_tab, + ), + ), + + // Option: Background Color. + array( + 'name' => 'transparent-account-menu-bg-obj-responsive', + 'default' => astra_get_option( 'transparent-account-menu-bg-obj-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'type' => 'sub-control', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'section' => 'section-transparent-header', + 'title' => __( 'Background Color', 'astra' ), + 'tab' => __( 'Normal', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'priority' => 8, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Menu Hover Color. + array( + 'name' => 'transparent-account-menu-h-color-responsive', + 'default' => astra_get_option( 'transparent-account-menu-h-color-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'tab' => __( 'Hover', 'astra' ), + 'type' => 'sub-control', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'title' => __( 'Link Color', 'astra' ), + 'section' => 'section-transparent-header', + 'responsive' => true, + 'rgba' => true, + 'priority' => 19, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Menu Hover Background Color. + array( + 'name' => 'transparent-account-menu-h-bg-color-responsive', + 'default' => astra_get_option( 'transparent-account-menu-h-bg-color-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'type' => 'sub-control', + 'title' => __( 'Background Color', 'astra' ), + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Hover', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'priority' => 21, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Active Menu Color. + array( + 'name' => 'transparent-account-menu-a-color-responsive', + 'default' => astra_get_option( 'transparent-account-menu-a-color-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'type' => 'sub-control', + 'section' => 'section-transparent-header', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'tab' => __( 'Active', 'astra' ), + 'title' => __( 'Link Color', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'priority' => 31, + 'context' => Astra_Builder_Helper::$design_tab, + ), + + // Option: Active Menu Background Color. + array( + 'name' => 'transparent-account-menu-a-bg-color-responsive', + 'default' => astra_get_option( 'transparent-account-menu-a-bg-color-responsive' ), + 'parent' => ASTRA_THEME_SETTINGS . '[transparent-account-menu-colors]', + 'type' => 'sub-control', + 'control' => 'ast-responsive-color', + 'transport' => 'postMessage', + 'section' => 'section-transparent-header', + 'title' => __( 'Background Color', 'astra' ), + 'tab' => __( 'Active', 'astra' ), + 'responsive' => true, + 'rgba' => true, + 'priority' => 33, + 'context' => Astra_Builder_Helper::$design_tab, + ), + ); + + $_configs = array_merge( $_configs, $pro_elements_transparent_config ); + } + + return array_merge( $configurations, $_configs ); + } + } +} + +/** + * Kicking this off by calling 'get_instance()' method + */ +new Astra_Customizer_Transparent_Header_Configs(); diff --git a/inc/addons/transparent-header/classes/sections/index.php b/inc/addons/transparent-header/classes/sections/index.php index 02f2fd6..7860b5b 100644 --- a/inc/addons/transparent-header/classes/sections/index.php +++ b/inc/addons/transparent-header/classes/sections/index.php @@ -1,9 +1,9 @@ -<?php
-/**
- * Index file
- *
- * @package Astra Addon
- * @since Astra 1.0.0
- */
-
-/* Silence is golden, and we agree. */
+<?php +/** + * Index file + * + * @package Astra Addon + * @since Astra 1.0.0 + */ + +/* Silence is golden, and we agree. */ |