All in One SEO Pack - Version 1.4.5.2

Version Description

Download this release

Release Info

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

Code changes from version 1.4.5 to 1.4.5.2

Files changed (1) hide show
  1. all_in_one_seo_pack.php +27 -82
all_in_one_seo_pack.php CHANGED
@@ -4,13 +4,13 @@
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.5
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
11
 
12
  /*
13
- Copyright (C) 2007 uberdose.com (seopack AT uberdose DOT com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -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.4.5";
32
 
33
  /** Max numbers of chars in auto-generated description */
34
  var $maximum_description_length = 160;
@@ -275,6 +275,10 @@ class All_in_One_SEO_Pack {
275
  $description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
276
  }
277
  }
 
 
 
 
278
  return $description;
279
  }
280
 
@@ -286,8 +290,8 @@ class All_in_One_SEO_Pack {
286
  $len_start = strlen($title_tag_start);
287
  $len_end = strlen($title_tag_end);
288
  $title = stripcslashes(trim($title));
289
- $start = strpos($content, "<title>");
290
- $end = strpos($content, "</title>");
291
 
292
  $this->title_start = $start;
293
  $this->title_end = $end;
@@ -416,6 +420,9 @@ class All_in_One_SEO_Pack {
416
  $header = $this->replace_title($header, $title);
417
  } else {
418
  $title = $this->internationalize(get_option('aiosp_home_title'));
 
 
 
419
  $title = $this->paged_title($title);
420
  $header = $this->replace_title($header, $title);
421
  }
@@ -903,8 +910,15 @@ class All_in_One_SEO_Pack {
903
  }
904
  // End -->
905
  </script>
906
- <fieldset id="seodiv" class="dbx-box">
907
- <h3 class="dbx-handle"><a style="color:white" target="__blank" href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></a></h3>
 
 
 
 
 
 
 
908
  <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
909
  <table style="margin-bottom:40px">
910
  <tr>
@@ -940,77 +954,12 @@ class All_in_One_SEO_Pack {
940
  </tr>
941
  <?php } ?>
942
 
943
- <!--
944
- <tr>
945
- <th scope="row" style="text-align:right;"><?php _e('Additional META:', 'all_in_one_seo_pack') ?></th>
946
- <td><input value="<?php echo $aiosp_meta ?>" type="text" name="aiosp_meta" size="80"/></td>
947
- </tr>
948
- -->
949
- </table>
950
- </fieldset>
951
-
952
- <?php
953
- }
954
-
955
- function add_meta_tags_page_textinput() {
956
- global $post;
957
- $post_id = $post;
958
- if (is_object($post_id)) {
959
- $post_id = $post_id->ID;
960
- }
961
- $keywords = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'keywords', true)));
962
- $description = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'description', true)));
963
- $title = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'title', true)));
964
- $aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'aiosp_meta', true)));
965
- $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'aiosp_disable', true)));
966
- ?>
967
- <SCRIPT LANGUAGE="JavaScript">
968
- <!-- Begin
969
- function countChars(field,cntfield) {
970
- cntfield.value = field.value.length;
971
- }
972
- // End -->
973
- </script>
974
- <fieldset id="seodiv" class="dbx-box">
975
- <h3 class="dbx-handle"><a style="color:white" target="__blank" href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></a></h3>
976
- <input value="aiosp_edit" type="hidden" name="aiosp_edit"/>
977
- <table style="margin-bottom:40px;">
978
- <tr>
979
- <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
980
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="80" tabindex="1000"/></td>
981
- </tr>
982
- <tr>
983
- <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
984
- <td><textarea name="aiosp_description" rows="1" cols="78" tabindex="1001"
985
- onKeyDown="countChars(document.post.aiosp_description,document.post.length1)"
986
- onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?></textarea><br />
987
- <input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
988
- <?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack')?></td>
989
- </tr>
990
- <tr>
991
- <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
992
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="80" tabindex="1002"/></td>
993
- </tr>
994
-
995
- <?php if ($this->is_admin()) { ?>
996
- <tr>
997
- <th scope="row" style="text-align:right; vertical-align:top;">
998
- <?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
999
- </th>
1000
- <td>
1001
- <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
1002
- </td>
1003
- </tr>
1004
- <?php } ?>
1005
-
1006
- <!--
1007
- <tr>
1008
- <th scope="row" style="text-align:right;"><?php _e('Additional META:', 'all_in_one_seo_pack') ?></th>
1009
- <td><input value="<?php echo $aiosp_meta ?>" type="text" name="aiosp_meta" size="80"/></td>
1010
- </tr>
1011
- -->
1012
  </table>
 
 
1013
  </fieldset>
 
 
1014
  <?php
1015
  }
1016
 
@@ -1573,18 +1522,14 @@ add_action('template_redirect', array($aiosp, 'template_redirect'));
1573
 
1574
  add_action('init', array($aiosp, 'init'));
1575
 
1576
- add_action('simple_edit_form', array($aiosp, 'add_meta_tags_textinput'));
1577
- add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
1578
- add_action('edit_page_form', array($aiosp, 'add_meta_tags_page_textinput'));
1579
- //add_action('edit_category_form', array($aiosp, 'edit_category_form'));
1580
 
1581
  add_action('edit_post', array($aiosp, 'post_meta_tags'));
1582
  add_action('publish_post', array($aiosp, 'post_meta_tags'));
1583
  add_action('save_post', array($aiosp, 'post_meta_tags'));
1584
  add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
1585
- //add_action('edit_category', array($aiosp, 'edit_category'));
1586
 
1587
  add_action('admin_menu', array($aiosp, 'admin_menu'));
1588
- //add_action('admin_head', array($aiosp, 'admin_head'));
1589
 
1590
  ?>
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.5.2
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
11
 
12
  /*
13
+ Copyright (C) 2008 uberdose.com (seopack AT uberdose DOT com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
+ var $version = "1.4.5.2";
32
 
33
  /** Max numbers of chars in auto-generated description */
34
  var $maximum_description_length = 160;
275
  $description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
276
  }
277
  }
278
+
279
+ // "internal whitespace trim"
280
+ $description = preg_replace("/\s+/", " ", $description);
281
+
282
  return $description;
283
  }
284
 
290
  $len_start = strlen($title_tag_start);
291
  $len_end = strlen($title_tag_end);
292
  $title = stripcslashes(trim($title));
293
+ $start = strpos($content, $title_tag_start);
294
+ $end = strpos($content, $title_tag_end);
295
 
296
  $this->title_start = $start;
297
  $this->title_end = $end;
420
  $header = $this->replace_title($header, $title);
421
  } else {
422
  $title = $this->internationalize(get_option('aiosp_home_title'));
423
+ if (empty($title)) {
424
+ $title = $this->internationalize(get_option('blogname'));
425
+ }
426
  $title = $this->paged_title($title);
427
  $header = $this->replace_title($header, $title);
428
  }
910
  }
911
  // End -->
912
  </script>
913
+
914
+ <div class="dbx-b-ox-wrapper">
915
+ <fieldset id="seodiv" class="dbx-box">
916
+ <div class="dbx-h-andle-wrapper">
917
+ <h3 class="dbx-handle"><a style="color:white" target="__blank" href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></a></h3>
918
+ </div>
919
+ <div class="dbx-c-ontent-wrapper">
920
+ <div class="dbx-content">
921
+
922
  <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
923
  <table style="margin-bottom:40px">
924
  <tr>
954
  </tr>
955
  <?php } ?>
956
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
957
  </table>
958
+
959
+ </div>
960
  </fieldset>
961
+ </div>
962
+
963
  <?php
964
  }
965
 
1522
 
1523
  add_action('init', array($aiosp, 'init'));
1524
 
1525
+ add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput'));
1526
+ add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
 
 
1527
 
1528
  add_action('edit_post', array($aiosp, 'post_meta_tags'));
1529
  add_action('publish_post', array($aiosp, 'post_meta_tags'));
1530
  add_action('save_post', array($aiosp, 'post_meta_tags'));
1531
  add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
 
1532
 
1533
  add_action('admin_menu', array($aiosp, 'admin_menu'));
 
1534
 
1535
  ?>