benecaster_episode_custom_fields
The unified custom fields filter — returns identical structure whether data comes from Benecaster built-in fields or ACF. Template and RSS code always use this filter rather than reading post meta directly.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$fields |
array |
— | Array of custom field objects {label, type, value} |
$episode_id |
int |
— | ID of the episode |
Returns:
array
Example
add_filter( 'benecaster_episode_custom_fields', function( $fields, $episode_id ) {
// Inject a read-only "Recording location" field from ACF.
$location = get_field( 'recording_location', $episode_id );
if ( $location ) {
$fields[] = [
'label' => 'Recording Location',
'type' => 'text',
'value' => $location,
];
}
return $fields;
}, 10, 2 );