Version Description
- Fixed phpQuery bugs (class already exists and loading stylesheet)
- Solved php notices
Download this release
Release Info
Developer | freelancephp |
Plugin | WP External Links (nofollow new tab seo) |
Version | 1.21 |
Comparing to | |
See all releases |
Code changes from version 1.20 to 1.21
includes/class-admin-external-links.php
CHANGED
@@ -195,7 +195,7 @@ final class Admin_External_Links {
|
|
195 |
*/
|
196 |
public function call_page_title( $title ) {
|
197 |
// when updated set the update message
|
198 |
-
if ( $_GET[ 'settings-updated' ] == 'true' ) {
|
199 |
$title .= '<div class="updated settings-error" id="setting-error-settings_updated" style="display:none">'
|
200 |
. '<p><strong>' . __( 'Settings saved.' ) .'</strong></p>'
|
201 |
. '</div>';
|
195 |
*/
|
196 |
public function call_page_title( $title ) {
|
197 |
// when updated set the update message
|
198 |
+
if ( isset($_GET[ 'settings-updated' ]) && $_GET[ 'settings-updated' ] == 'true' ) {
|
199 |
$title .= '<div class="updated settings-error" id="setting-error-settings_updated" style="display:none">'
|
200 |
. '<p><strong>' . __( 'Settings saved.' ) .'</strong></p>'
|
201 |
. '</div>';
|
includes/class-wp-external-links.php
CHANGED
@@ -47,7 +47,9 @@ final class WP_External_Links {
|
|
47 |
public function call_wp() {
|
48 |
if ( ! is_admin() && ! is_feed() ) {
|
49 |
// Include phpQuery
|
50 |
-
|
|
|
|
|
51 |
|
52 |
// add wp_head for setting js vars and css style
|
53 |
add_action( 'wp_head', array( $this, 'call_wp_head' ) );
|
@@ -333,13 +335,6 @@ var wpExtLinks = { baseUrl: '<?php echo get_bloginfo( 'wpurl' ) ?>',target: '<?p
|
|
333 |
}
|
334 |
*/
|
335 |
|
336 |
-
// remove style when no icon classes are found
|
337 |
-
if ( strpos( $content, 'ext-icon-' ) === FALSE ) {
|
338 |
-
// remove icon css
|
339 |
-
$css = $doc->find( 'link#wp-external-links-css' )->eq(0);
|
340 |
-
$css->remove();
|
341 |
-
}
|
342 |
-
|
343 |
$excl_sel = $this->get_opt( 'filter_excl_sel' );
|
344 |
|
345 |
// set excludes
|
@@ -369,6 +364,13 @@ var wpExtLinks = { baseUrl: '<?php echo get_bloginfo( 'wpurl' ) ?>',target: '<?p
|
|
369 |
$excludes->find( 'a' )->removeAttr( 'excluded' );
|
370 |
}
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
// get document content
|
373 |
$content = (string) $doc;
|
374 |
|
47 |
public function call_wp() {
|
48 |
if ( ! is_admin() && ! is_feed() ) {
|
49 |
// Include phpQuery
|
50 |
+
if ( ! class_exists( 'phpQuery' ) ) {
|
51 |
+
require_once( 'phpQuery.php' );
|
52 |
+
}
|
53 |
|
54 |
// add wp_head for setting js vars and css style
|
55 |
add_action( 'wp_head', array( $this, 'call_wp_head' ) );
|
335 |
}
|
336 |
*/
|
337 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
$excl_sel = $this->get_opt( 'filter_excl_sel' );
|
339 |
|
340 |
// set excludes
|
364 |
$excludes->find( 'a' )->removeAttr( 'excluded' );
|
365 |
}
|
366 |
|
367 |
+
// remove style when no icon classes are found
|
368 |
+
if ( strpos( $doc, 'ext-icon-' ) === FALSE ) {
|
369 |
+
// remove icon css
|
370 |
+
$css = $doc->find( 'link#wp-external-links-css' )->eq(0);
|
371 |
+
$css->remove();
|
372 |
+
}
|
373 |
+
|
374 |
// get document content
|
375 |
$content = (string) $doc;
|
376 |
|
includes/wp-plugin-dev-classes/class-wp-option-forms.php
CHANGED
@@ -251,7 +251,7 @@ class WP_Option_Forms_01 {
|
|
251 |
* @return string
|
252 |
*/
|
253 |
public function select( $key, $options = array(), $attrs = array() ) {
|
254 |
-
$html = '<select '. $this->attrs( $attrs, $key
|
255 |
|
256 |
foreach ( $options AS $value => $label ) {
|
257 |
$selected = ( $value == $this->value( $key ) ) ? ' selected="selected"' : '';
|
@@ -275,7 +275,7 @@ class WP_Option_Forms_01 {
|
|
275 |
$html = '';
|
276 |
$html .= '<p class="button-controls" style="text-align:right;">';
|
277 |
$html .= '<img alt="" title="" class="ajax-feedback" src="'. get_bloginfo( 'url' ) .'/wp-admin/images/wpspin_light.gif" style="visibility: hidden;" />';
|
278 |
-
$html .= '<input type="submit" '. $this->attrs( $attrs,
|
279 |
$html .= '</p>';
|
280 |
return $html;
|
281 |
}
|
251 |
* @return string
|
252 |
*/
|
253 |
public function select( $key, $options = array(), $attrs = array() ) {
|
254 |
+
$html = '<select '. $this->attrs( $attrs, $key ) .'>';
|
255 |
|
256 |
foreach ( $options AS $value => $label ) {
|
257 |
$selected = ( $value == $this->value( $key ) ) ? ' selected="selected"' : '';
|
275 |
$html = '';
|
276 |
$html .= '<p class="button-controls" style="text-align:right;">';
|
277 |
$html .= '<img alt="" title="" class="ajax-feedback" src="'. get_bloginfo( 'url' ) .'/wp-admin/images/wpspin_light.gif" style="visibility: hidden;" />';
|
278 |
+
$html .= '<input type="submit" '. $this->attrs( $attrs, '', __( 'Save Changes' ) ) .' />';
|
279 |
$html .= '</p>';
|
280 |
return $html;
|
281 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: freelancephp
|
3 |
Tags: links, external, icon, target, _blank, _new, _none, rel, nofollow, new window, new tab, javascript, xhtml, seo
|
4 |
Requires at least: 3.0.0
|
5 |
-
Tested up to: 3.3.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Open external links in a new window/tab, add "external" / "nofollow" to rel-attribute, set icon, XHTML strict, SEO friendly...
|
9 |
|
@@ -46,6 +46,10 @@ This latest version requires PHP 5.2+ and WP 3.0+.
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
|
|
49 |
= 1.20 =
|
50 |
* Added option to ignore certain links or domains
|
51 |
* Solved tweet button problem by adding link to new ignore option
|
@@ -129,6 +133,10 @@ This latest version requires PHP 5.2+ and WP 3.0+.
|
|
129 |
|
130 |
== Upgrade Notice ==
|
131 |
|
|
|
|
|
|
|
|
|
132 |
= 1.20 =
|
133 |
Main updates:
|
134 |
* Added option to ignore certain links or domains
|
2 |
Contributors: freelancephp
|
3 |
Tags: links, external, icon, target, _blank, _new, _none, rel, nofollow, new window, new tab, javascript, xhtml, seo
|
4 |
Requires at least: 3.0.0
|
5 |
+
Tested up to: 3.3.2
|
6 |
+
Stable tag: 1.21
|
7 |
|
8 |
Open external links in a new window/tab, add "external" / "nofollow" to rel-attribute, set icon, XHTML strict, SEO friendly...
|
9 |
|
46 |
|
47 |
== Changelog ==
|
48 |
|
49 |
+
= 1.21 =
|
50 |
+
* Fixed phpQuery bugs (class already exists and loading stylesheet)
|
51 |
+
* Solved php notices
|
52 |
+
|
53 |
= 1.20 =
|
54 |
* Added option to ignore certain links or domains
|
55 |
* Solved tweet button problem by adding link to new ignore option
|
133 |
|
134 |
== Upgrade Notice ==
|
135 |
|
136 |
+
= 1.21 =
|
137 |
+
* Fixed phpQuery bugs (class already exists and loading stylesheet)
|
138 |
+
* Solved php notices
|
139 |
+
|
140 |
= 1.20 =
|
141 |
Main updates:
|
142 |
* Added option to ignore certain links or domains
|
wp-external-links.php
CHANGED
@@ -4,13 +4,13 @@ Plugin Name: WP External Links
|
|
4 |
Plugin URI: http://www.freelancephp.net/wp-external-links-plugin
|
5 |
Description: Open external links in a new window/tab, add "external" / "nofollow" to rel-attribute, set icon, XHTML strict, SEO friendly...
|
6 |
Author: Victor Villaverde Laan
|
7 |
-
Version: 1.
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
*/
|
11 |
|
12 |
// plugin version
|
13 |
-
define( 'WP_EXTERNAL_LINKS_VERSION', '1.
|
14 |
|
15 |
// plugin key (used as translation domain, option_group, page_slug etc)
|
16 |
define( 'WP_EXTERNAL_LINKS_KEY', 'wp_external_links' );
|
4 |
Plugin URI: http://www.freelancephp.net/wp-external-links-plugin
|
5 |
Description: Open external links in a new window/tab, add "external" / "nofollow" to rel-attribute, set icon, XHTML strict, SEO friendly...
|
6 |
Author: Victor Villaverde Laan
|
7 |
+
Version: 1.21
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
*/
|
11 |
|
12 |
// plugin version
|
13 |
+
define( 'WP_EXTERNAL_LINKS_VERSION', '1.21' );
|
14 |
|
15 |
// plugin key (used as translation domain, option_group, page_slug etc)
|
16 |
define( 'WP_EXTERNAL_LINKS_KEY', 'wp_external_links' );
|