Skip to main content

benecaster_outlinks_redirect_detach_before

Action Premium outlinks

Fires immediately before a tracked link is detached from a Reference Library item that has been deleted. The link is kept, with its clicks and its destination, as a standalone link that no library item follows. Benecaster also deletes every library item of a show that is deleted, so this fires once per tracked item then.

$redirect is the tracked link as it was before the write, as the database returns it (string values), so $redirect['reference_id'] still holds the deleted item’s id. Nothing fires for an item no tracked link follows.

It fires only where Outlinks is switched on for the item’s show and the licence is current. The link is detached everywhere, including on a lapsed site or a show where Outlinks is switched off, but no hook fires there.

Parameters

Name Type Default Description
$redirect array — The tracked link before the write

Notes

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