Embeds: Add support for Amazon Kindle instant previews.

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

Fixes #38181

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


git-svn-id: http://core.svn.wordpress.org/trunk@41450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-09-27 13:26:45 +00:00
parent 255658fa31
commit 4b76c1f22f
2 changed files with 18 additions and 1 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:
*

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41614';
$wp_version = '4.9-alpha-41615';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.