Astra_Ext_Advanced_Headers_Markup::advanced_header_merged()
Advanced Headers Bar markup loader if we are using merged with header
Description
Source
File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-markup.php
public function advanced_header_merged() { // Get our options. $advanced_headers_merged = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_layout_option( 'merged' ); $advanced_header_bg_size = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'bg-size' ); $advanced_header_parallax_device = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'parallax-device' ); if ( ! self::advanced_header_enabled() || ( is_front_page() && 'posts' == get_option( 'show_on_front' ) ) ) { return; } if ( ! $advanced_headers_merged ) { return; } $combined = 'ast-merged-advanced-header ast-title-bar-wrap'; // Parallax variable. $parallax = ( 'none' !== $advanced_header_parallax_device ) ? ' ast-advanced-headers-parallax' : ''; // Parallax Device. $parallax_device = ( 'none' !== $advanced_header_parallax_device ) ? $advanced_header_parallax_device : ''; // Parallax speed variable. $parallax_speed = apply_filters( 'astra_advanced_header_parallax_speed', 2 ); // Full Screen vertical align center. $vertical_center = ' ast-advanced-headers-vertical-center'; // Full Screen. $full_screen = ( 'full-screen' == $advanced_header_bg_size ) ? ' ast-full-advanced-header' : ''; // Add advanced header wrapper classes. printf( '<div class="%1$s" %2$s role="img" %3$s>', $combined . $parallax . $full_screen . $vertical_center, ( ! empty( $parallax ) ) ? 'data-parallax-speed="' . esc_attr( $parallax_speed ) . '" data-parallax-device="' . esc_attr( $parallax_device ) . '"' : '', $this->get_header_background_image_alt_text() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |