/** * Returns single instance of the class * * @return \YITH_WCQV_Frontend * @since 1.0.0 */ public static function get_instance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }
/** * Get the add action including add to cart, quick view, compare, wishlist for the loop. * * @subpackage Loop */ function dtwl_template_loop_add_action() { global $product, $yith_woocompare; /** * woocommerce_after_shop_loop_item hook * * @hooked woocommerce_template_loop_add_to_cart - 10 * @hooked woocommerce_after_shop_loop_item - 15 * @hooked dtwl_add_compare_link - 20 */ remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10); add_action('woocommerce_after_shop_loop_item', 'dtwl_template_loop_add_to_cart', 10); $wishlist = 2; if (class_exists('YITH_WCQV_Frontend')) { add_action('woocommerce_after_shop_loop_item', array(YITH_WCQV_Frontend::get_instance(), 'yith_add_quick_view_button'), 15); $wishlist = $wishlist + 1; } if (isset($yith_woocompare)) { remove_action('woocommerce_after_shop_loop_item', array($yith_woocompare->obj, 'add_compare_link'), 20); $wishlist = $wishlist + 1; $add_to_cart = ''; add_action('woocommerce_after_shop_loop_item', 'dtwl_add_compare_link', 20); } do_action('woocommerce_after_shop_loop_item'); if (class_exists('YITH_WCWL')) { ?> <div class="dtwl-woo-add-to-wishlist" style="width: <?php echo 100 / (int) $wishlist; ?> %;"> <?php echo do_shortcode('[yith_wcwl_add_to_wishlist]'); ?> </div> <?php } }
function cmo_slider_init() { if (function_exists('set_revslider_as_theme')) { set_revslider_as_theme(); } if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } } function cmo_layerslider_overrides() { $GLOBALS['lsAutoUpdateBox'] = false; } // Customize YITH QUICK VIEW PLUGIN if (class_exists('YITH_WCQV_Frontend')) { remove_action('woocommerce_after_shop_loop_item', array(YITH_WCQV_Frontend::get_instance(), 'yith_add_quick_view_button'), 15); } function cumulo_language_setup() { load_theme_textdomain('cumulo', get_stylesheet_directory() . '/languages'); } /* * Theme Supports */ function cmo_add_theme_supports() { /* HTML5 Support */ add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'widgets')); /* Post Formats Support */ add_theme_support('post-formats', array('image', 'audio', 'video', 'gallery', 'quote', 'link')); add_theme_support('nav_menus');