Last active
September 5, 2021 12:05
-
-
Save debonx/e320b281077bb9787444b88cc4ab76ee to your computer and use it in GitHub Desktop.
WooCommerce snippet to customise Single Product image thumbs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /** | |
* Single Product Thumbnails | |
* | |
* @param array $args | |
* @param int $attachment_id | |
* @param string $image_size | |
* @param bool $main_image | |
* @return array | |
*/ | |
function bones_gallery_image_html_attachment_image_params ( $args, $attachment_id, $image_size, $main_image ) | |
{ | |
$args['class'] = esc_attr( $main_image ? 'wp-post-image' : 'wp-post-image-thumb' ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment