Skip to main content

benecaster_content_calendar_after_save_content_types

Action Premium content-calendar

Fires once a show’s list of Content Calendar content types has been saved, from the Content Types panel or PUT /benecaster-content-calendar/v1/shows/{show_id}/types. It does not fire for a request refused before the write.

Parameters

Name Type Default Description
$types array — The saved list, in the show's order, exactly as `GET …/types` answers it
$show_id int — The show whose list was saved

Example

add_action( 'benecaster_content_calendar_after_save_content_types', function ( array $types, int $show_id ): void {
    update_post_meta( $show_id, '_my_addon_calendar_type_count', count( $types ) );
}, 10, 2 );

Notes

Each type is { key, name, color, enabled, built_in, uses_content, content_limit }. Walkthroughs: Run your own code when a show's Content Calendar content types are saved and Read or change a show's Content Calendar content types.

Affects

  • Content Types panel
  • PUT benecaster-content-calendar/v1/shows/{show_id}/types

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