diff --git a/.gitignore b/.gitignore index ba51521f7..1d915da94 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ npm-debug.log dist *.sass-cache* *.log +.idea/ *.swp + diff --git a/library/responsive-images.php b/library/responsive-images.php index 323ef93ee..a4363892c 100644 --- a/library/responsive-images.php +++ b/library/responsive-images.php @@ -60,7 +60,9 @@ function foundationpress_adjust_image_sizes_attr( $sizes, $size ) { // Remove inline width and height attributes for post thumbnails function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) { - $html = preg_replace( '/(width|height)=\"\d*\"\s/', '', $html ); - return $html; + if(!strpos($html, 'attachment-shop_single')) { + $html = preg_replace( '/(width|height)=\"\d*\"\s/', '', $html ); + } + return $html; } add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 ); diff --git a/library/theme-support.php b/library/theme-support.php index 585cefd1b..0e6240639 100644 --- a/library/theme-support.php +++ b/library/theme-support.php @@ -37,6 +37,10 @@ function foundationpress_theme_support() { // Declare WooCommerce support per http://docs.woothemes.com/document/third-party-custom-theme-compatibility/ add_theme_support( 'woocommerce' ); + // Additional theme support for woocommerce 3.0.+ + add_theme_support( 'wc-product-gallery-zoom' ); + add_theme_support( 'wc-product-gallery-lightbox' ); + add_theme_support( 'wc-product-gallery-slider' ); // Add foundation.css as editor style https://codex.wordpress.org/Editor_Style add_editor_style( 'assets/stylesheets/foundation.css' );