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

29 lines
783 B
PHP
Raw Normal View History

2011-12-11 01:08:33 +00:00
<?php
/**
* Single Product Image
2012-08-14 18:05:45 +00:00
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
2011-12-11 01:08:33 +00:00
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2011-12-11 01:08:33 +00:00
global $post, $woocommerce;
2012-04-12 16:22:56 +00:00
2011-12-11 01:08:33 +00:00
?>
<div class="images">
2012-04-12 16:22:56 +00:00
<?php if ( has_post_thumbnail() ) : ?>
2011-12-11 01:08:33 +00:00
2013-01-31 14:15:50 +00:00
<a itemprop="image" href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" rel="prettyPhoto[product-gallery]" title="<?php echo get_the_title( get_post_thumbnail_id() ); ?>"><?php echo get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ) ?></a>
2011-12-11 01:08:33 +00:00
<?php else : ?>
2012-08-14 18:05:45 +00:00
<img src="<?php echo woocommerce_placeholder_img_src(); ?>" alt="Placeholder" />
2012-08-14 18:05:45 +00:00
2011-12-11 01:08:33 +00:00
<?php endif; ?>
<?php do_action('woocommerce_product_thumbnails'); ?>
</div>