Skip to content
Snippets Groups Projects
Commit b2463b93 authored by lucha's avatar lucha
Browse files

removed oembed providers which are already enabled by default in wordpres (in class-wp-oembed.php)

parent 39ee04c5
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ function register_embed_handlers() {
add_shortcode('archiveorg', 'shortcode_archiveorg');
wp_embed_register_handler( 'archive', '#http[s]?://(?:www\.)?archive\.org/.*/(?<id>.*)#i', 'wp_embed_handler_archive' );
wp_embed_register_handler( 'dctptv', '#http(s)?://www.dctp.tv/embed/.*?/#i', 'wp_embed_handler_dctptv' );
wp_embed_register_handler( 'dctptv', '#http(s)?://www.dctp\.tv/embed/.*?/#i', 'wp_embed_handler_dctptv' );
wp_embed_register_handler( 'googlemaps', '#http(s)?://maps\.google\.[^\.]+/(.*)#i', 'wp_embed_handler_google_maps');
wp_embed_register_handler( 'openstreetmap', '#http(s)?://www\.openstreetmap\.org/export/embed.html\?(.*)#i', 'wp_embed_handler_openstreetmap');
......@@ -83,24 +83,14 @@ add_action('wp', 'register_embed_handlers');
/* Noembed -- list selected from https://noembed.com/providers */
$noembed = 'https://noembed.com/embed';
$noembed_site = array(
"https?://soundcloud\\.com/.*",
"https?://www\\.urbandictionary\\.com/define\\.php\\?term=.+",
"https?://(?:www\\.)?vimeo\\.com/.+",
"https?://(?:www\\.)?xkcd\\.com/\\d+/?",
"https?://.*\\.deviantart\\.com/art/.*",
"https?://.*\\.deviantart\\.com/.*#/d.*",
"https?://.*\\.flickr\\.com/photos/.*",
"https?://flic\\.kr/p/.*",
"https?://instagram\\.com/p/.*",
"https?://instagr\\.am/p/.*",
"https?://instagram\\.com/p/.*",
"https?://instagr\\.am/p/.*",
"https?://www\\.slideshare\\.net/.*/.*",
"https?://fr\\.slideshare\\.net/.*/.*",
"https?://de\\.slideshare\\.net/.*/.*",
"https?://es\\.slideshare\\.net/.*/.*",
"https?://pt\\.slideshare\\.net/.*/.*",
"https?://imgur\\.com/(?:[^\\/]+/)?[0-9a-zA-Z]+$",
"https?://bash\\.org/\\?(\\d+)"
);
......@@ -109,13 +99,9 @@ foreach ($noembed_site as $site){
wp_oembed_add_provider('#' . $site . '#i', $noembed, true);
}
/* Ted Talks */
wp_oembed_add_provider('http://www.ted.com/talks/*', 'http://www.ted.com/talks/oembed.json', false);
/* arkiwi */
wp_oembed_add_provider('http://www.arkiwi.org/*','http://www.arkiwi.org/oembed/', false );
/* bambuser */
wp_oembed_add_provider('http://*.bambuser.com/*','http://api.bambuser.com/oembed', false);
/* mixcloud */
wp_oembed_add_provider('#https?://(www\.)?mixcloud\.com/.*#i', 'http://mixcloud.com/oembed', true);
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment