After looking at the code reference for wp_oembed_get
(and WP_oEmbed::get_html()
) I don’t think embed_oembed_html
fitler gets fired when that function is called. But I might have missed something.
You could try using WP_Embed::shortcode( array $attr, string $url="" )
instead of wp_oembed_get
as this would mimic what happens with the native post types and the filter would get fired, I think.
Something like this. Updated 23.12.19
<?php if ( get_cpt_meta( 'cpt_video_link' ) ) : ?>
<div class="cpt-video">
<?php
$embed = new WP_Embed();
echo $embed->shortcode(array(), get_cpt_meta( 'cpt_video_link' ));
?>
</div>
<?php endif; ?>