PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | classes/Picture/Display.php +9 -1 2.3.0 → trunk View file →
@@ -217,9 +217,17 @@
217 217 unset( $attributes['data-object-fit'] );
218 218 unset( $attributes['data-object-position'] );
219 219 }
220 220
221 - $output = '<picture' . $this->build_attributes( $attributes ) . ">\n";
221 + $picture_attributes = array_filter(
222 + $attributes,
223 + function ( $attribute ) {
224 + return strpos( $attribute, 'data-wp' ) === false;
225 + },
226 + ARRAY_FILTER_USE_KEY
227 + );
228 +
229 + $output = '<picture' . $this->build_attributes( $picture_attributes ) . ">\n";
222 230 /**
223 231 * Allow to add more <source> tags to the <picture> tag.
224 232 *
225 233 * @since 1.9