Skip to main content

benecaster_outlinks_site_link_create_before

Action Premium outlinks

Fires immediately before Outlinks creates a new site-wide link: a tracked /go/ link that belongs to no show, such as a guest’s book tracked from Guest Manager. The link has no id yet.

It fires the same way whichever path creates the link: the benecaster_outlinks_site_link() function, the POST /benecaster-outlinks/v1/site-links route, or the Add link form on Settings → Site-wide Links. Nothing fires when a site-wide link to the same address already exists and is returned instead, or when the request is refused before anything is written (an unusable URL or name).

Parameters

Name Type Default Description
$url string — The destination address, already cleaned
$slug string — The name the link is about to get, the part after `/go/`

Notes

If the link cannot be created, this hook has fired and benecaster_outlinks_site_link_create_after does not. Walkthrough: Run your own code when a site-wide Outlinks link is created.

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