From bfc2b52d1013b6fa66ff78a4f8364cb9690233b9 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 4 Sep 2013 14:17:17 +0100 Subject: [PATCH] Ensure product image has title --- templates/single-product/product-image.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index b2be1e2d110..4ba40ab7901 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -4,7 +4,7 @@ * * @author WooThemes * @package WooCommerce/Templates - * @version 2.0.3 + * @version 2.0.14 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -17,9 +17,11 @@ global $post, $woocommerce, $product; ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ); $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) ); $image_link = wp_get_attachment_url( get_post_thumbnail_id() ); + $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( + 'title' => $image_title + ) ); $attachment_count = count( $product->get_gallery_attachment_ids() ); if ( $attachment_count > 0 ) {