Skip to content

Commit 92553f2

Browse files
committed
Fix regex for dominant_color
1 parent e4fb28f commit 92553f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/dominant-color-images/hooks.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function dominant_color_prepare_attachment_for_js( $response, WP_Post $attachmen
264264
if (
265265
isset( $meta['dominant_color'] )
266266
&&
267-
1 === preg_match( '/^[0-9A-F]+$/', $meta['dominant_color'] ) // See format returned by dominant_color_rgb_to_hex().
267+
1 === preg_match( '/^[0-9a-f]+$/', $meta['dominant_color'] ) // See format returned by dominant_color_rgb_to_hex().
268268
) {
269269
$response['dominantColor'] = $meta['dominant_color'];
270270
}
@@ -273,8 +273,6 @@ function dominant_color_prepare_attachment_for_js( $response, WP_Post $attachmen
273273
$response['hasTransparency'] = (bool) $meta['has_transparency'];
274274
}
275275

276-
$response['testMeta'] = $meta;
277-
278276
return $response;
279277
}
280278
add_filter( 'wp_prepare_attachment_for_js', 'dominant_color_prepare_attachment_for_js', 10, 3 );

0 commit comments

Comments
 (0)