benecaster_ssp_episode_imported
Fires after each draft episode is created from a Seriously Simple Podcasting post. By the time this hook fires, the Benecaster draft episode already has its title, description, audio URL, episode number, season, artwork, publish date, and explicit flag set from the SSP source post.
This hook does not fire for SSP posts that were already imported in a previous run. The `$ssp_post` parameter provides full access to the original post data and all its meta fields — read any SSP-specific meta with `get_post_meta( $ssp_post->ID, ‘key’, true )`. Use this hook to populate additional fields that the importer does not map automatically. To modify the core post record before it is inserted, use the [benecaster_ssp_import_post_data](/hooks/benecaster_ssp_import_post_data/) filter instead.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$episode_id |
int |
— | ID of the created Benecaster draft episode post |
$show_id |
int |
— | ID of the show |
$ssp_post |
\WP_Post |
— | The original SSP WP_Post object that was imported |
Examples
Copy SSP meta field to Benecaster episode
add_action( 'benecaster_ssp_episode_imported', function ( int $episode_id, int $show_id, \WP_Post $ssp_post ): void {
$custom_transcript = get_post_meta( $ssp_post->ID, 'episode_transcript', true );
if ( $custom_transcript ) {
update_post_meta( $episode_id, '_benecaster_episode_transcript', $custom_transcript );
}
}, 10, 3 );
Notes
Does not fire for SSP posts skipped because they were already imported in a prior run. To modify the wp_insert_post() argument array before insertion, use benecaster_ssp_import_post_data instead. Episode meta fields are already written when this hook fires.