Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function colormag_middle_header_bar_display() {
- $screen_reader = '';
- $description = get_bloginfo( 'description', 'display' );
- $header_display_type = get_theme_mod( 'colormag_header_logo_placement', 'header_text_only' );
- ?>
- <div class="inner-wrap">
- <div id="header-text-nav-wrap" class="clearfix">
- <div id="header-left-section">
- <?php
- if ( 'show_both' === $header_display_type || 'header_logo_only' === $header_display_type ) {
- ?>
- <div id="header-logo-image">
- <?php
- if ( function_exists( 'the_custom_logo' ) ) {
- the_custom_logo();
- }
- ?>
- </div><!-- #header-logo-image -->
- <?php
- }
- if ( 'header_logo_only' === $header_display_type || 'disable' === ( $header_display_type ) ) {
- $screen_reader = 'screen-reader-text';
- }
- ?>
- <div id="header-text" class="<?php echo esc_attr( $screen_reader ); ?>">
- <?php if ( is_front_page() || is_home() ) : ?>
- <h1 id="site-title"<?php echo colormag_schema_markup( 'site-title' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
- </h1>
- <?php else : ?>
- <h3 id="site-title"<?php echo colormag_schema_markup( 'site-title' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
- </h3>
- <?php endif; ?>
- <?php
- if ( $description || is_customize_preview() ) :
- ?>
- <p id="site-description"<?php echo colormag_schema_markup( 'site-description' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>>
- <?php echo $description; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
- </p><!-- #site-description -->
- <?php endif; ?>
- </div><!-- #header-text -->
- </div><!-- #header-left-section -->
- <div id="header-right-section">
- <?php
- if ( is_active_sidebar( 'colormag_header_sidebar' ) ) {
- ?>
- <div id="header-right-sidebar" class="clearfix">
- <?php dynamic_sidebar( 'colormag_header_sidebar' ); ?>
- </div>
- <?php
- }
- ?>
- </div><!-- #header-right-section -->
- <?php colormag_below_header_bar_display(); ?>
- </div><!-- #header-text-nav-wrap -->
- </div><!-- .inner-wrap -->
- <?php
- }
- function colormag_header() {
- $header_layout = get_theme_mod( 'colormag_main_total_header_area_display_type', 'type_one' );
- $header_image_position = get_theme_mod( 'colormag_header_image_position', 'position_two' );
- if ( 'type_one' === $header_layout || 'type_two' === $header_layout || 'type_three' === $header_layout ) :
- // Display the top header bar.
- colormag_top_header_bar_display();
- if ( 'position_one' === $header_image_position ) {
- the_custom_header_markup();
- }
- // Display the middle header bar.
- colormag_middle_header_bar_display();
- if ( 'position_two' === $header_image_position ) :
- the_custom_header_markup();
- endif;
- elseif ( 'type_four' === $header_layout || 'type_six' === $header_layout ) :
- // Display the top header bar.
- colormag_top_header_bar_display();
- // Display the below header bar.
- colormag_below_header_bar_display();
- if ( 'position_one' === $header_image_position || 'position_two' === $header_image_position || 'position_three' === $header_image_position ) {
- the_custom_header_markup();
- }
- // Display the middle header bar.
- colormag_middle_header_bar_display();
- elseif ( 'type_five' === $header_layout ) :
- // Display the below header bar.
- colormag_below_header_bar_display();
- if ( 'position_three' === $header_image_position ) {
- the_custom_header_markup();
- }
- // Display the top header bar.
- colormag_top_header_bar_display();
- if ( 'position_one' === $header_image_position || 'position_two' === $header_image_position ) {
- the_custom_header_markup();
- }
- // Display the middle header bar.
- colormag_middle_header_bar_display();
- endif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement