From 399b182157bac71048dde33850f9564010c46da3 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 27 Aug 2021 09:29:33 -0700 Subject: [PATCH] Use string literal for amp-tiktok instead of constant until amp-toolbox-php updated --- includes/embeds/class-amp-tiktok-embed-handler.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/embeds/class-amp-tiktok-embed-handler.php b/includes/embeds/class-amp-tiktok-embed-handler.php index f399483ab51..60049f02622 100644 --- a/includes/embeds/class-amp-tiktok-embed-handler.php +++ b/includes/embeds/class-amp-tiktok-embed-handler.php @@ -8,7 +8,6 @@ use AmpProject\Attribute; use AmpProject\Dom\Document; use AmpProject\Dom\Element; -use AmpProject\Extension; use AmpProject\Layout; use AmpProject\Tag; @@ -40,7 +39,7 @@ public function unregister_embed() { */ public function sanitize_raw_embeds( Document $dom ) { $nodes = $dom->xpath->query( - sprintf( '//blockquote[ @cite and @data-video-id and contains( @class, "tiktok-embed" ) and not( parent::%s ) ]', Extension::TIKTOK ) + sprintf( '//blockquote[ @cite and @data-video-id and contains( @class, "tiktok-embed" ) and not( parent::%s ) ]', 'amp-tiktok' ) ); foreach ( $nodes as $node ) { @@ -66,7 +65,7 @@ protected function make_embed_amp_compatible( Element $blockquote ) { $amp_tiktok = AMP_DOM_Utils::create_node( Document::fromNode( $dom ), - Extension::TIKTOK, + 'amp-tiktok', [ Attribute::LAYOUT => Layout::RESPONSIVE, Attribute::HEIGHT => 575,