WebberZone Link Warnings v1.3.0: Sitewide link processing and CSS class rules everywhere

When I released WebberZone Link Warnings in March, I built it around WordPress’s native WP_HTML_Tag_Processor class. That approach works well for post content processed on the server side. But it left a gap. Links in navigation menus, footers, sidebars, widgets, and theme output were ignored. That’s a problem for sites aiming for full compliance.

This release fixes that gap by adding a JavaScript scan that runs after the page loads and applies the same rules to every link on the page.

The plugin now uses a two-layer approach. For post content, PHP still handles the processing via WP_HTML_Tag_Processor. For everything else, a lightweight JavaScript scan runs after the page loads and processes links that PHP never touched. This includes navigation menus, footers, sidebars, widgets, and any other theme output.

The JavaScript mirrors the PHP logic. It checks each link against your configured scope, applies the same external detection, respects domain exclusions, and adds the same ARIA attributes and visual indicators. Your stored content remains untouched. The plugin only alters rendered output.

CSS class rules everywhere

The four CSS class rules I added in previous releases now work sitewide. You can use these classes anywhere on your page:

  • wzlw-force-external — forces a link to be treated as external regardless of automatic detection
  • wzlw-force-external-wrapper — forces all links inside a container to be treated as external
  • wzlw-no-icon — suppresses the visual icon on a specific link
  • wzlw-no-icon-wrapper — suppresses visual icons on all links inside a container

Previously, these only worked in post content. Now the JavaScript scan picks them up wherever they appear on the page. This is particularly useful for navigation blocks or custom theme templates where you want to force certain links to trigger warnings without changing the actual URL structure.

Bug fixes

Links inside wzlw-no-icon-wrapper now correctly receive data-wzlw-* attributes. In the previous version, these links were missing the data attributes that trigger the redirect or modal warning. The visual icon was suppressed, but the warning itself never fired. That’s fixed now. Links inside no-icon wrappers still show the redirect screen or modal dialog, just without the visual indicator.

Upgrade notes

The JavaScript scan runs automatically on page load. Your existing settings and CSS class configurations continue to work as before. If you’ve been manually adding the CSS classes to theme templates or page builder output, those will now be processed correctly. You might need to clear your site’s cache to ensure the new JavaScript loads.

You can download the update from the WordPress plugin repository or update directly from your WordPress admin panel.

The two-layer approach gives you true sitewide coverage without touching your database or interfering with REST API responses. That’s the architecture I was aiming for when I started this plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *