Linux 软件免费装
Banner图

External Links - nofollow, noopener & new window

开发者 WebFactory
更新时间 2024年11月13日 15:16
PHP版本: 7.2 及以上
WordPress版本: 6.7
版权: GPLv2 or later
版权网址: 版权信息

标签

nofollow noopener external links new tab new window

下载

1.61 2.55 2.43 1.54 0.11 1.52 1.70 1.80 1.81 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 2.3 2.32 2.35 2.40 2.42 2.45 2.46 2.47 2.48 0.30 0.32 1.01 2.0.4 2.57 2.61 1.56 0.12 0.31 0.33 0.34 0.35 1.20 1.21 1.30 0.20 1.02 1.03 1.10 1.31 1.40 1.41 1.50 1.51 1.53 2.50 1.55 0.10 1.62 2.51 2.56 2.58 2.59 2.60 2.62 0.21 1.60

详情介绍:

Manage all external & internal links on your site. Control icons, nofollow, noopener, ugc (User Generated Content), sponsored and if links open in new window or new tab. WP Links 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. Link Scanner - PRO feature Check every single link on your site! See if it's broken or not, if it's redirected, what's the target and rel attribute and what page exactly it's linking to. This feature is a part of the WP Links PRO plugin. Features And more... Easy to use After activating you can set all options for external and internal links on the plugins admin page. On the fly 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. When deactivating the plugin, all contents will be the same as it was before. GDPR compatibility We are not lawyers. Please do not take any of the following as legal advice. WP External Links does not track, collect or process any user data. Nothing is logged or pushed to any 3rd parties. We also don't use any 3rd party services or CDNs. Based on that, we feel it's GDPR compatible, but again, please, don't take this as legal advice. Like the plugin? Rate it to support the development. If you're having problems with SSL or HTTPS try our free WP Force SSL plugin. It's a great way to enable SSL and fix SSL problems.

安装:

  1. Go to Plugins in the Admin menu
  2. Click on the button Add new
  3. Search for WP External Links and click Install Now
  4. Click on the Activate plugin link

屏幕截图:

  • Link Checker / Link Tester
  • Link Icons

常见问题:

I want certain posts or pages to be ignored by the plugin. How?

Just use the option "Skip pages or posts" under the tab "Exceptions". For a more custom approach use the action wpel_apply_settings: `add_action( 'wpel_apply_settings', function () { global $post; $ignored_post_ids = array( 1, 2, 4 ); if ( in_array( $post->ID, $ignored_post_ids ) ) { return false; } return true; }, 10 );` Using this filter you can ignore any request, like certain category, archive etcetera.

I want specific links to be ignored by the plugin. How?

There's an option for ignoring links containing a certain class (under tab "Exceptions"). For a more flexible check on ignoring links you could use the filter wpel_before_apply_link: add_action( 'wpel_before_apply_link', function ( $link ) { // ignore links with class "some-cls" if ( $link->has_attr_value( 'class', 'some-cls' ) ) { $link->set_ignore(); } }, 10 );

How to create a redirect for external links? (f.e. affiliate links)

Create redirect by using the wpel_link action. Add some code to functions.php of your theme, like: `add_action( 'wpel_link', function ( $link ) { // check if link is an external links if ( $link->is_external() ) { // get current url $url = $link->get_attr( 'href' ); // set redirect url $redirect_url = '//somedom.com?url='. urlencode( $url ); $link->set_attr( 'href', $redirect_url ); } }, 10, 1 );`

How to open external links in a new popup window?

By adding this JavaScript code to your site: `jQuery(function ($) { $('a[data-wpel-link="external"]').click(function (e) { // open link in popup window window.open($(this).attr('href'), '_blank', 'width=800, height=600'); // stop default and other behaviour e.preventDefault(); e.stopImmediatePropagation(); }); });` See more information on the window.open() method.

How to add an confirm (or alert) when opening external links?

Add this JavaScript code to your site: jQuery(function ($) { $('a[data-wpel-link="external"]').click(function (e) { if (!confirm('Are you sure you want to open this link?')) { // cancelled e.preventDefault(); e.stopImmediatePropagation(); } }); });

How to open PDF files in a new window?

Use some JavaScript code for opening PDF files in a new window: jQuery(function ($) { $('a[href$=".pdf"]').prop('target', '_blank'); });

How to set another icon for secure sites (using https)?

Use some CSS style to change the icon for secure sites using https: a[href^="https"] .wpel-icon:before { content: "\f023" !important; } The code \f023 refers to a dashicon or font awesome icon.

I am a plugin developer and my plugin conflicts with WPEL. How can I solve the problem?

If your plugin contains links it might be filtered by the WPEL plugin as well, causing a conflict. Here are some suggestions on solving the problem:

  1. Add data-wpel-link="ignore" to links that need to be ignored by WPEL plugin
  2. Use wpel_before_apply_link-action to ignore your links (f.e. containing certain class or data-attribute)
  3. Use wpel_apply_settings-filter to ignore complete post, pages, categories etc

How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.

更新日志:

2.62 2.61 2.60 2.59 2.58 2.57 2.56 2.55 2.51 2.50 2.48 2.47 2.46 2.45 2.43 2.42 2.40 2.35 2.32 2.3