Skip to content

Commit c2e30ec

Browse files
committed
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
1 parent a80aeeb commit c2e30ec

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/wp-includes/class-oembed.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ public function __construct() {
104104
'#https?://www\.facebook\.com/.*/videos/.*#i' => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
105105
'#https?://www\.facebook\.com/video\.php.*#i' => array( 'https://www.facebook.com/plugins/video/oembed.json/', true ),
106106
'#https?://(www\.)?screencast\.com/.*#i' => array( 'https://api.screencast.com/external/oembed', true ),
107+
'#https?://([a-z0-9-]+\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
108+
'#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 ),
109+
'#https?://([a-z0-9-]+\.)?amazon\.(co\.jp|com\.au)/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ),
110+
'#https?://([a-z0-9-]+\.)?amazon\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ),
111+
'#https?://(www\.)?a\.co/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
112+
'#https?://(www\.)?amzn\.to/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ),
113+
'#https?://(www\.)?amzn\.eu/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed', true ),
114+
'#https?://(www\.)?amzn\.in/.*#i' => array( 'https://read.amazon.in/kp/api/oembed', true ),
115+
'#https?://(www\.)?amzn\.asia/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ),
116+
'#https?://(www\.)?z\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ),
107117
);
108118

109119
if ( ! empty( self::$early_providers['add'] ) ) {
@@ -177,6 +187,13 @@ public function __construct() {
177187
* | Twitter | twitter.com/likes | Yes | 4.7.0 |
178188
* | Twitter | twitter.com/lists | Yes | 4.7.0 |
179189
* | Screencast | screencast.com | Yes | 4.8.0 |
190+
* | Amazon | amazon.com|com.mx|com.br|ca | Yes | 4.9.0 |
191+
* | Amazon | amazon.de|fr|it|es|in|nl|ru|co.uk | Yes | 4.9.0 |
192+
* | Amazon | amazon.co.jp|com.au | Yes | 4.9.0 |
193+
* | Amazon | amazon.cn | Yes | 4.9.0 |
194+
* | Amazon | a.co | Yes | 4.9.0 |
195+
* | Amazon | amzn.to|eu|in|asia | Yes | 4.9.0 |
196+
* | Amazon | z.cn | Yes | 4.9.0 |
180197
*
181198
* No longer supported providers:
182199
*

0 commit comments

Comments
 (0)