I used this function for other video hosts, but for some reason, now it's not working. This is the direct and embed code of the video


<IFRAME SRC="https://vidoza.net/embed-r2jeim68kuq6.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=640 HEIGHT=360 allowfullscreen></IFRAME>

and this is my registration function.

add_action( 'init', function()
{        wp_embed_register_handler(
} );

function vidoza_embed_handler( $matches, $attr, $url, $rawattr )
    $embed = sprintf( 
        '<IFRAME SRC="https://vidoza.net/embed-%1$s" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=640 HEIGHT=360 allowfullscreen></IFRAME>',
        esc_attr( $matches[1] )
    return apply_filters( 'vidoza_embed_handler', $embed, $matches, $attr, $url, $rawattr );

I am not able to get it to work.


1 Answer 1


You are trying to match the r2jeim68kuq6.html part, but you're not allowing dots in your regex pattern here:


You can try e.g. (removing the A-Z too because of the case-insensitive i search):


if .html is a standard extension and where you also adjust the iframe source to:


Hope it helps!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.