Skip to content

Commit

Permalink
Update Display.php
Browse files Browse the repository at this point in the history
Linted
  • Loading branch information
michaelbourne authored Aug 1, 2023
1 parent cfdbdf4 commit 5ab9c45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/Webp/Picture/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ private function remove_picture_tags( $html ) {
*/
protected function build_picture_tag( $image ) {
/**
* List of ignored <img> attributes.
*/
* List of ignored <img> attributes.
*/
$to_remove = [
'alt' => '',
'height' => '',
Expand Down Expand Up @@ -233,7 +233,7 @@ protected function build_picture_tag( $image ) {
unset( $attributes['data-object-fit'] );
unset( $attributes['data-object-position'] );
}

/**
* Image Blocks with an Aspect Ratio set.
* Remove Gutenberg specific attributes from picture tag, leave them on img tag.
Expand Down Expand Up @@ -361,7 +361,7 @@ protected function build_img_tag( $image ) {
'title' => '',
];
}

$attributes = array_diff_key( $image['attributes'], $to_remove );

/**
Expand Down

0 comments on commit 5ab9c45

Please sign in to comment.