| 开发者 | josevarghese |
|---|---|
| 更新时间 | 2026年5月28日 20:21 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
rel attributes like nofollow, noopener, noreferrer, sponsored, ugc, and external; display SVG icons next to external links; choose whether the Continue button opens links in a new tab or the same tab; and whitelist trusted domains so they bypass the popup entirely.
It is an essential tool for affiliate marketers, government sites, educational portals, and any site that needs exit confirmation dialogs or legal disclaimers for third-party content.
Why use this plugin?
rel="nofollow", rel="noopener", rel="noreferrer", rel="sponsored", rel="ugc", or rel="external" attributes to external links for better SEO control and security.https://www.facebook.com/sharer/*); they will open without triggering the popup.https://example.com/share/*) from triggering the noticeleaving-notice-popup-for-external-links folder to the /wp-content/plugins/ directoryYes, Leaving Notice Popup is designed to be compatible with all WordPress themes. The popup is added to the page dynamically and does not interfere with your theme's design.
The plugin works for all standard links that lead to external domains. It will not trigger for special links like mailto:, tel:, javascript: or anchor (#) links.
Yes, in the plugin settings you can add domains to a whitelist. Links to these domains will not trigger the leaving notice popup.
Yes, you can add specific URLs to a whitelist in the plugin settings. These URLs will not trigger the leaving notice popup.
You can also use * as a wildcard to match any characters in a URL. For example, entering https://www.facebook.com/sharer/* will whitelist all Facebook share URLs (like https://www.facebook.com/sharer/sharer.php?u=...) without whitelisting the entire Facebook domain. This is useful for social sharing links, affiliate redirect paths, or any URL pattern where you need partial matching.
Yes, you can use the externallinknotice_allowed_pages filter for specific pages (Pages, Posts, Custom Post Types).
Example:
add_filter( 'externallinknotice_allowed_pages', function( $pages ) { return array( 10, 25 ); // Replace with your Page IDs } );
Note: This will ONLY work for singular pages/posts. It will not work for archives or categories.
Yes, for more advanced control, use the externallinknotice_is_enabled filter.
Example:
add_filter( 'externallinknotice_is_enabled', function( $enabled ) { if ( is_home() || is_archive() ) { return true; } return $enabled; } );
No, the popup only appears when users click on links that lead to domains other than your own website.
No, the Leaving Notice Popup does not detect or intercept links inside embedded content or iframes. This is by design and is a technical limitation that applies to all similar plugins. Here's why:
Embeds and iframes (such as YouTube videos, Google Maps, social media widgets, or any other third-party embed) are sandboxed content rendered entirely by the external provider's server inside an isolated frame. They are not standard anchor (<a>) links on your page; they are self-contained mini-pages loaded from a third-party domain. Because of browser security policies (specifically the Same-Origin Policy), no WordPress plugin or JavaScript running on your site can access, modify, or listen to click events happening inside an iframe from a different domain.
In short:
<a href="...">) that exist directly in your page's DOM.
If you are using embeds and notice that those links do not trigger the popup, this is expected and correct behaviour. The popup will continue to work for all regular external links on your page.We do not recommend using this plugin on websites that rely on advertisements or ad networks for revenue. Here's why: Ad clicks are essential for generating revenue on your website. Since ads typically link to external domains, the Leaving Notice Popup will treat those ad links like any other external link and display a warning popup when a visitor clicks on them. This can significantly disrupt the ad click flow and negatively impact your ad revenue. However, you can give a try whether it works for you or not as some ads uses embed and it will not trigger the popup as mentioned in the FAQ section. While you could technically whitelist all the domains and URLs used by your ad networks, this is not practical because:
Yes, the plugin does not collect, store, or process any personal data.
Yes. In the plugin settings under the SEO & Security attributes section, enable the rel="nofollow" option. The plugin will automatically add nofollow to every external link on your site without you needing to edit any post or page manually.
These are all values for the rel attribute on links, but they serve different purposes:
window.opener. Recommended whenever you open external links in a new tab.Yes. The plugin supports rel="sponsored", which is Google's recommended attribute for paid or affiliate links. Enable it in the SEO & Security settings and it will be applied automatically to all external links, or combine it with the domain whitelist to control which links are excluded.
Yes. The plugin includes 5 built-in SVG icons that you can display beside external links. You can choose left or right positioning and optionally skip the icon when the link wraps an image.
Yes. There is a dedicated toggle in the settings that controls whether the Continue button inside the leaving notice popup opens the external link in a new tab or the same tab.
Yes. You can enter one or more CSS class names in the plugin settings under the exclusion options. Any link that carries one of those classes will be skipped entirely: no popup will appear and no rel attributes will be added to it.
Yes. The rel attribute processing (nofollow, noopener, noreferrer, sponsored, ugc, external) also applies to links inside widget text areas via the widget_text filter.
No. The plugin processes links on the fly as WordPress renders the page. Your original post and page content in the database is never modified. If you deactivate the plugin, all links revert to exactly how they were before.
Yes, the plugin works with links output by page builders as long as they render standard HTML anchor tags (<a href="...">) in the page's DOM. Since processing happens at the output level rather than in the editor, it is compatible with most page builders and themes.
externallinknotice_allowed_pages filter to restrict popup to specific Page IDs, read FAQ for more detailsexternallinknotice_is_enabled filter for advanced control (e.g. Archives, Home, Taxonomies)