Commit Graph

64 Commits

Author SHA1 Message Date
Rodrigo Primo 9b094fc74d Use $product->get_image_id() instead of has_post_thumbnail()
This commit replaces all instances where has_post_thumbnail() was used with $product->get_image_id(). This is a continuation of 64b589f032 and is needed to support the custom product tables plugin as has_post_thumbnail() relies on a post meta.
2018-10-18 09:28:20 -03:00
Rodrigo Primo 3c76b4992b phpcs fixes 2018-10-18 09:11:26 -03:00
pierrebuet 4bed2ddeea Correct spaces 2018-09-24 21:45:55 +02:00
pierrebuet db3270a390 Show the right size of placeholder image on single product page
in the template for the product image, wc_placeholder_img_src() returns the thumbnail size of the image.
In order to use 'woocommerce_single' as size, the function needs to be corrected, so the function use the size and not a calculated array of sizes.  wc_get_image_size doesn't return an height for the woocommerce_single size. Further and since the image sizes are declared, there is no need to translate the size to an array.
2018-09-21 19:33:04 +02:00
Mike Jolley 280ca3757e wc_get_gallery_image_html checks 2018-02-13 19:18:13 +00:00
Mike Jolley 2b36b5f49f Main image should be larger. 2018-02-13 11:16:42 +00:00
Mike Jolley a55a4b9a88 Use helper function which has more filters and moves logic out of template file 2018-02-13 11:16:42 +00:00
Mike Jolley db4e630600 Replace thumbnail names 2017-11-07 18:48:51 +00:00
Mike Jolley 1e6d52a3bd Add a data-caption for captions and keep title around.
Fixes #14578
2017-04-25 14:31:24 +01:00
Govind Kumar fef8b8365b changed thumbnail image filter name 2017-04-17 15:43:17 +05:30
Govind Kumar d8f7deb92c added new filter for product thumbnail size. 2017-04-17 11:30:26 +05:30
Mike Jolley 98b21b6be7 Fix caption on thumbnails as well as main image 2017-04-11 12:08:04 +01:00
Mike Jolley d89567f0e6 Gallery images should show caption not description
Fixes #14218
2017-04-10 22:38:16 +01:00
Mike Jolley 62bd505bda CSS transition 2017-03-31 15:16:10 +01:00
Mike Jolley e2f1449553 Set data-src
Closes #13710
2017-03-22 12:51:27 +00:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Manos Psychogyiopoulos 20d2c8b269 merge branch 'master' into multiple-and-dynamic-galleries 2017-03-14 15:31:01 +02:00
Manos Psychogyiopoulos 9181f1c151 allow init with args 2017-03-14 12:55:25 +02:00
James Koster 53b7844412 Replace figure tags with divs. closes #13546
For easier theme support
2017-03-14 10:42:21 +00:00
Mike Jolley 234b4cfa91 Merge pull request #13009 from woocommerce/gallery-tweaks
Gallery tweaks
2017-02-09 12:34:23 +00:00
Mike Jolley 9c523d2bc1 Merge branch 'pr/12937'
# Conflicts:
#	templates/single-product/product-image.php
2017-01-27 16:52:46 +00:00
Mike Jolley 9bc5eefc98 Use array for class filter 2017-01-27 16:52:23 +00:00
Mike Jolley db77ad96e1 Add image links to template files 2017-01-27 15:35:20 +00:00
Mike Jolley e99d8c9ef6 Name filter woocommerce_single_product_image_thumbnail_html 2017-01-26 14:50:40 +00:00
Maximus80 be3a77be32 add column data attr to the single product image gallery wrapper 2017-01-23 14:27:25 +01:00
Maximus80 afc3d3a26a add filter for single product image gallery wrapper classes 2017-01-23 14:25:31 +01:00
James Koster 88a378ea79 Don't allow users to open the lightbox for placeholder images 2017-01-16 14:17:03 +00:00
Mike Jolley b150e4c790 Fix image display when only placeholders are visible. 2017-01-06 11:51:09 +00:00
Claudio Sanches 68b864313a Fixed conflicts 2016-10-13 16:58:20 -03:00
James Koster 3823b78318 Add/product galleries (#11665)
* register prettyPhoto but don't enqueue. #10721

* Remove lightbox option. #10721

Also registers the prettyPhoto styles instead of enqueueing

* Stip all prettyPhoto related stuff from the templates and tidy up some logic. #10721

* Add flexslider assets #10721

* styling and re-adds `woocommerce_single_product_image_thumbnail_html`. #10721.

* Add zoom functionality. #10721

* Move js to single-product.js. #10721

* styling of the gallery thumbnails when using the `product_page` shortcode. #10721

* Only enable the zoom if the image is large enough. #10721

* Use a 4 column layout by default. #10721

* Make the carousel options filterable. #10721

* rtl styles for gallery. #10721

* Don't zoom on handheld devices. #10721

* markup tweaks in prep for photoswipe

* disable zoom for now

* Add and enqueue photoswipe assets

* add the photoswipe template

* initialise photoswipe - it's alive!

* tidy up js. add title. add separate trigger. #10721

* Move photoswipe functions to single-product.js. #10721

* reactivate the zoom! #10721

* style the photoswipe trigger. #10721

* disable flexslider animation loop. #10721

* js tidy up. #10721

* Fix jshint

* Abstract the product gallery scripts

* Minify

* Fixed conflict with the admin bar

* Photoswipe conflict with admin bar

* Index. #10721

* photoswipe button styles. #10721

* Styling. #10721

* No animation on zoom
* Image width on mobile

* No shadows please. #10721

Looking at you, Twenty Twelve.

* code tidy and add class to placeholder figure. #10721

* simplify rtl query

* photoswipe button styles

* Comma should not be here

* zoom icon #10721

* gallery thumb styles. #10721

* trigger icon. #10721

* Image margins. #10721

* icon hover states. #10721

* Variation handling

* Fix zoom and heights

* Resize after timeout
2016-10-13 15:25:42 +01:00
opportus b59d512774 improved structured data - patch2 - merge conflict fix 2016-07-19 22:42:24 +02:00
Mike Jolley e1a5bb1f28 Escape caption in product-images.php 2016-07-19 19:09:33 +01:00
Claudio Sanches 14eeee15ee Welcome to docs.woocommerce.com 2016-07-19 07:30:31 -03:00
opportus d74a3408b3 improved structured data 2016-07-17 04:57:03 +02:00
Claudio Sanches e39274e753 HTTPS for everybody 2016-05-26 22:48:49 -03:00
Mike Jolley fce8dc0868 Ensure alt text is set for product attachments
@claudiosmweb Fixes #10822
2016-05-03 16:41:51 +01:00
Mike Jolley bd4c90dbec Docblocks
Fixes #10336
2016-02-12 11:28:44 +00:00
Mike Jolley 25e02ac6f1 Alt text is set by WP
Fixes #10215
2016-01-29 11:25:43 +00:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Caleb Burks ee2757c08f Specific template override paths 2015-10-03 02:58:08 -05:00
Mike Jolley de4a80f950 Add disclaimer to template files
Closes #8942
2015-10-01 16:07:35 +02:00
James Koster 0973dec1e3 lightbox uses image title / caption correctly. 2015-03-02 12:15:10 +00:00
shivapoudel 61430e1515 Absolute path should have curly braces - part 2 2014-09-22 22:22:57 +05:45
claudiosmweb 61c94f9e25 fixed some hard code strings 2014-06-11 17:12:23 -03:00
splashingpixels 1e998f776e template coding standard fixes 2014-04-07 19:29:39 -07:00
Mike Jolley 3408965b8a Product functions 2013-11-25 14:01:38 +00:00
Mike Jolley 3d01a288ec hook: 'data-rel', Closes #4115 2013-11-18 13:00:56 +00:00
Mike Jolley bfc2b52d10 Ensure product image has title 2013-09-04 14:17:17 +01:00
Stephan 769fada460 Update product-image.php
Fix to correctly calculate $attachment_count
2013-04-27 00:42:41 +10:00