Skip to content

Commit 1131c4d

Browse files
committed
Remove vague condition that return attributes
1 parent 54baf60 commit 1131c4d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

includes/sanitizers/class-amp-img-sanitizer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ private function maybe_add_lightbox_attributes( $attributes, $node ) {
546546
$parent_attributes = AMP_DOM_Utils::get_node_attributes_as_assoc_array( $parent_node );
547547
} elseif ( Tag::A === $parent_node->tagName && Tag::FIGURE === $parent_node->parentNode->tagName ) {
548548
$parent_attributes = AMP_DOM_Utils::get_node_attributes_as_assoc_array( $parent_node->parentNode );
549-
} else {
550-
return $attributes;
551549
}
552550

553551
if ( isset( $parent_attributes['data-amp-lightbox'] ) && true === filter_var( $parent_attributes['data-amp-lightbox'], FILTER_VALIDATE_BOOLEAN ) ) {

0 commit comments

Comments
 (0)