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

"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.
parent 26f28074
Branches
No related tags found
No related merge requests found
......@@ -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');
......
  • lucha @lucha

    mentioned in issue #1

    ·

    mentioned in issue #1

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment