benecaster_content_calendar_idea_response
Filters each Content Calendar idea as the ideas routes of the benecaster-content-calendar/v1 REST API answer with it, including each one in a list or reorder answer. A return that is not an array is ignored.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$data |
array |
— | The idea as the API will send it: `{ id, show_id, type, type_name, type_label, type_color, type_enabled, title, notes }` |
$idea |
array |
— | The idea as stored: `{ id, show_id, type, type_name, title, notes, position, created_by, created_at, updated_at }` |
Returns:
array
Example
add_filter( 'benecaster_content_calendar_idea_response', function ( array $data, array $idea ): array {
$data['author'] = get_the_author_meta( 'display_name', $idea['created_by'] );
return $data;
}, 10, 2 );
Notes
The routes are described in Read, write, rearrange and promote a show's Content Calendar ideas over REST. Walkthrough: Add to what the Content Calendar REST API answers for an idea.
Affects
- Ideas board
- GET/POST benecaster-content-calendar/v1/shows/{show_id}/ideas
- PUT benecaster-content-calendar/v1/shows/{show_id}/ideas/order
- GET/PUT/PATCH benecaster-content-calendar/v1/shows/{show_id}/ideas/{id}
Need this built rather than just documented? See our services →