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
- The latest three versions of WordPress
- PHP 7.4 or later
Installation
From the WordPress dashboard
- Navigate to Plugins > Add New.
- Search for “WebberZone Link Warnings”.
- Click Install Now, then Activate.
Manual upload
- Download the plugin archive from GitHub releasesOpens in a new window or WordPress.orgOpens in a new window.
- Upload the
webberzone-link-warningsfolder to/wp-content/plugins/. - Activate the plugin from the Plugins screen.
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 (shown when the warning method includes a modal component).
- Redirect Screen — message and countdown duration (shown when the warning method includes a redirect component).
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 three tabs:
- General — warning method, link scope, and enabled post types.
- Display — inline indicator options, modal dialog text, download modal text, and redirect screen text.
- Advanced — automatic link attributes (
rel/target), affiliate link marking, download extensions, 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.
- 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 3 is included here. - Adds CSS classes (
wzlw-processed,wzlw-external) for styling. - 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(internal links opening in a new tab, scopebothonly) — 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 visual indicator markup (icon, text, or both) inside the link.
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.
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. This includes files hosted on your own site. 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 a visual indicator (icon, text, or both) and screen reader text inside the link. No click interception. |
| Modal | Intercepts clicks on external links and shows a confirmation dialog. The user can continue (opens in a new window) or cancel. |
| Redirect | Intercepts clicks and navigates to an interstitial page with a countdown timer before redirecting to the external URL. |
| 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 removes all transients, 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.

