Created
November 24, 2017 04:20
-
-
Save anonymous/0f7332b76a3a72942e536cda86e1fc47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function easy_commerce_site_branding() { | |
?> | |
<div class="site-branding"> | |
<?php easy_commerce_the_custom_logo(); ?> | |
<?php $show_title = easy_commerce_get_option( 'show_title' ); ?> | |
<?php $show_tagline = easy_commerce_get_option( 'show_tagline' ); ?> | |
<?php if ( true === $show_title || true === $show_tagline ) : ?> | |
<div id="site-identity"> | |
<?php if ( true === $show_title ) : ?> | |
<?php if ( is_front_page() && is_home() ) : ?> | |
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> | |
<?php else : ?> | |
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php if ( true === $show_tagline ) : ?> | |
<p class="site-description"><?php bloginfo( 'description' ); ?></p> | |
<?php endif; ?> | |
</div><!-- #site-identity --> | |
<?php endif; ?> | |
</div><!-- .site-branding --> | |
<div id="right-head"> | |
<?php if ( easy_commerce_is_woocommerce_active() ) : ?> | |
<div id="cart-section"> | |
<?php if ( class_exists( 'YITH_WCWL' ) ) : ?> | |
<?php $wishlist_page_id = yith_wcwl_object_id( get_option( 'yith_wcwl_wishlist_page_id' ) ); ?> | |
<?php if ( absint( $wishlist_page_id ) > 0 ) : ?> | |
<a class="wishlist-icon" href="<?php echo esc_url( get_permalink( $wishlist_page_id ) ); ?>"><i class="fa fa-heart" aria-hidden="true"></i><strong><?php echo absint( yith_wcwl_count_products() ); ?></strong></a> | |
<?php endif; ?> | |
<?php endif; ?> | |
<a class="cart-icon" href="<?php echo esc_url( wc_get_cart_url() ); ?>"><i class="fa fa-shopping-cart" aria-hidden="true"></i><strong><?php echo wp_kses_data( WC()->cart->get_cart_contents_count() );?></strong> | |
</a> | |
</div> <!-- .cart-section --> | |
<?php endif; ?> | |
<?php $search_in_header = easy_commerce_get_option( 'search_in_header' ); ?> | |
<?php if ( true === $search_in_header ) : ?> | |
<div class="header-search-wrapper"> | |
<?php if ( easy_commerce_is_woocommerce_active() ) : ?> | |
<?php get_template_part( 'template-parts/product-search' ); ?> | |
<?php else : ?> | |
<?php get_search_form(); ?> | |
<?php endif; ?> | |
</div><!-- .header-search-wrapper --> | |
<?php endif; ?> | |
</div> <!-- #right-head --> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment