Skip to content

Commit

Permalink
Add support for legacy version of duotone prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
delawski committed Mar 11, 2022
1 parent 703e853 commit f68c8e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/sanitizers/class-amp-block-uniqid-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class AMP_Block_Uniqid_Sanitizer extends AMP_Base_Sanitizer {
const KEY_PREFIXES = [
'wp-container-',
'wp-duotone-',
'wp-duotone-filter-',
'wp-elements-',
];

Expand Down Expand Up @@ -115,7 +116,7 @@ function ( $matches ) {
}
$new_key = $this->key_mapping[ $old_key ];

if ( 'wp-duotone-' === $matches['prefix'] ) {
if ( in_array( $matches['prefix'], [ 'wp-duotone-', 'wp-duotone-filter-' ], true ) ) {
$this->transform_duotone_filter( $old_key, $new_key );
}

Expand Down

0 comments on commit f68c8e2

Please sign in to comment.