All in One SEO Pack - Version 1.2.5.3

Version Description

Download this release

Release Info

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

Code changes from version 1.2.4 to 1.2.5.3

Files changed (1) hide show
  1. all_in_one_seo_pack.php +77 -7
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.4
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.4";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
@@ -139,6 +139,7 @@ class All_in_One_SEO_Pack {
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
  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
 
@@ -287,6 +293,56 @@ class All_in_One_SEO_Pack {
287
  }
288
  }
289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  function add_meta_tags_textinput() {
291
  global $post;
292
  $keywords = stripslashes(get_post_meta($post->ID, 'keywords', true));
@@ -322,7 +378,7 @@ class All_in_One_SEO_Pack {
322
  $description = stripslashes(get_post_meta($post->ID, 'description', true));
323
  $title = stripslashes(get_post_meta($post->ID, 'title', true));
324
  ?>
325
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
326
  <table style="margin-bottom:40px; margin-top:30px;">
327
  <tr>
328
  <th style="text-align:left;" colspan="2">
@@ -331,15 +387,15 @@ class All_in_One_SEO_Pack {
331
  </tr>
332
  <tr>
333
  <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
334
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="80"/></td>
335
  </tr>
336
  <tr>
337
  <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
338
- <td><textarea name="aiosp_description" rows="1" cols="78"><?php echo $description ?></textarea></td>
339
  </tr>
340
  <tr>
341
  <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
342
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="80"/></td>
343
  </tr>
344
  </table>
345
  <?php
@@ -362,6 +418,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 +497,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 +587,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'));
@@ -531,11 +599,13 @@ add_action('init', array($aiosp, 'init_textdomain'));
531
  add_action('simple_edit_form', array($aiosp, 'add_meta_tags_textinput'));
532
  add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
533
  add_action('edit_page_form', array($aiosp, 'add_meta_tags_page_textinput'));
 
534
 
535
  add_action('edit_post', array($aiosp, 'post_meta_tags'));
536
  add_action('publish_post', array($aiosp, 'post_meta_tags'));
537
  add_action('save_post', array($aiosp, 'post_meta_tags'));
538
  add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
 
539
 
540
  add_action('admin_menu', array($aiosp, 'admin_menu'));
541
 
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.3
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.3";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
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
 
293
  }
294
  }
295
 
296
+ function edit_category($id) {
297
+ $awmp_edit = $_POST["aiosp_edit"];
298
+ /*
299
+ if (isset($awmp_edit) && !empty($awmp_edit)) {
300
+ $keywords = $_POST["aiosp_keywords"];
301
+ $description = $_POST["aiosp_description"];
302
+ $title = $_POST["aiosp_title"];
303
+
304
+ delete_post_meta($id, 'keywords');
305
+ delete_post_meta($id, 'description');
306
+ delete_post_meta($id, 'title');
307
+
308
+ if (isset($keywords) && !empty($keywords)) {
309
+ add_post_meta($id, 'keywords', $keywords);
310
+ }
311
+ if (isset($description) && !empty($description)) {
312
+ add_post_meta($id, 'description', $description);
313
+ }
314
+ if (isset($title) && !empty($title)) {
315
+ add_post_meta($id, 'title', $title);
316
+ }
317
+ }
318
+ */
319
+ }
320
+
321
+ function edit_category_form() {
322
+ global $post;
323
+ $keywords = stripslashes(get_post_meta($post->ID, 'keywords', true));
324
+ $title = stripslashes(get_post_meta($post->ID, 'title', true));
325
+ $description = stripslashes(get_post_meta($post->ID, 'description', true));
326
+ ?>
327
+ <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
328
+ <table class="editform" width="100%" cellspacing="2" cellpadding="5">
329
+ <tr>
330
+ <th width="33%" scope="row" valign="top">
331
+ <a href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/">All in One SEO Pack</a>
332
+ </th>
333
+ </tr>
334
+ <tr>
335
+ <th width="33%" scope="row" valign="top"><label for="aiosp_title"><?php _e('Title:', 'all_in_one_seo_pack') ?></label></th>
336
+ <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="70"/></td>
337
+ </tr>
338
+ <tr>
339
+ <th width="33%" scope="row" valign="top"><label for="aiosp_keywords"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></label></th>
340
+ <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="70"/></td>
341
+ </tr>
342
+ </table>
343
+ <?php
344
+ }
345
+
346
  function add_meta_tags_textinput() {
347
  global $post;
348
  $keywords = stripslashes(get_post_meta($post->ID, 'keywords', true));
378
  $description = stripslashes(get_post_meta($post->ID, 'description', true));
379
  $title = stripslashes(get_post_meta($post->ID, 'title', true));
380
  ?>
381
+ <input value="aiosp_edit" type="hidden" name="aiosp_edit"/>
382
  <table style="margin-bottom:40px; margin-top:30px;">
383
  <tr>
384
  <th style="text-align:left;" colspan="2">
387
  </tr>
388
  <tr>
389
  <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
390
+ <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="80" tabindex="1000"/></td>
391
  </tr>
392
  <tr>
393
  <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
394
+ <td><textarea name="aiosp_description" rows="1" cols="78" tabindex="1001"><?php echo $description ?></textarea></td>
395
  </tr>
396
  <tr>
397
  <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
398
+ <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="80" tabindex="1002"/></td>
399
  </tr>
400
  </table>
401
  <?php
418
  update_option('aiosp_max_words_excerpt', $_POST['aiosp_max_words_excerpt']);
419
  update_option('aiosp_rewrite_titles', $_POST['aiosp_rewrite_titles']);
420
  update_option('aiosp_post_title_format', $_POST['aiosp_post_title_format']);
421
+ update_option('aiosp_page_title_format', $_POST['aiosp_page_title_format']);
422
  update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
423
  update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
424
  update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
497
  </tr>
498
  <tr>
499
  <th scope="row" style="text-align:right; vertical-align:top;">
500
+ <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">
501
+ <?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
502
+ </a>
503
+ </td>
504
+ <td>
505
+ <input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes(get_option('aiosp_page_title_format')); ?>"/>
506
+ </td>
507
+ </tr>
508
+ <tr>
509
+ <th scope="row" style="text-align:right; vertical-align:top;">
510
  <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">
511
  <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
512
  </td>
587
  add_option("aiosp_archive_noindex", 1, __('All in One SEO Plugin Noindex for Archives', 'all_in_one_seo_pack'), 'yes');
588
  add_option("aiosp_tags_noindex", 1, __('All in One SEO Plugin Noindex for Tag Archives', 'all_in_one_seo_pack'), 'yes');
589
  add_option("aiosp_generate_descriptions", 0, __('All in One SEO Plugin Autogenerate Descriptions', 'all_in_one_seo_pack'), 'yes');
590
+ add_option("aiosp_post_title_format", '%post_title% | %blog_title%', __('All in One SEO Plugin Post Title Format', 'all_in_one_seo_pack'), 'yes');
591
+ add_option("aiosp_page_title_format", '%page_title% | %blog_title%', __('All in One SEO Plugin Page Title Format', 'all_in_one_seo_pack'), 'yes');
592
 
593
  $aiosp = new All_in_One_SEO_Pack();
594
  add_action('wp_head', array($aiosp, 'wp_head'));
599
  add_action('simple_edit_form', array($aiosp, 'add_meta_tags_textinput'));
600
  add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
601
  add_action('edit_page_form', array($aiosp, 'add_meta_tags_page_textinput'));
602
+ //add_action('edit_category_form', array($aiosp, 'edit_category_form'));
603
 
604
  add_action('edit_post', array($aiosp, 'post_meta_tags'));
605
  add_action('publish_post', array($aiosp, 'post_meta_tags'));
606
  add_action('save_post', array($aiosp, 'post_meta_tags'));
607
  add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
608
+ //add_action('edit_category', array($aiosp, 'edit_category'));
609
 
610
  add_action('admin_menu', array($aiosp, 'admin_menu'));
611