WP External Links (nofollow new tab seo) - Version 2.42

Version Description

  • 2019-12-18
    • fixed various undefined variable notices
    • fixed an issue when theres no href attribute set in an A element
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 WP External Links (nofollow new tab seo)
Version 2.42
Comparing to
See all releases

Code changes from version 2.40 to 2.42

data/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
includes/admin/class-wpel-settings-page.php CHANGED
@@ -179,7 +179,7 @@ final class WPEL_Settings_Page extends WPRun_Base_1x0x0
179
  }
180
  } else if ( isset( $this->tabs[ $type ][ 'fields' ] ) ) {
181
  $option_values = $this->tabs[ $type ][ 'fields' ]->get_option_values();
182
- return $option_values[ $key ];
183
  }
184
 
185
  trigger_error( 'Option value "'. $key .'" cannot be found.' );
179
  }
180
  } else if ( isset( $this->tabs[ $type ][ 'fields' ] ) ) {
181
  $option_values = $this->tabs[ $type ][ 'fields' ]->get_option_values();
182
+ return @$option_values[ $key ];
183
  }
184
 
185
  trigger_error( 'Option value "'. $key .'" cannot be found.' );
includes/class-wpel-front.php CHANGED
@@ -149,6 +149,10 @@ final class WPEL_Front extends WPRun_Base_1x0x0
149
  $atts = $matches[ 1 ];
150
  $label = $matches[ 2 ];
151
 
 
 
 
 
152
  $created_link = $this->get_created_link( $label, $atts );
153
 
154
  if ( false === $created_link ) {
@@ -271,12 +275,12 @@ final class WPEL_Front extends WPRun_Base_1x0x0
271
  }
272
 
273
  // add "sponsored"
274
- if ( $this->opt( 'rel_sponsored', $type ) ) {
275
  $link->add_to_attr( 'rel', 'sponsored' );
276
  }
277
 
278
  // add "ugc"
279
- if ( $this->opt( 'rel_ugc', $type ) ) {
280
  $link->add_to_attr( 'rel', 'ugc' );
281
  }
282
 
149
  $atts = $matches[ 1 ];
150
  $label = $matches[ 2 ];
151
 
152
+ if(strpos($atts,'href') === false){
153
+ return $original_link;
154
+ }
155
+
156
  $created_link = $this->get_created_link( $label, $atts );
157
 
158
  if ( false === $created_link ) {
275
  }
276
 
277
  // add "sponsored"
278
+ if ( 'external-links' === $type && $this->opt( 'rel_sponsored', $type ) ) {
279
  $link->add_to_attr( 'rel', 'sponsored' );
280
  }
281
 
282
  // add "ugc"
283
+ if ( 'external-links' === $type && $this->opt( 'rel_ugc', $type ) ) {
284
  $link->add_to_attr( 'rel', 'ugc' );
285
  }
286
 
includes/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
libs/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
public/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === External Links - nofollow, noopener & new window ===
2
- Contributors: WebFactory, UnderConstructionPage, googlemapswidget, securityninja, wpreset
3
  Tags: new window, new tab, external links, nofollow, noopener, ugc, sponsored, follow, dofollow, seo, noreferrer, internal links, target, links, link, internal link, external link
4
  Requires at least: 4.2
5
  Tested up to: 5.3
6
  Requires PHP: 5.3
7
- Stable tag: 2.40
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -243,6 +243,11 @@ See [FAQ](https://wordpress.org/plugins/wp-external-links/faq/) for more info.
243
 
244
  == Changelog ==
245
 
 
 
 
 
 
246
  = 2.40 =
247
  * 2019-11-20
248
  * no longer loads CSS and FontAwesome globally on admin pages
1
  === External Links - nofollow, noopener & new window ===
2
+ Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset
3
  Tags: new window, new tab, external links, nofollow, noopener, ugc, sponsored, follow, dofollow, seo, noreferrer, internal links, target, links, link, internal link, external link
4
  Requires at least: 4.2
5
  Tested up to: 5.3
6
  Requires PHP: 5.3
7
+ Stable tag: 2.42
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
243
 
244
  == Changelog ==
245
 
246
+ = 2.42 =
247
+ * 2019-12-18
248
+ * fixed various undefined variable notices
249
+ * fixed an issue when there’s no href attribute set in an A element
250
+
251
  = 2.40 =
252
  * 2019-11-20
253
  * no longer loads CSS and FontAwesome globally on admin pages
templates/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden
wp-external-links.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP External Links
4
- * Version: 2.40
5
  * Plugin URI: https://wordpress.org/plugins/wp-external-links/
6
  * Description: Open external links in a new tab or window, control "nofollow" and "noopener", set font icon; SEO friendly.
7
  * Author: WebFactory Ltd
1
  <?php
2
  /**
3
  * Plugin Name: WP External Links
4
+ * Version: 2.42
5
  * Plugin URI: https://wordpress.org/plugins/wp-external-links/
6
  * Description: Open external links in a new tab or window, control "nofollow" and "noopener", set font icon; SEO friendly.
7
  * Author: WebFactory Ltd