All in One SEO Pack - Version 1.2.5

Version Description

Download this release

Release Info

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

Code changes from version 1.2.3.9 to 1.2.5

Files changed (1) hide show
  1. all_in_one_seo_pack.php +22 -4
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.9
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.9";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
@@ -136,9 +136,10 @@ class All_in_One_SEO_Pack {
136
  }
137
 
138
  function replace_title($content, $title) {
139
- $title = trim(stripslashes(addslashes($title)));
140
  $header = preg_replace_callback("/<title>.*<\/title>/s",
141
  create_function('$match_not_needed',"return '<title>$title</title>';"), $content);
 
142
  return $header;
143
  }
144
 
@@ -187,6 +188,11 @@ class All_in_One_SEO_Pack {
187
  if (!$title) {
188
  $title = wp_title('', false);
189
  }
 
 
 
 
 
190
  $header = $this->replace_title($header, $title);
191
  }
192
 
@@ -362,6 +368,7 @@ class All_in_One_SEO_Pack {
362
  update_option('aiosp_max_words_excerpt', $_POST['aiosp_max_words_excerpt']);
363
  update_option('aiosp_rewrite_titles', $_POST['aiosp_rewrite_titles']);
364
  update_option('aiosp_post_title_format', $_POST['aiosp_post_title_format']);
 
365
  update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
366
  update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
367
  update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
@@ -440,6 +447,16 @@ class All_in_One_SEO_Pack {
440
  </tr>
441
  <tr>
442
  <th scope="row" style="text-align:right; vertical-align:top;">
 
 
 
 
 
 
 
 
 
 
443
  <a target="_blank" title="<?php _e('Help for Option Categories for META keywords', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#categorymetakeywords">
444
  <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
445
  </td>
@@ -520,7 +537,8 @@ add_option("aiosp_category_noindex", 1, __('All in One SEO Plugin Noindex for Ca
520
  add_option("aiosp_archive_noindex", 1, __('All in One SEO Plugin Noindex for Archives', 'all_in_one_seo_pack'), 'yes');
521
  add_option("aiosp_tags_noindex", 1, __('All in One SEO Plugin Noindex for Tag Archives', 'all_in_one_seo_pack'), 'yes');
522
  add_option("aiosp_generate_descriptions", 0, __('All in One SEO Plugin Autogenerate Descriptions', 'all_in_one_seo_pack'), 'yes');
523
- add_option("aiosp_post_title_format", '%post_title% | %blog_title%', __('All in One SEO Plugin Title Format', 'all_in_one_seo_pack'), 'yes');
 
524
 
525
  $aiosp = new All_in_One_SEO_Pack();
526
  add_action('wp_head', array($aiosp, 'wp_head'));
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.5
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.5";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
136
  }
137
 
138
  function replace_title($content, $title) {
139
+ $title = trim(addslashes(stripslashes($title)));
140
  $header = preg_replace_callback("/<title>.*<\/title>/s",
141
  create_function('$match_not_needed',"return '<title>$title</title>';"), $content);
142
+ $header = stripslashes($header);
143
  return $header;
144
  }
145
 
188
  if (!$title) {
189
  $title = wp_title('', false);
190
  }
191
+ $title_format = get_option('aiosp_page_title_format');
192
+ $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
193
+ $new_title = str_replace('%page_title%', $title, $new_title);
194
+ $title = $new_title;
195
+ $title = trim($title);
196
  $header = $this->replace_title($header, $title);
197
  }
198
 
368
  update_option('aiosp_max_words_excerpt', $_POST['aiosp_max_words_excerpt']);
369
  update_option('aiosp_rewrite_titles', $_POST['aiosp_rewrite_titles']);
370
  update_option('aiosp_post_title_format', $_POST['aiosp_post_title_format']);
371
+ update_option('aiosp_page_title_format', $_POST['aiosp_page_title_format']);
372
  update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
373
  update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
374
  update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
447
  </tr>
448
  <tr>
449
  <th scope="row" style="text-align:right; vertical-align:top;">
450
+ <a target="_blank" title="<?php _e('Help for Page Title Format', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#pagetitleformat">
451
+ <?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
452
+ </a>
453
+ </td>
454
+ <td>
455
+ <input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes(get_option('aiosp_page_title_format')); ?>"/>
456
+ </td>
457
+ </tr>
458
+ <tr>
459
+ <th scope="row" style="text-align:right; vertical-align:top;">
460
  <a target="_blank" title="<?php _e('Help for Option Categories for META keywords', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#categorymetakeywords">
461
  <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
462
  </td>
537
  add_option("aiosp_archive_noindex", 1, __('All in One SEO Plugin Noindex for Archives', 'all_in_one_seo_pack'), 'yes');
538
  add_option("aiosp_tags_noindex", 1, __('All in One SEO Plugin Noindex for Tag Archives', 'all_in_one_seo_pack'), 'yes');
539
  add_option("aiosp_generate_descriptions", 0, __('All in One SEO Plugin Autogenerate Descriptions', 'all_in_one_seo_pack'), 'yes');
540
+ add_option("aiosp_post_title_format", '%post_title% | %blog_title%', __('All in One SEO Plugin Post Title Format', 'all_in_one_seo_pack'), 'yes');
541
+ add_option("aiosp_page_title_format", '%page_title% | %blog_title%', __('All in One SEO Plugin Page Title Format', 'all_in_one_seo_pack'), 'yes');
542
 
543
  $aiosp = new All_in_One_SEO_Pack();
544
  add_action('wp_head', array($aiosp, 'wp_head'));