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.org.
  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 walks through the core decisions:

  1. Warning method — inline indicators, modal dialog, redirect screen, or a combined approach.
  2. Link scope — external links only, or external links plus internal links opening in a new tab.
  3. Visual indicator — icon, text, both, or screen-reader-only.
  4. Modal settings — title, message, and button text (if using a modal method).
  5. Redirect settings — message and countdown duration (if using a redirect method).

You can dismiss the wizard and configure settings manually at any time.

Manual configuration

All settings are available at Settings > Link Warnings. The settings page is organised into three tabs:

  • General — warning method, link scope, and enabled post types.
  • Display — inline indicator options, modal dialog text, and redirect screen text.
  • Advanced — excluded domains.

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.
  3. Applies scope rules — external links only, or external links plus internal target="_blank" links.
  4. Adds CSS classes (wzlw-processed, wzlw-external) for styling.
  5. Appends the configured screen reader text to any existing aria-label attribute.
  6. For modal and redirect methods, adds data-wzlw-external, data-wzlw-url, and data-wzlw-redirect-url attributes used by the frontend JavaScript.
  7. For inline methods, appends visual indicator markup (icon, text, or both) inside the link.

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

MethodBehaviour
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.