SEO Ultimate - Version 6.1

Version Description

Download this release

Release Info

Developer JohnLamansky
Plugin Icon 128x128 SEO Ultimate
Version 6.1
Comparing to
See all releases

Code changes from version 6.0 to 6.1

modules/internal-link-aliases/internal-link-aliases.php CHANGED
@@ -25,6 +25,8 @@ class SU_InternalLinkAliases extends SU_Module {
25
  function admin_page_contents() {
26
  $this->child_admin_form_start();
27
  $this->textbox('alias_dir', __('Alias Directory', 'seo-ultimate'), $this->get_default_setting('alias_dir'));
 
 
28
  $this->child_admin_form_end();
29
  }
30
 
@@ -34,7 +36,8 @@ class SU_InternalLinkAliases extends SU_Module {
34
 
35
  function postmeta_fields($fields) {
36
 
37
- $post = get_post(suwp::get_post_id());
 
38
  if (!$post) return;
39
  $content = $post->post_content;
40
 
@@ -43,7 +46,7 @@ class SU_InternalLinkAliases extends SU_Module {
43
  if ($content && preg_match_all('@ href=["\']([^"\']+)["\']@', $content, $matches)) {
44
  $urls = $matches[1];
45
 
46
- $html = "<tr valign='top'>\n<th scope='row'>".__('Link Masks', 'seo-ultimate')."</th>\n<td>\n";
47
 
48
  $html .= "<table class='widefat'><thead>\n";
49
  $headers = array(__('URL', 'seo-ultimate'), '', __('Mask URL', 'seo-ultimate'));
@@ -58,10 +61,21 @@ class SU_InternalLinkAliases extends SU_Module {
58
  }
59
 
60
  foreach ($urls as $url) {
61
- $a_url = esc_attr($url);
 
62
  $ht_url = esc_html(sustr::truncate($url, 30));
63
- $a_alias = esc_attr($post_aliases[$url]);
64
- $html .= "<tr><td><a href='$a_url' title='$a_url' target='_blank'>$ht_url</a></td>\n<td>&rArr;</td><td>/$alias_dir/<input type='text' name='_su_aliases[$a_url]' value='$a_alias' /></td></tr>\n";
 
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
  $html .= "</tbody>\n</table>\n";
@@ -81,10 +95,10 @@ class SU_InternalLinkAliases extends SU_Module {
81
 
82
  $aliases = $this->get_setting('aliases', array());
83
 
84
- $posts = array($post->ID);
85
- foreach ($saved_aliases as $from => $to) {
86
- $id = md5($from . serialize($posts));
87
- $aliases[$id] = compact('from', 'to', 'posts');
88
  }
89
 
90
  $this->update_setting('aliases', $aliases);
@@ -93,10 +107,20 @@ class SU_InternalLinkAliases extends SU_Module {
93
  }
94
 
95
  function apply_aliases($content) {
 
 
 
 
96
  $id = suwp::get_post_id();
97
- $aliases = $this->get_setting('aliases', array());
98
- $aliases = array_reverse($aliases, true); //Just in case we have duplicate aliases, make sure the most recent ones are applied first
99
- $alias_dir = $this->get_setting('alias_dir', 'go');
 
 
 
 
 
 
100
 
101
  foreach ($aliases as $alias) {
102
  $to = $alias['to'];
@@ -105,16 +129,20 @@ class SU_InternalLinkAliases extends SU_Module {
105
  $from = $alias['from'];
106
  $h_from = esc_html($from);
107
  $to = get_bloginfo('url') . "/$alias_dir/$to/";
108
- $replace = array(
109
- " href='$from'" => " href='$to'"
110
- , " href='$h_from'" => " href='$to'"
111
- , " href=\"$from\"" => " href=\"$to\""
112
- , " href=\"$h_from\"" => " href=\"$to\""
113
- );
114
- $content = str_replace(array_keys($replace), array_values($replace), $content);
115
  }
116
  }
117
- return $content;
 
 
 
 
 
 
118
  }
119
 
120
  function redirect_aliases() {
25
  function admin_page_contents() {
26
  $this->child_admin_form_start();
27
  $this->textbox('alias_dir', __('Alias Directory', 'seo-ultimate'), $this->get_default_setting('alias_dir'));
28
+ if ($this->plugin->module_exists('link-nofollow'))
29
+ $this->checkbox('nofollow_aliased_links', __('Nofollow aliased links', 'seo-ultimate'), __('Link Attributes'));
30
  $this->child_admin_form_end();
31
  }
32
 
36
 
37
  function postmeta_fields($fields) {
38
 
39
+ $post_id = suwp::get_post_id();
40
+ $post = get_post($post_id);
41
  if (!$post) return;
42
  $content = $post->post_content;
43
 
46
  if ($content && preg_match_all('@ href=["\']([^"\']+)["\']@', $content, $matches)) {
47
  $urls = $matches[1];
48
 
49
+ $html = "<tr valign='top'>\n<th scope='row' class='su'>".__('Link Masks:', 'seo-ultimate')."</th>\n<td>\n";
50
 
51
  $html .= "<table class='widefat'><thead>\n";
52
  $headers = array(__('URL', 'seo-ultimate'), '', __('Mask URL', 'seo-ultimate'));
61
  }
62
 
63
  foreach ($urls as $url) {
64
+ $a_url = su_esc_attr($url);
65
+ $un_h_url = htmlspecialchars_decode($url);
66
  $ht_url = esc_html(sustr::truncate($url, 30));
67
+
68
+ if (isset($post_aliases[$url]))
69
+ $alias_to = $post_aliases[$url];
70
+ elseif (isset($post_aliases[$un_h_url]))
71
+ $alias_to = $post_aliases[$un_h_url];
72
+ else
73
+ $alias_to = '';
74
+
75
+ $a_alias_to = esc_attr($alias_to);
76
+
77
+ $alias_id = md5($url . serialize(array($post_id)));
78
+ $html .= "<tr><td><a href='$a_url' title='$a_url' target='_blank'>$ht_url</a><input type='hidden' name='_su_aliases[$alias_id][from]' value='$a_url' /></td>\n<td>&rArr;</td><td>/$alias_dir/<input type='text' name='_su_aliases[$alias_id][to]' value='$a_alias_to' /></td></tr>\n";
79
  }
80
 
81
  $html .= "</tbody>\n</table>\n";
95
 
96
  $aliases = $this->get_setting('aliases', array());
97
 
98
+ foreach ($saved_aliases as $id => $data) {
99
+ $aliases[$id]['from'] = $data['from'];
100
+ $aliases[$id]['to'] = $data['to'];
101
+ $aliases[$id]['posts'] = array($post->ID);
102
  }
103
 
104
  $this->update_setting('aliases', $aliases);
107
  }
108
 
109
  function apply_aliases($content) {
110
+ return preg_replace_callback('@<a ([^>]*)href=(["\'])([^"\']+)(["\'])([^>]*)>@', array(&$this, 'apply_aliases_callback'), $content);
111
+ }
112
+
113
+ function apply_aliases_callback($matches) {
114
  $id = suwp::get_post_id();
115
+
116
+ static $aliases = false;
117
+ //Just in case we have duplicate aliases, make sure the most recent ones are applied first
118
+ if ($aliases === false) $aliases = array_reverse($this->get_setting('aliases', array()), true);
119
+
120
+ static $alias_dir = false;
121
+ if ($alias_dir === false) $alias_dir = $this->get_setting('alias_dir', 'go');
122
+
123
+ $new_url = $old_url = $matches[3];
124
 
125
  foreach ($aliases as $alias) {
126
  $to = $alias['to'];
129
  $from = $alias['from'];
130
  $h_from = esc_html($from);
131
  $to = get_bloginfo('url') . "/$alias_dir/$to/";
132
+
133
+ if ($from == $old_url || $h_from == $old_url) {
134
+ $new_url = $to;
135
+ break;
136
+ }
 
 
137
  }
138
  }
139
+
140
+ $attrs = "{$matches[1]}href={$matches[2]}{$new_url}{$matches[4]}{$matches[5]}";
141
+
142
+ if ($this->get_setting('nofollow_aliased_links', false) && $this->plugin->module_exists('link-nofollow'))
143
+ $this->plugin->call_module_func('link-nofollow', 'nofollow_attributes_string', $attrs, $attrs);
144
+
145
+ return "<a $attrs>";
146
  }
147
 
148
  function redirect_aliases() {
readme.txt CHANGED
@@ -3,19 +3,19 @@ Contributors: SEO Design Solutions, JohnLamansky
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, base, title, meta, robots, noindex, nofollow, canonical, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, modules, uninstallable, reinstallable, downgradable, import, export, CSV, affiliate
4
  Requires at least: 3.0
5
  Tested up to: 3.1
6
- Stable tag: 6.0
7
 
8
  This all-in-one SEO plugin gives you control over title tags, noindex, meta tags, slugs, canonical, autolinks, 404 errors, rich snippets, and more.
9
 
10
  == Description ==
11
-
12
  = Recent Releases =
13
 
 
14
  * Version 6.0 features Deeplink Juggernaut 2.0
15
  * Version 5.9 adds default category/tag meta description formats
16
  * Version 5.8 adds the Permalink Tweaker module
17
  * Version 5.7 adds mass-editing for post format archives
18
- * Version 5.6 adds the Nofollow Manager module
19
 
20
  = Features =
21
 
@@ -39,7 +39,7 @@ SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin w
39
  * Go back and edit old posts' and pages' keywords with the mass-editor.
40
  * Automatically generate meta keywords based on categories, tags, custom taxonomy terms, and frequently-used words.
41
 
42
- * **Meta Robot Tags Editor** -- UPDATED in Version 5.5
43
  * Add the `<meta name="robots" content="noindex,follow" />` tag to archives, comment feeds, the login page, and more.
44
  * Set meta robots tags (index/noindex and follow/nofollow) for each individual post, page, category, tag, and post type archive on your blog. Also supports custom post types and custom taxonomies.
45
  * Avoid duplicate content SEO issues with the recommended noindex settings (see built-in module documentation for details).
@@ -114,14 +114,14 @@ SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin w
114
  * **Webmaster Verification Assistant**
115
  * Enter verification codes in the provided fields to access search engine webmaster tools.
116
 
117
- * **Link Mask Generator**
118
  * Lets you generate robots.txt-blocked "link masks" (e.g. `www.example.com/go/google/`) that pass-through to an external URL.
119
  * Lets you mask links on a per-link, per-post basis so you can exert fine-tuned control over your posts' linkflow.
120
  * Lets you change `/go/` to a directory of your choosing.
121
  * Link masks provide a modern replacement for the deprecated, nofollow-based "PageRank Sculpting" technique.
122
  * Perfect for affiliate marketers and SEO-savvy bloggers.
123
 
124
- * **Nofollow Manager** -- NEW in Version 5.6
125
  * Lets you maintain `rel="nofollow"` settings when migrating from other SEO plugins
126
 
127
  * **Permalink Tweaker** -- NEW in Version 5.8
@@ -234,6 +234,11 @@ Frequently asked questions, settings help, and troubleshooting tips for SEO Ulti
234
 
235
  == Changelog ==
236
 
 
 
 
 
 
237
  = Version 6.0 (June 21, 2011) =
238
  * Feature: Deeplink Juggernaut's "Destination Type" dropdowns have been replaced with snazzy autocomplete textboxes that let you link to a content item on your blog by typing the first few letters of its title
239
  * Feature: Deeplink Juggernaut now lets you autolink to categories, tags, post format archives, and custom taxonomy term archives
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, base, title, meta, robots, noindex, nofollow, canonical, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, modules, uninstallable, reinstallable, downgradable, import, export, CSV, affiliate
4
  Requires at least: 3.0
5
  Tested up to: 3.1
6
+ Stable tag: 6.1
7
 
8
  This all-in-one SEO plugin gives you control over title tags, noindex, meta tags, slugs, canonical, autolinks, 404 errors, rich snippets, and more.
9
 
10
  == Description ==
11
+
12
  = Recent Releases =
13
 
14
+ * Version 6.1 fixes Link Mask Generator issues
15
  * Version 6.0 features Deeplink Juggernaut 2.0
16
  * Version 5.9 adds default category/tag meta description formats
17
  * Version 5.8 adds the Permalink Tweaker module
18
  * Version 5.7 adds mass-editing for post format archives
 
19
 
20
  = Features =
21
 
39
  * Go back and edit old posts' and pages' keywords with the mass-editor.
40
  * Automatically generate meta keywords based on categories, tags, custom taxonomy terms, and frequently-used words.
41
 
42
+ * **Meta Robot Tags Editor**
43
  * Add the `<meta name="robots" content="noindex,follow" />` tag to archives, comment feeds, the login page, and more.
44
  * Set meta robots tags (index/noindex and follow/nofollow) for each individual post, page, category, tag, and post type archive on your blog. Also supports custom post types and custom taxonomies.
45
  * Avoid duplicate content SEO issues with the recommended noindex settings (see built-in module documentation for details).
114
  * **Webmaster Verification Assistant**
115
  * Enter verification codes in the provided fields to access search engine webmaster tools.
116
 
117
+ * **Link Mask Generator** -- UPDATED in Version 6.1
118
  * Lets you generate robots.txt-blocked "link masks" (e.g. `www.example.com/go/google/`) that pass-through to an external URL.
119
  * Lets you mask links on a per-link, per-post basis so you can exert fine-tuned control over your posts' linkflow.
120
  * Lets you change `/go/` to a directory of your choosing.
121
  * Link masks provide a modern replacement for the deprecated, nofollow-based "PageRank Sculpting" technique.
122
  * Perfect for affiliate marketers and SEO-savvy bloggers.
123
 
124
+ * **Nofollow Manager**
125
  * Lets you maintain `rel="nofollow"` settings when migrating from other SEO plugins
126
 
127
  * **Permalink Tweaker** -- NEW in Version 5.8
234
 
235
  == Changelog ==
236
 
237
+ = Version 6.1 (June 23, 2011) =
238
+ * Feature: Added option to add the `rel="nofollow"` attribute to all masked links
239
+ * Bugfix: Fixed bug that caused some link masks to disappear when the post is saved
240
+ * Bugfix: Fixed an issue with masking links with ampersands
241
+
242
  = Version 6.0 (June 21, 2011) =
243
  * Feature: Deeplink Juggernaut's "Destination Type" dropdowns have been replaced with snazzy autocomplete textboxes that let you link to a content item on your blog by typing the first few letters of its title
244
  * Feature: Deeplink Juggernaut now lets you autolink to categories, tags, post format archives, and custom taxonomy term archives
seo-ultimate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEO Ultimate
4
  Plugin URI: http://www.seodesignsolutions.com/wordpress-seo/
5
  Description: This all-in-one SEO plugin gives you control over title tags, noindex/nofollow, meta tags, rich snippets, slugs, canonical tags, autolinks, 404 errors, rich snippets, and more.
6
- Version: 6.0
7
  Author: SEO Design Solutions
8
  Author URI: http://www.seodesignsolutions.com/
9
  Text Domain: seo-ultimate
@@ -12,7 +12,7 @@ Text Domain: seo-ultimate
12
  /**
13
  * The main SEO Ultimate plugin file.
14
  * @package SeoUltimate
15
- * @version 6.0
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
@@ -47,10 +47,10 @@ define('SU_MINIMUM_WP_VER', '3.0');
47
  //Reading plugin info from constants is faster than trying to parse it from the header above.
48
  define('SU_PLUGIN_NAME', 'SEO Ultimate');
49
  define('SU_PLUGIN_URI', 'http://www.seodesignsolutions.com/wordpress-seo/');
50
- define('SU_VERSION', '6.0');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
- define('SU_USER_AGENT', 'SeoUltimate/6.0');
54
 
55
  /********** INCLUDES **********/
56
 
3
  Plugin Name: SEO Ultimate
4
  Plugin URI: http://www.seodesignsolutions.com/wordpress-seo/
5
  Description: This all-in-one SEO plugin gives you control over title tags, noindex/nofollow, meta tags, rich snippets, slugs, canonical tags, autolinks, 404 errors, rich snippets, and more.
6
+ Version: 6.1
7
  Author: SEO Design Solutions
8
  Author URI: http://www.seodesignsolutions.com/
9
  Text Domain: seo-ultimate
12
  /**
13
  * The main SEO Ultimate plugin file.
14
  * @package SeoUltimate
15
+ * @version 6.1
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
47
  //Reading plugin info from constants is faster than trying to parse it from the header above.
48
  define('SU_PLUGIN_NAME', 'SEO Ultimate');
49
  define('SU_PLUGIN_URI', 'http://www.seodesignsolutions.com/wordpress-seo/');
50
+ define('SU_VERSION', '6.1');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
+ define('SU_USER_AGENT', 'SeoUltimate/6.1');
54
 
55
  /********** INCLUDES **********/
56
 
seo-ultimate.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the SEO Ultimate package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: SEO Ultimate 6.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/seo-ultimate\n"
7
- "POT-Creation-Date: 2011-06-22 01:41:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -19,7 +19,7 @@ msgid ""
19
  "Ultimate to remove this notice."
20
  msgstr ""
21
 
22
- #. #-#-#-#-# plugin.pot (SEO Ultimate 6.0) #-#-#-#-#
23
  #. Plugin Name of the plugin/theme
24
  #: plugin/class.seo-ultimate.php:767 modules/settings/settings.php:14
25
  msgid "SEO Ultimate"
@@ -1461,7 +1461,7 @@ msgstr ""
1461
  msgid "SEO Design Solutions Whitepapers"
1462
  msgstr ""
1463
 
1464
- #. #-#-#-#-# plugin.pot (SEO Ultimate 6.0) #-#-#-#-#
1465
  #. Author of the plugin/theme
1466
  #: modules/sds-blog/sds-blog.php:49
1467
  msgid "SEO Design Solutions"
@@ -1482,29 +1482,37 @@ msgstr ""
1482
  msgid "Alias Directory"
1483
  msgstr ""
1484
 
1485
- #: modules/internal-link-aliases/internal-link-aliases.php:46
1486
- msgid "Link Masks"
 
 
 
 
1487
  msgstr ""
1488
 
1489
  #: modules/internal-link-aliases/internal-link-aliases.php:49
 
 
 
 
1490
  msgid "URL"
1491
  msgstr ""
1492
 
1493
- #: modules/internal-link-aliases/internal-link-aliases.php:49
1494
  msgid "Mask URL"
1495
  msgstr ""
1496
 
1497
- #: modules/internal-link-aliases/internal-link-aliases.php:69
1498
  msgid ""
1499
  "You can stop search engines from following a link by typing in a mask for "
1500
  "its URL."
1501
  msgstr ""
1502
 
1503
- #: modules/internal-link-aliases/internal-link-aliases.php:132
1504
  msgid "Added by Link Alias Generator (LAG) module"
1505
  msgstr ""
1506
 
1507
- #: modules/internal-link-aliases/internal-link-aliases.php:143
1508
  msgid "End LAG"
1509
  msgstr ""
1510
 
2
  # This file is distributed under the same license as the SEO Ultimate package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: SEO Ultimate 6.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/seo-ultimate\n"
7
+ "POT-Creation-Date: 2011-06-23 15:54:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
19
  "Ultimate to remove this notice."
20
  msgstr ""
21
 
22
+ #. #-#-#-#-# plugin.pot (SEO Ultimate 6.1) #-#-#-#-#
23
  #. Plugin Name of the plugin/theme
24
  #: plugin/class.seo-ultimate.php:767 modules/settings/settings.php:14
25
  msgid "SEO Ultimate"
1461
  msgid "SEO Design Solutions Whitepapers"
1462
  msgstr ""
1463
 
1464
+ #. #-#-#-#-# plugin.pot (SEO Ultimate 6.1) #-#-#-#-#
1465
  #. Author of the plugin/theme
1466
  #: modules/sds-blog/sds-blog.php:49
1467
  msgid "SEO Design Solutions"
1482
  msgid "Alias Directory"
1483
  msgstr ""
1484
 
1485
+ #: modules/internal-link-aliases/internal-link-aliases.php:29
1486
+ msgid "Nofollow aliased links"
1487
+ msgstr ""
1488
+
1489
+ #: modules/internal-link-aliases/internal-link-aliases.php:29
1490
+ msgid "Link Attributes"
1491
  msgstr ""
1492
 
1493
  #: modules/internal-link-aliases/internal-link-aliases.php:49
1494
+ msgid "Link Masks:"
1495
+ msgstr ""
1496
+
1497
+ #: modules/internal-link-aliases/internal-link-aliases.php:52
1498
  msgid "URL"
1499
  msgstr ""
1500
 
1501
+ #: modules/internal-link-aliases/internal-link-aliases.php:52
1502
  msgid "Mask URL"
1503
  msgstr ""
1504
 
1505
+ #: modules/internal-link-aliases/internal-link-aliases.php:83
1506
  msgid ""
1507
  "You can stop search engines from following a link by typing in a mask for "
1508
  "its URL."
1509
  msgstr ""
1510
 
1511
+ #: modules/internal-link-aliases/internal-link-aliases.php:160
1512
  msgid "Added by Link Alias Generator (LAG) module"
1513
  msgstr ""
1514
 
1515
+ #: modules/internal-link-aliases/internal-link-aliases.php:171
1516
  msgid "End LAG"
1517
  msgstr ""
1518