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

  1. Navigate to Plugins > Add New.
  2. Search for “WebberZone Link Warnings”.
  3. Click Install Now, then Activate.

Manual upload

  1. Download the plugin archive from GitHub releasesOpens in a new window or WordPress.orgOpens in a new window.
  2. Upload the webberzone-link-warnings folder to /wp-content/plugins/.
  3. 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:

  1. Welcome — introduction and the option to skip the wizard.
  2. General Settings — warning method and link scope.
  3. Visual Indicators — icon, text, both, or screen-reader-only, plus screen reader text.
  4. Modal Dialog — title, message, button text, modal frequency, and dismissal scope (shown when the warning method includes a modal component).
  5. 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:

  1. Checks whether the current post type is enabled in settings.
  2. 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).
  3. Applies the configured Link Attributes (nofollow, sponsored, ugc, target="_blank", noopener, noreferrer) for external and/or affiliate links, merging into any existing rel value without duplicating.
  4. Applies scope rules — external links only, or external links plus internal target="_blank" links. A link that just gained target="_blank" from step 3 is included here.
  5. Adds CSS classes (wzlw-processed, wzlw-external) for styling.
  6. Appends the configured screen reader text to any existing aria-label attribute.
  7. For modal and redirect methods, adds data-wzlw-url and either data-wzlw-external (external links) or data-wzlw-blank (internal links opening in a new tab, scope both only) — plus data-wzlw-download for configured download links and data-wzlw-redirect-url for the redirect methods specifically. These attributes are used by the frontend JavaScript.
  8. 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.

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

MethodBehavior
InlineAdds a visual indicator (icon, text, or both) and screen reader text inside the link. No click interception.
ModalIntercepts clicks on external links and shows a confirmation dialog. The user can continue (opens in a new window) or cancel.
RedirectIntercepts clicks and navigates to an interstitial page with a countdown timer before redirecting to the external URL.
Inline + ModalCombines inline indicators with the modal dialog on click.
Inline + RedirectCombines 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.

Was this article helpful?