Make WordPress Core

Changeset 49361


Ignore:
Timestamp:
10/28/2020 09:21:37 PM (4 years ago)
Author:
whyisjake
Message:

Embeds: Remove Facebook and Instagram as an oEmbed Source
Facebook has depracated all non-authenticated endpoints for Facebook and Instagram.

This commit brings the changes from [49359] to the 5.5 branch.

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.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-includes/class-wp-oembed.php

    r48586 r49361  
    73 73             '#https?://(www\.)?soundcloud\.com/.*#i'       => array( 'https://soundcloud.com/oembed', true ),
    74 74             '#https?://(.+?\.)?slideshare\.net/.*#i'       => array( 'https://www.slideshare.net/api/oembed/2', true ),
    75               '#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i' => array( 'https://api.instagram.com/oembed', true ),
    76 75             '#https?://(open|play)\.spotify\.com/.*#i'     => array( 'https://embed.spotify.com/oembed/', true ),
    77 76             '#https?://(.+\.)?imgur\.com/.*#i'             => array( 'https://api.imgur.com/oembed', true ),
     
    89 88             '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed', true ),
    90 89             '#https?://(www\.)?speakerdeck\.com/.*#i'      => array( 'https://speakerdeck.com/oembed.{format}', true ),
    91               '#https?://www\.facebook\.com/.*/posts/.*#i'   => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    92               '#https?://www\.facebook\.com/.*/activity/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    93               '#https?://www\.facebook\.com/.*/photos/.*#i'  => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    94               '#https?://www\.facebook\.com/photo(s/|\.php).*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    95               '#https?://www\.facebook\.com/permalink\.php.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    96               '#https?://www\.facebook\.com/media/.*#i'      => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    97               '#https?://www\.facebook\.com/questions/.*#i'  => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    98               '#https?://www\.facebook\.com/notes/.*#i'      => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
    99               '#https?://www\.facebook\.com/.*/videos/.*#i'  => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
    100               '#https?://www\.facebook\.com/video\.php.*#i'  => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
    101 90             '#https?://(www\.)?screencast\.com/.*#i'       => array( 'https://api.screencast.com/external/oembed', true ),
    102 91             '#https?://([a-z0-9-]+\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
     
    151 140          * | YouTube      | youtu.be                                  | 3.0.0   |
    152 141          * | Twitter      | twitter.com                               | 3.4.0   |
    153            * | Instagram    | instagram.com                             | 3.5.0   |
    154            * | Instagram    | instagr.am                                | 3.5.0   |
    155 142          * | Slideshare   | slideshare.net                            | 3.5.0   |
    156 143          * | SoundCloud   | soundcloud.com                            | 3.5.0   |
     
    178 165          * | Twitter      | twitter.com/timelines                     | 4.5.0   |
    179 166          * | Twitter      | twitter.com/moments                       | 4.5.0   |
    180            * | Facebook     | facebook.com                              | 4.7.0   |
    181 167          * | Twitter      | twitter.com/user                          | 4.7.0   |
    182 168          * | Twitter      | twitter.com/likes                         | 4.7.0   |
     
    193 179          * | Someecards   | some.ly                                   | 4.9.0   |
    194 180          * | Crowdsignal  | survey.fm                                 | 5.1.0   |
    195            * | Instagram TV | instagram.com                             | 5.1.0   |
    196            * | Instagram TV | instagr.am                                | 5.1.0   |
    197 181          * | TikTok       | tiktok.com                                | 5.4.0   |
    198 182          *
     
    212 196          * | CollegeHumor | collegehumor.com     | 4.0.0     | 5.3.1     |
    213 197          * | Hulu         | hulu.com             | 2.9.0     | 5.5.0     |
      198          * | Instagram    | instagram.com        | 3.5.0     | 5.5.2     |
      199          * | Instagram    | instagr.am           | 3.5.0     | 5.5.2     |
      200          * | Instagram TV | instagram.com        | 5.1.0     | 5.5.2     |
      201          * | Instagram TV | instagr.am           | 5.1.0     | 5.5.2     |
      202          * | Facebook     | facebook.com         | 4.7.0     | 5.5.2     |
    214 203          *
    215 204          * @see wp_oembed_add_provider()
Note: See TracChangeset for help on using the changeset viewer.