All in One SEO Pack - Version 1.3.6.8

Version Description

Download this release

Release Info

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

Code changes from version 1.3.6.7 to 1.3.6.8

Files changed (2) hide show
  1. all_in_one_seo_pack.php +21 -8
  2. all_in_one_seo_pack.pot +3 -0
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.3.6.7
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
@@ -28,16 +28,13 @@ 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.3.6.7";
32
 
33
- /**
34
- * Max numbers of chars in auto-generated description.
35
- */
36
  var $maximum_description_length = 160;
37
 
38
- /**
39
- * Minimum number of chars an excerpt should be so that it can be used
40
- * as description. Touch only if you know what you're doing.
41
  */
42
  var $minimum_description_length = 1;
43
 
@@ -47,8 +44,12 @@ class All_in_One_SEO_Pack {
47
 
48
  var $title_end = -1;
49
 
 
50
  var $orig_title = '';
51
 
 
 
 
52
  function template_redirect() {
53
  if (is_feed()) {
54
  return;
@@ -158,6 +159,7 @@ class All_in_One_SEO_Pack {
158
  $description = str_replace('%description%', $description, $description_format);
159
  $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
160
  $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
 
161
 
162
  $meta_string .= sprintf("<meta name=\"description\" content=\"%s\"/>", $description);
163
  }
@@ -258,6 +260,7 @@ class All_in_One_SEO_Pack {
258
  if (!$title) {
259
  $title = wp_title('', false);
260
  }
 
261
  $title_format = get_option('aiosp_page_title_format');
262
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
263
  $new_title = str_replace('%page_title%', $title, $new_title);
@@ -268,6 +271,7 @@ class All_in_One_SEO_Pack {
268
  if (get_option('aiosp_home_title')) {
269
  $header = $this->replace_title($header, get_option('aiosp_home_title'));
270
  }
 
271
  }
272
  } else if (is_single()) {
273
  $categories = get_the_category();
@@ -282,6 +286,7 @@ class All_in_One_SEO_Pack {
282
  $title = wp_title('', false);
283
  }
284
  }
 
285
  $title_format = get_option('aiosp_post_title_format');
286
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
287
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
@@ -298,6 +303,7 @@ class All_in_One_SEO_Pack {
298
  $search = wp_specialchars(stripcslashes($s), true);
299
  }
300
  $search = $this->capitalize($search);
 
301
  $title_format = get_option('aiosp_search_title_format');
302
  $title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
303
  $title = str_replace('%blog_description%', get_bloginfo('description'), $title);
@@ -306,6 +312,7 @@ class All_in_One_SEO_Pack {
306
  } else if (is_category() && !is_feed()) {
307
  $category_description = category_description();
308
  $category_name = ucwords(single_cat_title('', false));
 
309
  $title_format = get_option('aiosp_category_title_format');
310
  $title = str_replace('%category_title%', $category_name, $title_format);
311
  $title = str_replace('%category_description%', $category_description, $title);
@@ -315,6 +322,7 @@ class All_in_One_SEO_Pack {
315
  } else if (is_page()) {
316
  if ($this->is_static_front_page()) {
317
  if (get_option('aiosp_home_title')) {
 
318
  $header = $this->replace_title($header, get_option('aiosp_home_title'));
319
  }
320
  } else {
@@ -322,6 +330,7 @@ class All_in_One_SEO_Pack {
322
  if (!$title) {
323
  $title = wp_title('', false);
324
  }
 
325
  $title_format = get_option('aiosp_page_title_format');
326
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
327
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
@@ -340,6 +349,7 @@ class All_in_One_SEO_Pack {
340
  $tag = wp_title('', false);
341
  }
342
  if ($tag) {
 
343
  $tag = $this->capitalize($tag);
344
  $title_format = get_option('aiosp_tag_title_format');
345
  $title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
@@ -349,6 +359,7 @@ class All_in_One_SEO_Pack {
349
  }
350
  } else if (is_archive()) {
351
  $date = wp_title('', false);
 
352
  $title_format = get_option('aiosp_archive_title_format');
353
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
354
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
@@ -361,6 +372,7 @@ class All_in_One_SEO_Pack {
361
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
362
  $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
363
  $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
 
364
  $header = $this->replace_title($header, $new_title);
365
  }
366
 
@@ -968,6 +980,7 @@ echo('<ul>');
968
  echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
969
  echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
970
  echo('<li>'); _e('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all_in_one_seo_pack'); echo('</li>');
 
971
  echo('</ul>');
972
  ?>
973
  </div>
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.3.6.8
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
+ var $version = "1.3.6.8";
32
 
33
+ /** Max numbers of chars in auto-generated description */
 
 
34
  var $maximum_description_length = 160;
35
 
36
+ /** Minimum number of chars an excerpt should be so that it can be used
37
+ * as description. Touch only if you know what you're doing
 
38
  */
39
  var $minimum_description_length = 1;
40
 
44
 
45
  var $title_end = -1;
46
 
47
+ /** The title before rewriting */
48
  var $orig_title = '';
49
 
50
+ /** The "original" Wordpress title (e.g., post or page title) */
51
+ var $pure_title = '';
52
+
53
  function template_redirect() {
54
  if (is_feed()) {
55
  return;
159
  $description = str_replace('%description%', $description, $description_format);
160
  $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
161
  $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
162
+ $description = str_replace('%title%', $this->pure_title, $description);
163
 
164
  $meta_string .= sprintf("<meta name=\"description\" content=\"%s\"/>", $description);
165
  }
260
  if (!$title) {
261
  $title = wp_title('', false);
262
  }
263
+ $this->pure_title = $title;
264
  $title_format = get_option('aiosp_page_title_format');
265
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
266
  $new_title = str_replace('%page_title%', $title, $new_title);
271
  if (get_option('aiosp_home_title')) {
272
  $header = $this->replace_title($header, get_option('aiosp_home_title'));
273
  }
274
+ $this->pure_title = get_option('aiosp_home_title');
275
  }
276
  } else if (is_single()) {
277
  $categories = get_the_category();
286
  $title = wp_title('', false);
287
  }
288
  }
289
+ $this->pure_title = $title;
290
  $title_format = get_option('aiosp_post_title_format');
291
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
292
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
303
  $search = wp_specialchars(stripcslashes($s), true);
304
  }
305
  $search = $this->capitalize($search);
306
+ $this->pure_title = $search;
307
  $title_format = get_option('aiosp_search_title_format');
308
  $title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
309
  $title = str_replace('%blog_description%', get_bloginfo('description'), $title);
312
  } else if (is_category() && !is_feed()) {
313
  $category_description = category_description();
314
  $category_name = ucwords(single_cat_title('', false));
315
+ $this->pure_title = $category_name;
316
  $title_format = get_option('aiosp_category_title_format');
317
  $title = str_replace('%category_title%', $category_name, $title_format);
318
  $title = str_replace('%category_description%', $category_description, $title);
322
  } else if (is_page()) {
323
  if ($this->is_static_front_page()) {
324
  if (get_option('aiosp_home_title')) {
325
+ $this->pure_title = get_option('aiosp_home_title');
326
  $header = $this->replace_title($header, get_option('aiosp_home_title'));
327
  }
328
  } else {
330
  if (!$title) {
331
  $title = wp_title('', false);
332
  }
333
+ $this->pure_title = $title;
334
  $title_format = get_option('aiosp_page_title_format');
335
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
336
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
349
  $tag = wp_title('', false);
350
  }
351
  if ($tag) {
352
+ $this->pure_title = $tag;
353
  $tag = $this->capitalize($tag);
354
  $title_format = get_option('aiosp_tag_title_format');
355
  $title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
359
  }
360
  } else if (is_archive()) {
361
  $date = wp_title('', false);
362
+ $this->pure_title = $date;
363
  $title_format = get_option('aiosp_archive_title_format');
364
  $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
365
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
372
  $new_title = str_replace('%blog_description%', get_bloginfo('description'), $new_title);
373
  $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
374
  $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
375
+ $this->pure_title = $new_title;
376
  $header = $this->replace_title($header, $new_title);
377
  }
378
 
980
  echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
981
  echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
982
  echo('<li>'); _e('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all_in_one_seo_pack'); echo('</li>');
983
+ echo('<li>'); _e('%title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack'); echo('</li>');
984
  echo('</ul>');
985
  ?>
986
  </div>
all_in_one_seo_pack.pot CHANGED
@@ -201,3 +201,6 @@ msgstr ""
201
  msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional meta tags you want here, even references to stylesheets."
202
  msgstr ""
203
 
 
 
 
201
  msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional meta tags you want here, even references to stylesheets."
202
  msgstr ""
203
 
204
+ msgid "%title% - The original wordpress title, e.g. post_title for posts"
205
+ msgstr ""
206
+