benecaster_feed_podcast_episode_tags
Filters the per-episode Podcasting 2.0 tag array before XML output. Pre-populated from episode meta. Add-ons receive the populated array and may add, override, or remove entries. All keys are optional.
| Key | Type | Podcast 2.0 tag | Populated by |
|---|---|---|---|
transcript |
{url: string, type: string} |
podcast:transcript |
Transcription Service add-on |
soundbites |
list<{start_time: float, duration: float, title?: string}> |
podcast:soundbite |
— |
feed_credits |
list<{name: string, role?: string, url?: string, image?: string}> |
podcast:person |
Guest Manager add-on |
images |
list<{href: string, alt?: string, width: int, height: int, type: string}> |
podcast:image, one element per entry |
— |
season |
{number: int, name?: string} |
podcast:season |
— |
chapters |
{url: string, type?: string} |
podcast:chapters |
Benecaster (Chapter Markers) |
images changed type, and an add-on still assigning the old shape emits nothing. It used to be a single srcset string rendered as one <podcast:images srcset="…">; the Podcast Index spec retired that tag in favour of repeated <podcast:image> elements, so the key is now a list and each entry becomes its own element. A string in this key is silently dropped — there is no error and no fallback, the artwork simply stops appearing in the feed. Entries without an href are skipped individually.
Core populates it with one entry per registered WordPress image size, largest width first, deduplicated by URL. alt comes from the attachment’s Alternative Text and is omitted entirely when blank rather than emitted as alt="", because an empty alt asserts the image is decorative. If you append entries, follow the same rule.
The signature is unchanged — only this key’s type moved.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tags |
array |
— | Per-episode Podcasting 2.0 tag array. See description for key reference. All keys optional. |
$episode_id |
int |
— | Episode post ID |
$show_id |
int |
— | Show post ID |
Returns:
array
Example
add_filter( 'benecaster_feed_podcast_episode_tags', function( $tags, $episode_id, $show_id ) {
// Inject a soundbite from post meta (start/duration stored as JSON).
$soundbite = get_post_meta( $episode_id, '_episode_soundbite', true );
if ( $soundbite ) {
$sb = json_decode( $soundbite, true );
$tags['soundbites'][] = [
'start_time' => (float) $sb['start'],
'duration' => (float) $sb['duration'],
'title' => $sb['title'] ?? '',
];
}
return $tags;
}, 10, 3 );
Need this built rather than just documented? See our services →