Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'generate_header_items' ) ) :
- /**
- * Build the header
- *
- * Wrapping this into a function allows us to customize the order in a child theme
- *
- * @since 1.2.9.7
- */
- function generate_header_items()
- {
- $generate_settings = wp_parse_args(
- get_option( 'generate_settings', array() ),
- generate_get_defaults()
- );
- // Get the title and tagline
- $title = get_bloginfo( 'title' );
- $tagline = get_bloginfo( 'description' );
- // If the disable title checkbox is checked, or the title field is empty, return true
- $disable_title = ( '1' == $generate_settings[ 'hide_title' ] || '' == $title ) ? true : false;
- // If the disable tagline checkbox is checked, or the tagline field is empty, return true
- $disable_tagline = ( '1' == $generate_settings[ 'hide_tagline' ] || '' == $tagline ) ? true : false;
- // Header widget
- if ( is_active_sidebar('header') ) : ?>
- <div class="header-widget">
- <?php dynamic_sidebar( 'header' ); ?>
- </div>
- <?php endif;
- // Site logo
- if ( ! empty( $generate_settings['logo'] ) ) : ?>
- <div class="site-logo">
- <a href="<?php echo apply_filters( 'generate_logo_href' , esc_url( home_url( '/' ) ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img class="header-image" src="<?php echo esc_url( $generate_settings['logo'] ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
- </div>
- <?php endif;
- // Site title and tagline
- if ( false == $disable_title || false == $disable_tagline ) : ?>
- <div class="site-branding">
- <?php if ( false == $disable_title ) : ?>
- <p class="main-title" itemprop="headline"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
- <?php endif;
- if ( false == $disable_tagline ) : ?>
- <p class="site-description"><?php echo html_entity_decode( bloginfo( 'description' ) ); ?></p>
- <?php endif; ?>
- </div>
- <?php endif;
- }
- endif;
- add_filter ( 'generate_mobile_menu_label','generate_custom_mobile_menu_label' );
- function generate_custom_mobile_menu_label()
- {
- return 'Valikko';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement