Make WordPress Core

Changeset 41615


Ignore:
Timestamp:
09/27/2017 01:25:06 PM (6 years ago)
Author:
johnbillion
Message:

Embeds: Add support for Amazon Kindle instant previews.

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

Fixes #38181

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-oembed.php

    r41599 r41615  
    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
     
    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:
Note: See TracChangeset for help on using the changeset viewer.