benecaster_feed_sync_after
Fires after all draft episodes have been created for a sync run. By the time this hook fires, the feed cache for the affected show has already been invalidated — each wp_insert_post() call inside the sync triggers FeedCacheInvalidator synchronously via save_post, so the cache is cleared before this hook is reached. This makes it a safe point for cache-warming: any cache built here will reflect the freshest data. Also fires on failure runs (bad HTTP response, invalid RSS) with $drafts_created = 0; in those cases no cache was changed. Use for post-sync logging, external notifications, or cache-warming.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$show_id |
int |
— | ID of the show |
$drafts_created |
int |
— | Number of draft episodes created in this sync |
$new_items_found |
int |
— | Number of new RSS items found |
$triggered_by |
string |
— | One of 'manual', 'on_login', or 'cron' |
Need this built rather than just documented? See our services →