All in One SEO Pack - Version 1.2.6.1

Version Description

Download this release

Release Info

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

Code changes from version 1.2.6 to 1.2.6.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.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.
@@ -153,8 +153,8 @@ class All_in_One_SEO_Pack {
153
  $len_start = strlen($title_tag_start);
154
  $len_end = strlen($title_tag_end);
155
  $title = stripslashes(trim($title));
156
- $start = stripos($content, "<title>");
157
- $end = stripos($content, "</title>");
158
 
159
  if ($start && $end) {
160
  $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
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.1
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.1";
32
 
33
  /**
34
  * Number of words to be used (max) for generating an excerpt.
153
  $len_start = strlen($title_tag_start);
154
  $len_end = strlen($title_tag_end);
155
  $title = stripslashes(trim($title));
156
+ $start = strpos($content, "<title>");
157
+ $end = strpos($content, "</title>");
158
 
159
  if ($start && $end) {
160
  $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: uberdose
3
  Donate link: http://wp.uberdose.com/contribute/
4
  Tags: post,google,seo,meta,meta keywords,meta description,title
5
  Requires at least: 2.0.2
6
- Tested up to: 2.2
7
  Stable tag: trunk
8
 
9
  Optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
3
  Donate link: http://wp.uberdose.com/contribute/
4
  Tags: post,google,seo,meta,meta keywords,meta description,title
5
  Requires at least: 2.0.2
6
+ Tested up to: 2.3
7
  Stable tag: trunk
8
 
9
  Optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
trunk/all_in_one_seo_pack-he_IL.mo DELETED
Binary file
trunk/all_in_one_seo_pack-he_IL.po DELETED
@@ -1,176 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: all in one seo pack\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-07-03 09:58+0200\n"
6
- "Last-Translator: Hannit Cohen <hannit@gmail.com>\n"
7
- "Language-Team: hannit <webmaster@dakars.info>\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Poedit-Language: Hebrew\n"
12
- "X-Poedit-Country: ISRAEL\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: __;_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
-
18
- #: all_in_one_seo_pack.php:263
19
- #: all_in_one_seo_pack.php:288
20
- msgid "Title:"
21
- msgstr "כותרת דפדפן (Title):"
22
-
23
- #: all_in_one_seo_pack.php:267
24
- #: all_in_one_seo_pack.php:292
25
- msgid "Keywords (comma separated):"
26
- msgstr "מילות מפתח (מופרדות בפסיקים):"
27
-
28
- #: all_in_one_seo_pack.php:284
29
- #, fuzzy
30
- msgid "All in One SEO Pack"
31
- msgstr "All in One SEO"
32
-
33
- #: all_in_one_seo_pack.php:296
34
- msgid "Description:"
35
- msgstr "תיאור:"
36
-
37
- #: all_in_one_seo_pack.php:304
38
- msgid "All in One SEO"
39
- msgstr "All in One SEO"
40
-
41
- #: all_in_one_seo_pack.php:309
42
- msgid "All in One SEO Options Updated."
43
- msgstr "האפשרויות עודכנו"
44
-
45
- #: all_in_one_seo_pack.php:333
46
- msgid "All in One SEO Plugin Options"
47
- msgstr " אפשרויות All in One SEO"
48
-
49
- #: all_in_one_seo_pack.php:335
50
- msgid "<a target=\"_blank\" title=\"All in One SEO Plugin Feedback\" href=\"http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond\">Feedback</a>"
51
- msgstr "<a target=\"_blank\" title=\"All in One SEO Plugin Feedback\" href=\"http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond\">הביעו דעה</a>"
52
-
53
- #: all_in_one_seo_pack.php:336
54
- msgid "<a target=\"_blank\" title=\"All in One SEO Plugin Help\" href=\"http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/\">Help</a>"
55
- msgstr "<a target=\"_blank\" title=\"All in One SEO Plugin Help\" href=\"http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/\">עזרה</a>"
56
-
57
- #: all_in_one_seo_pack.php:342
58
- msgid "Help for Option Home Title"
59
- msgstr "עזרה לאפשרות כותרת דף הבית"
60
-
61
- #: all_in_one_seo_pack.php:343
62
- msgid "Home Title:"
63
- msgstr "כותרת דף הבית (title):"
64
-
65
- #: all_in_one_seo_pack.php:352
66
- msgid "Help for Option Home Description"
67
- msgstr "עזרה לאפשרות תיאור דף הבית"
68
-
69
- #: all_in_one_seo_pack.php:353
70
- msgid "Home Description:"
71
- msgstr "תיאור דף הבית:"
72
-
73
- #: all_in_one_seo_pack.php:362
74
- msgid "Help for Option Home Keywords"
75
- msgstr "עזרה לאפשרות מילות מפתח בדף הבית"
76
-
77
- #: all_in_one_seo_pack.php:363
78
- msgid "Home Keywords (comma separated):"
79
- msgstr "תגיות מפתח לדף הבית (מופרדות בפסיקים):"
80
-
81
- #: all_in_one_seo_pack.php:372
82
- msgid "Help for Option Rewrite Titles"
83
- msgstr "עזרה לאפשרות שכתוב כותרות"
84
-
85
- #: all_in_one_seo_pack.php:373
86
- msgid "Rewrite Titles:"
87
- msgstr "שכתוב כותרות:"
88
-
89
- #: all_in_one_seo_pack.php:382
90
- msgid "Help for Option Categories for META keywords"
91
- msgstr "עזרה לאפשרות קטגוריות בתור תגיות מטא"
92
-
93
- #: all_in_one_seo_pack.php:383
94
- msgid "Use Categories for META keywords:"
95
- msgstr "שימוש בקטגוריות עבור תגיות מפתח:"
96
-
97
- #: all_in_one_seo_pack.php:391
98
- msgid "Help for Option Category Description as Title"
99
- msgstr "עזרה לאפשרות תאור קטגוריות בתור כותרת"
100
-
101
- #: all_in_one_seo_pack.php:392
102
- msgid "Use Category Description as Title:"
103
- msgstr "שימוש בתיאור הקטגוריות ככותרת:"
104
-
105
- #: all_in_one_seo_pack.php:401
106
- msgid "Help for Option noindex for Categories"
107
- msgstr "עזרה לאפרות ביטול אינדוקס קטגוריות"
108
-
109
- #: all_in_one_seo_pack.php:402
110
- msgid "Use noindex for Categories:"
111
- msgstr "לא לאנדקס את דפי הקטגוריות:"
112
-
113
- #: all_in_one_seo_pack.php:411
114
- msgid "Help for Option noindex for Archives"
115
- msgstr "עזרה לאפשרות ביטול אינדוקס ארכיון"
116
-
117
- #: all_in_one_seo_pack.php:412
118
- msgid "Use noindex for Archives:"
119
- msgstr "לא לאנדקס את דפי הארכיון:"
120
-
121
- #: all_in_one_seo_pack.php:421
122
- msgid "Help for Autogenerate Descriptions"
123
- msgstr "עזרה לאפשרות יצירת תיאור אוטומטי"
124
-
125
- #: all_in_one_seo_pack.php:422
126
- msgid "Autogenerate Descriptions:"
127
- msgstr "ייצור תיאור אוטומטי:"
128
-
129
- #: all_in_one_seo_pack.php:431
130
- msgid "Help for Option Max Number of Words in Auto-Generated Descriptions"
131
- msgstr "עזרה לאפשרות מספר מקסימלי של מילים בתיאור אוטומטי"
132
-
133
- #: all_in_one_seo_pack.php:432
134
- msgid "Max Number of Words in Auto-Generated Descriptions:"
135
- msgstr "מספר מילים מקסימלי בתיאור שיוצר אוטומטית:"
136
-
137
- #: all_in_one_seo_pack.php:443
138
- msgid "Update Options"
139
- msgstr "עדכון אפשרויות"
140
-
141
- #: all_in_one_seo_pack.php:453
142
- msgid "All in One SEO Plugin Home Description"
143
- msgstr "תיאור דף הבית"
144
-
145
- #: all_in_one_seo_pack.php:454
146
- msgid "All in One SEO Plugin Home Title"
147
- msgstr "כותרת דף הבית"
148
-
149
- #: all_in_one_seo_pack.php:455
150
- msgid "All in One SEO Plugin Rewrite Titles"
151
- msgstr "שיכתוב כותרות"
152
-
153
- #: all_in_one_seo_pack.php:456
154
- msgid "All in One SEO Plugin Use Categories"
155
- msgstr "שימוש בקטגוריות"
156
-
157
- #: all_in_one_seo_pack.php:457
158
- msgid "All in One SEO Plugin Maximum Number of Words in Auto-Generated Descriptions"
159
- msgstr "מספר מקסימלי של מילים לשימוש בתיאר המיוצר אוטומטית"
160
-
161
- #: all_in_one_seo_pack.php:458
162
- msgid "Use Category Description for Title"
163
- msgstr "שימוש בתיאור הקטגוריות ככותרת"
164
-
165
- #: all_in_one_seo_pack.php:459
166
- msgid "All in One SEO Plugin Noindex for Categories"
167
- msgstr "שימוש ב-noindex לדפי קטגוריות"
168
-
169
- #: all_in_one_seo_pack.php:460
170
- msgid "All in One SEO Plugin Noindex for Archives"
171
- msgstr "שימוש ב-noindex לדפי ארכיון"
172
-
173
- #: all_in_one_seo_pack.php:461
174
- msgid "All in One SEO Plugin Autogenerate Descriptions"
175
- msgstr "ייצור תיאור אוטומטי"
176
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/all_in_one_seo_pack-zh_CN.mo DELETED
Binary file
trunk/all_in_one_seo_pack-zh_CN.po DELETED
@@ -1,193 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: all in one seo pack\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-06-16 01:24-0800\n"
6
- "Last-Translator: 72pines <webmaster@72pines.com>\n"
7
- "Language-Team: 72pines\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Poedit-Language: Chinese\n"
12
- "X-Poedit-Country: CHINA\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: __;_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
-
18
- #: all_in_one_seo_pack.php:263
19
- #: all_in_one_seo_pack.php:288
20
- msgid "Title:"
21
- msgstr "标题: "
22
-
23
- #: all_in_one_seo_pack.php:267
24
- #: all_in_one_seo_pack.php:292
25
- msgid "Keywords (comma separated):"
26
- msgstr "关键词 (半角的逗号分开)"
27
-
28
- #: all_in_one_seo_pack.php:284
29
- #, fuzzy
30
- msgid "All in One SEO Pack"
31
- msgstr "All in One SEO"
32
-
33
- #: all_in_one_seo_pack.php:296
34
- msgid "Description:"
35
- msgstr "站点描述: "
36
-
37
- #: all_in_one_seo_pack.php:304
38
- msgid "All in One SEO"
39
- msgstr "All in One SEO"
40
-
41
- #: all_in_one_seo_pack.php:309
42
- msgid "All in One SEO Options Updated."
43
- msgstr "更新选项成功。"
44
-
45
- #: all_in_one_seo_pack.php:333
46
- msgid "All in One SEO Plugin Options"
47
- msgstr "All in One SEO 选项"
48
-
49
- #: all_in_one_seo_pack.php:335
50
- msgid "<a target=\"_blank\" title=\"All in One SEO Plugin Feedback\" href=\"http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond\">Feedback</a>"
51
- msgstr "<a target=\"_blank\" title=\"All in One SEO Plugin Feedback\" href=\"http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond\">反馈意见</a>"
52
-
53
- #: all_in_one_seo_pack.php:336
54
- msgid "<a target=\"_blank\" title=\"All in One SEO Plugin Help\" href=\"http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/\">Help</a>"
55
- msgstr "<a target=\"_blank\" title=\"All in One SEO Plugin Help\" href=\"http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/\">帮助文档</a>"
56
-
57
- #: all_in_one_seo_pack.php:342
58
- msgid "Help for Option Home Title"
59
- msgstr "首页标题选项的帮助"
60
-
61
- #: all_in_one_seo_pack.php:343
62
- msgid "Home Title:"
63
- msgstr "首页标题: "
64
-
65
- #: all_in_one_seo_pack.php:352
66
- #, fuzzy
67
- msgid "Help for Option Home Description"
68
- msgstr "首页描述: "
69
-
70
- #: all_in_one_seo_pack.php:353
71
- msgid "Home Description:"
72
- msgstr "首页描述: "
73
-
74
- #: all_in_one_seo_pack.php:362
75
- msgid "Help for Option Home Keywords"
76
- msgstr "首页关键词选项的帮助"
77
-
78
- #: all_in_one_seo_pack.php:363
79
- msgid "Home Keywords (comma separated):"
80
- msgstr "首页关键词 (半角的逗号分开)"
81
-
82
- #: all_in_one_seo_pack.php:372
83
- #, fuzzy
84
- msgid "Help for Option Rewrite Titles"
85
- msgstr "是否对所有文章使用 “标题名 | 博客名” 的优化格式: "
86
-
87
- #: all_in_one_seo_pack.php:373
88
- msgid "Rewrite Titles:"
89
- msgstr "是否对所有文章使用 “标题名 | 博客名” 的优化格式: "
90
-
91
- #: all_in_one_seo_pack.php:382
92
- #, fuzzy
93
- msgid "Help for Option Categories for META keywords"
94
- msgstr "使用分类名作为关键字: "
95
-
96
- #: all_in_one_seo_pack.php:383
97
- msgid "Use Categories for META keywords:"
98
- msgstr "使用分类名作为关键字: "
99
-
100
- #: all_in_one_seo_pack.php:391
101
- #, fuzzy
102
- msgid "Help for Option Category Description as Title"
103
- msgstr "使用分类描述作为标题: "
104
-
105
- #: all_in_one_seo_pack.php:392
106
- msgid "Use Category Description as Title:"
107
- msgstr "使用分类描述作为标题: "
108
-
109
- #: all_in_one_seo_pack.php:401
110
- #, fuzzy
111
- msgid "Help for Option noindex for Categories"
112
- msgstr "不让搜索引擎抓取分类页:"
113
-
114
- #: all_in_one_seo_pack.php:402
115
- msgid "Use noindex for Categories:"
116
- msgstr "不让搜索引擎抓取分类页:"
117
-
118
- #: all_in_one_seo_pack.php:411
119
- #, fuzzy
120
- msgid "Help for Option noindex for Archives"
121
- msgstr "不让搜索引擎抓取档案页:"
122
-
123
- #: all_in_one_seo_pack.php:412
124
- msgid "Use noindex for Archives:"
125
- msgstr "不让搜索引擎抓取档案页:"
126
-
127
- #: all_in_one_seo_pack.php:421
128
- #, fuzzy
129
- msgid "Help for Autogenerate Descriptions"
130
- msgstr "自动生成文章描述: "
131
-
132
- #: all_in_one_seo_pack.php:422
133
- msgid "Autogenerate Descriptions:"
134
- msgstr "自动生成文章描述: "
135
-
136
- #: all_in_one_seo_pack.php:431
137
- #, fuzzy
138
- msgid "Help for Option Max Number of Words in Auto-Generated Descriptions"
139
- msgstr "自动生成文章描述时的字数限制: "
140
-
141
- #: all_in_one_seo_pack.php:432
142
- msgid "Max Number of Words in Auto-Generated Descriptions:"
143
- msgstr "自动生成文章描述时的字数限制: "
144
-
145
- #: all_in_one_seo_pack.php:443
146
- msgid "Update Options"
147
- msgstr "更新选项"
148
-
149
- #: all_in_one_seo_pack.php:453
150
- #, fuzzy
151
- msgid "All in One SEO Plugin Home Description"
152
- msgstr "All in One SEO 选项"
153
-
154
- #: all_in_one_seo_pack.php:454
155
- #, fuzzy
156
- msgid "All in One SEO Plugin Home Title"
157
- msgstr "All in One SEO 选项"
158
-
159
- #: all_in_one_seo_pack.php:455
160
- #, fuzzy
161
- msgid "All in One SEO Plugin Rewrite Titles"
162
- msgstr "All in One SEO 选项"
163
-
164
- #: all_in_one_seo_pack.php:456
165
- #, fuzzy
166
- msgid "All in One SEO Plugin Use Categories"
167
- msgstr "All in One SEO 选项"
168
-
169
- #: all_in_one_seo_pack.php:457
170
- #, fuzzy
171
- msgid "All in One SEO Plugin Maximum Number of Words in Auto-Generated Descriptions"
172
- msgstr "自动生成文章描述时的字数限制: "
173
-
174
- #: all_in_one_seo_pack.php:458
175
- #, fuzzy
176
- msgid "Use Category Description for Title"
177
- msgstr "使用分类描述作为标题: "
178
-
179
- #: all_in_one_seo_pack.php:459
180
- #, fuzzy
181
- msgid "All in One SEO Plugin Noindex for Categories"
182
- msgstr "All in One SEO 选项"
183
-
184
- #: all_in_one_seo_pack.php:460
185
- #, fuzzy
186
- msgid "All in One SEO Plugin Noindex for Archives"
187
- msgstr "All in One SEO 选项"
188
-
189
- #: all_in_one_seo_pack.php:461
190
- #, fuzzy
191
- msgid "All in One SEO Plugin Autogenerate Descriptions"
192
- msgstr "All in One SEO 选项"
193
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/all_in_one_seo_pack.php DELETED
@@ -1,690 +0,0 @@
1
- <?php
2
-
3
- /*
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
- */
11
-
12
- /*
13
- Copyright (C) 2007 uberdose (seopack AT uberdose DOT com)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
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.
35
- */
36
- var $maximum_excerpt_length = 25;
37
-
38
- /**
39
- * Minimum number of chars an excerpt should be so that it can be used
40
- * as description. Touch only if you know what you're doing.
41
- */
42
- var $minimum_excerpt_length = 1;
43
-
44
- var $table_prefix = "aiosp_";
45
-
46
- var $table_categries;
47
-
48
- var $db_version = '0.1';
49
-
50
- function template_redirect() {
51
- if (is_feed()) {
52
- return;
53
- }
54
-
55
- if (get_option('aiosp_max_words_excerpt') && is_numeric(get_option('aiosp_max_words_excerpt'))) {
56
- $this->maximum_excerpt_length = get_option('aiosp_max_words_excerpt');
57
- }
58
- if (get_option('aiosp_rewrite_titles')) {
59
- ob_start(array($this, 'output_callback_for_title'));
60
- }
61
- }
62
-
63
- function output_callback_for_title($content) {
64
- return $this->rewrite_title($content);
65
- }
66
-
67
- function init() {
68
- if(function_exists('load_plugin_textdomain')) {
69
- load_plugin_textdomain('all_in_one_seo_pack', 'wp-content/plugins/all-in-one-seo-pack');
70
- }
71
- //$this->db_install();
72
- }
73
-
74
- function wp_head() {
75
- if (is_feed()) {
76
- return;
77
- }
78
- if (get_option('aiosp_rewrite_titles')) {
79
- // make the title rewrite as short as possible
80
- $active_handlers = ob_list_handlers();
81
- if (sizeof($active_handlers) > 0 && $active_handlers[sizeof($active_handlers) - 1] == 'All_in_One_SEO_Pack::output_callback_for_title') {
82
- // if we don't land here there *could* be trouble with another plugin :(
83
- ob_end_flush();
84
- }
85
- }
86
-
87
- global $wp_query;
88
- $post = $wp_query->get_queried_object();
89
-
90
- $meta_string = null;
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
- $description = trim(stripslashes(get_post_meta($post->ID, "description", true)));
102
- if (!$description) {
103
- $description = $this->trim_excerpt_without_filters_full_length($post->post_excerpt);
104
- if (!$description && get_option("aiosp_generate_descriptions")) {
105
- $description = $this->trim_excerpt_without_filters($post->post_content);
106
- }
107
- }
108
- } else if (is_home()) {
109
- $description = trim(stripslashes(get_option('aiosp_home_description')));
110
- } else if (is_category()) {
111
- $description = category_description();
112
- }
113
-
114
- if (isset($description) && strlen($description) > $this->minimum_excerpt_length) {
115
- $description = str_replace('"', '', $description);
116
-
117
- // replace newlines on mac / windows?
118
- $description = str_replace("\r\n", ' ', $description);
119
-
120
- // maybe linux uses this alone
121
- $description = str_replace("\n", ' ', $description);
122
-
123
- if (isset($meta_string)) {
124
- $meta_string .= "\n";
125
- }
126
- $meta_string .= sprintf("<meta name=\"description\" content=\"%s\"/>", $description);
127
- }
128
-
129
- if (isset ($keywords) && !empty($keywords)) {
130
- if (isset($meta_string)) {
131
- $meta_string .= "\n";
132
- }
133
- $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\"/>", $keywords);
134
- }
135
-
136
- if((is_category() && get_option('aiosp_category_noindex')) ||
137
- (!is_category() && is_archive() && get_option('aiosp_archive_noindex')) ||
138
- (get_option('aiosp_tags_noindex') && function_exists('is_tag') && is_tag())) {
139
- if (isset($meta_string)) {
140
- $meta_string .= "\n";
141
- }
142
- $meta_string = '<meta name="robots" content="noindex,follow" />';
143
- }
144
-
145
- if ($meta_string != null) {
146
- echo "$meta_string\n";
147
- }
148
- }
149
-
150
- function replace_title($content, $title) {
151
- $title_tag_start = "<title>";
152
- $title_tag_end = "</title>";
153
- $len_start = strlen($title_tag_start);
154
- $len_end = strlen($title_tag_end);
155
- $title = stripslashes(trim($title));
156
- $start = stripos($content, "<title>");
157
- $end = stripos($content, "</title>");
158
-
159
- if ($start && $end) {
160
- $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
161
- } else {
162
- $header = $content . "<title>$title</title>";
163
- }
164
-
165
- return $header;
166
- }
167
-
168
- function rewrite_title($header) {
169
- global $wp_query;
170
- if (!$wp_query) {
171
- $header .= "<!-- no wp_query found! -->\n";
172
- return $header;
173
- }
174
-
175
- $post = $wp_query->get_queried_object();
176
-
177
- // the_search_query() is not suitable, it cannot just return
178
- global $s;
179
-
180
- if (is_home()) {
181
- if (get_option('aiosp_home_title')) {
182
- $header = $this->replace_title($header, get_option('aiosp_home_title'));
183
- }
184
- } else if (is_single()) {
185
- $title = get_post_meta($post->ID, "title", true);
186
- if (!$title) {
187
- $title = wp_title('', false);
188
- }
189
- $title_format = get_option('aiosp_post_title_format');
190
- $new_title = str_replace('%blog_title%', get_bloginfo('name'), $title_format);
191
- $new_title = str_replace('%post_title%', $title, $new_title);
192
- $title = $new_title;
193
- $title = trim($title);
194
- $header = $this->replace_title($header, $title);
195
- } else if (is_search() && isset($s) && !empty($s)) {
196
- if (function_exists('attribute_escape')) {
197
- $title = attribute_escape(stripslashes($s));
198
- } else {
199
- $title = wp_specialchars(stripslashes($s), true);
200
- }
201
- $header = $this->replace_title($header, $title);
202
- } else if (is_category() && !is_feed()) {
203
- $category_name = ucwords(single_cat_title('', false));
204
- $title_format = get_option('aiosp_category_title_format');
205
- $title = str_replace('%category_title%', $category_name, $title_format);
206
- $title = str_replace('%blog_title%', get_bloginfo('name'), $title);
207
- $header = $this->replace_title($header, $title);
208
- } else if (is_page()) {
209
- $title = get_post_meta($post->ID, "title", true);
210
- if (!$title) {
211
- $title = wp_title('', false);
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 = $new_title;
217
- $title = trim($title);
218
- $header = $this->replace_title($header, $title);
219
- } else if (function_exists('is_tag') && is_tag()) {
220
- global $utw;
221
- if ($utw) {
222
- $tags = $utw->GetCurrentTagSet();
223
- $tag = $tags[0]->tag;
224
- $header = $this->replace_title($header, $tag);
225
- }
226
- }
227
-
228
- return $header;
229
-
230
- }
231
-
232
- function trim_excerpt_without_filters($text) {
233
- $text = str_replace(']]>', ']]&gt;', $text);
234
- $text = strip_tags($text);
235
- $excerpt_length = $this->maximum_excerpt_length;
236
- $words = explode(' ', $text, $excerpt_length + 1);
237
- if (count($words) > $excerpt_length) {
238
- array_pop($words);
239
- array_push($words, '...');
240
- $text = implode(' ', $words);
241
- }
242
- return trim(stripslashes($text));
243
- }
244
-
245
- function trim_excerpt_without_filters_full_length($text) {
246
- $text = str_replace(']]>', ']]&gt;', $text);
247
- $text = strip_tags($text);
248
- $excerpt_length = $this->maximum_excerpt_length;
249
- $words = explode(' ', $text, $excerpt_length + 1);
250
- return trim(stripslashes($text));
251
- }
252
-
253
- /**
254
- * @return comma-separated list of unique keywords
255
- */
256
- function get_all_keywords() {
257
- global $posts;
258
-
259
- $keywords = array();
260
- if (is_array($posts)) {
261
- foreach ($posts as $post) {
262
- if ($post) {
263
- if (get_option('aiosp_use_categories') && !is_page()) {
264
- $categories = get_the_category($post->ID);
265
- foreach ($categories as $category) {
266
- $keywords[] = $category->cat_name;
267
- }
268
- }
269
-
270
- // Ultimate Tag Warrior integration
271
- global $utw;
272
- if ($utw) {
273
- $tags = $utw->GetTagsForPost($post);
274
- foreach ($tags as $tag) {
275
- $tag = $tag->tag;
276
- $tag = str_replace('_',' ', $tag);
277
- $tag = str_replace('-',' ',$tag);
278
- $tag = stripslashes($tag);
279
- $keywords[] = $tag;
280
- }
281
- }
282
-
283
- // WP 2.3 tags
284
- if (function_exists('get_tags')) {
285
- $tags = get_tags();
286
- foreach ($tags as $tag) {
287
- $keywords[] = $tag->name;
288
- }
289
- }
290
-
291
- $keywords_a = $keywords_i = null;
292
- $description_a = $description_i = null;
293
- $id = $post->ID;
294
- $keywords_i = stripslashes(get_post_meta($post->ID, "keywords", true));
295
- if (isset($keywords_i) && !empty($keywords_i)) {
296
- $keywords[] = $keywords_i;
297
- }
298
- }
299
- }
300
- }
301
-
302
- return $this->get_unique_keywords($keywords);
303
- }
304
-
305
- function db_install() {
306
- global $wpdb;
307
- $this->table_categories = $wpdb->prefix . $this->table_prefix . "categories";
308
- if(get_option('aiosp_db_version') != $this->db_version) {
309
- $sql = "CREATE TABLE $this->table_categories (
310
- ID bigint(20) NOT NULL auto_increment,
311
- category_id bigint(20) NOT NULL default '0',
312
- meta_title text NOT NULL,
313
- meta_description text NOT NULL,
314
- meta_keywords text NOT NULL,
315
- PRIMARY KEY (ID),
316
- KEY category_id (category_id));";
317
-
318
- require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
319
- dbDelta($sql);
320
- update_option('aiosp_db_version', $this->db_version);
321
- }
322
- }
323
-
324
- function get_unique_keywords($keywords) {
325
- $keywords_ar = array_unique($keywords);
326
- return implode(',', $keywords_ar);
327
- }
328
-
329
- function post_meta_tags($id) {
330
- $awmp_edit = $_POST["aiosp_edit"];
331
- if (isset($awmp_edit) && !empty($awmp_edit)) {
332
- $keywords = $_POST["aiosp_keywords"];
333
- $description = $_POST["aiosp_description"];
334
- $title = $_POST["aiosp_title"];
335
-
336
- delete_post_meta($id, 'keywords');
337
- delete_post_meta($id, 'description');
338
- delete_post_meta($id, 'title');
339
-
340
- if (isset($keywords) && !empty($keywords)) {
341
- add_post_meta($id, 'keywords', $keywords);
342
- }
343
- if (isset($description) && !empty($description)) {
344
- add_post_meta($id, 'description', $description);
345
- }
346
- if (isset($title) && !empty($title)) {
347
- add_post_meta($id, 'title', $title);
348
- }
349
- }
350
- }
351
-
352
- function edit_category($id) {
353
- global $wpdb;
354
- $id = $wpdb->escape($id);
355
- $awmp_edit = $_POST["aiosp_edit"];
356
- if (isset($awmp_edit) && !empty($awmp_edit)) {
357
- $keywords = $wpdb->escape($_POST["aiosp_keywords"]);
358
- $title = $wpdb->escape($_POST["aiosp_title"]);
359
- $old_category = $wpdb->get_row("select * from $this->table_categories where category_id=$id", OBJECT);
360
- if ($old_category) {
361
- $wpdb->query("update $this->table_categories
362
- set meta_title='$title', meta_keywords='$keywords'
363
- where category_id=$id");
364
- } else {
365
- $wpdb->query("insert into $this->table_categories(meta_title, meta_keywords, category_id)
366
- values ('$title', '$keywords', $id");
367
- }
368
- //$wpdb->query("insert into $this->table_categories")
369
- /*
370
- delete_post_meta($id, 'keywords');
371
- delete_post_meta($id, 'description');
372
- delete_post_meta($id, 'title');
373
-
374
- if (isset($keywords) && !empty($keywords)) {
375
- add_post_meta($id, 'keywords', $keywords);
376
- }
377
- if (isset($description) && !empty($description)) {
378
- add_post_meta($id, 'description', $description);
379
- }
380
- if (isset($title) && !empty($title)) {
381
- add_post_meta($id, 'title', $title);
382
- }
383
- */
384
- }
385
- }
386
-
387
- function edit_category_form() {
388
- global $post;
389
- $keywords = stripslashes(get_post_meta($post->ID, 'keywords', true));
390
- $title = stripslashes(get_post_meta($post->ID, 'title', true));
391
- $description = stripslashes(get_post_meta($post->ID, 'description', true));
392
- ?>
393
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
394
- <table class="editform" width="100%" cellspacing="2" cellpadding="5">
395
- <tr>
396
- <th width="33%" scope="row" valign="top">
397
- <a href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/">All in One SEO Pack</a>
398
- </th>
399
- </tr>
400
- <tr>
401
- <th width="33%" scope="row" valign="top"><label for="aiosp_title"><?php _e('Title:', 'all_in_one_seo_pack') ?></label></th>
402
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="70"/></td>
403
- </tr>
404
- <tr>
405
- <th width="33%" scope="row" valign="top"><label for="aiosp_keywords"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></label></th>
406
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="70"/></td>
407
- </tr>
408
- </table>
409
- <?php
410
- }
411
-
412
- function add_meta_tags_textinput() {
413
- global $post;
414
- $keywords = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'keywords', true)));
415
- $title = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'title', true)));
416
- $description = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'description', true)));
417
- ?>
418
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
419
- <table style="margin-bottom:40px; margin-top:30px;">
420
- <tr>
421
- <th style="text-align:left;" colspan="2">
422
- <a href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/">All in One SEO Pack</a>
423
- </th>
424
- </tr>
425
- <tr>
426
- <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
427
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="80"/></td>
428
- </tr>
429
- <tr>
430
- <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
431
- <td><textarea name="aiosp_description" rows="1" cols="78"><?php echo $description ?></textarea></td>
432
- </tr>
433
- <tr>
434
- <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
435
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="80"/></td>
436
- </tr>
437
- </table>
438
- <?php
439
- }
440
-
441
- function add_meta_tags_page_textinput() {
442
- global $post;
443
- $keywords = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'keywords', true)));
444
- $description = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'description', true)));
445
- $title = htmlspecialchars(stripslashes(get_post_meta($post->ID, 'title', true)));
446
- ?>
447
- <input value="aiosp_edit" type="hidden" name="aiosp_edit"/>
448
- <table style="margin-bottom:40px; margin-top:30px;">
449
- <tr>
450
- <th style="text-align:left;" colspan="2">
451
- <a href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack')?></a>
452
- </th>
453
- </tr>
454
- <tr>
455
- <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
456
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="80" tabindex="1000"/></td>
457
- </tr>
458
- <tr>
459
- <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
460
- <td><textarea name="aiosp_description" rows="1" cols="78" tabindex="1001"><?php echo $description ?></textarea></td>
461
- </tr>
462
- <tr>
463
- <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
464
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="80" tabindex="1002"/></td>
465
- </tr>
466
- </table>
467
- <?php
468
- }
469
-
470
- function admin_menu() {
471
- 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'));
472
- }
473
-
474
- function plugin_menu() {
475
- $message = null;
476
- $message_updated = __("All in One SEO Options Updated.");
477
-
478
- // update options
479
- if ($_POST['action'] && $_POST['action'] == 'aiosp_update') {
480
- $message = $message_updated;
481
- update_option('aiosp_home_title', $_POST['aiosp_home_title']);
482
- update_option('aiosp_home_description', $_POST['aiosp_home_description']);
483
- update_option('aiosp_home_keywords', $_POST['aiosp_home_keywords']);
484
- update_option('aiosp_max_words_excerpt', $_POST['aiosp_max_words_excerpt']);
485
- update_option('aiosp_rewrite_titles', $_POST['aiosp_rewrite_titles']);
486
- update_option('aiosp_post_title_format', $_POST['aiosp_post_title_format']);
487
- update_option('aiosp_page_title_format', $_POST['aiosp_page_title_format']);
488
- update_option('aiosp_category_title_format', $_POST['aiosp_category_title_format']);
489
- update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
490
- update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
491
- update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
492
- update_option('aiosp_tags_noindex', $_POST['aiosp_tags_noindex']);
493
- update_option('aiosp_generate_descriptions', $_POST['aiosp_generate_descriptions']);
494
- wp_cache_flush();
495
- }
496
-
497
- ?>
498
- <?php if ($message) : ?>
499
- <div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
500
- <?php endif; ?>
501
- <div id="dropmessage" class="updated" style="display:none;"></div>
502
- <div class="wrap">
503
- <h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
504
- <p>
505
- <?php _e("This is version $this->version. " .
506
- '<a target="_blank" title="All in One SEO Plugin Release History" href="http://wp.uberdose.com/2007/07/27/all-in-one-seo-pack-release-history/">Should I upgrade?</a>', 'all_in_one_seo_pack') ?>
507
- </p>
508
- <p>
509
- <?php _e('<a target="_blank" title="All in One SEO Plugin Help" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/">Help</a>', 'all_in_one_seo_pack') ?>
510
- | <?php _e('<a target="_blank" title="FAQ" href="http://wp.uberdose.com/2007/07/11/all-in-one-seo-pack-faq/">FAQ</a>', 'all_in_one_seo_pack') ?>
511
- | <?php _e('<a target="_blank" title="All in One SEO Plugin Feedback" href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/#respond">Feedback</a>', 'all_in_one_seo_pack') ?>
512
- </p>
513
- <form name="dofollow" action="" method="post">
514
- <table>
515
- <tr>
516
- <th scope="row" style="text-align:right; vertical-align:top;">
517
- <a target="_blank" title="<?php _e('Help for Option Home Title', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#hometitle">
518
- <?php _e('Home Title:', 'all_in_one_seo_pack')?>
519
- </a>
520
- </td>
521
- <td>
522
- <textarea cols="60" rows="2" name="aiosp_home_title"><?php echo stripcslashes(get_option('aiosp_home_title')); ?></textarea>
523
- </td>
524
- </tr>
525
- <tr>
526
- <th scope="row" style="text-align:right; vertical-align:top;">
527
- <a target="_blank" title="<?php _e('Help for Option Home Description', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#homedescription">
528
- <?php _e('Home Description:', 'all_in_one_seo_pack')?>
529
- </a>
530
- </td>
531
- <td>
532
- <textarea cols="60" rows="2" name="aiosp_home_description"><?php echo stripcslashes(get_option('aiosp_home_description')); ?></textarea>
533
- </td>
534
- </tr>
535
- <tr>
536
- <th scope="row" style="text-align:right; vertical-align:top;">
537
- <a target="_blank" title="<?php _e('Help for Option Home Keywords', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#homekeywords">
538
- <?php _e('Home Keywords (comma separated):', 'all_in_one_seo_pack')?>
539
- </a>
540
- </td>
541
- <td>
542
- <textarea cols="60" rows="2" name="aiosp_home_keywords"><?php echo stripcslashes(get_option('aiosp_home_keywords')); ?></textarea>
543
- </td>
544
- </tr>
545
- <tr>
546
- <th scope="row" style="text-align:right; vertical-align:top;">
547
- <a target="_blank" title="<?php _e('Help for Option Rewrite Titles', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#rewritetitles">
548
- <?php _e('Rewrite Titles:', 'all_in_one_seo_pack')?>
549
- </a>
550
- </td>
551
- <td>
552
- <input type="checkbox" name="aiosp_rewrite_titles" <?php if (get_option('aiosp_rewrite_titles')) echo "checked=\"1\""; ?>/>
553
- </td>
554
- </tr>
555
- <tr>
556
- <th scope="row" style="text-align:right; vertical-align:top;">
557
- <a target="_blank" title="<?php _e('Help for Post Title Format', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#posttitleformat">
558
- <?php _e('Post Title Format:', 'all_in_one_seo_pack')?>
559
- </a>
560
- </td>
561
- <td>
562
- <input size="59" name="aiosp_post_title_format" value="<?php echo stripcslashes(get_option('aiosp_post_title_format')); ?>"/>
563
- </td>
564
- </tr>
565
- <tr>
566
- <th scope="row" style="text-align:right; vertical-align:top;">
567
- <a target="_blank" title="<?php _e('Help for Page Title Format', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#pagetitleformat">
568
- <?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
569
- </a>
570
- </td>
571
- <td>
572
- <input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes(get_option('aiosp_page_title_format')); ?>"/>
573
- </td>
574
- </tr>
575
- <tr>
576
- <th scope="row" style="text-align:right; vertical-align:top;">
577
- <a target="_blank" title="<?php _e('Help for Category Title Format', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#categorytitleformat">
578
- <?php _e('Category Title Format:', 'all_in_one_seo_pack')?>
579
- </a>
580
- </td>
581
- <td>
582
- <input size="59" name="aiosp_category_title_format" value="<?php echo stripcslashes(get_option('aiosp_category_title_format')); ?>"/>
583
- </td>
584
- </tr>
585
- <tr>
586
- <th scope="row" style="text-align:right; vertical-align:top;">
587
- <a target="_blank" title="<?php _e('Help for Option Categories for META keywords', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#categorymetakeywords">
588
- <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
589
- </td>
590
- <td>
591
- <input type="checkbox" name="aiosp_use_categories" <?php if (get_option('aiosp_use_categories')) echo "checked=\"1\""; ?>/>
592
- </td>
593
- </tr>
594
- <tr>
595
- <th scope="row" style="text-align:right; vertical-align:top;">
596
- <a target="_blank" title="<?php _e('Help for Option noindex for Categories', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#usenoindexforcategories">
597
- <?php _e('Use noindex for Categories:', 'all_in_one_seo_pack')?>
598
- </a>
599
- </td>
600
- <td>
601
- <input type="checkbox" name="aiosp_category_noindex" <?php if (get_option('aiosp_category_noindex')) echo "checked=\"1\""; ?>/>
602
- </td>
603
- </tr>
604
- <tr>
605
- <th scope="row" style="text-align:right; vertical-align:top;">
606
- <a target="_blank" title="<?php _e('Help for Option noindex for Archives', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#usenoindexforarchives">
607
- <?php _e('Use noindex for Archives:', 'all_in_one_seo_pack')?>
608
- </a>
609
- </td>
610
- <td>
611
- <input type="checkbox" name="aiosp_archive_noindex" <?php if (get_option('aiosp_archive_noindex')) echo "checked=\"1\""; ?>/>
612
- </td>
613
- </tr>
614
- <tr>
615
- <th scope="row" style="text-align:right; vertical-align:top;">
616
- <a target="_blank" title="<?php _e('Help for Option noindex for Tag Archives', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#usenoindexfortagarchives">
617
- <?php _e('Use noindex for Tag Archives:', 'all_in_one_seo_pack')?>
618
- </a>
619
- </td>
620
- <td>
621
- <input type="checkbox" name="aiosp_tags_noindex" <?php if (get_option('aiosp_tags_noindex')) echo "checked=\"1\""; ?>/>
622
- </td>
623
- </tr>
624
- <tr>
625
- <th scope="row" style="text-align:right; vertical-align:top;">
626
- <a target="_blank" title="<?php _e('Help for Autogenerate Descriptions', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#autogeneratedescriptions">
627
- <?php _e('Autogenerate Descriptions:', 'all_in_one_seo_pack')?>
628
- </a>
629
- </td>
630
- <td>
631
- <input type="checkbox" name="aiosp_generate_descriptions" <?php if (get_option('aiosp_generate_descriptions')) echo "checked=\"1\""; ?>/>
632
- </td>
633
- </tr>
634
- <tr>
635
- <th scope="row" style="text-align:right; vertical-align:top;">
636
- <a target="_blank" title="<?php _e('Help for Option Max Number of Words in Auto-Generated Descriptions', 'all_in_one_seo_pack')?>" href="http://wp.uberdose.com/2007/05/11/all-in-one-seo-pack-help/#maxwordsdescription">
637
- <?php _e('Max Number of Words in Auto-Generated Descriptions:', 'all_in_one_seo_pack')?>
638
- </a>
639
- </td>
640
- <td>
641
- <input size="5" name="aiosp_max_words_excerpt" value="<?php echo stripcslashes(get_option('aiosp_max_words_excerpt')); ?>"/>
642
- </td>
643
- </tr>
644
- </table>
645
- <p class="submit">
646
- <input type="hidden" name="action" value="aiosp_update" />
647
- <input type="hidden" name="page_options" value="aiosp_home_description" />
648
- <input type="submit" name="Submit" value="<?php _e('Update Options')?> &raquo;" />
649
- </p>
650
- </form>
651
- </div>
652
- <?php
653
-
654
- } // plugin_menu
655
-
656
- }
657
-
658
- add_option("aiosp_home_description", null, __('All in One SEO Plugin Home Description', 'all_in_one_seo_pack'), 'yes');
659
- add_option("aiosp_home_title", null, __('All in One SEO Plugin Home Title', 'all_in_one_seo_pack'), 'yes');
660
- add_option("aiosp_rewrite_titles", 1, __('All in One SEO Plugin Rewrite Titles', 'all_in_one_seo_pack'), 'yes');
661
- add_option("aiosp_use_categories", 1, __('All in One SEO Plugin Use Categories', 'all_in_one_seo_pack'), 'yes');
662
- add_option("aiosp_max_words_excerpt", 25, __('All in One SEO Plugin Maximum Number of Words in Auto-Generated Descriptions', 'all_in_one_seo_pack'), 'yes');
663
- add_option("aiosp_category_noindex", 1, __('All in One SEO Plugin Noindex for Categories', 'all_in_one_seo_pack'), 'yes');
664
- add_option("aiosp_archive_noindex", 1, __('All in One SEO Plugin Noindex for Archives', 'all_in_one_seo_pack'), 'yes');
665
- add_option("aiosp_tags_noindex", 1, __('All in One SEO Plugin Noindex for Tag Archives', 'all_in_one_seo_pack'), 'yes');
666
- add_option("aiosp_generate_descriptions", 0, __('All in One SEO Plugin Autogenerate Descriptions', 'all_in_one_seo_pack'), 'yes');
667
- add_option("aiosp_post_title_format", '%post_title% | %blog_title%', __('All in One SEO Plugin Post Title Format', 'all_in_one_seo_pack'), 'yes');
668
- add_option("aiosp_page_title_format", '%page_title% | %blog_title%', __('All in One SEO Plugin Page Title Format', 'all_in_one_seo_pack'), 'yes');
669
- add_option("aiosp_category_title_format", '%category_title% | %blog_title%', __('All in One SEO Plugin Category Title Format', 'all_in_one_seo_pack'), 'yes');
670
-
671
- $aiosp = new All_in_One_SEO_Pack();
672
- add_action('wp_head', array($aiosp, 'wp_head'));
673
- add_action('template_redirect', array($aiosp, 'template_redirect'));
674
-
675
- add_action('init', array($aiosp, 'init'));
676
-
677
- add_action('simple_edit_form', array($aiosp, 'add_meta_tags_textinput'));
678
- add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
679
- add_action('edit_page_form', array($aiosp, 'add_meta_tags_page_textinput'));
680
- //add_action('edit_category_form', array($aiosp, 'edit_category_form'));
681
-
682
- add_action('edit_post', array($aiosp, 'post_meta_tags'));
683
- add_action('publish_post', array($aiosp, 'post_meta_tags'));
684
- add_action('save_post', array($aiosp, 'post_meta_tags'));
685
- add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
686
- //add_action('edit_category', array($aiosp, 'edit_category'));
687
-
688
- add_action('admin_menu', array($aiosp, 'admin_menu'));
689
-
690
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,37 +0,0 @@
1
- === All in One SEO Pack ===
2
- Contributors: uberdose
3
- Donate link: http://wp.uberdose.com/contribute/
4
- Tags: post,google,seo,meta,meta keywords,meta description,title
5
- Requires at least: 2.0.2
6
- Tested up to: 2.3
7
- Stable tag: trunk
8
-
9
- Optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
10
-
11
- == Description ==
12
-
13
- **Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**) by
14
-
15
- * Generating **META tags** and letting you define them
16
- * Automatically optimizing your **titles** and letting you specify your own ones
17
- * Avoiding indexing of duplicate content.
18
-
19
- **[Download now!](http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip)**
20
-
21
- * [SEO Manual](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
- * [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
-
29
- 1. Unzip into your `/wp-content/plugins/` directory. If you're uploading it make sure to upload
30
- the top-level folder. Don't just upload all the php files and put them in `/wp-content/plugins/`.
31
- 1. Activate the plugin through the 'Plugins' menu in WordPress
32
- 1. Visit your SEO options (*Options - All in One SEO*)
33
- 1. That's it! Don't forget to write good excerpts :)
34
-
35
- == Frequently Asked Questions ==
36
-
37
- Please read these [FAQs](http://wp.uberdose.com/2007/07/11/all-in-one-seo-pack-faq/)