css
1 month ago
images
1 year ago
img
2 months ago
js
7 months ago
archiveorg-book.php
7 months ago
archiveorg.php
1 month ago
archives.php
1 week ago
bandcamp.php
7 months ago
brightcove.php
6 months ago
cartodb.php
7 months ago
class.filter-embedded-html-objects.php
7 months ago
codepen.php
7 months ago
crowdsignal.php
6 months ago
dailymotion.php
7 months ago
descript.php
7 months ago
facebook.php
7 months ago
flatio.php
7 months ago
flickr.php
7 months ago
getty.php
7 months ago
gist.php
7 months ago
googleapps.php
7 months ago
googlemaps.php
2 months ago
googleplus.php
7 months ago
gravatar.php
7 months ago
houzz.php
7 months ago
inline-pdfs.php
7 months ago
instagram.php
7 months ago
kickstarter.php
7 months ago
mailchimp.php
1 month ago
medium.php
7 months ago
mixcloud.php
7 months ago
others.php
7 months ago
pinterest.php
7 months ago
presentations.php
7 months ago
quiz.php
7 months ago
recipe.php
2 weeks ago
scribd.php
7 months ago
shortcode-utils.php
7 months ago
sitemap.php
7 months ago
slideshare.php
7 months ago
slideshow.php
2 weeks ago
smartframe.php
7 months ago
soundcloud.php
1 month ago
spotify.php
7 months ago
ted.php
7 months ago
tweet.php
7 months ago
twitchtv.php
2 weeks ago
twitter-timeline.php
7 months ago
twitter.php
7 months ago
unavailable.php
7 months ago
untappd-menu.php
7 months ago
upcoming-events.php
7 months ago
ustream.php
7 months ago
videopress.php
7 months ago
vimeo.php
1 month ago
vine.php
7 months ago
vr.php
1 month ago
wufoo.php
7 months ago
youtube.php
4 months ago
others.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Extra oEmbed providers that we use on wpcom for feature parity. |
| 4 | * |
| 5 | * This file will be loaded even when you don't use the Shortcodes feature, |
| 6 | * as these embeds are considered safe to use on any site |
| 7 | * (and may end up embedded in Core in the future). |
| 8 | * |
| 9 | * @package automattic/jetpack |
| 10 | */ |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit( 0 ); |
| 14 | } |
| 15 | |
| 16 | wp_oembed_add_provider( 'https://me.sh/*', 'https://me.sh/oembed?format=json' ); |
| 17 | wp_oembed_add_provider( '#https?://(www\.)?gfycat\.com/.*#i', 'https://api.gfycat.com/v1/oembed', true ); |
| 18 | wp_oembed_add_provider( '#https?://[^.]+\.(wistia\.com|wi\.st)/(medias|embed)/.*#', 'https://fast.wistia.com/oembed', true ); |
| 19 | wp_oembed_add_provider( '#https?://sketchfab\.com/.*#i', 'https://sketchfab.com/oembed', true ); |
| 20 | wp_oembed_add_provider( '#https?://(www\.)?icloud\.com/keynote/.*#i', 'https://iwmb.icloud.com/iwmb/oembed', true ); |
| 21 | wp_oembed_add_provider( '#https?://(www\.)?icloud\.com\.cn/keynote/.*#i', 'https://iwmb.icloud.com.cn/iwmb/oembed', true ); |
| 22 | wp_oembed_add_provider( '#https?://((song|album|artist|pods|playlist)\.link|odesli\.com?|mylink\.page)/.*#', 'https://odesli.co/oembed', true ); |
| 23 | wp_oembed_add_provider( '#https?://(www\.)?loom\.com/share/.*#i', 'https://www.loom.com/v1/oembed', true ); |
| 24 | |
| 25 | /** |
| 26 | * Filters the HTTP request timeout value so that we can increase the timeout for iCloud oEmbeds. |
| 27 | * |
| 28 | * @param int $timeout The timeout value in seconds. |
| 29 | * @param string $url The URL to fetch. |
| 30 | * |
| 31 | * @return int The timeout value in seconds. |
| 32 | */ |
| 33 | function jetpack_oembed_timeout_override( $timeout, $url = '' ) { |
| 34 | if ( |
| 35 | is_string( $url ) |
| 36 | && str_contains( $url, 'iwmb.icloud.com' ) |
| 37 | ) { |
| 38 | return 10; |
| 39 | } |
| 40 | return $timeout; |
| 41 | } |
| 42 | |
| 43 | // TODO: Remove this. This should hopefully be a temporary hack since Apple's oEmbed often seems to take more than 5 seconds to respond. 10 is an arbitrary number of seconds that seems to work better. |
| 44 | add_filter( 'http_request_timeout', 'jetpack_oembed_timeout_override', 10, 2 ); |
| 45 | |
| 46 | // WordPress core only registers pca.st, not pcast.pocketcasts.net. |
| 47 | wp_oembed_add_provider( '#https?://pcast\.pocketcasts\.net/.+#i', 'https://pcast.pocketcasts.net/oembed.json', true ); |
| 48 |