Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/shortcod...
File: others.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Extra oEmbed providers that we use on wpcom for feature parity.
[2] Fix | Delete
*
[3] Fix | Delete
* This file will be loaded even when you don't use the Shortcodes feature,
[4] Fix | Delete
* as these embeds are considered safe to use on any site
[5] Fix | Delete
* (and may end up embedded in Core in the future).
[6] Fix | Delete
*
[7] Fix | Delete
* @package automattic/jetpack
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[11] Fix | Delete
exit( 0 );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
wp_oembed_add_provider( 'https://me.sh/*', 'https://me.sh/oembed?format=json' );
[15] Fix | Delete
wp_oembed_add_provider( '#https?://(www\.)?gfycat\.com/.*#i', 'https://api.gfycat.com/v1/oembed', true );
[16] Fix | Delete
wp_oembed_add_provider( '#https?://[^.]+\.(wistia\.com|wi\.st)/(medias|embed)/.*#', 'https://fast.wistia.com/oembed', true );
[17] Fix | Delete
wp_oembed_add_provider( '#https?://sketchfab\.com/.*#i', 'https://sketchfab.com/oembed', true );
[18] Fix | Delete
wp_oembed_add_provider( '#https?://(www\.)?icloud\.com/keynote/.*#i', 'https://iwmb.icloud.com/iwmb/oembed', true );
[19] Fix | Delete
wp_oembed_add_provider( '#https?://(www\.)?icloud\.com\.cn/keynote/.*#i', 'https://iwmb.icloud.com.cn/iwmb/oembed', true );
[20] Fix | Delete
wp_oembed_add_provider( '#https?://((song|album|artist|pods|playlist)\.link|odesli\.com?|mylink\.page)/.*#', 'https://odesli.co/oembed', true );
[21] Fix | Delete
wp_oembed_add_provider( '#https?://(www\.)?loom\.com/share/.*#i', 'https://www.loom.com/v1/oembed', true );
[22] Fix | Delete
[23] Fix | Delete
/**
[24] Fix | Delete
* Filters the HTTP request timeout value so that we can increase the timeout for iCloud oEmbeds.
[25] Fix | Delete
*
[26] Fix | Delete
* @param int $timeout The timeout value in seconds.
[27] Fix | Delete
* @param string $url The URL to fetch.
[28] Fix | Delete
*
[29] Fix | Delete
* @return int The timeout value in seconds.
[30] Fix | Delete
*/
[31] Fix | Delete
function jetpack_oembed_timeout_override( $timeout, $url = '' ) {
[32] Fix | Delete
if (
[33] Fix | Delete
is_string( $url )
[34] Fix | Delete
&& str_contains( $url, 'iwmb.icloud.com' )
[35] Fix | Delete
) {
[36] Fix | Delete
return 10;
[37] Fix | Delete
}
[38] Fix | Delete
return $timeout;
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
// 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.
[42] Fix | Delete
add_filter( 'http_request_timeout', 'jetpack_oembed_timeout_override', 10, 2 );
[43] Fix | Delete
[44] Fix | Delete
// WordPress core only registers pca.st, not pcast.pocketcasts.net.
[45] Fix | Delete
wp_oembed_add_provider( '#https?://pcast\.pocketcasts\.net/.+#i', 'https://pcast.pocketcasts.net/oembed.json', true );
[46] Fix | Delete
[47] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function