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
https://vidoza.net/r2jeim68kuq6.html
<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(
'vidoza',
'#https://vidoza\.net/([a-zA-Z0-9_-]+)$#i',
'vidoza_embed_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.