Version Description
- Stable beta version.
- Nofollow checkbox added to the add/edit blogroll links dialogue.
- Adds option to nofollow all blogroll links.
Download this release
Release Info
Developer | bitacre |
Plugin | Ultimate Nofollow |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
- nofollow.php +83 -21
- readme.txt +18 -13
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
nofollow.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ultimate Nofollow
|
4 |
-
Plugin URI: http://
|
5 |
Description: A suite of tools that gives you complete control over the rel=nofollow tag on an individual link basis.
|
6 |
-
Version: 0.1.
|
7 |
Author: bitacre
|
8 |
-
Author URI: http://
|
9 |
License: GPLv2
|
10 |
-
Copyright 2012
|
11 |
|
12 |
This plugin contains several tools in one to significantly increase your control of the nofollow rel tag on every link on your blog, on both an individual and type basis. It is designed to give you fine-grained control of linking for SEO purposes.
|
13 |
|
14 |
-
Notice: This plugin is still in beta. While it is stable, not all functions listed are included yet
|
15 |
|
16 |
*/
|
17 |
|
@@ -51,10 +51,23 @@ function ultnofo_options_do_page() {
|
|
51 |
<?php $options = get_option( 'ultnofo_item' ); // populate $options array from database ?>
|
52 |
<table class="form-table">
|
53 |
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
56 |
</tr>
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
<!-- <tr valign="top"><th scope="row">Text:</th>
|
60 |
<td>
|
@@ -67,7 +80,20 @@ function ultnofo_options_do_page() {
|
|
67 |
</p>
|
68 |
</form>
|
69 |
</div>
|
70 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
/* add hooks/filters */
|
@@ -84,19 +110,6 @@ add_action('admin_menu', 'ultnofo_options_add_page');
|
|
84 |
* NOFOLLOW SHORTCODES SECTION *
|
85 |
*******************************/
|
86 |
|
87 |
-
/* define additional plugin meta links */
|
88 |
-
function set_plugin_meta_ultnofo( $links, $file ) {
|
89 |
-
$plugin = plugin_basename( __FILE__ ); // '/nofollow/nofollow.php' by default
|
90 |
-
if ( $file == $plugin ) { // if called for THIS plugin then:
|
91 |
-
$newlinks = array(
|
92 |
-
'<a href="options-general.php?page=ultimate-nofollow">Settings</a>',
|
93 |
-
'<a href="http://wikiduh.com/plugins/nofollow/help">Help Page</a>'
|
94 |
-
); // array of links to add
|
95 |
-
return array_merge( $links, $newlinks ); // merge new links into existing $links
|
96 |
-
}
|
97 |
-
return $links; // return the $links (merged or otherwise)
|
98 |
-
}
|
99 |
-
|
100 |
/* valid href starting substring? */
|
101 |
function ultnofo_valid_url( $href ) {
|
102 |
$start_strs = array( // list of accepted url protocols
|
@@ -170,6 +183,55 @@ foreach( $shortcodes as $shortcode ) add_shortcode( $shortcode, 'ultnofo_nofollo
|
|
170 |
* BLOGROLL NOFOLLOW SECTION *
|
171 |
*****************************/
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
/**********************************************
|
174 |
* ADD LINK DIALOGUE NOFOLLOW CHECKBOX SECTION *
|
175 |
***********************************************/
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ultimate Nofollow
|
4 |
+
Plugin URI: http://shinraholdings.com/plugins/nofollow
|
5 |
Description: A suite of tools that gives you complete control over the rel=nofollow tag on an individual link basis.
|
6 |
+
Version: 0.1.3
|
7 |
Author: bitacre
|
8 |
+
Author URI: http://shinraholdings.com.com
|
9 |
License: GPLv2
|
10 |
+
Copyright 2012 Shinra Web Holdings (shinraholdings.com)
|
11 |
|
12 |
This plugin contains several tools in one to significantly increase your control of the nofollow rel tag on every link on your blog, on both an individual and type basis. It is designed to give you fine-grained control of linking for SEO purposes.
|
13 |
|
14 |
+
Notice: This plugin is still in beta. While it is stable, not all functions listed are included yet.
|
15 |
|
16 |
*/
|
17 |
|
51 |
<?php $options = get_option( 'ultnofo_item' ); // populate $options array from database ?>
|
52 |
<table class="form-table">
|
53 |
|
54 |
+
|
55 |
+
<!-- all comment links -->
|
56 |
+
<tr valign="top">
|
57 |
+
<th scope="row">Nofollow all links in comments?</th>
|
58 |
+
<td><input name="ultnofo_item[nofollow_comments]" type="checkbox" value="1" <?php checked( $options[ 'nofollow_comments' ] ); ?> />
|
59 |
+
</td>
|
60 |
</tr>
|
61 |
|
62 |
+
|
63 |
+
<!-- all blogroll links -->
|
64 |
+
<tr valign="top">
|
65 |
+
<th scope="row">Nofollow all blogroll links?</th>
|
66 |
+
<td><input name="ultnofo_item[nofollow_blogroll]" type="checkbox" value="1" <?php checked( $options[ 'nofollow_blogroll' ] ); ?> />
|
67 |
+
<span style="color:red; font-size:smaller">(warning: will override individual selections!)</span></td>
|
68 |
+
</tr>
|
69 |
+
|
70 |
+
|
71 |
|
72 |
<!-- <tr valign="top"><th scope="row">Text:</th>
|
73 |
<td>
|
80 |
</p>
|
81 |
</form>
|
82 |
</div>
|
83 |
+
<?php
|
84 |
+
}
|
85 |
+
|
86 |
+
/* define additional plugin meta links */
|
87 |
+
function set_plugin_meta_ultnofo( $links, $file ) {
|
88 |
+
$plugin = plugin_basename( __FILE__ ); // '/nofollow/nofollow.php' by default
|
89 |
+
if ( $file == $plugin ) { // if called for THIS plugin then:
|
90 |
+
$newlinks = array(
|
91 |
+
'<a href="options-general.php?page=ultimate-nofollow">Settings</a>',
|
92 |
+
'<a href="http://shinraholdings.com/plugins/nofollow/help">Help Page</a>'
|
93 |
+
); // array of links to add
|
94 |
+
return array_merge( $links, $newlinks ); // merge new links into existing $links
|
95 |
+
}
|
96 |
+
return $links; // return the $links (merged or otherwise)
|
97 |
}
|
98 |
|
99 |
/* add hooks/filters */
|
110 |
* NOFOLLOW SHORTCODES SECTION *
|
111 |
*******************************/
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
/* valid href starting substring? */
|
114 |
function ultnofo_valid_url( $href ) {
|
115 |
$start_strs = array( // list of accepted url protocols
|
183 |
* BLOGROLL NOFOLLOW SECTION *
|
184 |
*****************************/
|
185 |
|
186 |
+
function ultnofo_blogroll_add_meta_box() {
|
187 |
+
add_meta_box( 'ultnofo_blogroll_nofollow_div', 'Ultimate Nofollow', 'ultnofo_blogroll_inner_meta_box', 'link', 'side','high' );
|
188 |
+
}
|
189 |
+
|
190 |
+
function ultnofo_blogroll_inner_meta_box ( $post ) {
|
191 |
+
$bookmark = get_bookmark( $post->ID, 'ARRAY_A' );
|
192 |
+
if( strpos( $bookmark['link_rel'], 'nofollow' ) !== FALSE ) $checked = ' checked="checked"';
|
193 |
+
else $checked = '';
|
194 |
+
|
195 |
+
$options = get_option( 'ultnofo_item' );
|
196 |
+
if( $options['nofollow_blogroll'] ) {
|
197 |
+
$disabled=' disabled="disabled"';
|
198 |
+
$message='<br /><span style="color:red; font-size:smaller;">ALL blogroll links nofollowed on the <a href="options-general.php?page=ultimate-nofollow" target="_blank">options</a> page.</span>';
|
199 |
+
}
|
200 |
+
else {
|
201 |
+
$disabled = '';
|
202 |
+
$message = '';
|
203 |
+
}
|
204 |
+
|
205 |
+
?>
|
206 |
+
<label for="ultnofo_blogroll_nofollow_checkbox">Nofollow this link?</label>
|
207 |
+
<input value="1" id="ultnofo_blogroll_nofollow_checkbox" name="ultnofo_blogroll_nofollow_checkbox"<?php echo $disabled; ?> type="checkbox"<?php echo $checked; ?> /> <?php echo $message; ?>
|
208 |
+
<?php
|
209 |
+
}
|
210 |
+
|
211 |
+
function ultnofo_blogroll_save_meta_box( $link_rel ) {
|
212 |
+
$rel = trim( str_replace( 'nofollow', '', $link_rel ) );
|
213 |
+
if( $_POST['ultnofo_blogroll_nofollow_checkbox'] ) $rel .= ' nofollow';
|
214 |
+
return trim( $rel );
|
215 |
+
}
|
216 |
+
|
217 |
+
function ultnofo_blogroll_nofollow_all( $links ) {
|
218 |
+
foreach( $links as $link ) {
|
219 |
+
$rel = trim( str_replace('nofollow', '', $link->link_rel ) );
|
220 |
+
$link->link_rel = trim( $rel . ' nofollow' );
|
221 |
+
}
|
222 |
+
return $links;
|
223 |
+
}
|
224 |
+
|
225 |
+
/* add hooks/filters */
|
226 |
+
add_action( 'add_meta_boxes', 'ultnofo_blogroll_add_meta_box', 1 );
|
227 |
+
add_filter( 'pre_link_rel', 'ultnofo_blogroll_save_meta_box', 99998, 1);
|
228 |
+
|
229 |
+
$ultnofo_options = get_option( 'ultnofo_item' ); // NOT IN FUNCTION
|
230 |
+
if( $ultnofo_options['nofollow_blogroll'] ) add_filter( 'get_bookmarks', 'ultnofo_blogroll_nofollow_all', 99999);
|
231 |
+
|
232 |
+
|
233 |
+
|
234 |
+
|
235 |
/**********************************************
|
236 |
* ADD LINK DIALOGUE NOFOLLOW CHECKBOX SECTION *
|
237 |
***********************************************/
|
readme.txt
CHANGED
@@ -1,24 +1,22 @@
|
|
1 |
=== Ultimate Nofollow ===
|
2 |
-
Plugin URI: http://
|
3 |
Contributors: bitacre
|
4 |
-
Donate link: http://
|
5 |
Tags: nofollow,link,meta,rel,rel nofollow,seo,link meta,nofollow links,shortcode
|
6 |
Requires at least: 2.8
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 0.1.
|
9 |
|
10 |
A suite of tools that gives you complete control over the rel=nofollow tag on an individual link basis.
|
11 |
|
12 |
== Description ==
|
13 |
This plugin contains several tools in one to significantly increase your control of the nofollow rel tag on every link on your blog, on both an individual and type basis. It is designed to give you fine-grained control of linking for SEO purposes.
|
14 |
|
15 |
-
**Notice**: This plugin is still in beta. While it is stable, not all functions listed are included yet.
|
16 |
-
|
17 |
The plugin's main features are:
|
18 |
|
19 |
-
* a nofollow checkbox to the `insert link` dialogue box,
|
20 |
* several nofollow `shortcodes` *(added in v0.1.0)*,
|
21 |
-
* a nofollow option for individual `blogroll links
|
|
|
22 |
* add or remove the nofollow tag from all links in `comments` *(added in v0.1.2)*,
|
23 |
* plugin settings page *(added in v0.1.1)*.
|
24 |
|
@@ -38,8 +36,15 @@ See the manpages.
|
|
38 |
|
39 |
1. Settings page on the Dashboard.
|
40 |
|
|
|
|
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
|
|
|
|
43 |
= 0.1.2 =
|
44 |
* Stable beta version.
|
45 |
* Add/remove nofollow from all links in comments.
|
@@ -57,14 +62,14 @@ See the manpages.
|
|
57 |
New features!
|
58 |
|
59 |
== Readme Generator ==
|
60 |
-
* This plugin's readme.txt file was generated by the [
|
61 |
|
62 |
== Support ==
|
63 |
|
64 |
-
* [Plugin Homepage](http://
|
65 |
-
* [Help Page](http://
|
66 |
-
* [plugins@
|
67 |
|
68 |
== Donations ==
|
69 |
|
70 |
-
[Donations](http://
|
1 |
=== Ultimate Nofollow ===
|
2 |
+
Plugin URI: http://shinraholdings.com/plugins/nofollow
|
3 |
Contributors: bitacre
|
4 |
+
Donate link: http://shinraholdings.com/donate
|
5 |
Tags: nofollow,link,meta,rel,rel nofollow,seo,link meta,nofollow links,shortcode
|
6 |
Requires at least: 2.8
|
7 |
+
Tested up to: 3.4.1
|
8 |
+
Stable tag: 0.1.3
|
9 |
|
10 |
A suite of tools that gives you complete control over the rel=nofollow tag on an individual link basis.
|
11 |
|
12 |
== Description ==
|
13 |
This plugin contains several tools in one to significantly increase your control of the nofollow rel tag on every link on your blog, on both an individual and type basis. It is designed to give you fine-grained control of linking for SEO purposes.
|
14 |
|
|
|
|
|
15 |
The plugin's main features are:
|
16 |
|
|
|
17 |
* several nofollow `shortcodes` *(added in v0.1.0)*,
|
18 |
+
* a nofollow option for individual `blogroll links` *(added in v0.1.3)*,
|
19 |
+
* or nofollow all `blogroll links` *(added in v0.1.3)*,
|
20 |
* add or remove the nofollow tag from all links in `comments` *(added in v0.1.2)*,
|
21 |
* plugin settings page *(added in v0.1.1)*.
|
22 |
|
36 |
|
37 |
1. Settings page on the Dashboard.
|
38 |
|
39 |
+
2. Nofollow checkbox on the add/edit blogroll link page.
|
40 |
+
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 0.1.3 =
|
44 |
+
* Stable beta version.
|
45 |
+
* Nofollow checkbox added to the add/edit blogroll links dialogue.
|
46 |
+
* Adds option to nofollow all blogroll links.
|
47 |
+
|
48 |
= 0.1.2 =
|
49 |
* Stable beta version.
|
50 |
* Add/remove nofollow from all links in comments.
|
62 |
New features!
|
63 |
|
64 |
== Readme Generator ==
|
65 |
+
* This plugin's readme.txt file was generated by the [bitacre Readme Generator](http://shinraholdings/tools/readme-gen) for WordPress Plugins.
|
66 |
|
67 |
== Support ==
|
68 |
|
69 |
+
* [Plugin Homepage](http://shinraholdings.com/plugins/nofollow)
|
70 |
+
* [Help Page](http://shinraholdings.com/plugins/nofollow#help)
|
71 |
+
* [plugins@shinraholdings.com](mailto:plugins@shinraholdings.com)
|
72 |
|
73 |
== Donations ==
|
74 |
|
75 |
+
[Donations](http://shinraholdings.com/donate) are graciously accepted to support the continued development and maintenance of this and other plugins. We currently accept Paypal and kind words.
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|