All in One SEO Pack - Version 1.2.3.7

Version Description

Download this release

Release Info

Developer uberdose
Plugin Icon 128x128 All in One SEO Pack
Version 1.2.3.7
Comparing to
See all releases

Code changes from version 1.2.3.6 to 1.2.3.7

Files changed (1) hide show
  1. all_in_one_seo_pack.php +20 -18
all_in_one_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: All in One SEO Pack
5
  Plugin URI: http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/
6
  Description: Out-of-the-box SEO for your Wordpress blog.
7
- Version: 1.2.3.6
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
- var $version = "1.2.3.6";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
@@ -45,7 +45,9 @@ class All_in_One_SEO_Pack {
45
  if (get_option('aiosp_max_words_excerpt') && is_numeric(get_option('aiosp_max_words_excerpt'))) {
46
  $this->maximum_excerpt_length = get_option('aiosp_max_words_excerpt');
47
  }
48
- ob_start(array($this, 'output_callback_for_title'));
 
 
49
  }
50
 
51
  function output_callback_for_title($content) {
@@ -63,11 +65,13 @@ class All_in_One_SEO_Pack {
63
  return;
64
  }
65
 
66
- // make the title rewrite as short as possible
67
- $active_handlers = ob_list_handlers();
68
- if (sizeof($active_handlers) > 0 && $active_handlers[sizeof($active_handlers) - 1] == 'All_in_One_SEO_Pack::output_callback_for_title') {
69
- // if we don't land here there *could* be trouble with another plugin :(
70
- ob_end_flush();
 
 
71
  }
72
 
73
  global $wp_query;
@@ -151,17 +155,15 @@ class All_in_One_SEO_Pack {
151
  }
152
  } else if (is_single()) {
153
  $title = get_post_meta($post->ID, "title", true);
154
- if ($title) {
155
- $header = $this->replace_title($header, $title);
156
- } else if (get_option('aiosp_rewrite_titles')) {
157
- $title = wp_title('', false);
158
- $title_format = get_option('aiosp_post_title_format');
159
- $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
160
- $new_title = str_replace('%post_title%', $title, $new_title);
161
- $title = $new_title;
162
- $title = trim($title);
163
- $header = $this->replace_title($header, $title);
164
  }
 
 
 
 
 
 
165
  } else if (is_search() && isset($s) && !empty($s)) {
166
  if (function_exists('attribute_escape')) {
167
  $title = attribute_escape(stripslashes($s));
4
  Plugin Name: All in One SEO Pack
5
  Plugin URI: http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/
6
  Description: Out-of-the-box SEO for your Wordpress blog.
7
+ Version: 1.2.3.7
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
+ var $version = "1.2.3.7";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
45
  if (get_option('aiosp_max_words_excerpt') && is_numeric(get_option('aiosp_max_words_excerpt'))) {
46
  $this->maximum_excerpt_length = get_option('aiosp_max_words_excerpt');
47
  }
48
+ if (get_option('aiosp_rewrite_titles')) {
49
+ ob_start(array($this, 'output_callback_for_title'));
50
+ }
51
  }
52
 
53
  function output_callback_for_title($content) {
65
  return;
66
  }
67
 
68
+ if (get_option('aiosp_rewrite_titles')) {
69
+ // make the title rewrite as short as possible
70
+ $active_handlers = ob_list_handlers();
71
+ if (sizeof($active_handlers) > 0 && $active_handlers[sizeof($active_handlers) - 1] == 'All_in_One_SEO_Pack::output_callback_for_title') {
72
+ // if we don't land here there *could* be trouble with another plugin :(
73
+ ob_end_flush();
74
+ }
75
  }
76
 
77
  global $wp_query;
155
  }
156
  } else if (is_single()) {
157
  $title = get_post_meta($post->ID, "title", true);
158
+ if (!$title) {
159
+ $title = wp_title('', false);
 
 
 
 
 
 
 
 
160
  }
161
+ $title_format = get_option('aiosp_post_title_format');
162
+ $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
163
+ $new_title = str_replace('%post_title%', $title, $new_title);
164
+ $title = $new_title;
165
+ $title = trim($title);
166
+ $header = $this->replace_title($header, $title);
167
  } else if (is_search() && isset($s) && !empty($s)) {
168
  if (function_exists('attribute_escape')) {
169
  $title = attribute_escape(stripslashes($s));