Skip to main content

benecaster_outlinks_health_exclusions_save_before

Action Premium outlinks

Fires immediately before Link Health’s exclusions are saved, from the Exclusions form on Settings → Link Health or the PATCH /benecaster-outlinks/v1/link-health/exclusions route.

Both arguments are [ 'domains' => …, 'post_types' => …, 'categories' => … ]. $exclusions holds the cleaned lists about to be saved: domains in lower case without a leading www. (a pasted URL is reduced to its host), post types from episode, page and post, and categories as term ids. A list the request did not send is the same in both arguments.

It fires only for a request that sends at least one of the three lists and passes validation. A refused request (400, where nothing is saved) fires nothing, and so does a request with none of them.

Link Health is install-wide and needs Outlinks switched on for at least one show, so the hook never fires while Outlinks is off for every show or the licence has lapsed.

Parameters

Name Type Default Description
$exclusions array — The cleaned lists about to be saved
$previous array — The lists saved until now

Notes

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