woocommerce/templates/single-product/product-image.php

22 lines
650 B
PHP

<?php
/**
* Single Product Image
*/
global $post, $woocommerce;
?>
<div class="images">
<?php if (has_post_thumbnail()) : $thumb_id = get_post_thumbnail_id(); $large_thumbnail_size = apply_filters('single_product_large_thumbnail_size', 'shop_single'); ?>
<a itemprop="image" href="<?php echo wp_get_attachment_url($thumb_id); ?>" class="zoom" rel="thumbnails"><?php echo get_the_post_thumbnail($post->ID, $large_thumbnail_size) ?></a>
<?php else : ?>
<img src="<?php echo $woocommerce->plugin_url() ?>/assets/images/placeholder.png" alt="Placeholder" />
<?php endif; ?>
<?php do_action('woocommerce_product_thumbnails'); ?>
</div>