diff --git a/embed.php b/embed.php index 1a59d6f31ac498cf70bd3a6484c6055f5642c102..363abf7856a756c9969194d338764a093acfc0f5 100644 --- a/embed.php +++ b/embed.php @@ -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); ?>