Description
Filter HTML output rendered immediately after the video player. Replaces the deprecated cbc_after_video_embed filter.
Parameters
- $after_video
- (string)(required) HTML to output after 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_after', function( $html, $post, $video ) {
return $html . '<a href="' . $video['link'] . '">Open on YouTube</a>';
}, 10, 3 );