Version Description
Download this release
Release Info
| Developer | uberdose |
| Plugin | |
| Version | 1.3.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.6.9 to 1.3.7
- all_in_one_seo_pack-bg_BG.mo +0 -0
- all_in_one_seo_pack-de_DE.mo +0 -0
- all_in_one_seo_pack.php +27 -24
all_in_one_seo_pack-bg_BG.mo
CHANGED
|
Binary file
|
all_in_one_seo_pack-de_DE.mo
CHANGED
|
Binary file
|
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.3.
|
| 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.3.
|
| 32 |
|
| 33 |
/** Max numbers of chars in auto-generated description */
|
| 34 |
var $maximum_description_length = 160;
|
|
@@ -115,13 +115,13 @@ class All_in_One_SEO_Pack {
|
|
| 115 |
echo "-->\n";
|
| 116 |
|
| 117 |
if ((is_home() && !$this->is_static_posts_page() && get_option('aiosp_home_keywords')) || $this->is_static_front_page()) {
|
| 118 |
-
$keywords = trim(get_option('aiosp_home_keywords'));
|
| 119 |
} else {
|
| 120 |
$keywords = $this->get_all_keywords();
|
| 121 |
}
|
| 122 |
if (is_single() || is_page()) {
|
| 123 |
if ($this->is_static_front_page()) {
|
| 124 |
-
$description = trim(stripcslashes(get_option('aiosp_home_description')));
|
| 125 |
} else {
|
| 126 |
$description = $this->get_post_description($post);
|
| 127 |
}
|
|
@@ -129,10 +129,10 @@ class All_in_One_SEO_Pack {
|
|
| 129 |
if ($this->is_static_posts_page()) {
|
| 130 |
$description = $this->get_post_description(get_post(get_option('page_for_posts')));
|
| 131 |
} else {
|
| 132 |
-
$description = trim(stripcslashes(get_option('aiosp_home_description')));
|
| 133 |
}
|
| 134 |
} else if (is_category()) {
|
| 135 |
-
$description = category_description();
|
| 136 |
}
|
| 137 |
|
| 138 |
if (isset($description) && strlen($description) > $this->minimum_description_length) {
|
|
@@ -201,11 +201,11 @@ class All_in_One_SEO_Pack {
|
|
| 201 |
}
|
| 202 |
|
| 203 |
function get_post_description($post) {
|
| 204 |
-
$description = trim(stripcslashes(get_post_meta($post->ID, "description", true)));
|
| 205 |
if (!$description) {
|
| 206 |
-
$description = $this->trim_excerpt_without_filters_full_length($post->post_excerpt);
|
| 207 |
if (!$description && get_option("aiosp_generate_descriptions")) {
|
| 208 |
-
$description = $this->trim_excerpt_without_filters($post->post_content);
|
| 209 |
}
|
| 210 |
}
|
| 211 |
return $description;
|
|
@@ -214,10 +214,6 @@ class All_in_One_SEO_Pack {
|
|
| 214 |
function replace_title($content, $title) {
|
| 215 |
$title = trim(strip_tags($title));
|
| 216 |
|
| 217 |
-
if (function_exists('langswitch_filter_langs_with_message')) {
|
| 218 |
-
$title = langswitch_filter_langs_with_message($title);
|
| 219 |
-
}
|
| 220 |
-
|
| 221 |
$title_tag_start = "<title>";
|
| 222 |
$title_tag_end = "</title>";
|
| 223 |
$len_start = strlen($title_tag_start);
|
|
@@ -242,6 +238,13 @@ class All_in_One_SEO_Pack {
|
|
| 242 |
return $header;
|
| 243 |
}
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
function rewrite_title($header) {
|
| 246 |
global $wp_query;
|
| 247 |
if (!$wp_query) {
|
|
@@ -258,7 +261,7 @@ class All_in_One_SEO_Pack {
|
|
| 258 |
if ($this->is_static_posts_page()) {
|
| 259 |
$title = get_post_meta(get_option('page_for_posts'), "title", true);
|
| 260 |
if (!$title) {
|
| 261 |
-
$title = wp_title('', false);
|
| 262 |
}
|
| 263 |
$this->pure_title = $title;
|
| 264 |
$title_format = get_option('aiosp_page_title_format');
|
|
@@ -268,7 +271,7 @@ class All_in_One_SEO_Pack {
|
|
| 268 |
$title = trim($new_title);
|
| 269 |
$header = $this->replace_title($header, $title);
|
| 270 |
} else {
|
| 271 |
-
if (get_option('aiosp_home_title')) {
|
| 272 |
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 273 |
}
|
| 274 |
$this->pure_title = get_option('aiosp_home_title');
|
|
@@ -279,11 +282,11 @@ class All_in_One_SEO_Pack {
|
|
| 279 |
if (count($categories) > 0) {
|
| 280 |
$category = $categories[0]->cat_name;
|
| 281 |
}
|
| 282 |
-
$title = get_post_meta($post->ID, "title", true);
|
| 283 |
if (!$title) {
|
| 284 |
-
$title = get_post_meta($post->ID, "title_tag", true);
|
| 285 |
if (!$title) {
|
| 286 |
-
$title = wp_title('', false);
|
| 287 |
}
|
| 288 |
}
|
| 289 |
$this->pure_title = $title;
|
|
@@ -310,8 +313,8 @@ class All_in_One_SEO_Pack {
|
|
| 310 |
$title = str_replace('%search%', $search, $title);
|
| 311 |
$header = $this->replace_title($header, $title);
|
| 312 |
} else if (is_category() && !is_feed()) {
|
| 313 |
-
$category_description = category_description();
|
| 314 |
-
$category_name = ucwords(single_cat_title('', false));
|
| 315 |
$this->pure_title = $category_name;
|
| 316 |
$title_format = get_option('aiosp_category_title_format');
|
| 317 |
$title = str_replace('%category_title%', $category_name, $title_format);
|
|
@@ -321,14 +324,14 @@ class All_in_One_SEO_Pack {
|
|
| 321 |
$header = $this->replace_title($header, $title);
|
| 322 |
} else if (is_page()) {
|
| 323 |
if ($this->is_static_front_page()) {
|
| 324 |
-
if (get_option('aiosp_home_title')) {
|
| 325 |
$this->pure_title = get_option('aiosp_home_title');
|
| 326 |
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 327 |
}
|
| 328 |
} else {
|
| 329 |
$title = get_post_meta($post->ID, "title", true);
|
| 330 |
if (!$title) {
|
| 331 |
-
$title = wp_title('', false);
|
| 332 |
}
|
| 333 |
$this->pure_title = $title;
|
| 334 |
$title_format = get_option('aiosp_page_title_format');
|
|
@@ -346,7 +349,7 @@ class All_in_One_SEO_Pack {
|
|
| 346 |
$tag = str_replace('-', ' ', $tag);
|
| 347 |
} else {
|
| 348 |
// wordpress > 2.3
|
| 349 |
-
$tag = wp_title('', false);
|
| 350 |
}
|
| 351 |
if ($tag) {
|
| 352 |
$this->pure_title = $tag;
|
|
@@ -358,7 +361,7 @@ class All_in_One_SEO_Pack {
|
|
| 358 |
$header = $this->replace_title($header, $title);
|
| 359 |
}
|
| 360 |
} else if (is_archive()) {
|
| 361 |
-
$date = wp_title('', false);
|
| 362 |
$this->pure_title = $date;
|
| 363 |
$title_format = get_option('aiosp_archive_title_format');
|
| 364 |
$new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
|
| 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.3.7
|
| 8 |
Author: uberdose
|
| 9 |
Author URI: http://wp.uberdose.com/
|
| 10 |
*/
|
| 28 |
|
| 29 |
class All_in_One_SEO_Pack {
|
| 30 |
|
| 31 |
+
var $version = "1.3.7";
|
| 32 |
|
| 33 |
/** Max numbers of chars in auto-generated description */
|
| 34 |
var $maximum_description_length = 160;
|
| 115 |
echo "-->\n";
|
| 116 |
|
| 117 |
if ((is_home() && !$this->is_static_posts_page() && get_option('aiosp_home_keywords')) || $this->is_static_front_page()) {
|
| 118 |
+
$keywords = trim($this->internationalize(get_option('aiosp_home_keywords')));
|
| 119 |
} else {
|
| 120 |
$keywords = $this->get_all_keywords();
|
| 121 |
}
|
| 122 |
if (is_single() || is_page()) {
|
| 123 |
if ($this->is_static_front_page()) {
|
| 124 |
+
$description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
| 125 |
} else {
|
| 126 |
$description = $this->get_post_description($post);
|
| 127 |
}
|
| 129 |
if ($this->is_static_posts_page()) {
|
| 130 |
$description = $this->get_post_description(get_post(get_option('page_for_posts')));
|
| 131 |
} else {
|
| 132 |
+
$description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
| 133 |
}
|
| 134 |
} else if (is_category()) {
|
| 135 |
+
$description = $this->internationalize(category_description());
|
| 136 |
}
|
| 137 |
|
| 138 |
if (isset($description) && strlen($description) > $this->minimum_description_length) {
|
| 201 |
}
|
| 202 |
|
| 203 |
function get_post_description($post) {
|
| 204 |
+
$description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "description", true))));
|
| 205 |
if (!$description) {
|
| 206 |
+
$description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt));
|
| 207 |
if (!$description && get_option("aiosp_generate_descriptions")) {
|
| 208 |
+
$description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
|
| 209 |
}
|
| 210 |
}
|
| 211 |
return $description;
|
| 214 |
function replace_title($content, $title) {
|
| 215 |
$title = trim(strip_tags($title));
|
| 216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
$title_tag_start = "<title>";
|
| 218 |
$title_tag_end = "</title>";
|
| 219 |
$len_start = strlen($title_tag_start);
|
| 238 |
return $header;
|
| 239 |
}
|
| 240 |
|
| 241 |
+
function internationalize($in) {
|
| 242 |
+
if (function_exists('langswitch_filter_langs_with_message')) {
|
| 243 |
+
$in = langswitch_filter_langs_with_message($in);
|
| 244 |
+
}
|
| 245 |
+
return $in;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
function rewrite_title($header) {
|
| 249 |
global $wp_query;
|
| 250 |
if (!$wp_query) {
|
| 261 |
if ($this->is_static_posts_page()) {
|
| 262 |
$title = get_post_meta(get_option('page_for_posts'), "title", true);
|
| 263 |
if (!$title) {
|
| 264 |
+
$title = $this->internationalize(wp_title('', false));
|
| 265 |
}
|
| 266 |
$this->pure_title = $title;
|
| 267 |
$title_format = get_option('aiosp_page_title_format');
|
| 271 |
$title = trim($new_title);
|
| 272 |
$header = $this->replace_title($header, $title);
|
| 273 |
} else {
|
| 274 |
+
if ($this->internationalize(get_option('aiosp_home_title'))) {
|
| 275 |
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 276 |
}
|
| 277 |
$this->pure_title = get_option('aiosp_home_title');
|
| 282 |
if (count($categories) > 0) {
|
| 283 |
$category = $categories[0]->cat_name;
|
| 284 |
}
|
| 285 |
+
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
| 286 |
if (!$title) {
|
| 287 |
+
$title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
|
| 288 |
if (!$title) {
|
| 289 |
+
$title = $this->internationalize(wp_title('', false));
|
| 290 |
}
|
| 291 |
}
|
| 292 |
$this->pure_title = $title;
|
| 313 |
$title = str_replace('%search%', $search, $title);
|
| 314 |
$header = $this->replace_title($header, $title);
|
| 315 |
} else if (is_category() && !is_feed()) {
|
| 316 |
+
$category_description = $this->internationalize(category_description());
|
| 317 |
+
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
| 318 |
$this->pure_title = $category_name;
|
| 319 |
$title_format = get_option('aiosp_category_title_format');
|
| 320 |
$title = str_replace('%category_title%', $category_name, $title_format);
|
| 324 |
$header = $this->replace_title($header, $title);
|
| 325 |
} else if (is_page()) {
|
| 326 |
if ($this->is_static_front_page()) {
|
| 327 |
+
if ($this->internationalize(get_option('aiosp_home_title'))) {
|
| 328 |
$this->pure_title = get_option('aiosp_home_title');
|
| 329 |
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 330 |
}
|
| 331 |
} else {
|
| 332 |
$title = get_post_meta($post->ID, "title", true);
|
| 333 |
if (!$title) {
|
| 334 |
+
$title = $this->internationalize(wp_title('', false));
|
| 335 |
}
|
| 336 |
$this->pure_title = $title;
|
| 337 |
$title_format = get_option('aiosp_page_title_format');
|
| 349 |
$tag = str_replace('-', ' ', $tag);
|
| 350 |
} else {
|
| 351 |
// wordpress > 2.3
|
| 352 |
+
$tag = $this->internationalize(wp_title('', false));
|
| 353 |
}
|
| 354 |
if ($tag) {
|
| 355 |
$this->pure_title = $tag;
|
| 361 |
$header = $this->replace_title($header, $title);
|
| 362 |
}
|
| 363 |
} else if (is_archive()) {
|
| 364 |
+
$date = $this->internationalize(wp_title('', false));
|
| 365 |
$this->pure_title = $date;
|
| 366 |
$title_format = get_option('aiosp_archive_title_format');
|
| 367 |
$new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
|
