WebberZone Link Warnings v1.5.0: Link Attributes, Affiliate Marking and Dismissible Modals
Affiliate links and rel attributes have always lived outside Link Warnings. I’d add nofollow and sponsored by hand, cloak affiliate URLs through a redirect plugin, and let Link Warnings handle the warning separately. That worked, but it meant maintaining two systems that didn’t know about each other, and a cloaked affiliate link never got treated as external because it technically pointed back to my own domain.
I wanted Link Warnings to understand affiliate links the same way it already understands external ones. Version 1.5.0 does that, and it also gives repeat visitors a way to stop seeing the same modal on every click.

Automatic rel and target attributes
There’s a new Link Attributes section under Settings → WebberZone Link Warnings → Advanced. It adds rel and target attributes to your links automatically, with two independent checkbox sets: one for external links, one for affiliate links. You can add nofollow to affiliate links only, for example, while leaving other external links untouched.
The options cover rel="nofollow", rel="sponsored", rel="ugc", opening in a new tab (target="_blank"), rel="noopener" and rel="noreferrer". Existing rel values are preserved rather than overwritten, and matching ignores case, so a link with rel="me author" becomes rel="me author nofollow", and a link that already carries rel="NoFollow" doesn’t get a duplicate.
noopener and noreferrer are kept as separate options on purpose. Both only apply to links that actually open in a new tab, whether that’s because they already carry target="_blank" or because you turned on the new-tab option here. noreferrer also stops the referrer being sent, which can break referrer-based affiliate attribution. noopener is a pure security hint with no side effects, so there’s no reason to bundle the two.
Attributes are applied by both processing layers Link Warnings already uses: WP_HTML_Tag_Processor for post content, and the sitewide JavaScript scan for navigation menus, footers, sidebars, widgets, and other theme output. Set it once, and it covers the whole site, not just your posts.
Full settings reference, including default values and setting keys, is in the Link Warnings settings reference.
Marking affiliate links
Two new settings, Affiliate Link Class (default wzlw-affiliate) and Affiliate Link Wrapper Class (default wzlw-affiliate-wrapper), mark a single link or every link inside a container as an affiliate link. Both accept comma-separated values, the same way the existing exclusion classes do.
Affiliate links receive both the external and the affiliate attribute sets, and they’re treated as external for warning purposes even if the URL points back to your own domain. This is where the cloaked-URL problem gets solved. A link like /go/product/ now shows the same modal, redirect screen, or icon as a genuine outbound link, because Link Warnings treats it as one. This mirrors how the existing force-external class behaves, and it takes precedence over the excluded domains list.
Letting visitors dismiss the modal
Repeat visitors can now dismiss the modal instead of confirming every external link. Set Modal Frequency under Settings → WebberZone Link Warnings → Display to “Once per browser session” or “Once every N days” and the modal gains a Don’t show again checkbox. Tick it, click Continue, and the modal stops appearing on later clicks. The default stays “Always show the modal”, so nothing changes unless you turn this on.
A new Dismissal Scope setting decides whether a dismissal applies only to the destination domain the visitor dismissed, or to every external link on the site. Remember Dismissal For sets how long a dismissal lasts, from 1 to 365 days. The checkbox label itself is configurable via Don’t Show Again Label and is registered for WPML string translation.
Dismissals are stored in the visitor’s own browser, in sessionStorage or localStorage depending on the frequency setting. No cookies are set, and nothing gets written to your database.
The Advanced tab is now split under two headings, Link Attributes and Exclusions and Classes, so the new attribute options aren’t grouped in with the domain exclusion and CSS class settings.
Bug fixes
Internal target="_blank" links inside post content never triggered a warning. Under the “external links and internal links opening in a new tab” scope, the PHP side marked these links as processed but wrote no data attributes, so the JavaScript scan skipped them too. The identical link in a navigation menu or widget did get a warning, because that path went through JavaScript only. PHP now mirrors the JavaScript logic and emits data-wzlw-blank for internal new-tab links, so post content and theme output behave the same way.
The signed redirect URL is no longer added to every processed link when the warning method is modal only. It’s emitted for the redirect and inline redirect methods alone now, which drops an unused attribute from the rendered HTML and skips a per-link HMAC calculation on pages that never use it.
Upgrading
- Update to 1.5.0 as usual, from your WordPress admin or via WP-CLI.
- Existing sites keep behaving exactly as before. Link attributes, affiliate marking and dismissible modals are all off by default.
- If you want automatic
rel/targethandling, visit Settings → WebberZone Link Warnings → Advanced and configure the External Links and Affiliate Links attribute sets. - If you run an affiliate site with cloaked links, add your redirect path’s class (or a wrapper around it) to Affiliate Link Class or Affiliate Link Wrapper Class.
- If your modal has been getting in repeat visitors’ way, set Modal Frequency to session or day-based dismissal under the Display tab.
