Embeds: Remove Facebook and Instagram as an oEmbed Source

Facebook has depracated all non-authenticated endpoints for Facebook and Instagram. 

See: https://developers.facebook.com/docs/plugins/oembed-legacy
See also: https://make.wordpress.org/core/2020/09/22/facebook-and-instagram-embeds-to-be-deprecated-october-24th/

With this change, endpoints are being removed. If a site is dependent on this feature, they need to pass either an app or client token. There are a few plugins that add this functionality.

Fixes #50861.
Props johnbillion, joyously, mkaz, dimadin, ayeshrajans, davisshaver, paaljoachim, Clorith, bridgetwillard, jb510, sippis, Clorith, TimothyBlynJacobs, desrosj, smub, audrasjb, whyisjake.

Built from https://develop.svn.wordpress.org/trunk@49359


git-svn-id: http://core.svn.wordpress.org/trunk@49119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-10-28 19:11:06 +00:00
parent 41d5f153c5
commit dbae445997
2 changed files with 6 additions and 17 deletions

View File

@ -72,7 +72,6 @@ class WP_oEmbed {
'#https?://(www\.)?twitter\.com/i/moments/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
'#https?://(www\.)?soundcloud\.com/.*#i' => array( 'https://soundcloud.com/oembed', true ),
'#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ),
'#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i' => array( 'https://api.instagram.com/oembed', true ),
'#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ),
'#https?://(.+\.)?imgur\.com/.*#i' => array( 'https://api.imgur.com/oembed', true ),
'#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'https://api.meetup.com/oembed', true ),
@ -88,16 +87,6 @@ class WP_oEmbed {
'#https?://videopress\.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/?for=' . $host, true ),
'#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed', true ),
'#https?://(www\.)?speakerdeck\.com/.*#i' => array( 'https://speakerdeck.com/oembed.{format}', true ),
'#https?://www\.facebook\.com/.*/posts/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/.*/activity/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/.*/photos/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/photo(s/|\.php).*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/permalink\.php.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/media/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/questions/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/notes/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
'#https?://www\.facebook\.com/.*/videos/.*#i' => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
'#https?://www\.facebook\.com/video\.php.*#i' => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
'#https?://(www\.)?screencast\.com/.*#i' => array( 'https://api.screencast.com/external/oembed', true ),
'#https?://([a-z0-9-]+\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
'#https?://([a-z0-9-]+\.)?amazon\.(co\.uk|de|fr|it|es|in|nl|ru)/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed', true ),
@ -150,8 +139,6 @@ class WP_oEmbed {
* | SmugMug | smugmug.com | 3.0.0 |
* | YouTube | youtu.be | 3.0.0 |
* | Twitter | twitter.com | 3.4.0 |
* | Instagram | instagram.com | 3.5.0 |
* | Instagram | instagr.am | 3.5.0 |
* | Slideshare | slideshare.net | 3.5.0 |
* | SoundCloud | soundcloud.com | 3.5.0 |
* | Dailymotion | dai.ly | 3.6.0 |
@ -177,7 +164,6 @@ class WP_oEmbed {
* | Speaker Deck | speakerdeck.com | 4.4.0 |
* | Twitter | twitter.com/timelines | 4.5.0 |
* | Twitter | twitter.com/moments | 4.5.0 |
* | Facebook | facebook.com | 4.7.0 |
* | Twitter | twitter.com/user | 4.7.0 |
* | Twitter | twitter.com/likes | 4.7.0 |
* | Twitter | twitter.com/lists | 4.7.0 |
@ -192,8 +178,6 @@ class WP_oEmbed {
* | Someecards | someecards.com | 4.9.0 |
* | Someecards | some.ly | 4.9.0 |
* | Crowdsignal | survey.fm | 5.1.0 |
* | Instagram TV | instagram.com | 5.1.0 |
* | Instagram TV | instagr.am | 5.1.0 |
* | TikTok | tiktok.com | 5.4.0 |
*
* No longer supported providers:
@ -211,6 +195,11 @@ class WP_oEmbed {
* | Funny or Die | funnyordie.com | 3.0.0 | 5.1.0 |
* | CollegeHumor | collegehumor.com | 4.0.0 | 5.3.1 |
* | Hulu | hulu.com | 2.9.0 | 5.5.0 |
* | Instagram | instagram.com | 3.5.0 | 5.5.2 |
* | Instagram | instagr.am | 3.5.0 | 5.5.2 |
* | Instagram TV | instagram.com | 5.1.0 | 5.5.2 |
* | Instagram TV | instagr.am | 5.1.0 | 5.5.2 |
* | Facebook | facebook.com | 4.7.0 | 5.5.2 |
*
* @see wp_oembed_add_provider()
*

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta2-49358';
$wp_version = '5.6-beta2-49359';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.