WebberZone Link Warnings adds accessible warnings to external links and target="_blank" links in your WordPress content. It supports inline visual indicators, modal confirmation dialogs, and redirect interstitial screens, or combinations of these.
Requirements
- WordPress 6.6 or later
- PHP 7.4 or later
WordPress install (The easy way)
- Navigate to Plugins > Add New.
- Search for “WebberZone Link Warnings”.
- Click Install Now, then Activate.
Manual install
- Download the plugin archive from GitHub releases or WordPress.org.
- Upload the
webberzone-link-warningsfolder to/wp-content/plugins/. - Activate the plugin from the Plugins screen.
Installing via WP CLI
Install and activate on a single site:
To activate across a multisite network:
First-run wizard
On first activation, an admin notice appears offering a guided setup wizard. It runs through five sequential steps:
- Welcome: introduction and the option to skip the wizard.
- General Settings: warning method and link scope.
- Visual Indicators: icon, text, both, or screen-reader-only, plus screen reader text.
- Modal Dialog: title, message, button text, modal frequency, and dismissal scope.
- Redirect Screen: message and countdown duration.
You can dismiss the wizard at any time and configure settings manually.
Manual configuration
All settings are available at Settings > Link Warnings. The settings page is organized into four tabs:
- General: warning method, link scope, enabled post types, external content processing, and the Disable Warnings For list.
- Display: inline indicator options, modal dialog text, download modal text, and redirect screen text.
- Rules: link rules that give links matching a URL pattern their own warning method, or exclude them.
- Advanced: automatic link attributes (
rel/target), affiliate link marking, download extensions, download warning scope, excluded domains, and CSS class overrides.
See the Settings Reference for a full description of every option.
How content processing works
WebberZone Link Warnings does not modify your stored content. It filters rendered output using the the_content and the_excerpt hooks at priority 999, which means it runs after most other content filters.
For each <a> tag in the output, the plugin:
- Checks whether the current post type is enabled in settings.
- Checks the link against the Link Rules on the Rules tab. The first matching rule sets the link’s warning method, or excludes it.
- Determines whether the link is external by comparing its host against the site host and the excluded domains list, or whether it carries the Affiliate Link Class or sits inside an Affiliate Link Wrapper Class (affiliate links are always treated as external).
- Applies the configured Link Attributes (
nofollow,sponsored,ugc,target="_blank",noopener,noreferrer) for external and/or affiliate links, merging into any existingrelvalue without duplicating. - Applies scope rules: external links only, or external links plus internal
target="_blank"links. A link that just gainedtarget="_blank"from step 4 is included here. - Adds CSS classes (
wzlw-processed,wzlw-external) for styling. - For links that open in a new tab, appends the configured screen reader text to any existing
aria-labelattribute. - For modal and redirect methods, adds
data-wzlw-urland eitherdata-wzlw-external(external links) ordata-wzlw-blank(processed non-external links opening in a new tab): plusdata-wzlw-downloadfor configured download links anddata-wzlw-redirect-urlfor the redirect methods specifically. These attributes are used by the frontend JavaScript. - For inline methods, appends the configured visual indicator markup inside the link. New-tab links also receive hidden screen reader text. Suppressed indicators and icon-only links can receive only the hidden text.
When enabled, separate server-side filters also process block, Text, and Custom HTML widgets, classic navigation menus, displayed comment text, and complete block-theme template parts. Each source has its own toggle in the External Content section of the General tab. The filters reuse the same link classification, exclusions, indicators, and warning methods as post content.
Enabled Post Types controls server processing of post content and excerpts on singular views. It does not disable the sitewide browser scan or the separately configured external-content filters.
The frontend JavaScript scan still processes navigation menus, widgets, footers, and other theme output that a theme or another plugin adds after the server-side filters run. It also covers markup that does not pass through a WordPress content filter.
Download links
Links whose URL path ends in a configured file extension receive a download warning. By default this includes files hosted on your own site; set Download Warning Scope to Download links to external sites only to skip their download warnings. A matching rule, new-tab scope, or force-external/affiliate class can still cause a warning. The default extensions are pdf, zip, doc, docx, xls, xlsx, exe, and dmg.
Configure the list under Advanced > Download Links. Query strings and URL fragments are ignored when matching the file extension, and the separate Download Modal Title and Download Modal Message settings let download warnings use different text from external-link warnings.
The plugin uses WordPress’s native WP_HTML_Tag_Processor class for HTML parsing, which avoids regex-based content manipulation for the structural changes.
Warning methods at a glance
| Method | Behavior |
|---|---|
| Inline | Adds configured visual indicators. Processed new-tab links also receive hidden screen reader text. No click interception. |
| Modal | Shows a confirmation dialog for matching links. The visitor can continue or cancel. |
| Redirect | Opens an interstitial page for matching links. Automatic redirection depends on the configured countdown, signature, destination, and arrival from your site. |
| Inline + Modal | Combines inline indicators with the modal dialog on click. |
| Inline + Redirect | Combines inline indicators with the redirect interstitial on click. |
What happens on deactivation
Deactivating the plugin deletes the wzlw_activation_redirect transient, flushes the rewrite rules cache, and clears the object cache. Your content is unaffected: links return to their original rendered state because the plugin never modifies stored content.
