Astra_Ext_Transparent_Header_Markup::is_transparent_header()
Astra check if transparent header is enabled.
Description
Return
(boolean) true/false.
Source
File: inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php
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 ); }
Expand full source code Collapse full source code View on Trac