All in One SEO Pack - Version 1.4.3

Version Description

Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

Files changed (2) hide show
  1. all_in_one_seo_pack.php +51 -10
  2. all_in_one_seo_pack.pot +15 -0
all_in_one_seo_pack.php CHANGED
@@ -1,10 +1,14 @@
 
 
 
 
1
  <?php
2
 
3
  /*
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.4.2
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
@@ -28,7 +32,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.4.2";
32
 
33
  /** Max numbers of chars in auto-generated description */
34
  var $maximum_description_length = 160;
@@ -361,6 +365,23 @@ class All_in_One_SEO_Pack {
361
  return trim($title);
362
  }
363
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  function rewrite_title($header) {
365
  global $wp_query;
366
  if (!$wp_query) {
@@ -386,14 +407,9 @@ class All_in_One_SEO_Pack {
386
  $title = trim($new_title);
387
  $header = $this->replace_title($header, $title);
388
  } else {
389
- if (is_paged()) {
390
- global $paged;
391
- $title = $this->internationalize(get_option('aiosp_home_title'));
392
- $title .= " Part $paged";
393
- $header = $this->replace_title($header, $title);
394
- } else if ($this->internationalize(get_option('aiosp_home_title'))) {
395
- $header = $this->replace_title($header, $this->internationalize(get_option('aiosp_home_title')));
396
- }
397
  }
398
  } else if (is_single()) {
399
  $categories = get_the_category();
@@ -437,6 +453,7 @@ class All_in_One_SEO_Pack {
437
  $title = str_replace('%category_description%', $category_description, $title);
438
  $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
439
  $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
 
440
  $header = $this->replace_title($header, $title);
441
  } else if (is_page()) {
442
  if ($this->is_static_front_page()) {
@@ -471,6 +488,7 @@ class All_in_One_SEO_Pack {
471
  $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
472
  $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
473
  $title = str_replace('%tag%', $tag, $title);
 
474
  $header = $this->replace_title($header, $title);
475
  }
476
  } else if (is_archive()) {
@@ -480,6 +498,7 @@ class All_in_One_SEO_Pack {
480
  $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
481
  $new_title = str_replace('%date%', $date, $new_title);
482
  $title = trim($new_title);
 
483
  $header = $this->replace_title($header, $title);
484
  } else if (is_404()) {
485
  $title_format = get_option('aiosp_404_title_format');
@@ -996,6 +1015,7 @@ class All_in_One_SEO_Pack {
996
  update_option('aiosp_search_title_format', $_POST['aiosp_search_title_format']);
997
  update_option('aiosp_description_format', $_POST['aiosp_description_format']);
998
  update_option('aiosp_404_title_format', $_POST['aiosp_404_title_format']);
 
999
  update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
1000
  update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
1001
  update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
@@ -1307,6 +1327,26 @@ echo('</ul>');
1307
  </td>
1308
  </tr>
1309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1310
  <tr>
1311
  <th scope="row" style="text-align:right; vertical-align:top;">
1312
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
@@ -1463,6 +1503,7 @@ add_option("aiosp_archive_title_format", '%date% | %blog_title%', 'All in One SE
1463
  add_option("aiosp_tag_title_format", '%tag% | %blog_title%', 'All in One SEO Plugin Tag Title Format', 'yes');
1464
  add_option("aiosp_search_title_format", '%search% | %blog_title%', 'All in One SEO Plugin Search Title Format', 'yes');
1465
  add_option("aiosp_description_format", '%description%', 'All in One SEO Plugin Description Format', 'yes');
 
1466
  add_option("aiosp_404_title_format", 'Nothing found for %request_words%', 'All in One SEO Plugin 404 Title Format', 'yes');
1467
  add_option("aiosp_post_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
1468
  add_option("aiosp_page_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
1
+ 1.4.3
2
+ paged title format as option
3
+ archives, tags and categories have paged titles now
4
+
5
  <?php
6
 
7
  /*
8
  Plugin Name: All in One SEO Pack
9
  Plugin URI: http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/
10
  Description: Out-of-the-box SEO for your Wordpress blog.
11
+ Version: 1.4.3
12
  Author: uberdose
13
  Author URI: http://wp.uberdose.com/
14
  */
32
 
33
  class All_in_One_SEO_Pack {
34
 
35
+ var $version = "1.4.3";
36
 
37
  /** Max numbers of chars in auto-generated description */
38
  var $maximum_description_length = 160;
365
  return trim($title);
366
  }
367
 
368
+ function paged_title($title) {
369
+ // the page number if paged
370
+ global $paged;
371
+
372
+ if (is_paged()) {
373
+ $part = $this->internationalize(get_option('aiosp_paged_format'));
374
+ if (!isset($part) || empty($part) || !$part) {
375
+ // reasonable default
376
+ $part = _e("Part %page%", 'all_in_one_seo_pack');
377
+ }
378
+ $part = " " . trim($part);
379
+ $part = str_replace('%page%', $paged, $part);
380
+ $title .= $part;
381
+ }
382
+ return $title;
383
+ }
384
+
385
  function rewrite_title($header) {
386
  global $wp_query;
387
  if (!$wp_query) {
407
  $title = trim($new_title);
408
  $header = $this->replace_title($header, $title);
409
  } else {
410
+ $title = $this->internationalize(get_option('aiosp_home_title'));
411
+ $title = $this->paged_title($title);
412
+ $header = $this->replace_title($header, $title);
 
 
 
 
 
413
  }
414
  } else if (is_single()) {
415
  $categories = get_the_category();
453
  $title = str_replace('%category_description%', $category_description, $title);
454
  $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
455
  $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
456
+ $title = $this->paged_title($title);
457
  $header = $this->replace_title($header, $title);
458
  } else if (is_page()) {
459
  if ($this->is_static_front_page()) {
488
  $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
489
  $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
490
  $title = str_replace('%tag%', $tag, $title);
491
+ $title = $this->paged_title($title);
492
  $header = $this->replace_title($header, $title);
493
  }
494
  } else if (is_archive()) {
498
  $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
499
  $new_title = str_replace('%date%', $date, $new_title);
500
  $title = trim($new_title);
501
+ $title = $this->paged_title($title);
502
  $header = $this->replace_title($header, $title);
503
  } else if (is_404()) {
504
  $title_format = get_option('aiosp_404_title_format');
1015
  update_option('aiosp_search_title_format', $_POST['aiosp_search_title_format']);
1016
  update_option('aiosp_description_format', $_POST['aiosp_description_format']);
1017
  update_option('aiosp_404_title_format', $_POST['aiosp_404_title_format']);
1018
+ update_option('aiosp_paged_format', $_POST['aiosp_paged_format']);
1019
  update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
1020
  update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
1021
  update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
1327
  </td>
1328
  </tr>
1329
 
1330
+ <tr>
1331
+ <th scope="row" style="text-align:right; vertical-align:top;">
1332
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_paged_format_tip');">
1333
+ <?php _e('Paged Format:', 'all_in_one_seo_pack')?>
1334
+ </a>
1335
+ </td>
1336
+ <td>
1337
+ <input size="59" name="aiosp_paged_format" value="<?php echo stripcslashes(get_option('aiosp_paged_format')); ?>"/>
1338
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_paged_format_tip">
1339
+ <?php
1340
+ _e('This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages).', 'all_in_one_seo_pack');
1341
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1342
+ echo('<ul>');
1343
+ echo('<li>'); _e('%page% - The page number', 'all_in_one_seo_pack'); echo('</li>');
1344
+ echo('</ul>');
1345
+ ?>
1346
+ </div>
1347
+ </td>
1348
+ </tr>
1349
+
1350
  <tr>
1351
  <th scope="row" style="text-align:right; vertical-align:top;">
1352
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
1503
  add_option("aiosp_tag_title_format", '%tag% | %blog_title%', 'All in One SEO Plugin Tag Title Format', 'yes');
1504
  add_option("aiosp_search_title_format", '%search% | %blog_title%', 'All in One SEO Plugin Search Title Format', 'yes');
1505
  add_option("aiosp_description_format", '%description%', 'All in One SEO Plugin Description Format', 'yes');
1506
+ add_option("aiosp_paged_format", ' - Part %page%', 'All in One SEO Plugin Paged Format', 'yes');
1507
  add_option("aiosp_404_title_format", 'Nothing found for %request_words%', 'All in One SEO Plugin 404 Title Format', 'yes');
1508
  add_option("aiosp_post_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
1509
  add_option("aiosp_page_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
all_in_one_seo_pack.pot CHANGED
@@ -244,3 +244,18 @@ msgstr ""
244
  msgid "Log important events:"
245
  msgstr ""
246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  msgid "Log important events:"
245
  msgstr ""
246
 
247
+ msgid "Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page)."
248
+ msgstr ""
249
+
250
+ msgid "Paged Format:"
251
+ msgstr ""
252
+
253
+ msgid "This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages)."
254
+ msgstr ""
255
+
256
+ msgid "%page% - The page number"
257
+ msgstr ""
258
+
259
+ msgid "Part %page%"
260
+ msgstr ""
261
+