Permalink
Browse files

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

Fixes #34737
Props pento, GaryJ

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


git-svn-id: http://core.svn.wordpress.org/trunk@38308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent a71d445 commit 07c31a54373405fec30168ce34c3985171b79b65 @johnbillion johnbillion committed Aug 26, 2016
Showing with 11 additions and 1 deletion.
  1. +10 −0 wp-includes/class-oembed.php
  2. +1 −1 wp-includes/version.php
@@ -95,6 +95,15 @@ public function __construct() {
'#https?://videopress.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/1.0/?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/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 ),
);
if ( ! empty( self::$early_providers['add'] ) ) {
@@ -164,6 +173,7 @@ public function __construct() {
* | Speaker Deck | speakerdeck.com | Yes | 4.4.0 |
* | Twitter | twitter.com/timelines | Yes | 4.5.0 |
* | Twitter | twitter.com/moments | Yes | 4.5.0 |
+ * | Facebook | facebook.com | Yes | 4.7.0 |
*
* No longer supported providers:
*
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
-$wp_version = '4.7-alpha-38366';
+$wp_version = '4.7-alpha-38367';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 comments on commit 07c31a5

Please sign in to comment.