SEO Ultimate - Version 5.0.1

Version Description

Download this release

Release Info

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

Code changes from version 5.0 to 5.0.1

includes/jlfunctions/str.php CHANGED
@@ -52,10 +52,14 @@ class sustr {
52
  * @param int $maxlen The desired maximum length of the string.
53
  * @param str $truncate The string that should be added to the end of a truncated string.
54
  */
55
- function truncate( $str, $maxlen, $truncate = '...' ) {
56
- if ( strlen($str) > $maxlen )
57
- return substr( $str, 0, $maxlen - strlen($truncate) ) . $truncate;
58
 
 
 
 
 
 
 
59
  return $str;
60
  }
61
 
@@ -163,6 +167,10 @@ class sustr {
163
  return preg_replace("/[^{$filter}]/", '', $str);
164
  }
165
 
 
 
 
 
166
  function preg_escape($str, $delim='%') {
167
  $chars = "\ ^ . $ | ( ) [ ] * + ? { } , ".$delim;
168
  $chars = explode(' ', $chars);
52
  * @param int $maxlen The desired maximum length of the string.
53
  * @param str $truncate The string that should be added to the end of a truncated string.
54
  */
55
+ function truncate( $str, $maxlen, $truncate = '...', $maintain_words=false ) {
 
 
56
 
57
+ if ( strlen($str) > $maxlen ) {
58
+ $str = substr( $str, 0, $maxlen - strlen($truncate) );
59
+ if ($maintain_words) $str = preg_replace('/ ([^ ]+)$/', '', $str);
60
+ $str .= $truncate;
61
+ }
62
+
63
  return $str;
64
  }
65
 
167
  return preg_replace("/[^{$filter}]/", '', $str);
168
  }
169
 
170
+ function to_int($str) {
171
+ return intval(sustr::preg_filter('0-9', strval($str)));
172
+ }
173
+
174
  function preg_escape($str, $delim='%') {
175
  $chars = "\ ^ . $ | ( ) [ ] * + ? { } , ".$delim;
176
  $chars = explode(' ', $chars);
modules/404s/fofs-log.php CHANGED
@@ -74,7 +74,8 @@ class SU_FofsLog extends SU_Module {
74
 
75
  $exceptions = suarr::explode_lines($this->get_setting('exceptions', ''));
76
  foreach ($exceptions as $exception) {
77
- $exception = str_replace('*', '.*', $exception);
 
78
  $regex = "@^$exception$@i";
79
  $regex = str_replace(array('@^.*', '.*$@i'), array('@', '@i'), $regex);
80
  if (preg_match($regex, $hit['url'])) return $hit;
74
 
75
  $exceptions = suarr::explode_lines($this->get_setting('exceptions', ''));
76
  foreach ($exceptions as $exception) {
77
+ $exception = sustr::preg_escape($exception, '@');
78
+ $exception = str_replace('\\*', '.*', $exception);
79
  $regex = "@^$exception$@i";
80
  $regex = str_replace(array('@^.*', '.*$@i'), array('@', '@i'), $regex);
81
  if (preg_match($regex, $hit['url'])) return $hit;
modules/404s/fofs-settings.php CHANGED
@@ -28,6 +28,10 @@ class SU_FofsSettings extends SU_Module {
28
  );
29
  }
30
 
 
 
 
 
31
  function admin_page_contents() {
32
  $this->admin_form_start();
33
  $this->checkbox('log_enabled', __('Continue monitoring for new 404 errors', 'seo-ultimate'), __('Monitoring Settings', 'seo-ultimate'));
28
  );
29
  }
30
 
31
+ function init() {
32
+ add_filter('su_get_setting-404s-max_log_size', array('sustr', 'to_int'));
33
+ }
34
+
35
  function admin_page_contents() {
36
  $this->admin_form_start();
37
  $this->checkbox('log_enabled', __('Continue monitoring for new 404 errors', 'seo-ultimate'), __('Monitoring Settings', 'seo-ultimate'));
modules/documentation.txt CHANGED
@@ -37,7 +37,7 @@ The following options are available on the Settings tab:
37
 
38
  * **Maximum Log Entries** -- Here you can set the maximum number of log entries that 404 Monitor will keep at a time. Setting this to a reasonable number will help keep database usage under control. If you change this setting, it will take effect the next time a 404 is logged.
39
 
40
- * **URLs to Ignore** -- URLs entered here will be ignored whenever they generate 404 errors in the future. You can use astericks (*) as wildcards.
41
 
42
  = Troubleshooting =
43
 
37
 
38
  * **Maximum Log Entries** -- Here you can set the maximum number of log entries that 404 Monitor will keep at a time. Setting this to a reasonable number will help keep database usage under control. If you change this setting, it will take effect the next time a 404 is logged.
39
 
40
+ * **URLs to Ignore** -- URLs entered here will be ignored whenever they generate 404 errors in the future. You can use asterisks (*) as wildcards.
41
 
42
  = Troubleshooting =
43
 
modules/meta/meta-descriptions.php CHANGED
@@ -72,24 +72,20 @@ class SU_MetaDescriptions extends SU_Module {
72
  } elseif (is_singular()) {
73
  $desc = $this->get_postmeta('description');
74
 
75
- //Enable the get_the_excerpt() and wp_trim_excerpt() functions
76
- setup_postdata($post);
77
-
78
- //Get rid of the [...] or whatever else the current theme may try to add
79
- add_filter('excerpt_more', '__return_false', 100);
80
-
81
- //Autogenerate the excerpt if needed
82
- $auto_excerpt = strip_tags(wp_trim_excerpt(get_the_excerpt()));
83
-
84
- //Restore normal excerpts
85
- remove_filter('excerpt_more', '__return_false', 100);
86
-
87
- if (!trim($desc) && !post_password_required() && $format = $this->get_setting('description_posttype_'.get_post_type()))
88
  $desc = str_replace(
89
  array('{excerpt::autogen}', '{excerpt}')
90
  , array($auto_excerpt, strip_tags($post->post_excerpt))
91
  , $format);
92
-
 
93
  //If we're viewing a term, look for its meta data.
94
  } elseif (is_category() || is_tag() || is_tax()) {
95
  global $wp_query;
72
  } elseif (is_singular()) {
73
  $desc = $this->get_postmeta('description');
74
 
75
+ if (!trim($desc) && !post_password_required() && $format = $this->get_setting('description_posttype_'.get_post_type())) {
76
+
77
+ $auto_excerpt = $post->post_content;
78
+ $auto_excerpt = strip_shortcodes($auto_excerpt);
79
+ $auto_excerpt = str_replace(']]>', ']]>', $auto_excerpt);
80
+ $auto_excerpt = strip_tags($auto_excerpt);
81
+ $auto_excerpt = sustr::truncate($auto_excerpt, 150, '', true);
82
+
 
 
 
 
 
83
  $desc = str_replace(
84
  array('{excerpt::autogen}', '{excerpt}')
85
  , array($auto_excerpt, strip_tags($post->post_excerpt))
86
  , $format);
87
+ }
88
+
89
  //If we're viewing a term, look for its meta data.
90
  } elseif (is_category() || is_tag() || is_tax()) {
91
  global $wp_query;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: SEO Design Solutions
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, 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: 5.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
 
@@ -226,6 +226,10 @@ Frequently asked questions, settings help, and troubleshooting tips for SEO Ulti
226
 
227
  == Changelog ==
228
 
 
 
 
 
229
  = Version 5.0 (May 13, 2011) =
230
  * Improvement: Revamped database infrastructure for improved efficiency
231
  * Feature: Title Tag Rewriter supports a new `{page_parent}` variable
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, 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: 5.0.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
 
226
 
227
  == Changelog ==
228
 
229
+ = Version 5.0.1 (May 14, 2011) =
230
+ * Bugfix: Meta Description Editor no longer calls the `the_content` filter, since doing so broke some plugins that would add their content to that filter only once per page load
231
+ * Bugfix: Added additional input filtering to 404 Monitor settings
232
+
233
  = Version 5.0 (May 13, 2011) =
234
  * Improvement: Revamped database infrastructure for improved efficiency
235
  * Feature: Title Tag Rewriter supports a new `{page_parent}` variable
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: 5.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 5.0
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
@@ -42,15 +42,15 @@ if (!defined('ABSPATH')) {
42
  /********** CONSTANTS **********/
43
 
44
  //The minimum version of WordPress required
45
- define('SU_MINIMUM_WP_VER', '3.0');
46
 
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', '5.0');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
- define('SU_USER_AGENT', 'SeoUltimate/5.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: 5.0.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 5.0.1
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
42
  /********** CONSTANTS **********/
43
 
44
  //The minimum version of WordPress required
45
+ define('SU_MINIMUM_WP_VER', '2.8');
46
 
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', '5.0.1');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
+ define('SU_USER_AGENT', 'SeoUltimate/5.0.1');
54
 
55
  /********** INCLUDES **********/
56