File: /home/dermova/www/india/wp-content/themes/ri-colias/included/templates/topbar.php
<?php
/**
* Created by PhpStorm.
* User: admin
* Date: 11/9/15
* Time: 11:19 AM
*/
global $woocommerce, $yith_wcwl;
$configTopbar = str_replace('','',rit_topbar_config() );
?>
<div id="ri-top-navbar" class="top-navbar <?php echo esc_attr($configTopbar);?>">
<div class="container">
<div class="row">
<div class="topbar-left hidden-xs col-sm-6 col-md-6 clearfix">
<?php
if(is_active_sidebar( 'custom-topbar-left' )){
dynamic_sidebar('custom-topbar-left');
}
else {?>
<div class="language list-unstyled">
<?php rit_language_selector(); ?>
</div>
<?php
if (in_array('woocommerce-currency-switcher/index.php', apply_filters('active_plugins', get_option('active_plugins')))) {
?>
<div class="currency_switcher list-unstyled">
<div class="wrap-select-currency">
<?php echo do_shortcode('[woocs show_flags=0]'); ?>
</div>
</div>
<?php } ?>
<div class="user-login list-unstyled">
<div>
<?php if (!is_user_logged_in()) { ?>
<span class="hidden-xs"><?php esc_html_e('Welcome ', 'ri-colias'); ?><a
href="<?php echo esc_url(get_permalink(get_option('woocommerce_myaccount_page_id'))); ?>"><?php echo esc_html__('Guest', 'ri-colias'); ?></a> !</span>
<?php } else { ?>
<?php $current_user = wp_get_current_user(); ?>
<span class="hidden-xs"><?php esc_html_e('Welcome ', 'ri-colias'); ?><a
href="<?php echo esc_url(get_permalink(get_option('woocommerce_myaccount_page_id'))); ?>"><?php echo esc_attr($current_user->display_name); ?></a> !</span>
<?php } ?>
</div>
</div>
<?php }?>
</div>
<div class="topbar-right col-xs-12 col-sm-6 col-md-6">
<?php
if(is_active_sidebar( 'custom-topbar-right' )){
dynamic_sidebar('custom-topbar-right');
}
else { ?>
<div class="nav-menu clearfix ">
<nav class="pull-right text-center no-padding">
<ul class="nav navbar-nav" id="menu-topbar-menu">
<?php if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?>
<li>
<a href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>">
<i class="fa fa-user"></i>
<span><?php esc_html_e('My Account', 'ri-colias'); ?></span>
</a>
</li>
<?php } ?>
<?php if (class_exists('YITH_WCWL_UI')) {
$wishlist_url = str_replace('view/', '', YITH_WCWL()->get_wishlist_url());
?>
<li>
<a href="<?php echo esc_url($wishlist_url); ?>">
<i class="fa fa-heart"></i>
<span><?php esc_html_e("My Wishlist", 'ri-colias'); ?></span>
</a>
</li>
<?php } ?>
<?php if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?>
<li>
<a href="<?php echo esc_url($woocommerce->cart->get_checkout_url()); ?>">
<i class="fa fa-check"></i>
<span><?php esc_html_e('Checkout', 'ri-colias'); ?></span>
</a>
</li>
<?php } ?>
<li>
<?php if (!is_user_logged_in()) { ?>
<a href="<?php echo esc_url(get_permalink(get_option('woocommerce_myaccount_page_id'))); ?>">
<i class="fa fa-lock"></i>
<span><?php esc_html_e(' Login', 'ri-colias'); ?></span>
</a>
<?php } else { ?>
<a href="<?php echo wp_logout_url(get_permalink(get_option('woocommerce_myaccount_page_id'))); ?>">
<i class="fa fa-lock"></i>
<span><?php esc_html_e(' Logout', 'ri-colias'); ?></span>
</a>
<?php } ?>
</li>
</ul>
<?php
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
?>
<div class="cart-wrap mobile-cart hidden-lg hidden-md hidden-sm">
<div class="mini-cart btn-header clearfix" role="contentinfo">
<span class="icon-cart text-items">
<?php echo sprintf(_n(' <span class="mini-cart-items">%d</span> ', '<span class="mini-cart-items">%d</span>', $woocommerce->cart->cart_contents_count, 'ri-colias'), $woocommerce->cart->cart_contents_count); ?>
</span>
</div>
<div class="cart-box">
<?php woocommerce_mini_cart(); ?>
</div>
</div>
<?php
}
?>
</nav>
</div>
<?php }?>
</div>
</div>
</div>
</div>