<?php /** * Prevent direct access to this file */ function_exists('tijara_option') or die; ?> <?php // Load images if applicable, i.e, for pages, products and product categories if (is_page() or kds_is_product() or kds_is_product_category()) { // Taxonomy archive pages are different, we will query term data if (kds_is_product_category()) { $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $term_custom = piklist('get_term_custom', $term->term_id); $slider_images = $term_custom['slider_images']; } else { $slider_images = get_post_meta($post->ID, 'slider_images', false); } // OK, let's get actual URL instead of attachment ID if ($slider_images) { foreach ($slider_images as $key => $value) { if (!$value) { unset($slider_images[$key]); } else { $slider_images[$key] = wp_get_attachment_url($value); } } } if ($slider_images) { ?>
function fc_remove_woo_lightbox() { global $woocommerce; $lightbox_en = get_option('woocommerce_enable_lightbox') == 'yes' ? true : false; if ($lightbox_en && (kds_is_product() || !empty($post->post_content) && strstr($post->post_content, '[product_page'))) { wp_dequeue_script('prettyPhoto-init'); wp_enqueue_script('tijara-prettyPhoto-init', get_template_directory_uri() . '/woocommerce/assets/js/prettyPhoto/jquery.prettyPhoto.init.js', array('jquery'), $woocommerce->version, true); } }