Version Description
Download this release
Release Info
Developer | JohnLamansky |
Plugin | SEO Ultimate |
Version | 6.9.5 |
Comparing to | |
See all releases |
Code changes from version 6.9.4 to 6.9.5
- modules/autolinks/content-autolinks.php +50 -26
- readme.txt +4 -1
- seo-ultimate.php +4 -4
modules/autolinks/content-autolinks.php
CHANGED
@@ -24,9 +24,9 @@ class SU_ContentAutolinks extends SU_Module {
|
|
24 |
add_filter('su_custom_update_postmeta-autolinks', array(&$this, 'save_post_autolinks'), 10, 4);
|
25 |
|
26 |
if ($this->is_action('update'))
|
27 |
-
add_action('admin_footer', array(&$this, '
|
28 |
-
|
29 |
-
|
30 |
|
31 |
add_filter('su_get_setting-autolinks-linkfree_tags', array(&$this, 'filter_linkfree_tags'));
|
32 |
}
|
@@ -195,8 +195,20 @@ class SU_ContentAutolinks extends SU_Module {
|
|
195 |
return $linkfree_tags;
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
function update_max_post_dates() {
|
199 |
|
|
|
|
|
200 |
$sitewide_lpa_enabled = $this->get_setting('limit_sitewide_lpa', false);
|
201 |
$sitewide_lpa = intval($this->get_setting('limit_sitewide_lpa_value', false));
|
202 |
$lpp = $this->get_setting('limit_lpp_value', 5); //No need to check limit_lpp, as _autolink_content already does this
|
@@ -212,33 +224,40 @@ class SU_ContentAutolinks extends SU_Module {
|
|
212 |
$i=0;
|
213 |
foreach ($links as $link_data) {
|
214 |
|
215 |
-
if ($
|
216 |
-
$
|
217 |
-
elseif ($sitewide_lpa_enabled)
|
218 |
-
$link_sitewide_lpa = $sitewide_lpa;
|
219 |
-
else
|
220 |
-
$link_sitewide_lpa = false;
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
));
|
229 |
|
230 |
-
$
|
231 |
-
|
232 |
|
233 |
-
$
|
234 |
-
|
235 |
-
|
|
|
236 |
|
237 |
-
$count
|
238 |
-
|
239 |
-
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
}
|
|
|
|
|
242 |
}
|
243 |
}
|
244 |
|
@@ -294,13 +313,15 @@ class SU_ContentAutolinks extends SU_Module {
|
|
294 |
$sitewide_lpa = sustr::preg_filter('0-9', strval($_POST["link_{$i}_sitewide_lpa"]));
|
295 |
$sitewide_lpa = ($sitewide_lpa === '') ? false : intval($sitewide_lpa);
|
296 |
|
|
|
|
|
297 |
$target = empty($_POST["link_{$i}_target"]) ? 'self' : 'blank';
|
298 |
|
299 |
$nofollow = isset($_POST["link_{$i}_nofollow"]) ? (intval($_POST["link_{$i}_nofollow"]) == 1) : false;
|
300 |
$delete = isset($_POST["link_{$i}_delete"]) ? (intval($_POST["link_{$i}_delete"]) == 1) : false;
|
301 |
|
302 |
if (!$delete && (strlen($anchor) || $to_id))
|
303 |
-
$links[] = compact('anchor', 'to_type', 'to_id', 'title', 'sitewide_lpa', 'nofollow', 'target');
|
304 |
}
|
305 |
$this->update_setting('links', $links);
|
306 |
|
@@ -346,6 +367,7 @@ class SU_ContentAutolinks extends SU_Module {
|
|
346 |
if (!isset($link['to_type'])) $link['to_type'] = 'url';
|
347 |
if (!isset($link['title'])) $link['title'] = '';
|
348 |
if (!isset($link['sitewide_lpa'])) $link['sitewide_lpa'] = '';
|
|
|
349 |
if (!isset($link['nofollow'])) $link['nofollow'] = false;
|
350 |
if (!isset($link['target'])) $link['target'] = '';
|
351 |
|
@@ -363,6 +385,8 @@ class SU_ContentAutolinks extends SU_Module {
|
|
363 |
} else
|
364 |
$cells['link-options'] = $this->get_input_element('hidden', "link_{$i}_sitewide_lpa", $link['sitewide_lpa']);
|
365 |
|
|
|
|
|
366 |
$cells['link-options'] .=
|
367 |
$this->get_input_element('checkbox', "link_{$i}_nofollow", $link['nofollow'], str_replace(' ', ' ', __('Nofollow', 'seo-ultimate')))
|
368 |
.'<br />'
|
24 |
add_filter('su_custom_update_postmeta-autolinks', array(&$this, 'save_post_autolinks'), 10, 4);
|
25 |
|
26 |
if ($this->is_action('update'))
|
27 |
+
add_action('admin_footer', array(&$this, 'outdate_max_post_dates'));
|
28 |
+
add_action('save_post', array(&$this, 'outdate_max_post_dates'));
|
29 |
+
$this->cron(array(&$this, 'update_max_post_dates'), 'hourly');
|
30 |
|
31 |
add_filter('su_get_setting-autolinks-linkfree_tags', array(&$this, 'filter_linkfree_tags'));
|
32 |
}
|
195 |
return $linkfree_tags;
|
196 |
}
|
197 |
|
198 |
+
function outdate_max_post_dates() {
|
199 |
+
$links = $this->get_setting('links', array());
|
200 |
+
$new_links = array();
|
201 |
+
foreach ($links as $link_data) {
|
202 |
+
$link_data['max_post_date_outdated'] = true;
|
203 |
+
$new_links[] = $link_data;
|
204 |
+
}
|
205 |
+
$this->update_setting('links', $new_links);
|
206 |
+
}
|
207 |
+
|
208 |
function update_max_post_dates() {
|
209 |
|
210 |
+
$processing_limit = 1;
|
211 |
+
|
212 |
$sitewide_lpa_enabled = $this->get_setting('limit_sitewide_lpa', false);
|
213 |
$sitewide_lpa = intval($this->get_setting('limit_sitewide_lpa_value', false));
|
214 |
$lpp = $this->get_setting('limit_lpp_value', 5); //No need to check limit_lpp, as _autolink_content already does this
|
224 |
$i=0;
|
225 |
foreach ($links as $link_data) {
|
226 |
|
227 |
+
if ($link_data['max_post_date_outdated'] && $processing_limit > 0) {
|
228 |
+
$link_data['max_post_date_outdated'] = false;
|
|
|
|
|
|
|
|
|
229 |
|
230 |
+
if ($this->get_setting('enable_link_limits', false) && isset($link_data['sitewide_lpa']) && $link_data['sitewide_lpa'] !== false)
|
231 |
+
$link_sitewide_lpa = intval($link_data['sitewide_lpa']);
|
232 |
+
elseif ($sitewide_lpa_enabled)
|
233 |
+
$link_sitewide_lpa = $sitewide_lpa;
|
234 |
+
else
|
235 |
+
$link_sitewide_lpa = false;
|
|
|
236 |
|
237 |
+
if ($link_sitewide_lpa !== false) {
|
238 |
+
$link_data['max_post_date'] = false;
|
239 |
|
240 |
+
$posts_with_anchor = $wpdb->get_results( $wpdb->prepare(
|
241 |
+
"SELECT ID, post_content, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND LOWER(post_content) LIKE %s ORDER BY post_date_gmt ASC"
|
242 |
+
, '%' . like_escape(strtolower($link_data['anchor'])) . '%'
|
243 |
+
));
|
244 |
|
245 |
+
$count = 0;
|
246 |
+
foreach ($posts_with_anchor as $post_with_anchor) {
|
247 |
+
|
248 |
+
$total_count = 0; //Not used
|
249 |
+
$link_count = array();
|
250 |
+
$this->_autolink_content($post_with_anchor->ID, $post_with_anchor->post_content, $links, $lpp, $total_count, $link_count, 1, array(), 'update_max_post_dates');
|
251 |
+
|
252 |
+
$count += $link_count[$i];
|
253 |
+
|
254 |
+
if ($count >= $link_sitewide_lpa) {
|
255 |
+
$link_data['max_post_date'] = $post_with_anchor->post_date_gmt;
|
256 |
+
break;
|
257 |
+
}
|
258 |
}
|
259 |
+
|
260 |
+
$processing_limit--;
|
261 |
}
|
262 |
}
|
263 |
|
313 |
$sitewide_lpa = sustr::preg_filter('0-9', strval($_POST["link_{$i}_sitewide_lpa"]));
|
314 |
$sitewide_lpa = ($sitewide_lpa === '') ? false : intval($sitewide_lpa);
|
315 |
|
316 |
+
$max_post_date = sustr::preg_filter('0-9-: ', strval($_POST["link_{$i}_max_post_date"]));
|
317 |
+
|
318 |
$target = empty($_POST["link_{$i}_target"]) ? 'self' : 'blank';
|
319 |
|
320 |
$nofollow = isset($_POST["link_{$i}_nofollow"]) ? (intval($_POST["link_{$i}_nofollow"]) == 1) : false;
|
321 |
$delete = isset($_POST["link_{$i}_delete"]) ? (intval($_POST["link_{$i}_delete"]) == 1) : false;
|
322 |
|
323 |
if (!$delete && (strlen($anchor) || $to_id))
|
324 |
+
$links[] = compact('anchor', 'to_type', 'to_id', 'title', 'sitewide_lpa', 'nofollow', 'target', 'max_post_date');
|
325 |
}
|
326 |
$this->update_setting('links', $links);
|
327 |
|
367 |
if (!isset($link['to_type'])) $link['to_type'] = 'url';
|
368 |
if (!isset($link['title'])) $link['title'] = '';
|
369 |
if (!isset($link['sitewide_lpa'])) $link['sitewide_lpa'] = '';
|
370 |
+
if (!isset($link['max_post_date'])) $link['max_post_date'] = '';
|
371 |
if (!isset($link['nofollow'])) $link['nofollow'] = false;
|
372 |
if (!isset($link['target'])) $link['target'] = '';
|
373 |
|
385 |
} else
|
386 |
$cells['link-options'] = $this->get_input_element('hidden', "link_{$i}_sitewide_lpa", $link['sitewide_lpa']);
|
387 |
|
388 |
+
$cells['link-options'] .= $this->get_input_element('hidden', "link_{$i}_max_post_date", $link['max_post_date']);
|
389 |
+
|
390 |
$cells['link-options'] .=
|
391 |
$this->get_input_element('checkbox', "link_{$i}_nofollow", $link['nofollow'], str_replace(' ', ' ', __('Nofollow', 'seo-ultimate')))
|
392 |
.'<br />'
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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, title tag, wp_title, meta, robots, noindex, nofollow, canonical, HTTP headers, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, settings, redirect, 301, 302, 307, modules, uninstallable, reinstallable, downgradable, import, export, CSV, affiliate
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.2
|
6 |
-
Stable tag: 6.9.
|
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 |
|
@@ -265,6 +265,9 @@ Frequently asked questions, settings help, and troubleshooting tips for SEO Ulti
|
|
265 |
|
266 |
== Changelog ==
|
267 |
|
|
|
|
|
|
|
268 |
= Version 6.9.4 (August 31, 2011) =
|
269 |
* Bugfix: Fixed mb_strtolower errors that appeared on some PHP setups (introduced in 6.9.2)
|
270 |
|
3 |
Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, base, title, title tag, wp_title, meta, robots, noindex, nofollow, canonical, HTTP headers, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, settings, redirect, 301, 302, 307, modules, uninstallable, reinstallable, downgradable, import, export, CSV, affiliate
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.2
|
6 |
+
Stable tag: 6.9.5
|
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 |
|
265 |
|
266 |
== Changelog ==
|
267 |
|
268 |
+
= Version 6.9.5 (September 23, 2011) =
|
269 |
+
* Bugfix: Deeplink Juggernaut now applies changes to sitewide link caps gradually instead of all at once, in order to alleviate out-of-memory errors and large processing overhead on sites with many posts
|
270 |
+
|
271 |
= Version 6.9.4 (August 31, 2011) =
|
272 |
* Bugfix: Fixed mb_strtolower errors that appeared on some PHP setups (introduced in 6.9.2)
|
273 |
|
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.9.
|
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.9.
|
16 |
* @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
|
17 |
*/
|
18 |
|
@@ -47,10 +47,10 @@ define('SU_MINIMUM_WP_VER', '3.1.3');
|
|
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.9.
|
51 |
define('SU_AUTHOR', 'SEO Design Solutions');
|
52 |
define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
|
53 |
-
define('SU_USER_AGENT', 'SeoUltimate/6.9.
|
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.9.5
|
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.9.5
|
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.9.5');
|
51 |
define('SU_AUTHOR', 'SEO Design Solutions');
|
52 |
define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
|
53 |
+
define('SU_USER_AGENT', 'SeoUltimate/6.9.5');
|
54 |
|
55 |
/********** INCLUDES **********/
|
56 |
|