benecaster_video_podcast_enhanced_episode_poster_url
Filters the image an episode’s video shows before playback, as benecaster_video_podcast_enhanced_get_episode_poster_url() returns it: the poster chosen on the episode editor’s Video tab, else the episode’s artwork, else the show’s. Runs only where Video Podcast Enhanced is switched on for the episode’s show.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$url |
string |
— | The image's URL, or `''` for none |
$episode_id |
int |
— | The episode |
$show_id |
int |
— | The episode's show |
$size |
string |
— | The image size asked for |
Returns:
string
Example
add_filter( 'benecaster_video_podcast_enhanced_episode_poster_url', function ( string $url, int $episode_id, int $show_id ): string {
return '' === $url ? get_template_directory_uri() . '/images/video-fallback.jpg' : $url;
}, 10, 3 );
Notes
A return that is not a string becomes ''. Walkthrough: Get the image an episode's video shows before playback.
Affects
- benecaster_video_podcast_enhanced_get_episode_poster_url()
Need this built rather than just documented? See our services →