if ($layout != "boxed") { ?> </div> <?php } ?> </div> <?php if (!$is_video) { ?> <div class="parallaxeos"> </div> <?php } else { if (YIT_Mobile()->isTablet('isAndroid') || YIT_Mobile()->isMobile() && !YIT_Mobile()->isTablet()) { ?> <div class="video-image-static" style="background-image: url('<?php echo $video_poster; ?> '); "></div> <?php } else { ?> <video id="video-<?php echo $id; ?> " class="video-parallaxeos" preload="auto" autoplay="autoplay" loop="loop" muted="muted" poster="<?php echo $video_poster; ?> ">
/** * * Register and Enqueue Script and Style * * @return void * * @since 2.0.0 * @access public * @author Andrea Grillo <*****@*****.**> */ public function register() { foreach ($this->_assets as $type => $assets) { foreach ($assets as $handle => $args) { $args = wp_parse_args($args, $this->_assets_default_value[$type]); if ($args['registered']) { continue; } $function_register = 'wp_register_' . $type; $function_enqueue = 'wp_enqueue_' . $type; extract($args); // set in_footer or media $last_param = false; if ('style' == $type) { $last_param = $media; } elseif ('script' == $type) { $last_param = $in_footer; // localize if (isset($args['localize']) && !empty($args['localize'])) { wp_localize_script($handle, str_replace('-', '_', sanitize_title($handle)), $args['localize']); } } // Register $function_register($handle, $src, $deps, $ver, $last_param); // enqueue if ($enqueue && ($use_in_mobile || !YIT_Mobile()->isMobile())) { $function_enqueue($handle); } $args['registered'] = true; } } }
$woocommerce_loop['loop'] = 0; } // Increase loop count $woocommerce_loop['loop'] ++; // Extra post classes $woocommerce_loop['li_class'] = array(); // view if ( ! isset( $woocommerce_loop['view'] ) ) { $woocommerce_loop['view'] = yit_get_option( 'shop-view-type', 'grid' ); } //force alternative layout in mobile if( $isMobile && ! YIT_Mobile()->is( 'iPad' ) ) { $woocommerce_loop['products_layout'] = 'alternative'; } $woocommerce_loop['li_class'][] = $woocommerce_loop['view']; // Set column if ( ( is_shop() || is_product_category() ) && ! $isMobile && yit_get_option( 'shop-custom-num-column' ) == 'yes' ) { $woocommerce_loop['li_class'][] = 'col-sm-' . intval( 12 / intval( yit_get_option( 'shop-num-column' ) ) ); $woocommerce_loop['columns'] = intval( yit_get_option( 'shop-num-column' ) ); } elseif ( isset( $product_in_a_row ) ){ $woocommerce_loop['li_class'][] = 'col-sm-' . intval( 12 / intval( $product_in_a_row ) ); $woocommerce_loop['columns'] = intval( $product_in_a_row ); } else {
* The template for displaying product category thumbnails within loops. * * Override this template by copying it to yourtheme/woocommerce/content-product_cat.php * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $woocommerce_loop; // check if is mobile $isMobile = YIT_Mobile()->isMobile(); $isPhone = $isMobile && !YIT_Mobile()->isTablet(); // Store loop count we're currently on if (empty($woocommerce_loop['loop'])) { $woocommerce_loop['loop'] = 0; } $woocommerce_loop['li_class'] = array(); //standard li class $woocommerce_loop['li_class'][] = 'product-category product'; $sidebar = YIT_Layout()->sidebars; if ($sidebar['layout'] == 'sidebar-double') { $woocommerce_loop['li_class'][] = 'col-sm-4 col-xs-4'; $woocommerce_loop['columns'] = '3'; } elseif ($sidebar['layout'] == 'sidebar-right' || $sidebar['layout'] == 'sidebar-left') { $woocommerce_loop['li_class'][] = 'col-sm-3 col-xs-4'; $woocommerce_loop['columns'] = '4'; } else {
function yit_detect_browser_body_class($classes = '') { global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; if ($is_lynx) { $classes[] = 'lynx'; } elseif ($is_gecko) { $classes[] = 'gecko'; } elseif ($is_opera) { $classes[] = 'opera'; } elseif ($is_NS4) { $classes[] = 'ns4'; } elseif ($is_safari) { $classes[] = 'safari'; } elseif ($is_chrome) { $classes[] = 'chrome'; } elseif ($is_IE && function_exists('YIT_Mobile')) { if (YIT_Mobile()->match('MSIE 8.0')) { $classes[] = 'ie8'; $classes[] = 'ie'; } elseif (YIT_Mobile()->match('MSIE 9.0')) { $classes[] = 'ie9'; $classes[] = 'ie'; } elseif (YIT_Mobile()->match('MSIE 10.0')) { $classes[] = 'ie10'; $classes[] = 'ie'; } elseif (YIT_Mobile()->match('rv:11.0') && YIT_Mobile()->match('Trident/7.0')) { $classes[] = 'ie11'; $classes[] = 'ie'; } else { $classes[] = 'ie'; } } else { $classes[] = 'ie'; } if (function_exists('YIT_Mobile') && YIT_Mobile()->isMobile()) { $classes[] = 'isMobile'; if (YIT_Mobile()->is('AndroidOS')) { $classes[] = 'isAndroid'; } elseif (YIT_Mobile()->is('iPhone')) { $classes[] = 'isIphone'; } elseif (YIT_Mobile()->is('iPad')) { $classes[] = 'isIpad'; } elseif (YIT_Mobile()->is('WindowsMobileOS')) { $classes[] = 'isWindows'; } elseif (YIT_Mobile()->is('WindowsPhoneOS')) { $classes[] = 'isWindows-phone'; } elseif (YIT_Mobile()->is('AndroidOS') || YIT_Mobile()->isTablet()) { $classes[] = 'isAndroid-tablet'; } elseif (YIT_Mobile()->is('BlackBerryOS') || YIT_Mobile()->isTablet()) { $classes[] = 'isBlackberry-tablet'; } elseif (YIT_Mobile()->is('GenericPhone') || YIT_Mobile()->is('GenericTablet')) { $classes[] = 'isGeneric'; } } return $classes; }
/* * This file belongs to the YIT Framework. * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly // check if is mobile $isMobile = YIT_Mobile()->isMobile(); $isPhone = $isMobile && !YIT_Mobile()->isTablet(); $isTablet = YIT_Mobile()->isTablet(); $is_iPad = wp_is_mobile() && preg_match('/iPad/', $_SERVER['HTTP_USER_AGENT']); $isLumia = preg_match('/IEMobile/', $_SERVER['HTTP_USER_AGENT']) ? true : false; if (apply_filters('yit-enable-topbar', yit_get_option('header-enable-topbar')) != 'yes' || yit_get_option('header-skin') == 'transparent') { return; } ?> <!-- START TOPBAR --> <div id="topbar" class="<?php echo class_exists('YIT_Style_Picker') ? apply_filters('yit-stylepicker-topbar-class', '') : ''; ?> "> <div class="container"> <div class="clearfix header-wrapper">
break; case "external" : $link['url'] = apply_filters( 'external_add_to_cart_url', get_permalink( $product->id ) ); $link['label'] = apply_filters( 'external_add_to_cart_text', __( 'Read More', 'yit' ) ); break; default : if ( $product->is_purchasable() ) { $link['url'] = apply_filters( 'add_to_cart_url', esc_url( $product->add_to_cart_url() ) ); $link['label'] = apply_filters( 'add_to_cart_text', __( 'Add to cart', 'yit' ) ); $link['quantity'] = apply_filters( 'add_to_cart_quantity', ( get_post_meta( $product->id, 'minimum_allowed_quantity', true ) ? get_post_meta( $product->id, 'minimum_allowed_quantity', true ) : 1 ) ); } else { $link['url'] = apply_filters( 'not_purchasable_url', get_permalink( $product->id ) ); $link['label'] = apply_filters( 'not_purchasable_text', __( 'Read More', 'yit' ) ); } break; } echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-quantity="%s" data-product_sku="%s" class="%s product_type_%s">%s</a>', esc_url( $link['url'] ), esc_attr( $product->id ), esc_attr( $link['quantity'] ), esc_attr( $product->get_sku() ), esc_attr( $link['class'] ), esc_attr( $product->product_type ), esc_html( $link['label'] ) ), $product, $link ); endif; if ( $woocommerce_loop['products_layout'] != 'alternative' && yit_get_option( 'shop-quick-view-enable' ) == 'yes' && ( ( YIT_Mobile()->isMobile() && YIT_Mobile()->is( 'iPad' ) ) || ! YIT_Mobile()->isMobile() ) && ! $is_wishlist ) { $sc_index = function_exists('YIT_Shortcodes') && YIT_Shortcodes()->is_inside ? '-' . YIT_Shortcodes()->index() : ''; echo '<a id="quick-view-trigger-' . esc_attr( $product->id ) . $sc_index . '" href="#" class="trigger-quick-view btn-ghost" data-item_id="'. $product->id . '"><span class="fa fa-search"></span></a>'; } ?> </div>
function yit_shop_loop_add_to_cart() { global $product; echo '<div class="product-action-button-wrapper">'; wc_get_template( 'loop/add-to-cart.php' ); if( yit_get_option( 'shop-quick-view-enable' ) == 'yes' && ( ( YIT_Mobile()->isMobile() && YIT_Mobile()->is( 'iPad' ) ) || ! YIT_Mobile()->isMobile() ) ) { $sc_index = function_exists('YIT_Shortcodes') && YIT_Shortcodes()->is_inside ? '-' . YIT_Shortcodes()->index() : ''; echo '<a id="quick-view-trigger-' . esc_attr( $product->id ) . $sc_index . '" href="#" class="trigger-quick-view" data-item_id="'. $product->id . '"><span class="fa fa-search"></span></a>'; } echo '</div>'; }
function yit_add_quick_view_button() { if (YIT_Mobile()->isMobile()) { return; } global $product; echo '<div class="product-quick-view-button">'; $sc_index = function_exists('YIT_Shortcodes') && YIT_Shortcodes()->is_inside ? '-' . YIT_Shortcodes()->index() : ''; echo '<a id="quick-view-trigger-' . esc_attr($product->id) . $sc_index . '" href="#" class="trigger-quick-view" data-item_id="' . $product->id . '">' . __(yit_get_option('shop-quick-view-text'), 'yit') . '</a>'; echo '</div>'; }