Version Description
Download this release
Release Info
| Developer | uberdose |
| Plugin | |
| Version | 1.2.6.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.6.2 to 1.2.6.3
- all_in_one_seo_pack.php +64 -21
- readme.txt +3 -5
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.6.
|
| 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.6.
|
| 32 |
|
| 33 |
/**
|
| 34 |
* Number of words to be used (max) for generating an excerpt.
|
|
@@ -71,6 +71,18 @@ class All_in_One_SEO_Pack {
|
|
| 71 |
//$this->db_install();
|
| 72 |
}
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
function wp_head() {
|
| 75 |
if (is_feed()) {
|
| 76 |
return;
|
|
@@ -91,22 +103,24 @@ class All_in_One_SEO_Pack {
|
|
| 91 |
|
| 92 |
echo "<!-- all in one seo pack $this->version -->\n";
|
| 93 |
|
| 94 |
-
if (is_home() && get_option('aiosp_home_keywords')) {
|
| 95 |
$keywords = trim(get_option('aiosp_home_keywords'));
|
| 96 |
} else {
|
| 97 |
$keywords = $this->get_all_keywords();
|
| 98 |
}
|
| 99 |
|
| 100 |
if (is_single() || is_page()) {
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
}
|
| 107 |
-
}
|
| 108 |
} else if (is_home()) {
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
} else if (is_category()) {
|
| 111 |
$description = category_description();
|
| 112 |
}
|
|
@@ -147,6 +161,17 @@ class All_in_One_SEO_Pack {
|
|
| 147 |
}
|
| 148 |
}
|
| 149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
function replace_title($content, $title) {
|
| 151 |
$title_tag_start = "<title>";
|
| 152 |
$title_tag_end = "</title>";
|
|
@@ -178,8 +203,20 @@ class All_in_One_SEO_Pack {
|
|
| 178 |
global $s;
|
| 179 |
|
| 180 |
if (is_home()) {
|
| 181 |
-
if (
|
| 182 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
}
|
| 184 |
} else if (is_single()) {
|
| 185 |
$title = get_post_meta($post->ID, "title", true);
|
|
@@ -206,15 +243,21 @@ class All_in_One_SEO_Pack {
|
|
| 206 |
$title = str_replace('%blog_title%', get_bloginfo('name'), $title);
|
| 207 |
$header = $this->replace_title($header, $title);
|
| 208 |
} else if (is_page()) {
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
}
|
| 213 |
-
$title_format = get_option('aiosp_page_title_format');
|
| 214 |
-
$new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
|
| 215 |
-
$new_title = str_replace('%page_title%', $title, $new_title);
|
| 216 |
-
$title = trim($new_title);
|
| 217 |
-
$header = $this->replace_title($header, $title);
|
| 218 |
} else if (function_exists('is_tag') && is_tag()) {
|
| 219 |
global $utw;
|
| 220 |
if ($utw) {
|
| 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.6.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.6.3";
|
| 32 |
|
| 33 |
/**
|
| 34 |
* Number of words to be used (max) for generating an excerpt.
|
| 71 |
//$this->db_install();
|
| 72 |
}
|
| 73 |
|
| 74 |
+
function is_static_front_page() {
|
| 75 |
+
global $wp_query;
|
| 76 |
+
$post = $wp_query->get_queried_object();
|
| 77 |
+
return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
function is_static_posts_page() {
|
| 81 |
+
global $wp_query;
|
| 82 |
+
$post = $wp_query->get_queried_object();
|
| 83 |
+
return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
function wp_head() {
|
| 87 |
if (is_feed()) {
|
| 88 |
return;
|
| 103 |
|
| 104 |
echo "<!-- all in one seo pack $this->version -->\n";
|
| 105 |
|
| 106 |
+
if ((is_home() && !$this->is_static_posts_page() && get_option('aiosp_home_keywords')) || $this->is_static_front_page()) {
|
| 107 |
$keywords = trim(get_option('aiosp_home_keywords'));
|
| 108 |
} else {
|
| 109 |
$keywords = $this->get_all_keywords();
|
| 110 |
}
|
| 111 |
|
| 112 |
if (is_single() || is_page()) {
|
| 113 |
+
if ($this->is_static_front_page()) {
|
| 114 |
+
$description = trim(stripslashes(get_option('aiosp_home_description')));
|
| 115 |
+
} else {
|
| 116 |
+
$description = $this->get_post_description($post);
|
| 117 |
+
}
|
|
|
|
|
|
|
| 118 |
} else if (is_home()) {
|
| 119 |
+
if ($this->is_static_posts_page()) {
|
| 120 |
+
$description = $this->get_post_description(get_post(get_option('page_for_posts')));
|
| 121 |
+
} else {
|
| 122 |
+
$description = trim(stripslashes(get_option('aiosp_home_description')));
|
| 123 |
+
}
|
| 124 |
} else if (is_category()) {
|
| 125 |
$description = category_description();
|
| 126 |
}
|
| 161 |
}
|
| 162 |
}
|
| 163 |
|
| 164 |
+
function get_post_description($post) {
|
| 165 |
+
$description = trim(stripslashes(get_post_meta($post->ID, "description", true)));
|
| 166 |
+
if (!$description) {
|
| 167 |
+
$description = $this->trim_excerpt_without_filters_full_length($post->post_excerpt);
|
| 168 |
+
if (!$description && get_option("aiosp_generate_descriptions")) {
|
| 169 |
+
$description = $this->trim_excerpt_without_filters($post->post_content);
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
return $description;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
function replace_title($content, $title) {
|
| 176 |
$title_tag_start = "<title>";
|
| 177 |
$title_tag_end = "</title>";
|
| 203 |
global $s;
|
| 204 |
|
| 205 |
if (is_home()) {
|
| 206 |
+
if ($this->is_static_posts_page()) {
|
| 207 |
+
$title = get_post_meta(get_option('page_for_posts'), "title", true);
|
| 208 |
+
if (!$title) {
|
| 209 |
+
$title = wp_title('', false);
|
| 210 |
+
}
|
| 211 |
+
$title_format = get_option('aiosp_page_title_format');
|
| 212 |
+
$new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
|
| 213 |
+
$new_title = str_replace('%page_title%', $title, $new_title);
|
| 214 |
+
$title = trim($new_title);
|
| 215 |
+
$header = $this->replace_title($header, $title);
|
| 216 |
+
} else {
|
| 217 |
+
if (get_option('aiosp_home_title')) {
|
| 218 |
+
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 219 |
+
}
|
| 220 |
}
|
| 221 |
} else if (is_single()) {
|
| 222 |
$title = get_post_meta($post->ID, "title", true);
|
| 243 |
$title = str_replace('%blog_title%', get_bloginfo('name'), $title);
|
| 244 |
$header = $this->replace_title($header, $title);
|
| 245 |
} else if (is_page()) {
|
| 246 |
+
if ($this->is_static_front_page()) {
|
| 247 |
+
if (get_option('aiosp_home_title')) {
|
| 248 |
+
$header = $this->replace_title($header, get_option('aiosp_home_title'));
|
| 249 |
+
}
|
| 250 |
+
} else {
|
| 251 |
+
$title = get_post_meta($post->ID, "title", true);
|
| 252 |
+
if (!$title) {
|
| 253 |
+
$title = wp_title('', false);
|
| 254 |
+
}
|
| 255 |
+
$title_format = get_option('aiosp_page_title_format');
|
| 256 |
+
$new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
|
| 257 |
+
$new_title = str_replace('%page_title%', $title, $new_title);
|
| 258 |
+
$title = trim($new_title);
|
| 259 |
+
$header = $this->replace_title($header, $title);
|
| 260 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
} else if (function_exists('is_tag') && is_tag()) {
|
| 262 |
global $utw;
|
| 263 |
if ($utw) {
|
readme.txt
CHANGED
|
@@ -12,17 +12,15 @@ Optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
|
|
| 12 |
|
| 13 |
**Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**) by
|
| 14 |
|
| 15 |
-
*
|
| 16 |
-
*
|
| 17 |
* Avoiding indexing of duplicate content.
|
| 18 |
|
| 19 |
**[Download now!](http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip)**
|
| 20 |
|
| 21 |
-
* [SEO
|
| 22 |
* [Version History](http://wp.uberdose.com/2007/07/27/all-in-one-seo-pack-release-history/)
|
| 23 |
* [FAQ](http://wp.uberdose.com/2007/07/11/all-in-one-seo-pack-faq/)
|
| 24 |
-
* [See what users are saying](http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#comments)
|
| 25 |
-
* [Get Help](http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond)
|
| 26 |
|
| 27 |
== Installation ==
|
| 28 |
|
| 12 |
|
| 13 |
**Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**) by
|
| 14 |
|
| 15 |
+
* Automatically optimizing your **titles** for search engines and letting you tweak them further
|
| 16 |
+
* Generating **META tags** automatically *and* letting you define them
|
| 17 |
* Avoiding indexing of duplicate content.
|
| 18 |
|
| 19 |
**[Download now!](http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip)**
|
| 20 |
|
| 21 |
+
* [SEO Plugin](http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/)
|
| 22 |
* [Version History](http://wp.uberdose.com/2007/07/27/all-in-one-seo-pack-release-history/)
|
| 23 |
* [FAQ](http://wp.uberdose.com/2007/07/11/all-in-one-seo-pack-faq/)
|
|
|
|
|
|
|
| 24 |
|
| 25 |
== Installation ==
|
| 26 |
|
