/** * Returns single instance of the class * * @return \YITH_WCWL * @since 2.0.0 */ public static function get_instance() { if (is_null(self::$instance)) { self::$instance = new self($_REQUEST); } return self::$instance; }
*/ /** * Checks if we are on a YIThemes.com theme or not. */ if (isset($_POST['gform_form_id'])) { unset($_POST['gform_form_id']); } // Handles all ajax requests pertaining to this plugin require_once 'safe-wp-load.php'; require_once 'functions.yith-wcwl.php'; header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past if (!isset($yith_wcwl)) { $yith_wcwl = new YITH_WCWL($_REQUEST); } // Remove product from the wishlist if ($_GET['action'] == 'remove_from_wishlist') { $count = yith_wcwl_count_products(); if ($yith_wcwl->remove($_GET['wishlist_item_id'])) { _e('Product successfully removed.', 'yit'); } else { echo '#' . $count . '#'; _e('Error. Unable to remove the product from the wishlist.', 'yit'); } if (!$count) { _e('No products were added to the wishlist', 'yit'); } wp_redirect($yith_wcwl->get_wishlist_url()); die;
<!-- <?php if (etheme_get_option('right_panel')) { ?> <div class="side-area-icon hidden-phone hidden-tablet"><i class="icon-reorder"></i></div> <?php } ?> --> <div class="right" style="padding-top:5px"> <span> <a class="hidden-desktop" style="padding-left: 0px; padding-bottom: 0px;" href="./?page_id=7"><img src="./wp-content/themes/legenda/framework/dT6ao7obc-copy-90x90.png" alt="" style="width:20px;height:20px;"></a> </span> <?php if (class_exists('YITH_WCWL') && etheme_get_option('wishlist_link')) { $wl = new YITH_WCWL(array()); ?> <span class="wishlist-link hidden-tablet"> <a href="<?php echo $wl->get_wishlist_url(); ?> "><i class="icon-heart-empty"></i><span><?php _e('Wishlist', ETHEME_DOMAIN); ?> </span></a> </span> <?php } ?> <span> <div class="hidden-desktop" style="margin-right:10px;margin-left:10px">