{"id":206821,"date":"2011-02-27T08:00:00","date_gmt":"2011-02-27T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/wp-external-links\/"},"modified":"2025-07-12T13:35:00","modified_gmt":"2025-07-12T13:35:00","slug":"wp-external-links","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/wp-external-links\/","title":{"rendered":"External Links \u2013 nofollow, noopener &#038; new window"},"content":{"rendered":"<p><strong>Manage all external & internal links on your site<\/strong>. Control icons, nofollow, noopener, ugc (User Generated Content), sponsored and if links open in new window or new tab.<\/p>\n<p><a href=\"https:\/\/getwplinks.com\/\" rel=\"nofollow ugc\">WP Links<\/a> plugin was completely rebuilt in v2 and has lots of new features, like noopener, ugc and sponsored values for rel; font icons, internal links options and full WPMU support.<\/p>\n<h4>Link Scanner \u2013 PRO feature<\/h4>\n<p>Check every single link on your site! See if it\u2019s broken or not, if it\u2019s redirected, what\u2019s the target and rel attribute and what page exactly it\u2019s linking to. This feature is a part of the <a href=\"https:\/\/getwplinks.com\/\" rel=\"nofollow ugc\">WP Links PRO<\/a> plugin.<\/p>\n<h4>Features<\/h4>\n<ul>\n<li>Manage external and internal links<\/li>\n<li>Open links in new window or tab<\/li>\n<li>Add follow or nofollow (for SEO)<\/li>\n<li>Add noopener and noreferrer (for security)<\/li>\n<li>Add ugc (User Generated Content) and sponsored values to rel (<a href=\"https:\/\/webmasters.googleblog.com\/2019\/09\/evolving-nofollow-new-ways-to-identify.html\" rel=\"nofollow ugc\">Google announcement<\/a>)<\/li>\n<li>Add link icons (FontAwesome and Dashicons)<\/li>\n<li>Set other attributes like title and CSS classes<\/li>\n<li>Scan complete page (or just posts, comments, widgets)<\/li>\n<li>SEO friendly<\/li>\n<li>Link Scanner \u2013 check all links on your site \u2013 PRO feature<\/li>\n<li>Exit Confirmation \u2013 protect visitors and traffic when external links are clicked \u2013 PRO feature<\/li>\n<li>Link Rules \u2013 create advanced link rules for chosen link groups \u2013 PRO feature<\/li>\n<\/ul>\n<h4>And more\u2026<\/h4>\n<ul>\n<li>Network Settings (WPMU support)<\/li>\n<li>Use template tag to apply plugin settings on specific contents<\/li>\n<li>Set data-attribute to change how individual links will be treated<\/li>\n<li>Use built-in actions and filters to implement your specific needs<\/li>\n<\/ul>\n<h4>Easy to use<\/h4>\n<p>After activating you can set all options for external and internal links on the plugins admin page.<\/p>\n<h4>On the fly<\/h4>\n<p>The plugin filters the output and changes the links on the fly. The real contents (posts, pages, widget etcetera) will not be changed in the database.<br \/>\nWhen deactivating the plugin, all contents will be the same as it was before.<\/p>\n<h4>GDPR compatibility<\/h4>\n<p>We are not lawyers. Please do not take any of the following as legal advice.<br \/>\nWP External Links does not track, collect or process any user data. Nothing is logged or pushed to any 3rd parties. We also don\u2019t use any 3rd party services or CDNs. Based on that, we feel it\u2019s GDPR compatible, but again, please, don\u2019t take this as legal advice.<\/p>\n<p><strong>Like the plugin?<\/strong> <a href=\"https:\/\/wordpress.org\/support\/view\/plugin-reviews\/wp-external-links\" rel=\"ugc\">Rate it<\/a> to support the development.<\/p>\n<p>If you\u2019re having <strong>problems with SSL or HTTPS<\/strong> try our free <a href=\"https:\/\/wordpress.org\/plugins\/wp-force-ssl\/\" rel=\"ugc\">WP Force SSL<\/a> plugin. It\u2019s a great way to enable SSL and fix SSL problems.<\/p>\n<h3>Documentation<\/h3>\n<p>After activating you can set all options for external and internal links.<\/p>\n<h4>Data attribute \u201cdata-wpel-link\u201d<\/h4>\n<p>Links being processed by this plugin will also contain the data-attribute <code>data-wpel-link<\/code>.<br \/>\nThe plugin could set the value to <code>external<\/code>, <code>internal<\/code> or <code>exclude<\/code>, meaning how the<br \/>\nlink was processed.<\/p>\n<p>You can also set the data-attribute yourself. This way you can force how the plugin will process<br \/>\ncertain links.<\/p>\n<p>When you add the value <code>ignore<\/code>, the link will be completely ignored by the plugin:<\/p>\n<pre><code><a href=\"http:\/\/somedomain.com\" data-wpel-link=\"ignore\">Go to somedomain<\/a>\n<\/code><\/pre>\n<h4>Action \u201cwpel_link\u201d<\/h4>\n<p>Use this action to change the link object after all plugin settings have been applied.<\/p>\n<pre><code>add_action( 'wpel_link', ( $link_object ) {\n    if ( $link_object->is_external() ) {\n        \/\/ get current url\n        $url = $link_object->getAttribute( 'href' );\n\n        \/\/ set redirect url\n        $redirect_url = '\/\/somedom.com?url='. urlencode( $url );\n        $link_object->setAttribute( 'href', $redirect_url );\n    }\n}, 10, 1 );\n<\/code><\/pre>\n<p>The link object is an instance of <code>WPEL_Link<\/code> class.<\/p>\n<h4>Action hook \u201cwpel_before_apply_link\u201d<\/h4>\n<p>Use this action to change the link object before the plugin settings will be applied on the link.<br \/>\nYou can use this filter f.e. to ignore individual links from being processed. Or change dynamically how<br \/>\nthey will be treated by this plugin.<\/p>\n<pre><code>add_action( 'wpel_before_apply_link', function ( $link ) {\n    \/\/ ignore links with class \"some-cls\"\n    if ( $link->has_attr_value( 'class', 'some-cls' ) ) {\n        $link->set_ignore();\n    }\n\n    \/\/ mark and treat links with class \"ext-cls\" as external link\n    if ( $link->has_attr_value( 'class', 'ext-cls' ) ) {\n        $link->set_external();\n    }\n}, 10 );\n<\/code><\/pre>\n<h4>Filter hook \u201cwpel_apply_settings\u201d<\/h4>\n<p>When filter returns false the plugin settings will not be applied. Can be used when f.e. certain posts or pages should be ignored by this plugin.<\/p>\n<pre><code>add_filter( 'wpel_apply_settings', '__return_false' );\n<\/code><\/pre>\n<p>See <a href=\"https:\/\/wordpress.org\/plugins\/wp-external-links\/faq\/\" rel=\"ugc\">FAQ<\/a> for more info.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internal links &#038; external links manager: open in new window or tab, control nofollow, ugc, sponsored &#038; noopener. SEO friendly.<\/p>\n","protected":false},"author":65,"featured_media":381256,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"External Links \u2013 nofollow, noopener & new window - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Internal links & external links manager: open in new window or tab, control nofollow, ugc, sponsored & noopener. SEO friendly."},"footnotes":""},"categories":[1],"tags":[10970,30619,13855,126,33207],"class_list":["post-206821","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-external-links","tag-new-tab","tag-new-window","tag-nofollow","tag-noopener"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/206821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=206821"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/206821\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/381256"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=206821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=206821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=206821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}