WordPress.org

Make WordPress Core

Changeset 38367


Ignore:
Timestamp:
08/26/16 11:56:47 (16 months ago)
Author:
johnbillion
Message:

Embeds: Add support for embedding Facebook posts and videos via oEmbed.

Fixes #34737
Props pento, GaryJ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-oembed.php

    r38366 r38367  
    9696            '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed',                             true  ), 
    9797            '#https?://(www\.)?speakerdeck\.com/.*#i'             => array( 'https://speakerdeck.com/oembed.{format}',                   true  ), 
     98            '#https?://www\.facebook\.com/.*/posts/.*#i'          => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     99            '#https?://www\.facebook\.com/.*/activity/.*#i'       => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     100            '#https?://www\.facebook\.com/photo(s/|\.php).*i'     => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     101            '#https?://www\.facebook\.com/permalink\.php.*#i'     => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     102            '#https?://www\.facebook\.com/media/.*#i'             => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     103            '#https?://www\.facebook\.com/questions/.*#i'         => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     104            '#https?://www\.facebook\.com/notes/.*#i'             => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ), 
     105            '#https?://www\.facebook\.com/.*/videos/.*#i'         => array( 'https://www.facebook.com/plugins/video/oembed.json/',       true  ), 
     106            '#https?://www\.facebook\.com/video\.php.*#i'         => array( 'https://www.facebook.com/plugins/video/oembed.json/',       true  ), 
    98107        ); 
    99108 
     
    165174         * | Twitter      | twitter.com/timelines |      Yes       | 4.5.0     | 
    166175         * | Twitter      | twitter.com/moments   |      Yes       | 4.5.0     | 
     176         * | Facebook     | facebook.com          |      Yes       | 4.7.0     | 
    167177         * 
    168178         * No longer supported providers: 
Note: See TracChangeset for help on using the changeset viewer.