Skip to main content

benecaster_show_updated

Action Free

Fires after an existing show is updated — every save that is not the show’s first creation. The $changed_fields array lets integrations respond selectively to relevant changes rather than processing every save.

$changed_fields covers post-table columns only: any subset of title, content, post_status, and post_date. It is empty when only show meta changed — artwork URL, feed slug, author name, language settings — or when no prior snapshot was available. Show meta fields are written after the WordPress save_post hook completes and are not included in $changed_fields. Read current meta values with get_post_meta() inside your callback, where they will be up to date within the same request.

Parameters

Name Type Default Description
$show_id int ID of the updated show post
$changed_fields array Array of field keys that changed

Examples

Sync show title change to CRM

add_action( 'benecaster_show_updated', function (
    int   $show_id,
    array $changed_fields
) {
    // Skip if nothing post-level changed (meta-only update).
    if ( empty( $changed_fields ) ) {
        return;
    }

    if ( in_array( 'title', $changed_fields, true ) ) {
        my_crm_update_show_name( $show_id, get_the_title( $show_id ) );
    }
}, 10, 2 );

Notes

$changed_fields is empty for meta-only saves (artwork, feed slug, language, etc.). Meta changes are not tracked here — read current meta values with get_post_meta() inside your callback. For the first creation of a show, use benecaster_show_created instead.

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