/** * Menu Fallback * ============= * If this function is assigned to the wp_nav_menu's fallback_cb variable * and a manu has not been assigned to the theme location in the WordPress * menu manager the function with display nothing to a non-logged in user, * and will add a link to the WordPress menu manager if logged in as an admin. * * @param array $args passed from the wp_nav_menu function. * */ public static function fallback($args) { if (current_user_can('manage_options')) { extract($args); $fb_output = null; if ($container) { $fb_output = '<' . $container; if ($container_id) { $fb_output .= ' id="' . esc_attr($container_id) . '"'; } if ($container_class) { $fb_output .= ' class="' . esc_attr($container_class) . '"'; } $fb_output .= '>'; } $fb_output .= '<ul'; if ($menu_id) { $fb_output .= ' id="' . esc_attr($menu_id) . '"'; } if ($menu_class) { $fb_output .= ' class="' . esc_attr($menu_class) . '"'; } $fb_output .= '>'; $fb_output .= '<li><a href="' . admin_url('nav-menus.php') . '">' . esc_attr__('Add a menu', 'kutetheme') . '</a></li>'; $fb_output .= '</ul>'; if ($container) { $fb_output .= '</' . esc_attr($container) . '>'; } echo kt_get_html($fb_output); } }
public function widget($args, $instance) { echo apply_filters('kt_wg_before_widget', $args['before_widget']); //Defaults $wtitle = isset($instance['wtitle']) && $instance['wtitle'] ? esc_html($instance['wtitle']) : ''; $facebook = kt_option('kt_facebook_link_id'); $twitter = kt_option('kt_twitter_link_id'); $pinterest = kt_option('kt_pinterest_link_id'); $dribbble = kt_option('kt_dribbble_link_id'); $vimeo = kt_option('kt_vimeo_link_id'); $tumblr = kt_option('kt_tumblr_link_id'); $skype = kt_option('kt_skype_link_id'); $linkedin = kt_option('kt_linkedIn_link_id'); $vk = kt_option('kt_vk_link_id'); $googleplus = kt_option('kt_google_plus_link_id'); $youtube = kt_option('kt_youtube_link_id'); $instagram = kt_option('kt_instagram_link_id'); $social_icons = ''; if ($facebook) { $social_icons .= '<a href="' . esc_url($facebook) . '" title ="' . __('Facebook', 'kutetheme') . '" ><i class="fa fa-facebook"></i></a>'; } if ($twitter) { $social_icons .= '<a href="http://www.twitter.com/' . esc_attr($twitter) . '" title = "' . __('Twitter', 'kutetheme') . '" ><i class="fa fa-twitter"></i></a>'; } if ($dribbble) { $social_icons .= '<a href="http://www.dribbble.com/' . esc_attr($dribbble) . '" title ="' . __('Dribbble', 'kutetheme') . '" ><i class="fa fa-dribbble"></i></a>'; } if ($vimeo) { $social_icons .= '<a href="http://www.vimeo.com/' . esc_attr($vimeo) . '" title ="' . __('Vimeo', 'kutetheme') . '" ><i class="fa fa-vimeo-square"></i></a>'; } if ($tumblr) { $social_icons .= '<a href="http://' . esc_attr($tumblr) . '.tumblr.com/" title ="' . __('Tumblr', 'kutetheme') . '" ><i class="fa fa-tumblr"></i></a>'; } if ($skype) { $social_icons .= '<a href="skype:' . esc_attr($skype) . '" title ="' . __('Skype', 'kutetheme') . '" ><i class="fa fa-skype"></i></a>'; } if ($linkedin) { $social_icons .= '<a href="' . esc_attr($linkedin) . '" title ="' . __('Linkedin', 'kutetheme') . '" ><i class="fa fa-linkedin"></i></a>'; } if ($googleplus) { $social_icons .= '<a href="' . esc_url($googleplus) . '" title ="' . __('Google Plus', 'kutetheme') . '" ><i class="fa fa-google-plus"></i></a>'; } if ($youtube) { $social_icons .= '<a href="http://www.youtube.com/user/' . esc_attr($youtube) . '" title ="' . __('Youtube', 'kutetheme') . '"><i class="fa fa-youtube"></i></a>'; } if ($pinterest) { $social_icons .= '<a href="http://www.pinterest.com/' . esc_attr($pinterest) . '/" title ="' . __('Pinterest', 'kutetheme') . '" ><i class="fa fa-pinterest-p"></i></a>'; } if ($instagram) { $social_icons .= '<a href="http://instagram.com/' . esc_attr($instagram) . '" title ="' . __('Instagram', 'kutetheme') . '" ><i class="fa fa-instagram"></i></a>'; } if ($vk) { $social_icons .= '<a href="https://vk.com/' . esc_attr($vk) . '" title ="' . __('Vk', 'kutetheme') . '" ><i class="fa fa-vk"></i></a>'; } ?> <div class="introduce-title"><?php echo esc_attr($wtitle); ?> </div> <div class="social-link"> <?php $allowed_html = array('a' => array('href' => array(), 'title' => array()), 'i' => array('classs' => array())); echo kt_get_html($social_icons); ?> </div> <?php echo apply_filters('kt_wg_after_widget', $args['after_widget']); }
public function widget($args, $instance) { echo apply_filters('kt_wg_before_widget', $args['before_widget']); $title = isset($instance['title']) && $instance['title'] ? esc_html($instance['title']) : esc_attr__('Best Sellers', 'kutetheme'); $number = isset($instance['number']) && intval($instance['number']) ? intval($instance['number']) : 6; $perpage = isset($instance['perpage']) && intval($instance['perpage']) ? intval($instance['perpage']) : 3; $meta_query = WC()->query->get_meta_query(); $params = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $number, 'meta_query' => $meta_query, 'suppress_filter' => true, 'orderby' => 'meta_value_num', 'meta_key' => 'total_sales'); $product = new WP_Query($params); if ($product->have_posts()) { $speed = isset($instance['speed']) && intval($instance['speed']) > 0 ? intval($instance['speed']) : 250; $autoplay = isset($instance['autoplay']) && $instance['autoplay'] ? 'true' : 'false'; $loop = isset($instance['loop']) && $instance['loop'] ? 'true' : 'false'; ?> <!-- block best sellers --> <div class="block left-module"> <?php if ($title) { echo apply_filters('kt_wg_before_title', $args['before_title']); echo esc_html($title); echo apply_filters('kt_wg_after_title', $args['after_title']); } $i = 1; $endtag = $perpage + 1; ob_start(); ?> <?php while ($product->have_posts()) { $product->the_post(); ?> <?php if ($i == 1) { ?> <ul class="products-block best-sell"> <?php } ?> <?php wc_get_template_part('content', 'special-product-sidebar'); ?> <?php $i++; ?> <?php if ($i == $endtag) { $i = 1; ?> </ul> <?php } ?> <?php } ?> <?php $html = ob_get_clean(); ?> <?php if ($i < 2) { $loop = 'false'; } ?> <div class="block_content"> <div class="owl-carousel owl-best-sell" data-slidespeed="<?php echo intval($speed); ?> " data-loop="<?php echo esc_attr($loop); ?> " data-nav = "false" data-margin = "0" data-autoplayTimeout="1000" data-autoplay="<?php echo esc_attr($autoplay); ?> " data-autoplayHoverPause = "true" data-items="1"> <?php echo kt_get_html($html); ?> </div> </div> </div> <!-- ./block best sellers --> <?php } wp_reset_query(); wp_reset_postdata(); echo apply_filters('kt_wg_after_widget', $args['after_widget']); }
</span><?php echo kt_get_html($address); ?> </a></li> <li><a class="phone" href="#"><span><?php _e('Hotline:', 'kutetheme'); ?> </span><?php echo kt_get_html($hotline); ?> </a></li> <li><a class="email" href="#"><span><?php _e('Email:', 'kutetheme'); ?> </span><?php echo kt_get_html($email); ?> </a></li> </ul> </div> </div> </div> <div class="col-sm-3 col-md-2"> <div class="widget-container"> <?php if (is_active_sidebar('footer-menu-1')) { dynamic_sidebar('footer-menu-1'); } ?> </div> </div>
<!-- MAIN HEADER --> <div class="container main-header"> <div class="row top-main-header"> <div class="col-sm-12 col-md-12 col-lg-3"></div> <div class="col-sm-7 col-md-6"> <?php wp_nav_menu(array('menu' => 'custom_header_menu', 'theme_location' => 'custom_header_menu', 'depth' => 1, 'container' => '', 'container_class' => '', 'container_id' => '', 'menu_class' => 'main-header-top-link', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker())); ?> </div> <?php if ($kt_header_message) { ?> <div class="col-sm-5 col-md-6 col-lg-3"> <div class="header-text"> <i class="fa fa-info-circle"></i> <?php echo kt_get_html($kt_header_message); ?> </div> </div> <?php } ?> </div> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-3 logo"> <?php echo kt_get_logo(); ?> </div> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 header-search-box">
<?php } ?> </div> </div> </div> </div> <div class="footer-bottom"> <div class="container"> <div class="footer-bottom-wapper"> <div class="row"> <div class="col-sm-12"> <div class="footer-coppyright"> <?php if ($copyright) { ?> <p class="text-center"><?php echo kt_get_html($copyright); ?> </p> <?php } ?> </div> </div> </div> </div> </div> </div> <!-- ./footer paralax--> </footer>
?> <a class="cart-link" href="<?php echo esc_url($check_out_url); ?> "> <span class="icon"> <span class="count"><?php echo esc_html($cart_count); ?> </span> </span> <?php _e('Cart:', 'kutetheme'); ?> <?php echo kt_get_html($cart_subtotal); ?> </a> <?php do_action('kt_mini_cart_content', esc_url($check_out_url)); ?> <?php } elseif ($kt_used_header == 14) { ?> <a class="cart-link" href="<?php echo esc_url($check_out_url); ?> "> <span class="icon"> <span class="count"><?php echo esc_html($cart_count);