Skip to main content

React to episode meta changes (audio URL, type, description)

Free Beginner

Fires when episode details are edited and saved — but only when something actually changed. Opening an episode and saving without modifications does not trigger this hook.

When it fires, you get the old and new value for each changed field, so you can act on the delta rather than re-reading the whole episode. It covers media fields (audio URL, episode type, description, guests) and any custom fields you’ve added — not the post title or publish status, which fire separate hooks.

Typical uses: sync a changed audio URL to an external CDN, invalidate a transcript cache when the description updates, or log guest changes to a CRM.

Code

<?php
add_action( 'benecaster_episode_meta_updated', function ( int $episode_id, int $show_id, array $changed_meta ): void {
    if ( ! isset( $changed_meta['_benecaster_audio_url'] ) ) {
        return;
    }
    $new_url = $changed_meta['_benecaster_audio_url']['new'];
    my_addon_sync_audio_url( $episode_id, $new_url );
}, 10, 3 );

View on GitHub →

Hooks Used

Need this built rather than just documented? See our services →