css
2 years ago
images
2 years ago
img
2 years ago
js
1 year ago
archiveorg-book.php
5 years ago
archiveorg.php
5 years ago
archives.php
5 years ago
bandcamp.php
3 years ago
brightcove.php
5 years ago
cartodb.php
5 years ago
class.filter-embedded-html-objects.php
2 years ago
codepen.php
5 years ago
crowdsignal.php
2 years ago
dailymotion.php
3 years ago
descript.php
4 years ago
facebook.php
1 year ago
flatio.php
5 years ago
flickr.php
2 years ago
getty.php
2 years ago
gist.php
3 years ago
googleapps.php
2 years ago
googlemaps.php
2 years ago
googleplus.php
5 years ago
gravatar.php
2 years ago
houzz.php
5 years ago
inline-pdfs.php
4 years ago
instagram.php
1 year ago
kickstarter.php
3 years ago
mailchimp.php
3 years ago
medium.php
3 years ago
mixcloud.php
2 years ago
others.php
1 year ago
pinterest.php
2 years ago
presentations.php
2 years ago
quiz.php
4 years ago
recipe.php
2 years ago
scribd.php
5 years ago
sitemap.php
5 years ago
slideshare.php
5 years ago
slideshow.php
1 year ago
smartframe.php
3 years ago
soundcloud.php
3 years ago
spotify.php
2 years ago
ted.php
5 years ago
tweet.php
2 years ago
twitchtv.php
5 years ago
twitter-timeline.php
5 years ago
twitter.php
1 year ago
unavailable.php
3 years ago
untappd-menu.php
3 years ago
upcoming-events.php
1 year ago
ustream.php
5 years ago
videopress.php
4 years ago
vimeo.php
2 years ago
vine.php
5 years ago
vr.php
2 years ago
wufoo.php
3 years ago
youtube.php
1 year ago
others.php
44 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 | wp_oembed_add_provider( 'https://me.sh/*', 'https://me.sh/oembed?format=json' ); |
| 13 | wp_oembed_add_provider( '#https?://(www\.)?gfycat\.com/.*#i', 'https://api.gfycat.com/v1/oembed', true ); |
| 14 | wp_oembed_add_provider( '#https?://[^.]+\.(wistia\.com|wi\.st)/(medias|embed)/.*#', 'https://fast.wistia.com/oembed', true ); |
| 15 | wp_oembed_add_provider( '#https?://sketchfab\.com/.*#i', 'https://sketchfab.com/oembed', true ); |
| 16 | wp_oembed_add_provider( '#https?://(www\.)?icloud\.com/keynote/.*#i', 'https://iwmb.icloud.com/iwmb/oembed', true ); |
| 17 | wp_oembed_add_provider( '#https?://(www\.)?icloud\.com\.cn/keynote/.*#i', 'https://iwmb.icloud.com.cn/iwmb/oembed', true ); |
| 18 | wp_oembed_add_provider( '#https?://((song|album|artist|pods|playlist)\.link|odesli\.com?|mylink\.page)/.*#', 'https://odesli.co/oembed', true ); |
| 19 | wp_oembed_add_provider( '#https?://(www\.)?loom\.com/share/.*#i', 'https://www.loom.com/v1/oembed', true ); |
| 20 | |
| 21 | /** |
| 22 | * Filters the HTTP request timeout value so that we can increase the timeout for iCloud oEmbeds. |
| 23 | * |
| 24 | * @param int $timeout The timeout value in seconds. |
| 25 | * @param string $url The URL to fetch. |
| 26 | * |
| 27 | * @return int The timeout value in seconds. |
| 28 | */ |
| 29 | function jetpack_oembed_timeout_override( $timeout, $url = '' ) { |
| 30 | if ( |
| 31 | is_string( $url ) |
| 32 | && str_contains( $url, 'iwmb.icloud.com' ) |
| 33 | ) { |
| 34 | return 10; |
| 35 | } |
| 36 | return $timeout; |
| 37 | } |
| 38 | |
| 39 | // 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. |
| 40 | add_filter( 'http_request_timeout', 'jetpack_oembed_timeout_override', 10, 2 ); |
| 41 | |
| 42 | // WordPress core only registers pca.st, not pcast.pocketcasts.net. |
| 43 | wp_oembed_add_provider( '#https?://pcast\.pocketcasts\.net/.+#i', 'https://pcast.pocketcasts.net/oembed.json', true ); |
| 44 |