All in One SEO Pack - Version 0.6.3.2

Version Description

Download this release

Release Info

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

Code changes from version 0.6.3.1 to 0.6.3.2

Files changed (1) hide show
  1. all_in_one_seo_pack.php +10 -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: 0.6.3.1
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
@@ -27,7 +27,7 @@ Author URI: http://wp.uberdose.com/
27
 
28
  class All_in_One_SEO_Pack {
29
 
30
- var $version = "0.6.3.1";
31
 
32
  /**
33
  * Number of words to be used (max) for generating an excerpt.
@@ -172,19 +172,20 @@ class All_in_One_SEO_Pack {
172
  return trim(stripslashes($text));
173
  }
174
 
 
 
 
175
  function get_all_keywords() {
176
  global $posts;
177
 
 
178
  if (is_array($posts)) {
179
  foreach ($posts as $post) {
180
  if ($post) {
181
  if (get_option('aiosp_use_categories') && !is_page()) {
182
  $categories = get_the_category($post->ID);
183
  foreach ($categories as $category) {
184
- if (isset($keywords) && !empty($keywords)) {
185
- $keywords .= ',';
186
- }
187
- $keywords .= $category->cat_name;
188
  }
189
  }
190
 
@@ -197,11 +198,7 @@ class All_in_One_SEO_Pack {
197
  $tag = str_replace('_',' ', $tag);
198
  $tag = str_replace('-',' ',$tag);
199
  $tag = stripslashes($tag);
200
-
201
- if (isset($keywords) && !empty($keywords)) {
202
- $keywords .= ',';
203
- }
204
- $keywords .= $tag;
205
  }
206
  }
207
 
@@ -210,10 +207,7 @@ class All_in_One_SEO_Pack {
210
  $id = $post->ID;
211
  $keywords_i = stripslashes(get_post_meta($post->ID, "keywords", true));
212
  if (isset($keywords_i) && !empty($keywords_i)) {
213
- if (isset($keywords) && !empty($keywords)) {
214
- $keywords .= ',';
215
- }
216
- $keywords .= $keywords_i;
217
  }
218
  }
219
  }
@@ -223,7 +217,7 @@ class All_in_One_SEO_Pack {
223
  }
224
 
225
  function get_unique_keywords($keywords) {
226
- $keywords_ar = array_unique(explode(',', $keywords));
227
  return implode(',', $keywords_ar);
228
  }
229
 
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: 0.6.3.2
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
27
 
28
  class All_in_One_SEO_Pack {
29
 
30
+ var $version = "0.6.3.2";
31
 
32
  /**
33
  * Number of words to be used (max) for generating an excerpt.
172
  return trim(stripslashes($text));
173
  }
174
 
175
+ /**
176
+ * @return comma-separated list of unique keywords
177
+ */
178
  function get_all_keywords() {
179
  global $posts;
180
 
181
+ $keywords = array();
182
  if (is_array($posts)) {
183
  foreach ($posts as $post) {
184
  if ($post) {
185
  if (get_option('aiosp_use_categories') && !is_page()) {
186
  $categories = get_the_category($post->ID);
187
  foreach ($categories as $category) {
188
+ $keywords[] = $category->cat_name;
 
 
 
189
  }
190
  }
191
 
198
  $tag = str_replace('_',' ', $tag);
199
  $tag = str_replace('-',' ',$tag);
200
  $tag = stripslashes($tag);
201
+ $keywords[] = $tag;
 
 
 
 
202
  }
203
  }
204
 
207
  $id = $post->ID;
208
  $keywords_i = stripslashes(get_post_meta($post->ID, "keywords", true));
209
  if (isset($keywords_i) && !empty($keywords_i)) {
210
+ $keywords[] = $keywords_i;
 
 
 
211
  }
212
  }
213
  }
217
  }
218
 
219
  function get_unique_keywords($keywords) {
220
+ $keywords_ar = array_unique($keywords);
221
  return implode(',', $keywords_ar);
222
  }
223