Skip to main content

benecaster_content_calendar_before_save_idea

Action Premium content-calendar

Fires before a Content Calendar idea is written: when one is added or edited on a show’s Ideas board or over the REST API.

Parameters

Name Type Default Description
$idea array — The idea about to be stored. Its fields are listed in the walkthrough below.
$context string — `create` (`id` is then 0) or `update`

Example

add_action( 'benecaster_content_calendar_before_save_idea', function ( array $idea, string $context ): void {
    if ( 'create' === $context ) {
        my_audit_log( 'calendar-idea-creating', $idea['show_id'], $idea['title'] );
    }
}, 10, 2 );

Notes

Each idea is { id, show_id, type, type_name, title, notes, position, created_by, created_at, updated_at }. Walkthrough: Run your own code when a Content Calendar idea is saved, deleted or rearranged.

Affects

  • Ideas board
  • POST benecaster-content-calendar/v1/shows/{show_id}/ideas
  • PUT/PATCH benecaster-content-calendar/v1/shows/{show_id}/ideas/{id}

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