From ce2a6f32be1fee24740bb4c10afa0f80042ddcfa Mon Sep 17 00:00:00 2001 From: lucha <lucha@paranoici.org> Date: Fri, 27 Aug 2021 13:07:07 +0200 Subject: [PATCH] "fixes" dctp embed I think this should close #21. On the other hand, it says "this video is not available in your region", so I am not sure this actually works. --- embed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embed.php b/embed.php index 363abf7..f3d44c5 100644 --- a/embed.php +++ b/embed.php @@ -62,7 +62,7 @@ function wp_embed_handler_dctptv( $matches, $attr, $url, $rawattr ) { $width = ($attr['width']) ? $attr['width'] : 480 ; $height = ($attr['height']) ? $attr['height'] : 396 ; $embed= sprintf( - '<iframe width="%3$s" scrolling="no" height="%2$s" frameborder="0" src="%1$s" name="dctp-teaser" marginwidth="0" marginheight="0"><br> + '<iframe width="%3$s" scrolling="no" height="%2$s" frameborder="0" src="%1$s" name="dctp-embed" marginwidth="0" marginheight="0"><br> </iframe>',esc_attr($matches[0]),esc_attr($height),esc_attr($width)); return apply_filters( 'embed_dctptv', $embed, $matches, $attr, $url, $rawattr ); @@ -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/.*#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'); -- GitLab