Description
Filter HTML output rendered immediately before the video player. Replaces the deprecated cbc_before_video_embed filter.
Parameters
- $before_video
- (string)(required) HTML to output before the player.
- Default:empty string
- $post
- (WP_Post)(optional) The current post object.
- Default:None
- $video
- (array)(optional) Video details returned by the YouTube API.
- Default:None
Example
add_filter( 'cbc_embed_before', function( $html, $post, $video ) {
return '<p class="intro">Watch:</p>' . $html;
}, 10, 3 );