All in One SEO Pack - Version 1.2.7.3

Version Description

Download this release

Release Info

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

Code changes from version 1.2.7.2 to 1.2.7.3

Files changed (1) hide show
  1. all_in_one_seo_pack.php +21 -16
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.7.2
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.7.2";
32
 
33
  /**
34
  * Max numbers of chars in auto-generated description.
@@ -109,7 +109,6 @@ class All_in_One_SEO_Pack {
109
 
110
  global $wp_query;
111
  $post = $wp_query->get_queried_object();
112
-
113
  $meta_string = null;
114
 
115
  echo "<!-- all in one seo pack $this->version ";
@@ -124,7 +123,6 @@ class All_in_One_SEO_Pack {
124
  } else {
125
  $keywords = $this->get_all_keywords();
126
  }
127
-
128
  if (is_single() || is_page()) {
129
  if ($this->is_static_front_page()) {
130
  $description = trim(stripslashes(get_option('aiosp_home_description')));
@@ -274,13 +272,7 @@ class All_in_One_SEO_Pack {
274
  $title = str_replace('%search%', $search, $title);
275
  $header = $this->replace_title($header, $title);
276
  } else if (is_category() && !is_feed()) {
277
- $categories = get_the_category();
278
- $category_description = '';
279
- if (count($categories) > 0) {
280
- $category = $categories[0];
281
- $category_description = $category->category_description;
282
- }
283
- $header .= $category;
284
  $category_name = ucwords(single_cat_title('', false));
285
  $title_format = get_option('aiosp_category_title_format');
286
  $title = str_replace('%category_title%', $category_name, $title_format);
@@ -524,9 +516,13 @@ class All_in_One_SEO_Pack {
524
 
525
  function add_meta_tags_textinput() {
526
  global $post;
527
- $keywords = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'keywords', true)));
528
- $title = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'title', true)));
529
- $description = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'description', true)));
 
 
 
 
530
  ?>
531
  <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
532
  <table style="margin-bottom:40px; margin-top:30px;">
@@ -584,7 +580,14 @@ class All_in_One_SEO_Pack {
584
  }
585
 
586
  function admin_menu() {
587
- add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 5, __FILE__, array($this, 'plugin_menu'));
 
 
 
 
 
 
 
588
  }
589
 
590
  function plugin_menu() {
@@ -611,7 +614,9 @@ class All_in_One_SEO_Pack {
611
  update_option('aiosp_tags_noindex', $_POST['aiosp_tags_noindex']);
612
  update_option('aiosp_generate_descriptions', $_POST['aiosp_generate_descriptions']);
613
  update_option('aiosp_debug_info', $_POST['aiosp_debug_info']);
614
- wp_cache_flush();
 
 
615
  }
616
 
617
  ?>
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.7.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.7.3";
32
 
33
  /**
34
  * Max numbers of chars in auto-generated description.
109
 
110
  global $wp_query;
111
  $post = $wp_query->get_queried_object();
 
112
  $meta_string = null;
113
 
114
  echo "<!-- all in one seo pack $this->version ";
123
  } else {
124
  $keywords = $this->get_all_keywords();
125
  }
 
126
  if (is_single() || is_page()) {
127
  if ($this->is_static_front_page()) {
128
  $description = trim(stripslashes(get_option('aiosp_home_description')));
272
  $title = str_replace('%search%', $search, $title);
273
  $header = $this->replace_title($header, $title);
274
  } else if (is_category() && !is_feed()) {
275
+ $category_description = category_description();
 
 
 
 
 
 
276
  $category_name = ucwords(single_cat_title('', false));
277
  $title_format = get_option('aiosp_category_title_format');
278
  $title = str_replace('%category_title%', $category_name, $title_format);
516
 
517
  function add_meta_tags_textinput() {
518
  global $post;
519
+ $post_id = $post;
520
+ if (is_object($post_id)) {
521
+ $post_id = $post_id->ID;
522
+ }
523
+ $keywords = htmlspecialchars(stripslashes(get_post_meta($post_id, 'keywords', true)));
524
+ $title = htmlspecialchars(stripslashes(get_post_meta($post_id, 'title', true)));
525
+ $description = htmlspecialchars(stripslashes(get_post_meta($post_id, 'description', true)));
526
  ?>
527
  <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
528
  <table style="margin-bottom:40px; margin-top:30px;">
580
  }
581
 
582
  function admin_menu() {
583
+ $file = __FILE__;
584
+
585
+ // hack for 1.5
586
+ global $wp_version;
587
+ if (substr($wp_version, 0, 3) == '1.5') {
588
+ $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
589
+ }
590
+ add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 5, $file, array($this, 'plugin_menu'));
591
  }
592
 
593
  function plugin_menu() {
614
  update_option('aiosp_tags_noindex', $_POST['aiosp_tags_noindex']);
615
  update_option('aiosp_generate_descriptions', $_POST['aiosp_generate_descriptions']);
616
  update_option('aiosp_debug_info', $_POST['aiosp_debug_info']);
617
+ if (function_exists('wp_cache_flush')) {
618
+ wp_cache_flush();
619
+ }
620
  }
621
 
622
  ?>