Skip to main content

Customize imported episode post data during SSP/PowerPress import

Free Beginner Since v1.0.0

When migrating episodes from Seriously Simple Podcasting (SSP) or PowerPress, Benecaster creates a draft episode for each imported post. This filter runs just before each draft is saved, giving you a chance to adjust the episode’s title, content, or initial status.

A common use: cleaning up or reformatting titles during the import — for example, prepending the show name when merging multiple shows, or stripping a prefix the old plugin added automatically.

Code

<?php
add_filter( 'benecaster_ssp_import_post_data', function ( array $post_data, \WP_Post $ssp_post, int $show_id ): array {
    // Prepend show name to imported episode titles.
    $show_name            = get_the_title( $show_id );
    $post_data['post_title'] = $show_name . ': ' . $post_data['post_title'];
    return $post_data;
}, 10, 3 );

View on GitHub →

Hooks Used