Skip to main content

benecaster_get_episode_preview_video_html()

Template Free
benecaster_get_episode_preview_video_html( int $episode_id, string $context = 'page' ): string

The video preview player for this render, for a theme or add-on that overrides a player template. An override of episode/player.php or archive/episode-card/player.php should print this ahead of its audio branch. One that doesn’t leaks nothing: while a video preview is showing, benecaster_episode_audio_url answers the audio clip or '', never the full audio. It just shows no video.

Parameters

Name Type Default Required Description
$episode_id int — Yes The episode.
$context string 'page' No page, or card for a list of episodes, which loads nothing until played.

Return Value

Type: string

The escaped player HTML, or '' unless benecaster_show_episode_player opened this episode's player for its video preview in this request.

Example

echo benecaster_get_episode_preview_video_html( $episode_id ); // Escaped already.

Hooks Fired

Need this built rather than just documented? See our services →