Version Description
Download this release
Release Info
| Developer | uberdose |
| Plugin | |
| Version | 1.3.7.4 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.7.3 to 1.3.7.4
- all_in_one_seo_pack.php +21 -44
- all_in_one_seo_pack.pot +1 -1
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.7.
|
| 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.7.
|
| 32 |
|
| 33 |
/** Max numbers of chars in auto-generated description */
|
| 34 |
var $maximum_description_length = 160;
|
|
@@ -156,7 +156,7 @@ class All_in_One_SEO_Pack {
|
|
| 156 |
$description = str_replace('%description%', $description, $description_format);
|
| 157 |
$description = str_replace('%blog_title%', get_bloginfo('name'), $description);
|
| 158 |
$description = str_replace('%blog_description%', get_bloginfo('description'), $description);
|
| 159 |
-
$description = str_replace('%
|
| 160 |
|
| 161 |
$meta_string .= sprintf("<meta name=\"description\" content=\"%s\"/>", $description);
|
| 162 |
}
|
|
@@ -253,26 +253,13 @@ class All_in_One_SEO_Pack {
|
|
| 253 |
|
| 254 |
// the_search_query() is not suitable, it cannot just return
|
| 255 |
global $s;
|
| 256 |
-
|
| 257 |
$title = null;
|
| 258 |
-
|
| 259 |
if (is_home()) {
|
| 260 |
-
|
| 261 |
-
$title = $this->internationalize(get_post_meta(get_option('page_for_posts'), "title", true));
|
| 262 |
-
if (!$title) {
|
| 263 |
-
$title = $this->internationalize(wp_title('', false));
|
| 264 |
-
}
|
| 265 |
-
} else {
|
| 266 |
-
$title = $this->internationalize(get_option('aiosp_home_title'));
|
| 267 |
-
}
|
| 268 |
} else if (is_single()) {
|
| 269 |
-
$title = $this->internationalize(
|
| 270 |
-
if (!$title) {
|
| 271 |
-
$title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
|
| 272 |
-
if (!$title) {
|
| 273 |
-
$title = $this->internationalize(wp_title('', false));
|
| 274 |
-
}
|
| 275 |
-
}
|
| 276 |
} else if (is_search() && isset($s) && !empty($s)) {
|
| 277 |
if (function_exists('attribute_escape')) {
|
| 278 |
$search = attribute_escape(stripcslashes($s));
|
|
@@ -286,22 +273,13 @@ class All_in_One_SEO_Pack {
|
|
| 286 |
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
| 287 |
$title = $category_name;
|
| 288 |
} else if (is_page()) {
|
| 289 |
-
|
| 290 |
-
if ($this->internationalize(get_option('aiosp_home_title'))) {
|
| 291 |
-
$title = $this->internationalize(get_option('aiosp_home_title'));
|
| 292 |
-
}
|
| 293 |
-
} else {
|
| 294 |
-
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
| 295 |
-
if (!$title) {
|
| 296 |
-
$title = $this->internationalize(wp_title('', false));
|
| 297 |
-
}
|
| 298 |
-
}
|
| 299 |
} else if (function_exists('is_tag') && is_tag()) {
|
| 300 |
global $utw;
|
| 301 |
if ($utw) {
|
| 302 |
$tags = $utw->GetCurrentTagSet();
|
| 303 |
$tag = $tags[0]->tag;
|
| 304 |
-
|
| 305 |
} else {
|
| 306 |
// wordpress > 2.3
|
| 307 |
$tag = $this->internationalize(wp_title('', false));
|
|
@@ -310,21 +288,20 @@ class All_in_One_SEO_Pack {
|
|
| 310 |
$title = $tag;
|
| 311 |
}
|
| 312 |
} else if (is_archive()) {
|
| 313 |
-
$
|
| 314 |
-
$title = $date;
|
| 315 |
} else if (is_404()) {
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
|
|
|
|
|
|
|
|
|
| 322 |
}
|
| 323 |
-
|
| 324 |
-
return $title;
|
| 325 |
-
}
|
| 326 |
|
| 327 |
-
|
| 328 |
global $wp_query;
|
| 329 |
if (!$wp_query) {
|
| 330 |
$header .= "<!-- no wp_query found! -->\n";
|
|
@@ -1056,7 +1033,7 @@ echo('<ul>');
|
|
| 1056 |
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
| 1057 |
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
| 1058 |
echo('<li>'); _e('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all_in_one_seo_pack'); echo('</li>');
|
| 1059 |
-
echo('<li>'); _e('%
|
| 1060 |
echo('</ul>');
|
| 1061 |
?>
|
| 1062 |
</div>
|
| 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.4
|
| 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.4";
|
| 32 |
|
| 33 |
/** Max numbers of chars in auto-generated description */
|
| 34 |
var $maximum_description_length = 160;
|
| 156 |
$description = str_replace('%description%', $description, $description_format);
|
| 157 |
$description = str_replace('%blog_title%', get_bloginfo('name'), $description);
|
| 158 |
$description = str_replace('%blog_description%', get_bloginfo('description'), $description);
|
| 159 |
+
$description = str_replace('%wp_title%', $this->get_original_title(), $description);
|
| 160 |
|
| 161 |
$meta_string .= sprintf("<meta name=\"description\" content=\"%s\"/>", $description);
|
| 162 |
}
|
| 253 |
|
| 254 |
// the_search_query() is not suitable, it cannot just return
|
| 255 |
global $s;
|
| 256 |
+
|
| 257 |
$title = null;
|
| 258 |
+
|
| 259 |
if (is_home()) {
|
| 260 |
+
$title = $this->internationalize(wp_title('', false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
} else if (is_single()) {
|
| 262 |
+
$title = $this->internationalize(wp_title('', false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
} else if (is_search() && isset($s) && !empty($s)) {
|
| 264 |
if (function_exists('attribute_escape')) {
|
| 265 |
$search = attribute_escape(stripcslashes($s));
|
| 273 |
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
| 274 |
$title = $category_name;
|
| 275 |
} else if (is_page()) {
|
| 276 |
+
$title = $this->internationalize(wp_title('', false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
} else if (function_exists('is_tag') && is_tag()) {
|
| 278 |
global $utw;
|
| 279 |
if ($utw) {
|
| 280 |
$tags = $utw->GetCurrentTagSet();
|
| 281 |
$tag = $tags[0]->tag;
|
| 282 |
+
$tag = str_replace('-', ' ', $tag);
|
| 283 |
} else {
|
| 284 |
// wordpress > 2.3
|
| 285 |
$tag = $this->internationalize(wp_title('', false));
|
| 288 |
$title = $tag;
|
| 289 |
}
|
| 290 |
} else if (is_archive()) {
|
| 291 |
+
$title = $this->internationalize(wp_title('', false));
|
|
|
|
| 292 |
} else if (is_404()) {
|
| 293 |
+
$title_format = get_option('aiosp_404_title_format');
|
| 294 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
| 295 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
| 296 |
+
$new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
|
| 297 |
+
$new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
|
| 298 |
+
$title = $new_title;
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
return trim($title);
|
| 302 |
}
|
|
|
|
|
|
|
|
|
|
| 303 |
|
| 304 |
+
function rewrite_title($header) {
|
| 305 |
global $wp_query;
|
| 306 |
if (!$wp_query) {
|
| 307 |
$header .= "<!-- no wp_query found! -->\n";
|
| 1033 |
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
| 1034 |
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
| 1035 |
echo('<li>'); _e('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all_in_one_seo_pack'); echo('</li>');
|
| 1036 |
+
echo('<li>'); _e('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack'); echo('</li>');
|
| 1037 |
echo('</ul>');
|
| 1038 |
?>
|
| 1039 |
</div>
|
all_in_one_seo_pack.pot
CHANGED
|
@@ -201,6 +201,6 @@ msgstr ""
|
|
| 201 |
msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional meta tags you want here, even references to stylesheets."
|
| 202 |
msgstr ""
|
| 203 |
|
| 204 |
-
msgid "%
|
| 205 |
msgstr ""
|
| 206 |
|
| 201 |
msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional meta tags you want here, even references to stylesheets."
|
| 202 |
msgstr ""
|
| 203 |
|
| 204 |
+
msgid "%wp_title% - The original wordpress title, e.g. post_title for posts"
|
| 205 |
msgstr ""
|
| 206 |
|
