Skip to main content

benecaster_podcast_workflow_after_save_preset_tasks

Action Premium podcast-workflow

Fires once a show’s Podcast Workflow preset task list has been saved, from the show’s Workflow settings tab → Preset tasks or PUT /benecaster-podcast-workflow/v1/shows/{show_id}/task-list. It fires only once the write is done.

Parameters

Name Type Default Description
$show_id int — The show whose preset task list is being saved
$tasks array — The list as stored, in order: `[ { id, name, offset_days, duration_days } ]`

Example

add_action( 'benecaster_podcast_workflow_after_save_preset_tasks', function ( int $show_id, array $tasks ): void {
    $longest = max( array_column( $tasks, 'duration_days' ) ?: [ 0 ] );
    update_post_meta( $show_id, '_my_plugin_longest_task', $longest );
}, 10, 2 );

Notes

The preset list is only where new production plans start: saving it never changes an episode's existing plan. Walkthrough: Read or change a show's preset task list, and run code when a show saves it.

Affects

  • Workflow tab (show settings)
  • PUT benecaster-podcast-workflow/v1/shows/{show_id}/task-list

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