Pretty sure it’s the fact you’re trying to use the regex pattern in your sprintf
call, when you should be using… well, a sprintf
format:
$embed = sprintf(
'<iframe class="openload-video" src="https://openload.co/embed/%s" scrolling="no" frameborder="0" width="700" height="430" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">></iframe>',
esc_attr(
$matches[1]
)
);
Note that you’re not using www
in your embed url:
https://openload.co/f/onU1gT5mkJ8/A_date_with_Lazar_Angelov.mp4
as expected in your pattern:
#https://www\.openload\.co/f/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)?#i