Embeds: Add support for Amazon Kindle instant previews.

Props jsepia, morganestes, adamsilverstein, swissspidy, jbpaul17, johnbillion, rugved

Fixes #38181


git-svn-id: https://develop.svn.wordpress.org/trunk@41615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-09-27 13:25:06 +00:00
parent a80aeeb5dc
commit c2e30ec382
1 changed files with 17 additions and 0 deletions

View File

@ -104,6 +104,16 @@ class WP_oEmbed {
'#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 ),
'#https?://([a-z0-9-]+\.)?amazon\.(co\.jp|com\.au)/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ),
'#https?://([a-z0-9-]+\.)?amazon\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ),
'#https?://(www\.)?a\.co/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
'#https?://(www\.)?amzn\.to/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
'#https?://(www\.)?amzn\.eu/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed', true ),
'#https?://(www\.)?amzn\.in/.*#i' => array( 'https://read.amazon.in/kp/api/oembed', true ),
'#https?://(www\.)?amzn\.asia/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ),
'#https?://(www\.)?z\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ),
);
if ( ! empty( self::$early_providers['add'] ) ) {
@ -177,6 +187,13 @@ class WP_oEmbed {
* | Twitter | twitter.com/likes | Yes | 4.7.0 |
* | Twitter | twitter.com/lists | Yes | 4.7.0 |
* | Screencast | screencast.com | Yes | 4.8.0 |
* | Amazon | amazon.com|com.mx|com.br|ca | Yes | 4.9.0 |
* | Amazon | amazon.de|fr|it|es|in|nl|ru|co.uk | Yes | 4.9.0 |
* | Amazon | amazon.co.jp|com.au | Yes | 4.9.0 |
* | Amazon | amazon.cn | Yes | 4.9.0 |
* | Amazon | a.co | Yes | 4.9.0 |
* | Amazon | amzn.to|eu|in|asia | Yes | 4.9.0 |
* | Amazon | z.cn | Yes | 4.9.0 |
*
* No longer supported providers:
*