kollapsminoriteten/wp-content/plugins/jetpack/modules/shortcodes/others.php

31 lines
1.6 KiB
PHP
Raw Normal View History

2020-05-06 17:20:49 +02:00
<?php
/**
2022-12-15 17:41:53 +01:00
* Extra oEmbed providers that we use on wpcom for feature parity.
2020-05-06 17:20:49 +02:00
*
* This file will be loaded even when you don't use the Shortcodes feature,
* as these embeds are considered safe to use on any site
* (and may end up embedded in Core in the future).
*
2021-04-27 08:32:47 +02:00
* @package automattic/jetpack
2020-05-06 17:20:49 +02:00
*/
wp_oembed_add_provider( 'https://me.sh/*', 'https://me.sh/oembed?format=json' );
wp_oembed_add_provider( '#https?://(www\.)?gfycat\.com/.*#i', 'https://api.gfycat.com/v1/oembed', true );
wp_oembed_add_provider( '#https?://[^.]+\.(wistia\.com|wi\.st)/(medias|embed)/.*#', 'https://fast.wistia.com/oembed', true );
wp_oembed_add_provider( '#https?://sketchfab\.com/.*#i', 'https://sketchfab.com/oembed', true );
wp_oembed_add_provider( '#https?://(www\.)?icloud\.com/keynote/.*#i', 'https://iwmb.icloud.com/iwmb/oembed', true );
2020-10-20 18:05:12 +02:00
wp_oembed_add_provider( '#https?://((song|album|artist|pods|playlist)\.link|odesli\.com?|mylink\.page)/.*#', 'https://odesli.co/oembed', true );
wp_oembed_add_provider( '#https?://(www\.)?loom\.com/share/.*#i', 'https://www.loom.com/v1/oembed', true );
2022-12-15 17:41:53 +01:00
/**
* Conditionally add PocketCasts as an oEmbed provider in advanced of its inclusion in WP 6.1.
*
* @todo Remove when WordPress 6.1 is the minimum supported version.
*/
global $wp_version;
if ( version_compare( $wp_version, '6.1-alpha-53744', '<' ) ) {
wp_oembed_add_provider( '#https?://pca\.st/.+#i', 'https://pca.st/oembed.json', true );
}
// WordPress core only registers pca.st, not pcast.pocketcasts.net.
wp_oembed_add_provider( '#https?://pcast\.pocketcasts\.net/.+#i', 'https://pcast.pocketcasts.net/oembed.json', true );