Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Changed regex so it could only start with width or height.
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-marshall committed Aug 28, 2017
1 parent 8007da4 commit c2fca14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/responsive-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ 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 ) {
if(!strpos($html, 'attachment-shop_single')) {
$html = preg_replace( '/(width|height)=\"\d*\"\s/', '', $html );
$html = preg_replace( '/^(width|height)=\"\d*\"\s/', '', $html );
}
return $html;
}
Expand Down

0 comments on commit c2fca14

Please sign in to comment.