Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gyfcat embed support #7612

Merged
merged 7 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion includes/amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,12 @@ function amp_register_default_scripts( $wp_scripts ) {
$version = $extension_spec['latest'];
}

// Skip registering the amp-gfycat extension.
// @TODO: Remove this once the amp-gfycat extension is removed from spec.
if ( 'amp-gfycat' === $extension_name ) {
continue;
}

$src = sprintf(
'https://cdn.ampproject.org/v0/%s-%s.js',
$extension_name,
Expand Down Expand Up @@ -1408,7 +1414,6 @@ function amp_get_content_embed_handlers( $post = null ) {
AMP_TikTok_Embed_Handler::class => [],
AMP_Tumblr_Embed_Handler::class => [],
AMP_Gallery_Embed_Handler::class => [],
AMP_Gfycat_Embed_Handler::class => [],
AMP_Imgur_Embed_Handler::class => [],
AMP_Scribd_Embed_Handler::class => [],
AMP_WordPress_Embed_Handler::class => [],
Expand Down
83 changes: 0 additions & 83 deletions includes/embeds/class-amp-gfycat-embed-handler.php

This file was deleted.

1 change: 0 additions & 1 deletion includes/sanitizers/class-amp-style-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer {
'amp-brightcove',
'amp-dailymotion',
'amp-delight-player',
'amp-gfycat',
'amp-ima-video',
'amp-mowplayer',
'amp-nexxtv-player',
Expand Down
2 changes: 0 additions & 2 deletions tests/php/test-amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,6 @@ public function test_amp_register_default_scripts_and_styles() {
'amp-fx-collection' => 'v0/amp-fx-collection-0.1.js',
'amp-fx-flying-carpet' => 'v0/amp-fx-flying-carpet-0.1.js',
'amp-geo' => 'v0/amp-geo-0.1.js',
'amp-gfycat' => 'v0/amp-gfycat-0.1.js',
'amp-gist' => 'v0/amp-gist-0.1.js',
'amp-google-document-embed' => 'v0/amp-google-document-embed-0.1.js',
'amp-google-read-aloud-player' => 'v0/amp-google-read-aloud-player-0.1.js',
Expand Down Expand Up @@ -1714,7 +1713,6 @@ public function test_amp_register_default_scripts_and_styles_with_bento() {
'amp-fx-collection' => 'v0/amp-fx-collection-0.1.js',
'amp-fx-flying-carpet' => 'v0/amp-fx-flying-carpet-0.1.js',
'amp-geo' => 'v0/amp-geo-0.1.js',
'amp-gfycat' => 'v0/amp-gfycat-0.1.js',
'amp-gist' => 'v0/amp-gist-0.1.js',
'amp-google-document-embed' => 'v0/amp-google-document-embed-0.1.js',
'amp-google-read-aloud-player' => 'v0/amp-google-read-aloud-player-0.1.js',
Expand Down
131 changes: 0 additions & 131 deletions tests/php/test-class-amp-gfycat-embed-handler.php

This file was deleted.

6 changes: 0 additions & 6 deletions tests/php/test-tag-and-attribute-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -965,12 +965,6 @@ static function () {
[ 'amp-form' ],
],

'gfycat' => [
'<amp-gfycat data-gfyid="BareSecondaryFlamingo" width="225" height="400"></amp-gfycat>',
'<amp-gfycat data-gfyid="BareSecondaryFlamingo" width="225" height="400"></amp-gfycat>',
[ 'amp-gfycat' ],
],

'h2' => [
'<h2>Example Text</h2>',
],
Expand Down
Loading