benecaster_get_episode_notes()
benecaster_get_episode_notes( int $episode_id, array $args = [] ): array
The read counterpart to benecaster_add_episode_note(). Returns an episode’s production notes newest-first, optionally filtered to one note type.
internal notes are written by people — the production notes a team leaves for each other. system notes are written by Benecaster itself to record what happened to an episode. Passing no note_type returns both, interleaved by date.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
$episode_id |
int |
— | Yes | Episode post ID. |
$args |
array |
[] |
No | Optional query arguments. note_type — 'internal', 'system', or '' for all (default ''); limit — maximum rows, 0 for unlimited (default 100); offset — skip this many rows (default 0). |
Return Value
Type:
array
Notes for the episode, newest first. Each row is an array with id, episode_id, show_id, author_id, content, note_type and created_at. An episode with no notes returns an empty array.
Example
foreach ( benecaster_get_episode_notes( $episode_id, [ 'note_type' => 'internal', 'limit' => 10 ] ) as $note ) {
printf(
'<li><time datetime="%s">%s</time> — %s</li>',
esc_attr( $note['created_at'] ),
esc_html( mysql2date( get_option( 'date_format' ), $note['created_at'] ) ),
esc_html( $note['content'] )
);
}
Notes
Notes are internal-facing. Nothing in core renders them on the front end, and author_id is null for system notes. If you surface them anywhere a listener can reach, that is your decision to make deliberately — escape the content and check the capability yourself, because this function does neither.
Need this built rather than just documented? See our services →