Version Description
- Solved the not working activation hook
Download this release
Release Info
Developer | freelancephp |
Plugin | WP External Links (nofollow new tab seo) |
Version | 1.02 |
Comparing to | |
See all releases |
Code changes from version 1.01 to 1.02
includes/class-admin-external-links.php
CHANGED
@@ -71,7 +71,12 @@ final class Admin_External_Links {
|
|
71 |
load_plugin_textdomain( WP_EXTERNAL_LINKS_KEY, FALSE, dirname( plugin_basename( WP_EXTERNAL_LINKS_FILE ) ) . '/lang/' );
|
72 |
|
73 |
// set activation hook
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
// set deactivation hook
|
77 |
register_deactivation_hook( WP_EXTERNAL_LINKS_FILE, array( $this, 'call_deactivation' ) );
|
@@ -262,7 +267,7 @@ final class Admin_External_Links {
|
|
262 |
<?php echo $this->tooltip_help( 'The "target"-attribute is not valid XHTML strict code. Enable this option to remove the target from external links and use the JavaScript method (built-in this plugin) for opening links.' ) ?></th>
|
263 |
<td>
|
264 |
<label><?php echo $this->form->checkbox( 'use_js', 1, array( 'class' => 'field_use_js' ) ); ?>
|
265 |
-
<span><?php $this->_e( 'Use JavaScript for opening links in given target
|
266 |
</td>
|
267 |
</tr>
|
268 |
</table>
|
@@ -442,7 +447,6 @@ final class Admin_External_Links {
|
|
442 |
|
443 |
// delete old format option values
|
444 |
delete_option( 'WP_External_Links_options' );
|
445 |
-
unregister_setting( 'WP_External_Links', 'WP_External_Links_options' );
|
446 |
}
|
447 |
}
|
448 |
|
71 |
load_plugin_textdomain( WP_EXTERNAL_LINKS_KEY, FALSE, dirname( plugin_basename( WP_EXTERNAL_LINKS_FILE ) ) . '/lang/' );
|
72 |
|
73 |
// set activation hook
|
74 |
+
// Does not work properly
|
75 |
+
//register_activation_hook( WP_EXTERNAL_LINKS_FILE, array( $this, 'call_activation' ) );
|
76 |
+
// workaround: call activation, when new format not found
|
77 |
+
$options = get_option( 'wp_external_links-general' );
|
78 |
+
if ( empty( $options ) )
|
79 |
+
$this->call_activation();
|
80 |
|
81 |
// set deactivation hook
|
82 |
register_deactivation_hook( WP_EXTERNAL_LINKS_FILE, array( $this, 'call_deactivation' ) );
|
267 |
<?php echo $this->tooltip_help( 'The "target"-attribute is not valid XHTML strict code. Enable this option to remove the target from external links and use the JavaScript method (built-in this plugin) for opening links.' ) ?></th>
|
268 |
<td>
|
269 |
<label><?php echo $this->form->checkbox( 'use_js', 1, array( 'class' => 'field_use_js' ) ); ?>
|
270 |
+
<span><?php $this->_e( 'Use JavaScript for opening links in given target.' ) ?></span></label>
|
271 |
</td>
|
272 |
</tr>
|
273 |
</table>
|
447 |
|
448 |
// delete old format option values
|
449 |
delete_option( 'WP_External_Links_options' );
|
|
|
450 |
}
|
451 |
}
|
452 |
|
includes/wp-plugin-dev-classes/class-wp-option-forms.php
CHANGED
@@ -314,7 +314,6 @@ class WP_Option_Forms_01 {
|
|
314 |
public function delete_options() {
|
315 |
foreach ( $this->options AS $option_name => $values ) {
|
316 |
delete_option( $option_name );
|
317 |
-
unregister_setting( $option_name, $option_name );
|
318 |
}
|
319 |
}
|
320 |
|
314 |
public function delete_options() {
|
315 |
foreach ( $this->options AS $option_name => $values ) {
|
316 |
delete_option( $option_name );
|
|
|
317 |
}
|
318 |
}
|
319 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.2.1
|
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,9 @@ This latest version requires PHP 5.2+ and WP 3.0+.
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
49 |
= 1.01 =
|
50 |
* Solved bug after live testing
|
51 |
|
@@ -111,7 +114,7 @@ This latest version requires PHP 5.2+ and WP 3.0+.
|
|
111 |
|
112 |
== Upgrade Notice ==
|
113 |
|
114 |
-
= 1.
|
115 |
* This version requires PHP5.2+ and WP3.0+
|
116 |
* Added option for setting title-attribute
|
117 |
* Added option for excluding certain links
|
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.2.1
|
6 |
+
Stable tag: 1.02
|
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.02 =
|
50 |
+
* Solved the not working activation hook
|
51 |
+
|
52 |
= 1.01 =
|
53 |
* Solved bug after live testing
|
54 |
|
114 |
|
115 |
== Upgrade Notice ==
|
116 |
|
117 |
+
= 1.02 =
|
118 |
* This version requires PHP5.2+ and WP3.0+
|
119 |
* Added option for setting title-attribute
|
120 |
* Added option for excluding certain links
|
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.02
|
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.02' );
|
14 |
|
15 |
// plugin key (used as translation domain, option_group, page_slug etc)
|
16 |
define( 'WP_EXTERNAL_LINKS_KEY', 'wp_external_links' );
|