benecaster_feed_podcast_channel_tags
Filters the channel-level Podcasting 2.0 tag array before XML output. All keys are pre-populated from show settings; use this filter to add, override, or remove entries before the feed is rendered.
| Key | Type | Podcast 2.0 tag | |—|—|—| | `guid` | string | `podcast:guid` | | `locked` | `{enabled: bool, owner_email: string}` | `podcast:locked` | | `funding` | `{url: string, label: string}` | `podcast:funding` | | `block` | `string[]` | `podcast:block` | | `txt` | `list<{purpose: string, value: string}>` | `podcast:txt` | | `license` | `{url: string, label: string}` | `podcast:license` | | `host` | `{name: string, url: string, image: string}` | `podcast:person role=”host”` — omitted when `name` is empty |
The `xmlns:podcast` namespace declaration is added automatically when at least one `podcast:` tag is present in the rendered output. All keys are optional.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tags |
array |
— | See description for key reference. |
$show_id |
int |
— | Show post ID |
Returns:
array
Example
add_filter( 'benecaster_feed_podcast_channel_tags', function( $tags, $show_id ) {
// Add a custom <podcast:txt> verification tag for a podcast directory.
$tags['txt'][] = [
'purpose' => 'verify',
'value' => get_post_meta( $show_id, '_mypodcast_verify_token', true ),
];
return $tags;
}, 10, 2 );