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

Changed regex so it could only start with width or height. #1056

Merged
merged 1 commit into from
Aug 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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