Skip to main content

benecaster_outlinks_redirect_move_copy_before

Action Premium outlinks

Fires once for each tracked link Outlinks copies when an episode moves to another show, immediately before the new link is created in the destination show. The copy carries the destination, affiliate URL, expiry and country rules; the old show’s link is left as it was. The new link has no id yet.

Nothing fires for a reference whose library item already has a tracked link in the destination show (that one is reused unchanged), for a reference with no tracked link in the old show, or when the old link’s destination is not http or https (no copy is made).

It fires only where Outlinks is switched on for the destination show and the licence is current; whether Outlinks is on for the old show does not matter. The copy is made everywhere, but no hook fires elsewhere.

Parameters

Name Type Default Description
$source_redirect_id int — ID of the tracked link being copied, in the old show
$episode_id int — ID of the episode that moved
$from_show_id int — ID of the show the episode left
$to_show_id int — ID of the show the episode moved to

Notes

If the new link cannot be created, or its settings cannot be saved and it is removed again, this hook has fired and benecaster_outlinks_redirect_move_copy_after does not. Walkthrough: Run your own code when moving an episode copies its tracked links.

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