Created
September 9, 2019 06:43
-
-
Save westonruter/77ef69f59c25127f0b6d3e59b10a5930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/sanitizers/class-amp-style-sanitizer.php b/includes/sanitizers/class-amp-style-sanitizer.php | |
index 988c4942..87d0c470 100644 | |
--- a/includes/sanitizers/class-amp-style-sanitizer.php | |
+++ b/includes/sanitizers/class-amp-style-sanitizer.php | |
@@ -667,6 +667,15 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer { | |
$this->used_attributes[ $attribute_name ] = ( 0 !== $this->xpath->query( $expression )->length ); | |
} | |
+ | |
+ // Attributes for amp-accordion, see <https://amp.dev/documentation/components/amp-accordion/#styling>. | |
+ if ( 'expanded' === $attribute_name ) { | |
+ if ( ! $this->has_used_tag_names( [ 'amp-accordion' ] ) ) { | |
+ return false; | |
+ } | |
+ continue; | |
+ } | |
+ | |
if ( ! $this->used_attributes[ $attribute_name ] ) { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment