Embeds: Add oEmbed support for User, List and Like Twitter timelines.
Props earnjam. Fixes #38003. git-svn-id: https://develop.svn.wordpress.org/trunk@38693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f603891a41
commit
41fc5ba881
@ -72,8 +72,11 @@ class WP_oEmbed {
|
||||
'#https?://(.+\.)?polldaddy\.com/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
||||
'#https?://poll\.fm/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
||||
'#https?://(www\.)?funnyordie\.com/videos/.*#i' => array( 'http://www.funnyordie.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/.+?/timelines/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/\w{1,15}/status(es)?/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/\w{1,15}$#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/\w{1,15}/likes$#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/\w{1,15}/lists/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/\w{1,15}/timelines/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/i/moments/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://vine\.co/v/.*#i' => array( 'https://vine.co/oembed.{format}', true ),
|
||||
'#https?://(www\.)?soundcloud\.com/.*#i' => array( 'https://soundcloud.com/oembed', true ),
|
||||
@ -175,6 +178,9 @@ class WP_oEmbed {
|
||||
* | Twitter | twitter.com/timelines | Yes | 4.5.0 |
|
||||
* | Twitter | twitter.com/moments | Yes | 4.5.0 |
|
||||
* | Facebook | facebook.com | Yes | 4.7.0 |
|
||||
* | Twitter | twitter.com/user | Yes | 4.7.0 |
|
||||
* | Twitter | twitter.com/likes | Yes | 4.7.0 |
|
||||
* | Twitter | twitter.com/lists | Yes | 4.7.0 |
|
||||
*
|
||||
* No longer supported providers:
|
||||
*
|
||||
|
@ -20,8 +20,11 @@ class Tests_oEmbed extends WP_UnitTestCase {
|
||||
'polldaddy' => '#https?://(.+\.)?polldaddy\.com/.*#i',
|
||||
'polldaddy-shorturl' => '#https?://poll\.fm/.*#i',
|
||||
'funnyordie' => '#https?://(www\.)?funnyordie\.com/videos/.*#i',
|
||||
'twitter' => '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i',
|
||||
'twitter-timeline' => '#https?://(www\.)?twitter\.com/.+?/timelines/.*#i',
|
||||
'twitter' => '#https?://(www\.)?twitter\.com/\w{1,15}/status(es)?/.*#i',
|
||||
'twitter-user' => '#https?://(www\.)?twitter\.com/\w{1,15}$#i',
|
||||
'twitter-likes' => '#https?://(www\.)?twitter\.com/\w{1,15}/likes$#i',
|
||||
'twitter-list' => '#https?://(www\.)?twitter\.com/\w{1,15}/lists/.*#i',
|
||||
'twitter-timeline' => '#https?://(www\.)?twitter\.com/\w{1,15}/timelines/.*#i',
|
||||
'twitter-moment' => '#https?://(www\.)?twitter\.com/i/moments/.*#i',
|
||||
'vine' => '#https?://vine\.co/v/.*#i',
|
||||
'soundcloud' => '#https?://(www\.)?soundcloud\.com/.*#i',
|
||||
@ -583,6 +586,24 @@ class Tests_oEmbed extends WP_UnitTestCase {
|
||||
'http://twitter.com/WordPress/status/633718182335922177',
|
||||
),
|
||||
),
|
||||
array(
|
||||
$providers['twitter-user'],
|
||||
array(
|
||||
'https://twitter.com/WordPress',
|
||||
),
|
||||
),
|
||||
array(
|
||||
$providers['twitter-likes'],
|
||||
array(
|
||||
'https://twitter.com/WordPress/likes',
|
||||
),
|
||||
),
|
||||
array(
|
||||
$providers['twitter-list'],
|
||||
array(
|
||||
'https://twitter.com/TwitterDev/lists/national-parks',
|
||||
),
|
||||
),
|
||||
array(
|
||||
$providers['twitter-timeline'],
|
||||
array(
|
||||
|
Loading…
Reference in New Issue
Block a user