本文整理汇总了PHP中woocommerce_placeholder_img_src函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_placeholder_img_src函数的具体用法?PHP woocommerce_placeholder_img_src怎么用?PHP woocommerce_placeholder_img_src使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woocommerce_placeholder_img_src函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: woocommerce_get_product_thumbnail
function woocommerce_get_product_thumbnail($size = 'shop_catalog', $placeholder_width = 0, $placeholder_height = 0)
{
global $post, $woocommerce, $data;
if (!$placeholder_width) {
if (function_exists('wc_get_image_size')) {
$placeholder_width = wc_get_image_size('shop_catalog_image_width');
} else {
$placeholder_width = $woocommerce->get_image_size('shop_catalog_image_width');
}
}
if (!$placeholder_height) {
if (function_exists('wc_get_image_size')) {
$placeholder_height = wc_get_image_size('shop_catalog_image_height');
} else {
$placeholder_height = $woocommerce->get_image_size('shop_catalog_image_height');
}
}
$output = '<div class="image">';
if (has_post_thumbnail()) {
$width = '150';
$height = '130';
if (!empty($data['woo_cat_image_size'])) {
$width = $data['woo_cat_image_size']['width'];
$height = $data['woo_cat_image_size']['height'];
}
$image = vt_resize(get_post_thumbnail_id($post->ID), '', $width, $height, true);
$output .= '<a href="' . get_permalink() . '"><img src="' . $image['url'] . '" alt=""></a>';
} else {
$output .= '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" width="' . $placeholder_width . '" height="' . $placeholder_height . '" />';
}
$output .= '</div>';
return $output;
}
示例2: wc_placeholder_img_src
public static function wc_placeholder_img_src()
{
if (self::is_wc_version_gte_2_1()) {
return wc_placeholder_img_src();
} else {
return woocommerce_placeholder_img_src();
}
}
示例3: widget
/**
* widget function.
*
* @see WP_Widget
* @access public
* @param array $args
* @param array $instance
* @return void
*/
function widget($args, $instance)
{
global $woocommerce;
// Use default title as fallback
$title = '' === $instance['title'] ? __('Random Products', 'woocommerce') : $instance['title'];
$title = apply_filters('widget_title', $title, $instance, $this->id_base);
// Setup product query
$query_args = array('post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => $instance['number'], 'orderby' => 'rand', 'no_found_rows' => 1);
$query_args['meta_query'] = array();
if (!$instance['show_variations']) {
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$query_args['post_parent'] = 0;
}
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query = new WP_Query($query_args);
if ($query->have_posts()) {
echo $args['before_widget'];
if ('' !== $title) {
echo $args['before_title'], $title, $args['after_title'];
}
?>
<ul class="product_list_widget">
<?php
while ($query->have_posts()) {
$query->the_post();
global $product;
?>
<li>
<a href="<?php
the_permalink();
?>
">
<?php
if (has_post_thumbnail()) {
the_post_thumbnail('shop_thumbnail');
} else {
echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" width="' . $woocommerce->get_image_size('shop_thumbnail_image_width') . '" height="' . $woocommerce->get_image_size('shop_thumbnail_image_height') . '" />';
}
?>
<?php
the_title();
?>
</a>
<?php
echo $product->get_price_html();
?>
</li>
<?php
}
?>
</ul>
<?php
echo $args['after_widget'];
}
}
示例4: woops_get_product_thumbnail
public static function woops_get_product_thumbnail($post_id, $size = 'shop_catalog', $placeholder_width = 0, $placeholder_height = 0)
{
global $woocommerce;
$woocommerce_db_version = get_option('woocommerce_db_version', null);
$shop_catalog = version_compare($woocommerce_db_version, '2.1', '<') ? $woocommerce->get_image_size('shop_catalog') : wc_get_image_size('shop_catalog');
if (is_array($shop_catalog) && isset($shop_catalog['width']) && $placeholder_width == 0) {
$placeholder_width = $shop_catalog['width'];
}
if (is_array($shop_catalog) && isset($shop_catalog['height']) && $placeholder_height == 0) {
$placeholder_height = $shop_catalog['height'];
}
if (has_post_thumbnail($post_id)) {
return get_the_post_thumbnail($post_id, $size);
}
$mediumSRC = '';
if (trim($mediumSRC == '')) {
$args = array('post_parent' => $post_id, 'numberposts' => 1, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'DESC', 'orderby' => 'ID', 'post_status' => null);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$mediumSRC = wp_get_attachment_image($attachment->ID, $size, true);
break;
}
}
}
if (trim($mediumSRC == '')) {
// Load the product
$product = get_post($post_id);
// Get ID of parent product if one exists
if (!empty($product->post_parent)) {
$post_id = $product->post_parent;
}
if (has_post_thumbnail($post_id)) {
return get_the_post_thumbnail($post_id, $size);
}
if (trim($mediumSRC == '')) {
$args = array('post_parent' => $post_id, 'numberposts' => 1, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'DESC', 'orderby' => 'ID', 'post_status' => null);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$mediumSRC = wp_get_attachment_image($attachment->ID, $size, true);
break;
}
}
}
}
if (trim($mediumSRC != '')) {
return $mediumSRC;
} else {
return '<img src="' . (version_compare($woocommerce_db_version, '2.1', '<') ? woocommerce_placeholder_img_src() : wc_placeholder_img_src()) . '" alt="Placeholder" width="' . $placeholder_width . '" height="' . $placeholder_height . '" />';
}
}
示例5: jck_quickview_content
function jck_quickview_content()
{
global $post, $product, $woocommerce;
echo '<div class="hide">';
echo '<div itemscope itemtype="http://schema.org/Product" id="product-' . get_the_ID() . '" class="jck_quickview product">';
echo '<div class="images">';
if (has_post_thumbnail()) {
echo get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'shop_single'));
} else {
echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" class="attachment-shop_single wp-post-image" />';
}
$attachment_ids = $product->get_gallery_attachment_ids();
if ($attachment_ids) {
?>
<div class="thumbnails"><?php
if (has_post_thumbnail()) {
array_unshift($attachment_ids, get_post_thumbnail_id($post->ID));
}
$loop = 0;
$columns = apply_filters('woocommerce_product_thumbnails_columns', 3);
foreach ($attachment_ids as $attachment_id) {
$wrapClasses = array('quickviewThumbs-' . $columns . 'col', 'jck_quickview_thumb');
$classes = array('attachment-shop_thumbnail');
if ($loop == 0 || $loop % $columns == 0) {
$wrapClasses[] = 'first';
}
if ($loop == 0) {
$wrapClasses[] = 'firstThumb';
}
if (($loop + 1) % $columns == 0) {
$wrapClasses[] = 'last';
}
$image_class = esc_attr(implode(' ', $classes));
$lrgImg = wp_get_attachment_image_src($attachment_id, 'shop_single');
echo '<a href="' . $lrgImg[0] . '" class="' . esc_attr(implode(' ', $wrapClasses)) . '">' . wp_get_attachment_image($attachment_id, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), false, array('class' => $image_class)) . '</a>';
$loop++;
}
?>
</div>
<?php
}
echo '</div>';
echo '<div class="summary entry-summary">';
do_action('jck_quickview_single_product_summary');
echo '</div><!-- .summary -->';
echo '</div><!-- #product-' . get_the_ID() . ' -->';
echo '</div>';
}
示例6: woocommerce_subcategory_thumbnail
function woocommerce_subcategory_thumbnail($category)
{
// Figure
$figure = \Drone\HTML::figure()->class('featured full-width');
// Hyperlink
$a = $figure->addNew('a')->attr(Everything::getImageAttrs('a', array('fancybox' => false)))->href(get_term_link($category->slug, 'product_cat'));
// Thumbnail
$thumbnail_id = get_woocommerce_term_meta($category->term_id, 'thumbnail_id', true);
$thumbnail_size = apply_filters('single_product_small_thumbnail_size', 'shop_catalog');
if ($thumbnail_id) {
$a->add(wp_get_attachment_image($thumbnail_id, $thumbnail_size));
} elseif (woocommerce_placeholder_img_src()) {
$a->add(woocommerce_placeholder_img($thumbnail_size));
}
echo $figure->html();
}
示例7: woocommerce_template_loop_product_thumbnail
public function woocommerce_template_loop_product_thumbnail()
{
global $post, $product, $woocommerce;
$placeholder_width = get_option('shop_catalog_image_size');
$placeholder_width = $placeholder_width['width'];
$placeholder_height = get_option('shop_catalog_image_size');
$placeholder_height = $placeholder_height['height'];
$output = '';
$class = 'image-no-effect';
if (has_post_thumbnail()) {
$attachment_ids = $product->get_gallery_attachment_ids();
if ($attachment_ids) {
$class = 'image-effect';
$output .= wp_get_attachment_image($attachment_ids[0], 'shop_catalog', false, array('class' => "attachment-shop_catalog image-hover"));
}
$output .= get_the_post_thumbnail($post->ID, 'shop_catalog', array('class' => $class));
} else {
$output .= '<img src="' . woocommerce_placeholder_img_src() . '" alt="' . __('Placeholder', 'gp_lang') . '" class="' . $class . '" width="' . $placeholder_width . '" height="' . $placeholder_height . '" />';
}
echo $output;
}
示例8: get_template_image_file_info
/**
* get_template_image_file_info( $file )
*
* @access public
* @since 3.8
* @param $file string filename
* @return PATH to the file
*/
public static function get_template_image_file_info($file = '')
{
// If we're not looking for a file, do not proceed
if (empty($file)) {
return;
}
// Look for file in stylesheet
$image_info = array();
if (file_exists(get_stylesheet_directory() . '/images/' . $file)) {
$file_url = get_stylesheet_directory_uri() . '/images/' . $file;
list($current_width, $current_height) = getimagesize(get_stylesheet_directory() . '/images/' . $file);
$image_info['url'] = $file_url;
$image_info['width'] = $current_width;
$image_info['height'] = $current_height;
// Look for file in template
} elseif (file_exists(get_template_directory() . '/images/' . $file)) {
$file_url = get_template_directory_uri() . '/images/' . $file;
list($current_width, $current_height) = getimagesize(get_template_directory() . '/images/' . $file);
$image_info['url'] = $file_url;
$image_info['width'] = $current_width;
$image_info['height'] = $current_height;
// Backwards compatibility
} else {
$woocommerce_db_version = get_option('woocommerce_db_version', null);
$file_url = version_compare($woocommerce_db_version, '2.1', '<') ? woocommerce_placeholder_img_src() : wc_placeholder_img_src();
list($current_width, $current_height) = getimagesize($file_url);
$image_info['url'] = $file_url;
$image_info['width'] = $current_width;
$image_info['height'] = $current_height;
}
if (is_ssl()) {
$file_url = str_replace('http://', 'https://', $file_url);
$image_info['url'] = $file_url;
}
return $image_info;
}
示例9: wp_get_attachment_image_src
if ($presizeimage == 1) {
$product_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
$product_image_url = $product_image[0];
$image_url = aq_resize($product_image_url, $productimgwidth, $productimgheight, true);
if (empty($image_url)) {
$image_url = $product_image_url;
}
$image = '<img width="' . $productimgwidth . '" height="' . $productimgheight . '" src="' . $image_url . '" class="attachment-shop_single wp-post-image" title="' . esc_attr(get_the_title(get_post_thumbnail_id())) . '">';
} else {
$image = get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'shop_single'), array('title' => $image_title));
}
$image_title = esc_attr(get_the_title(get_post_thumbnail_id()));
$image_link = wp_get_attachment_url(get_post_thumbnail_id());
$attachment_count = count($product->get_gallery_attachment_ids());
if ($attachment_count > 0) {
$gallery = '[product-gallery]';
} else {
$gallery = '';
}
echo apply_filters('woocommerce_single_product_image_html', sprintf('<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" rel="lightbox' . $gallery . '">%s</a>', $image_link, $image_title, $image), $post->ID);
} else {
echo apply_filters('woocommerce_single_product_image_html', sprintf('<img src="%s" alt="Placeholder" />', woocommerce_placeholder_img_src()), $post->ID);
}
?>
</div>
<?php
do_action('woocommerce_product_thumbnails');
?>
</div>
示例10: widget
/** @see WP_Widget */
function widget($args, $instance)
{
global $woocommerce;
$cache = wp_cache_get('widget_best_sellers', 'widget');
if (!is_array($cache)) {
$cache = array();
}
if (isset($cache[$args['widget_id']])) {
echo $cache[$args['widget_id']];
return;
}
ob_start();
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Best Sellers', 'woocommerce') : $instance['title'], $instance, $this->id_base);
if (!($number = (int) $instance['number'])) {
$number = 10;
} else {
if ($number < 1) {
$number = 1;
} else {
if ($number > 15) {
$number = 15;
}
}
}
$query_args = array('posts_per_page' => $number, 'post_status' => 'publish', 'post_type' => 'product', 'meta_key' => 'total_sales', 'orderby' => 'meta_value', 'no_found_rows' => 1);
$query_args['meta_query'] = array();
if (isset($instance['hide_free']) && 1 == $instance['hide_free']) {
$query_args['meta_query'][] = array('key' => '_price', 'value' => 0, 'compare' => '>', 'type' => 'DECIMAL');
}
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$r = new WP_Query($query_args);
if ($r->have_posts()) {
?>
<?php
echo $before_widget;
?>
<?php
if ($title) {
echo $before_title . $title . $after_title;
}
?>
<ul class="product_list_widget">
<?php
while ($r->have_posts()) {
$r->the_post();
global $product;
?>
<li><a href="<?php
the_permalink();
?>
" title="<?php
echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
?>
">
<?php
if (has_post_thumbnail()) {
the_post_thumbnail('shop_thumbnail');
} else {
echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" width="' . $woocommerce->get_image_size('shop_thumbnail_image_width') . '" height="' . $woocommerce->get_image_size('shop_thumbnail_image_height') . '" />';
}
?>
<?php
if (get_the_title()) {
the_title();
} else {
the_ID();
}
?>
</a> <?php
echo $product->get_price_html();
?>
</li>
<?php
}
?>
</ul>
<?php
echo $after_widget;
}
$content = ob_get_clean();
if (isset($args['widget_id'])) {
$cache[$args['widget_id']] = $content;
}
echo $content;
wp_cache_set('widget_best_sellers', $cache, 'widget');
}
示例11: dhwc_product_brand_column
/**
* Thumbnail column value added to brand admin.
*
* @access public
* @param mixed $columns
* @param mixed $column
* @param mixed $id
* @return void
*/
function dhwc_product_brand_column($columns, $column, $id)
{
global $woocommerce;
if ($column == 'thumb') {
$image = '';
$thumbnail_id = get_woocommerce_term_meta($id, 'thumbnail_id', true);
if ($thumbnail_id) {
$image = wp_get_attachment_thumb_url($thumbnail_id);
} else {
$image = woocommerce_placeholder_img_src();
}
$columns .= '<img src="' . $image . '" alt="Thumbnail" class="wp-post-image" height="48" width="48" />';
}
return $columns;
}
示例12: widget
/**
* (non-PHPdoc)
* @see wp-includes/WP_Widget::widget()
*/
public function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Brands', DH_DOMAIN) : $instance['title'], $instance, $this->id_base);
$o = isset($instance['orderby']) ? $instance['orderby'] : 'order';
$h = $instance['hide_empty'] ? true : false;
if ($o == 'name') {
$order = 'asc';
} else {
$order = 'desc';
}
$brands = get_terms('product_brand', array('hide_empty' => $h, 'orderby' => $o, 'order' => $order));
if (!$brands) {
return;
}
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
?>
<div class="product-brand-slide">
<ul id="pb-<?php
echo $args['widget_id'];
?>
" class="list-brand">
<?php
foreach ($brands as $brand) {
?>
<?php
$thumbnail = dhwc_get_product_brand_thumbnail_url($brand->term_id);
if (!$thumbnail) {
$thumbnail = woocommerce_placeholder_img_src();
}
?>
<li class="item">
<a title="<?php
echo $brand->name;
?>
" href="<?php
echo get_term_link($brand->slug, 'product_brand');
?>
">
<img alt="<?php
echo $brand->name;
?>
" src="<?php
echo $thumbnail;
?>
">
</a>
<h2><a title="<?php
echo $brand->name;
?>
" href="<?php
echo get_term_link($brand->slug, 'product_brand');
?>
"><?php
echo $brand->name;
?>
</a></h2>
</li>
<?php
}
?>
</ul>
</div>
<script type="text/javascript">
<!--
jQuery(document).ready(function($){
$('#pb-<?php
echo $args['widget_id'];
?>
').bxSlider();
});
//-->
</script>
<?php
echo $after_widget;
}
示例13: load_product_content_callback
public function load_product_content_callback()
{
$prod_id = absint($_GET['product_id']);
$this->id = $prod_id;
global $post, $product, $woocommerce;
$post = get_post($prod_id);
$product = get_product($prod_id);
if ($prod_id <= 0) {
die('Invalid Products');
}
if (!isset($post->post_type) || strcmp($post->post_type, 'product') != 0) {
die('Invalid Products');
}
add_filter('woocommerce_add_to_cart_url', array($this, 'update_qs_add_to_cart_url'), 10);
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 1000);
remove_action('woocommerce_product_thumbnails', 'woocommerce_template_single_sharing', 50);
global $wd_data;
if (isset($wd_data['wd_catelog_mod']) && $wd_data['wd_catelog_mod'] == 0) {
remove_action('wd_quickshop_single_product_summary', 'woocommerce_template_single_add_to_cart', 11);
}
ob_start();
?>
<div itemscope itemtype="http://schema.org/Product" id="product-<?php
echo get_the_ID();
?>
" class="wd_quickshop product">
<div class="images">
<?php
do_action('wd_qs_before_product_image');
?>
<?php
if (has_post_thumbnail()) {
$image_title = esc_attr($product->get_title());
$image = get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'shop_single'), array('alt' => $image_title, 'title' => $image_title));
$image_link = wp_get_attachment_url(get_post_thumbnail_id());
$attachment_count = count($product->get_gallery_attachment_ids());
echo apply_filters('woocommerce_single_product_image_html', sprintf('<a href="%s" itemprop="image" class="woocommerce-main-image cloud-zoom zoom wd_qs_main_image" title="%s" id=\'qs-zoom\' rel="position:\'right\',showTitle:1,titleOpacity:0.5,lensOpacity:0.5,fixWidth:362,fixThumbWidth:72,fixThumbHeight:72,adjustX: 0, adjustY:0">%s</a>', $image_link, $image_title, $image), $post->ID);
} else {
echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" class="attachment-shop_single wp-post-image wd_qs_main_image" />';
}
$attachment_ids = $product->get_gallery_attachment_ids();
if ($attachment_ids) {
?>
<div class="thumbnails list_carousel">
<ul class="qs-thumbnails">
<?php
if (has_post_thumbnail()) {
array_unshift($attachment_ids, get_post_thumbnail_id($post->ID));
}
$loop = 0;
$columns = apply_filters('woocommerce_product_thumbnails_columns', 3);
foreach ($attachment_ids as $attachment_id) {
$wrapClasses = array('quickshop-thumb-' . $columns . 'col', 'wd_quickshop_thumb', 'pop_cloud_zoom cloud-zoom-gallery');
$classes = array('attachment-shop_thumbnail');
if ($loop == 0 || $loop % $columns == 0) {
$wrapClasses[] = 'first';
}
if ($loop == 0) {
$wrapClasses[] = 'firstThumb';
}
if (($loop + 1) % $columns == 0) {
$wrapClasses[] = 'last';
}
$image_class = esc_attr(implode(' ', $classes));
$lrgImg = wp_get_attachment_image_src($attachment_id, 'shop_single');
$lrgImg_full = wp_get_attachment_image_src($attachment_id, 'full');
echo '<li><a href="' . $lrgImg_full[0] . '"rel="useZoom: \'qs-zoom\', smallImage: \'' . $lrgImg[0] . '\'" class="' . esc_attr(implode(' ', $wrapClasses)) . '">' . wp_get_attachment_image($attachment_id, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), false, array('class' => $image_class)) . '</a></li>';
$loop++;
}
?>
</ul>
<div class="slider_control">
<a id="qs_thumbnails_prev" class="prev" href="#"><</a>
<a id="qs_thumbnails_next" class="next" href="#">></a>
</div>
</div>
<?php
}
?>
<div class="details_view">
<a href="<?php
echo the_permalink();
?>
" title="<?php
_e('View Details', 'wpdance');
?>
" ><?php
_e('View Details', 'wpdance');
?>
</a>
</div>
//.........这里部分代码省略.........
示例14: array
<div id="<?php
echo $this->slug . '_images';
?>
" class="royalSlider rsMinW">
<?php
$prodImgs = array();
if (has_post_thumbnail()) {
$imgId = get_post_thumbnail_id();
$prodImgs[$imgId]['slideId'][] = '-0-';
$prodImgs[$imgId]['imgSrc'] = wp_get_attachment_image_src(get_post_thumbnail_id(), apply_filters('single_product_large_thumbnail_size', 'shop_single'));
$prodImgs[$imgId]['imgThumbSrc'] = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail');
} else {
$prodImgs[0]['slideId'][] = '-0-';
$prodImgs[0]['imgSrc'] = woocommerce_placeholder_img_src();
$prodImgs[0]['imgThumbSrc'] = woocommerce_placeholder_img_src();
}
// Additional Images
$attachIds = $product->get_gallery_attachment_ids();
$attachment_count = count($attachIds);
if (!empty($attachIds)) {
foreach ($attachIds as $attachId) {
$prodImgs[$attachId]['slideId'][] = '-0-';
$prodImgs[$attachId]['imgSrc'] = wp_get_attachment_image_src($attachId, apply_filters('single_product_large_thumbnail_size', 'shop_single'));
$prodImgs[$attachId]['imgThumbSrc'] = wp_get_attachment_image_src($attachId, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'));
}
}
// !If is Varibale product
if ($product->product_type == 'variable') {
$prodVars = $product->get_available_variations();
if (!empty($prodVars)) {
示例15: get_option
<?php
/**
* Single Product Image
*
* @author YIThemes
* @package YITH_Magnifier/Templates
* @version 1.1.2
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
global $post, $woocommerce, $product, $is_IE;
$enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
$placeholder = function_exists('wc_placeholder_img_src') ? wc_placeholder_img_src() : woocommerce_placeholder_img_src();
$slider_items = get_option('yith_wcmg_slider_items', 3);
if (!isset($slider_items) || $slider_items == null) {
$slider_items = 3;
}
?>
<?php
$attachment_ids = $product->get_gallery_attachment_ids();
if (!empty($attachment_ids)) {
$imageclass = 'hasthumb';
} else {
$imageclass = 'nothumb';
}
?>
<div class="images<?php