Version Description
- Solved bug removing icon stylesheet
Download this release
Release Info
Developer | freelancephp |
Plugin | WP External Links (nofollow new tab seo) |
Version | 0.21 |
Comparing to | |
See all releases |
Code changes from version 0.20 to 0.21
- readme.txt +6 -2
- wp-external-links.php +8 -6
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: freelancephp
|
|
3 |
Tags: links, external, new window, icon, target, _blank, _new, rel, nofollow, javascript, xhtml strict
|
4 |
Requires at least: 2.7.0
|
5 |
Tested up to: 3.1.0
|
6 |
-
Stable tag: 0.
|
7 |
|
8 |
Manage the external links on your site: opening in a new window, set link icon, set "external" and/or "nofollow", set No-Icon or additional css-class.
|
9 |
|
@@ -15,8 +15,9 @@ Manage the external links on your site.
|
|
15 |
* Opening external links in a new window
|
16 |
* Adding "external" and/or "nofollow" value to rel-attribute
|
17 |
* Choose an icon for external links
|
18 |
-
*
|
19 |
* Unobtrusive JavaScript method wich is XHTML Strict compliant
|
|
|
20 |
* Supports PHP4.3+ and up to latest WP version
|
21 |
|
22 |
More info at [FreelancePHP.net](http://www.freelancephp.net/wp-external-links-plugin)
|
@@ -37,6 +38,9 @@ More info at [FreelancePHP.net](http://www.freelancephp.net/wp-external-links-pl
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
40 |
= 0.20 =
|
41 |
* Put icon styles in external stylesheet
|
42 |
* Can use "ext-icon-..." to show a specific icon on a link
|
3 |
Tags: links, external, new window, icon, target, _blank, _new, rel, nofollow, javascript, xhtml strict
|
4 |
Requires at least: 2.7.0
|
5 |
Tested up to: 3.1.0
|
6 |
+
Stable tag: 0.21
|
7 |
|
8 |
Manage the external links on your site: opening in a new window, set link icon, set "external" and/or "nofollow", set No-Icon or additional css-class.
|
9 |
|
15 |
* Opening external links in a new window
|
16 |
* Adding "external" and/or "nofollow" value to rel-attribute
|
17 |
* Choose an icon for external links
|
18 |
+
* Set a No-Icon class and/or an additional class (for your own styling)
|
19 |
* Unobtrusive JavaScript method wich is XHTML Strict compliant
|
20 |
+
* Scans hole page (posts, comments, widgets etc)
|
21 |
* Supports PHP4.3+ and up to latest WP version
|
22 |
|
23 |
More info at [FreelancePHP.net](http://www.freelancephp.net/wp-external-links-plugin)
|
38 |
|
39 |
== Changelog ==
|
40 |
|
41 |
+
= 0.21 =
|
42 |
+
* Solved bug removing icon stylesheet
|
43 |
+
|
44 |
= 0.20 =
|
45 |
* Put icon styles in external stylesheet
|
46 |
* Can use "ext-icon-..." to show a specific icon on a link
|
wp-external-links.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP External Links
|
|
4 |
Plugin URI: http://www.freelancephp.net/
|
5 |
Description: Manage the external links on your site: opening in a new window, set link icon, set "external", set "nofollow", set css-class.
|
6 |
Author: Victor Villaverde Laan
|
7 |
-
Version: 0.
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
*/
|
@@ -19,7 +19,7 @@ class WP_External_Links {
|
|
19 |
* Current version
|
20 |
* @var string
|
21 |
*/
|
22 |
-
var $version = '0.
|
23 |
|
24 |
/**
|
25 |
* Used as prefix for options entry and could be used as text domain (for translations)
|
@@ -139,15 +139,17 @@ var gExtLinks = {
|
|
139 |
* @return string
|
140 |
*/
|
141 |
function filter_content( $content ) {
|
|
|
|
|
|
|
|
|
142 |
// remove style when no icon classes are found
|
143 |
-
if ( strpos( $content, 'ext-icon-' )
|
144 |
// remove style with id wp-external-links-css
|
145 |
$content = preg_replace( '/<link(.*?)wp-external-links-css(.*?)\/>[\s+]*/i','' ,$content );
|
146 |
}
|
147 |
|
148 |
-
|
149 |
-
$a_pattern = '/<[aA](.*?)>(.*?)<\/[aA][\s+]*>/i';
|
150 |
-
return preg_replace_callback( $a_pattern, array( $this, 'parse_link' ), $content );
|
151 |
}
|
152 |
|
153 |
/**
|
4 |
Plugin URI: http://www.freelancephp.net/
|
5 |
Description: Manage the external links on your site: opening in a new window, set link icon, set "external", set "nofollow", set css-class.
|
6 |
Author: Victor Villaverde Laan
|
7 |
+
Version: 0.21
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
*/
|
19 |
* Current version
|
20 |
* @var string
|
21 |
*/
|
22 |
+
var $version = '0.21';
|
23 |
|
24 |
/**
|
25 |
* Used as prefix for options entry and could be used as text domain (for translations)
|
139 |
* @return string
|
140 |
*/
|
141 |
function filter_content( $content ) {
|
142 |
+
// get <a> elements
|
143 |
+
$a_pattern = '/<[aA](.*?)>(.*?)<\/[aA][\s+]*>/i';
|
144 |
+
$content = preg_replace_callback( $a_pattern, array( $this, 'parse_link' ), $content );
|
145 |
+
|
146 |
// remove style when no icon classes are found
|
147 |
+
if ( strpos( $content, 'ext-icon-' ) === FALSE ) {
|
148 |
// remove style with id wp-external-links-css
|
149 |
$content = preg_replace( '/<link(.*?)wp-external-links-css(.*?)\/>[\s+]*/i','' ,$content );
|
150 |
}
|
151 |
|
152 |
+
return $content;
|
|
|
|
|
153 |
}
|
154 |
|
155 |
/**
|