Make WordPress Core

Ticket #38181: 38181.9.diff

File 38181.9.diff, 3.0 KB (added by johnbillion, 8 years ago)
  • src/wp-includes/class-oembed.php

    diff --git src/wp-includes/class-oembed.php src/wp-includes/class-oembed.php
    index 48beac3047..cbac3f63ba 100644
    class WP_oEmbed { 
    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?://(read\.|www\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i'      => array( 'https://read.amazon.com/kp/api/oembed',          true  ),
     108                        '#https?://(read\.|www\.)?amazon\.(co\.uk|de|fr|it|es|in|nl|ru)/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed',        true  ),
     109                        '#https?://(read\.|www\.)?amazon\.(co\.jp|com\.au)/.*#i'              => array( 'https://read.amazon.com.au/kp/api/oembed',       true  ),
     110                        '#https?://(read\.|www\.)?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'] ) ) {
    class WP_oEmbed { 
    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                 *