All in One SEO Pack - Version 1.6.13.3

Version Description

Download this release

Release Info

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

Code changes from version 1.6.13.2 to 1.6.13.3

Files changed (3) hide show
  1. aioseop.class.php +2364 -2355
  2. all_in_one_seo_pack.php +2 -2
  3. readme.txt +1 -1
aioseop.class.php CHANGED
@@ -1,2355 +1,2364 @@
1
- <?php
2
-
3
- class All_in_One_SEO_Pack {
4
-
5
- var $version = "1.6.13.2";
6
-
7
- /** Max numbers of chars in auto-generated description */
8
- var $maximum_description_length = 160;
9
-
10
- /** Minimum number of chars an excerpt should be so that it can be used
11
- * as description. Touch only if you know what you're doing
12
- */
13
- var $minimum_description_length = 1;
14
-
15
- var $ob_start_detected = false;
16
-
17
- var $title_start = -1;
18
-
19
- var $title_end = -1;
20
-
21
- /** The title before rewriting */
22
- var $orig_title = '';
23
-
24
- /** Temp filename for the latest version. */
25
- // var $upgrade_filename = 'temp.zip';
26
-
27
- /** Where to extract the downloaded newest version. */
28
- // var $upgrade_folder;
29
-
30
- /** Any error in upgrading. */
31
- // var $upgrade_error;
32
-
33
- /** Which zip to download in order to upgrade .*/
34
- // var $upgrade_url = 'http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip';
35
-
36
- /** Filename of log file. */
37
- var $log_file;
38
-
39
- /** Flag whether there should be logging. */
40
- var $do_log;
41
-
42
- var $wp_version;
43
-
44
- var $aioseop_op;
45
- //var $aioseop_options = get_option('aioseop_options');
46
-
47
- function All_in_One_SEO_Pack() {
48
- global $wp_version;
49
- global $aioseop_options;
50
- $this->wp_version = $wp_version;
51
-
52
- $this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log';
53
- if ($aioseop_options['aiosp_do_log']) {
54
- $this->do_log = true;
55
- } else {
56
- $this->do_log = false;
57
- }
58
-
59
- // $this->upgrade_filename = dirname(__FILE__) . '/' . $this->upgrade_filename;
60
- // $this->upgrade_folder = dirname(__FILE__);
61
- }
62
-
63
- /**
64
- * Convert a string to lower case
65
- * Compatible with mb_strtolower(), an UTF-8 friendly replacement for strtolower()
66
- */
67
- function strtolower($str) {
68
- global $UTF8_TABLES;
69
- return strtr($str, $UTF8_TABLES['strtolower']);
70
- }
71
-
72
- /**
73
- * Convert a string to upper case
74
- * Compatible with mb_strtoupper(), an UTF-8 friendly replacement for strtoupper()
75
- */
76
- function strtoupper($str) {
77
- global $UTF8_TABLES;
78
- return strtr($str, $UTF8_TABLES['strtoupper']);
79
- }
80
-
81
-
82
- function template_redirect() {
83
- global $wp_query;
84
- global $aioseop_options;
85
-
86
- $post = $wp_query->get_queried_object();
87
-
88
- if( $this->aioseop_mrt_exclude_this_page()){
89
- return;
90
- }
91
-
92
- if (is_feed()) {
93
- return;
94
- }
95
-
96
- if (is_single() || is_page()) {
97
- $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true)));
98
- if ($aiosp_disable) {
99
- return;
100
- }
101
- }
102
-
103
-
104
-
105
- if ($aioseop_options['aiosp_rewrite_titles']) {
106
- ob_start(array($this, 'output_callback_for_title'));
107
- }
108
- }
109
-
110
- function aioseop_mrt_exclude_this_page(){
111
- global $aioseop_options;
112
- $currenturl = trim($_SERVER['REQUEST_URI'],'/');
113
- /* echo "<br /><br />";
114
- echo $aioseop_options['aiosp_ex_pages'];
115
- echo "<br /><br />";
116
- */
117
-
118
- $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']);
119
- foreach($excludedstuff as $exedd){
120
- //echo $exedd;
121
- $exedd = trim($exedd);
122
- if($exedd){
123
- if(stristr($currenturl, $exedd)){
124
- return true;
125
- }
126
- }
127
- }
128
- return false;
129
- }
130
-
131
- function output_callback_for_title($content) {
132
- return $this->rewrite_title($content);
133
- }
134
-
135
-
136
-
137
-
138
-
139
-
140
- //
141
- //CHECK IF ARRAY EXISTS IN DB, IF SO, GET ARRAY, ADD EVERYTHING, CHECK FOR ISSET?
142
- //
143
- function init() {
144
- if (function_exists('load_plugin_textdomain')) {
145
- if ( !defined('WP_PLUGIN_DIR') ) {
146
- load_plugin_textdomain('all_in_one_seo_pack', str_replace( ABSPATH, '', dirname(__FILE__)));
147
- } else {
148
- load_plugin_textdomain('all_in_one_seo_pack', false, dirname(plugin_basename(__FILE__)));
149
- }
150
- }
151
-
152
-
153
- /*
154
- if (function_exists('load_plugin_textdomain')) {
155
- load_plugin_textdomain('all_in_one_seo_pack', WP_PLUGIN_DIR . '/all-in-one-seo-pack');
156
- }
157
- */
158
-
159
- }
160
-
161
- function is_static_front_page() {
162
- global $wp_query;
163
- global $aioseop_options;
164
- $post = $wp_query->get_queried_object();
165
- return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
166
- }
167
-
168
- function is_static_posts_page() {
169
- global $wp_query;
170
- $post = $wp_query->get_queried_object();
171
- return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
172
- }
173
-
174
- function get_base() {
175
- return '/'.end(explode('/', str_replace(array('\\','/all_in_one_seo_pack.php'),array('/',''),__FILE__)));
176
- }
177
-
178
- function seo_mrt_admin_head() {
179
- $home = get_settings('siteurl');
180
- $stylesheet = WP_PLUGIN_URL . '/all-in-one-seo-pack/style.css';
181
- echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />';
182
- }
183
-
184
-
185
- function wp_head() {
186
- if (is_feed()) {
187
- return;
188
- }
189
-
190
- global $wp_query;
191
- global $aioseop_options;
192
- $post = $wp_query->get_queried_object();
193
- $meta_string = null;
194
- if($this->is_static_posts_page()){
195
- $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
196
-
197
- }
198
- //echo("wp_head() " . wp_title('', false) . " is_home() => " . is_home() . ", is_page() => " . is_page() . ", is_single() => " . is_single() . ", is_static_front_page() => " . $this->is_static_front_page() . ", is_static_posts_page() => " . $this->is_static_posts_page());
199
-
200
- if (is_single() || is_page()) {
201
- $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true)));
202
- if ($aiosp_disable) {
203
- return;
204
- }
205
- }
206
-
207
- if( $this->aioseop_mrt_exclude_this_page()==TRUE ){
208
- return;
209
- }
210
-
211
- if ($aioseop_options['aiosp_rewrite_titles']) {
212
- // make the title rewrite as short as possible
213
- if (function_exists('ob_list_handlers')) {
214
- $active_handlers = ob_list_handlers();
215
- } else {
216
- $active_handlers = array();
217
- }
218
- if (sizeof($active_handlers) > 0 &&
219
- strtolower($active_handlers[sizeof($active_handlers) - 1]) ==
220
- strtolower('All_in_One_SEO_Pack::output_callback_for_title')) {
221
- ob_end_flush();
222
- } else {
223
- $this->log("another plugin interfering?");
224
- // if we get here there *could* be trouble with another plugin :(
225
- $this->ob_start_detected = true;
226
- if (function_exists('ob_list_handlers')) {
227
- foreach (ob_list_handlers() as $handler) {
228
- $this->log("detected output handler $handler");
229
- }
230
- }
231
- }
232
- }
233
-
234
- /*
235
-
236
- echo trim($_SERVER['REQUEST_URI'],'/');
237
- $currenturl = trim($_SERVER['REQUEST_URI'],'/');
238
- echo "<br /><br />";
239
-
240
- echo $aioseop_options['aiosp_ex_pages'];
241
-
242
- echo "<br /><br />";
243
-
244
- $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']);
245
- foreach($excludedstuff as $exedd){
246
- echo $exedd;
247
- //echo "<br /><br />substring: ". stristr($currenturl,trim($exedd)) . "<br />";
248
- if(stristr($currenturl, trim($exedd))){
249
- echo "<br />match, should not display<br /><br />";
250
- }else{
251
- echo "<br />( " . $exedd . " was not found in " . $currenturl . " ) - no match<br /><br />";
252
- }
253
- }
254
- //print_r($excludedstuff);
255
- */
256
- echo "\n<!-- All in One SEO Pack $this->version by Michael Torbert of Semper Fi Web Design";
257
- if ($this->ob_start_detected) {
258
- echo "ob_start_detected ";
259
- }
260
- echo "[$this->title_start,$this->title_end] ";
261
- echo "-->\n";
262
- if ((is_home() && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page()) || $this->is_static_front_page()) {
263
- $keywords = trim($this->internationalize($aioseop_options['aiosp_home_keywords']));
264
- } elseif($this->is_static_posts_page() && !$aioseop_options['aiosp_dynamic_postspage_keywords']){ // and if option = use page set keywords instead of keywords from recent posts
265
- //$keywords = "posts keyyysss" . stripcslashes(get_post_meta($post->ID,'keywords',true));
266
- $keywords = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true)));
267
-
268
- // $keywords = $this->get_unique_keywords($keywords);
269
-
270
- } else {
271
- $keywords = $this->get_all_keywords();
272
- }
273
- if (is_single() || is_page() || $this->is_static_posts_page()) {
274
- if ($this->is_static_front_page()) {
275
- $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
276
- } else {
277
- $description = $this->get_post_description($post);
278
- $description = apply_filters('aioseop_description',$description);
279
- }
280
- } else if (is_home()) {
281
- $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
282
- } else if (is_category()) {
283
- $description = $this->internationalize(category_description());
284
- }
285
-
286
- if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) {
287
- $description = trim(strip_tags($description));
288
- $description = str_replace('"', '', $description);
289
-
290
- // replace newlines on mac / windows?
291
- $description = str_replace("\r\n", ' ', $description);
292
-
293
- // maybe linux uses this alone
294
- $description = str_replace("\n", ' ', $description);
295
-
296
- if (isset($meta_string)) {
297
- //$meta_string .= "\n";
298
- } else {
299
- $meta_string = '';
300
- }
301
-
302
- // description format
303
- $description_format = $aioseop_options['aiosp_description_format'];
304
- if (!isset($description_format) || empty($description_format)) {
305
- $description_format = "%description%";
306
- }
307
- $description = str_replace('%description%', apply_filters('aioseop_description_override', $description), $description_format);
308
- $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
309
- $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
310
- $description = str_replace('%wp_title%', $this->get_original_title(), $description);
311
- //$description = html_entity_decode($description, ENT_COMPAT, get_bloginfo('charset'));
312
- if($aioseop_options['aiosp_can'] && is_attachment()){
313
- $url = $this->aiosp_mrt_get_url($wp_query);
314
- if ($url) {
315
- preg_match_all('/(\d+)/', $url, $matches);
316
- if (is_array($matches)){
317
- $uniqueDesc = join('',$matches[0]);
318
- }
319
- }
320
- $description .= ' ' . $uniqueDesc;
321
- }
322
- $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
323
- }
324
- $keywords = apply_filters('aioseop_keywords',$keywords);
325
- if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) {
326
- if (isset($meta_string)) {
327
- $meta_string .= "\n";
328
- }
329
- $keywords = str_replace('"','',$keywords);
330
- $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
331
- }
332
-
333
- if (function_exists('is_tag')) {
334
- $is_tag = is_tag();
335
- }
336
-
337
- if ((is_category() && $aioseop_options['aiosp_category_noindex']) || (!is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex']) || ($aioseop_options['aiosp_tags_noindex'] && $is_tag)) {
338
- if (isset($meta_string)) {
339
- $meta_string .= "\n";
340
- }
341
- $meta_string .= '<meta name="robots" content="noindex,follow" />';
342
- }
343
-
344
- $page_meta = stripcslashes($aioseop_options['aiosp_page_meta_tags']);
345
- $post_meta = stripcslashes($aioseop_options['aiosp_post_meta_tags']);
346
- $home_meta = stripcslashes($aioseop_options['aiosp_home_meta_tags']);
347
- if (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page()) {
348
- if (isset($meta_string)) {
349
- $meta_string .= "\n";
350
- }
351
- echo "\n$page_meta";
352
- }
353
-
354
- if (is_single() && isset($post_meta) && !empty($post_meta)) {
355
- if (isset($meta_string)) {
356
- $meta_string .= "\n";
357
- }
358
- $meta_string .= "$post_meta";
359
- }
360
-
361
- if (is_home() && !empty($home_meta)) {
362
- if (isset($meta_string)) {
363
- $meta_string .= "\n";
364
- }
365
- $meta_string .= "$home_meta";
366
- }
367
-
368
- if ($meta_string != null) {
369
- echo "$meta_string\n";
370
- }
371
-
372
- if($aioseop_options['aiosp_can']){
373
- $url = $this->aiosp_mrt_get_url($wp_query);
374
- if ($url) {
375
- $url = apply_filters('aioseop_canonical_url',$url);
376
-
377
- echo "".'<link rel="canonical" href="'.$url.'" />'."\n";
378
- }
379
- }
380
-
381
- echo "<!-- /all in one seo pack -->\n";
382
- }
383
-
384
- // Thank you, Yoast de Valk, for much of this code.
385
-
386
- function aiosp_mrt_get_url($query) {
387
- global $aioseop_options;
388
- if ($query->is_404 || $query->is_search) {
389
- return false;
390
- }
391
- $haspost = count($query->posts) > 0;
392
- $has_ut = function_exists('user_trailingslashit');
393
-
394
- if (get_query_var('m')) {
395
- $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
396
- switch (strlen($m)) {
397
- case 4:
398
- $link = get_year_link($m);
399
- break;
400
- case 6:
401
- $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
402
- break;
403
- case 8:
404
- $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
405
- break;
406
- default:
407
- return false;
408
- }
409
- } elseif (($query->is_single || $query->is_page) && $haspost) {
410
- $post = $query->posts[0];
411
- $link = get_permalink($post->ID);
412
- $link = $this->yoast_get_paged($link);
413
- /* if ($page && $page > 1) {
414
- $link = trailingslashit($link) . "page/". "$page";
415
- if ($has_ut) {
416
- $link = user_trailingslashit($link, 'paged');
417
- } else {
418
- $link .= '/';
419
- }
420
- }
421
- if ($query->is_page && ('page' == get_option('show_on_front')) &&
422
- $post->ID == get_option('page_on_front'))
423
- {
424
- $link = trailingslashit($link);
425
- }*/
426
- } elseif ($query->is_author && $haspost) {
427
- global $wp_version;
428
- if ($wp_version >= '2') {
429
- $author = get_userdata(get_query_var('author'));
430
- if ($author === false)
431
- return false;
432
- $link = get_author_link(false, $author->ID, $author->user_nicename);
433
- } else {
434
- global $cache_userdata;
435
- $userid = get_query_var('author');
436
- $link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
437
- }
438
- } elseif ($query->is_category && $haspost) {
439
- $link = get_category_link(get_query_var('cat'));
440
- $link = $this->yoast_get_paged($link);
441
- } else if ($query->is_tag && $haspost) {
442
- $tag = get_term_by('slug',get_query_var('tag'),'post_tag');
443
- if (!empty($tag->term_id)) {
444
- $link = get_tag_link($tag->term_id);
445
- }
446
- $link = $this->yoast_get_paged($link);
447
- } elseif ($query->is_day && $haspost) {
448
- $link = get_day_link(get_query_var('year'),
449
- get_query_var('monthnum'),
450
- get_query_var('day'));
451
- } elseif ($query->is_month && $haspost) {
452
- $link = get_month_link(get_query_var('year'),
453
- get_query_var('monthnum'));
454
- } elseif ($query->is_year && $haspost) {
455
- $link = get_year_link(get_query_var('year'));
456
- } elseif ($query->is_home) {
457
- if ((get_option('show_on_front') == 'page') &&
458
- ($pageid = get_option('page_for_posts')))
459
- {
460
- $link = get_permalink($pageid);
461
- $link = $this->yoast_get_paged($link);
462
- $link = trailingslashit($link);
463
- } else {
464
- $link = get_option('home');
465
- $link = $this->yoast_get_paged($link);
466
- $link = trailingslashit($link); }
467
- } else {
468
- return false;
469
- }
470
-
471
- return $link;
472
-
473
- }
474
-
475
-
476
- function yoast_get_paged($link) {
477
- $page = get_query_var('paged');
478
- if ($page && $page > 1) {
479
- $link = trailingslashit($link) ."page/". "$page";
480
- if ($has_ut) {
481
- $link = user_trailingslashit($link, 'paged');
482
- } else {
483
- $link .= '/';
484
- }
485
- }
486
- return $link;
487
- }
488
-
489
-
490
- function get_post_description($post) {
491
- global $aioseop_options;
492
- $description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_description", true))));
493
- if (!$description) {
494
- $description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt));
495
- if (!$description && $aioseop_options["aiosp_generate_descriptions"]) {
496
- $description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
497
- }
498
- }
499
-
500
- // "internal whitespace trim"
501
- $description = preg_replace("/\s\s+/", " ", $description);
502
-
503
- return $description;
504
- }
505
-
506
- function replace_title($content, $title) {
507
- $title = trim(strip_tags($title));
508
-
509
- $title_tag_start = "<title>";
510
- $title_tag_end = "</title>";
511
- $len_start = strlen($title_tag_start);
512
- $len_end = strlen($title_tag_end);
513
- $title = stripcslashes(trim($title));
514
- $start = strpos($content, $title_tag_start);
515
- $end = strpos($content, $title_tag_end);
516
-
517
- $this->title_start = $start;
518
- $this->title_end = $end;
519
- $this->orig_title = $title;
520
-
521
- if ($start && $end) {
522
- $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
523
- } else {
524
- // this breaks some sitemap plugins (like wpg2)
525
- //$header = $content . "<title>$title</title>";
526
-
527
- $header = $content;
528
- }
529
-
530
- return $header;
531
- }
532
-
533
- function internationalize($in) {
534
- if (function_exists('langswitch_filter_langs_with_message')) {
535
- $in = langswitch_filter_langs_with_message($in);
536
- }
537
- if (function_exists('polyglot_filter')) {
538
- $in = polyglot_filter($in);
539
- }
540
- if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
541
- $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
542
- }
543
- $in = apply_filters('localization', $in);
544
- return $in;
545
- }
546
-
547
- /** @return The original title as delivered by WP (well, in most cases) */
548
- function get_original_title() {
549
- global $wp_query;
550
- global $aioseop_options;
551
- if (!$wp_query) {
552
- return null;
553
- }
554
-
555
- $post = $wp_query->get_queried_object();
556
-
557
- // the_search_query() is not suitable, it cannot just return
558
- global $s;
559
-
560
- $title = null;
561
-
562
- if (is_home()) {
563
- $title = get_option('blogname');
564
- } else if (is_single()) {
565
- $title = $this->internationalize(wp_title('', false));
566
- } else if (is_search() && isset($s) && !empty($s)) {
567
- if (function_exists('attribute_escape')) {
568
- $search = attribute_escape(stripcslashes($s));
569
- } else {
570
- $search = wp_specialchars(stripcslashes($s), true);
571
- }
572
- $search = $this->capitalize($search);
573
- $title = $search;
574
- } else if (is_category() && !is_feed()) {
575
- $category_description = $this->internationalize(category_description());
576
- $category_name = ucwords($this->internationalize(single_cat_title('', false)));
577
- $title = $category_name;
578
- } else if (is_page()) {
579
- $title = $this->internationalize(wp_title('', false));
580
- } else if (function_exists('is_tag') && is_tag()) {
581
- global $utw;
582
- if ($utw) {
583
- $tags = $utw->GetCurrentTagSet();
584
- $tag = $tags[0]->tag;
585
- $tag = str_replace('-', ' ', $tag);
586
- } else {
587
- // wordpress > 2.3
588
- $tag = $this->internationalize(wp_title('', false));
589
- }
590
- if ($tag) {
591
- $title = $tag;
592
- }
593
- } else if (is_archive()) {
594
- $title = $this->internationalize(wp_title('', false));
595
- } else if (is_404()) {
596
- $title_format = $aioseop_options['aiosp_404_title_format'];
597
- $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
598
- $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
599
- $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
600
- $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
601
- $title = $new_title;
602
- }
603
-
604
- return trim($title);
605
- }
606
-
607
- function paged_title($title) {
608
- // the page number if paged
609
- global $paged;
610
- global $aioseop_options;
611
- // simple tagging support
612
- global $STagging;
613
-
614
- if (is_paged() || (isset($STagging) && $STagging->is_tag_view() && $paged)) {
615
- $part = $this->internationalize($aioseop_options['aiosp_paged_format']);
616
- if (isset($part) || !empty($part)) {
617
- $part = " " . trim($part);
618
- $part = str_replace('%page%', $paged, $part);
619
- $this->log("paged_title() [$title] [$part]");
620
- $title .= $part;
621
- }
622
- }
623
- return $title;
624
- }
625
-
626
- function rewrite_title($header) {
627
- global $aioseop_options;
628
- global $wp_query;
629
- if (!$wp_query) {
630
- $header .= "<!-- no wp_query found! -->\n";
631
- return $header;
632
- }
633
-
634
- $post = $wp_query->get_queried_object();
635
-
636
- // the_search_query() is not suitable, it cannot just return
637
- global $s;
638
-
639
- global $STagging;
640
-
641
- if (is_home() && !$this->is_static_posts_page()) {
642
- $title = $this->internationalize($aioseop_options['aiosp_home_title']);
643
- if (empty($title)) {
644
- $title = $this->internationalize(get_option('blogname'));
645
- }
646
- $title = $this->paged_title($title);
647
- $header = $this->replace_title($header, $title);
648
- } else if (is_attachment()) {
649
- $title = get_the_title($post->post_parent).' '.$post->post_title.' – '.get_option('blogname');
650
- $header = $this->replace_title($header,$title);
651
- } else if (is_single()) {
652
- // we're not in the loop :(
653
- $authordata = get_userdata($post->post_author);
654
- $categories = get_the_category();
655
- $category = '';
656
- if (count($categories) > 0) {
657
- $category = $categories[0]->cat_name;
658
- }
659
- $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
660
- if (!$title) {
661
- $title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
662
- if (!$title) {
663
- $title = $this->internationalize(wp_title('', false));
664
- }
665
- }
666
- $title_format = $aioseop_options['aiosp_post_title_format'];
667
- /*
668
- $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
669
- $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
670
- $new_title = str_replace('%post_title%', $title, $new_title);
671
- $new_title = str_replace('%category%', $category, $new_title);
672
- $new_title = str_replace('%category_title%', $category, $new_title);
673
- $new_title = str_replace('%post_author_login%', $authordata->user_login, $new_title);
674
- $new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
675
- $new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
676
- $new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
677
- */
678
- $r_title = array('%blog_title%','%blog_description%','%post_title%','%category%','%category_title%','%post_author_login%','%post_author_nicename%','%post_author_firstname%','%post_author_lastname%');
679
- $d_title = array($this->internationalize(get_bloginfo('name')),$this->internationalize(get_bloginfo('description')),$title, $category, $category, $authordata->user_login, $authordata->user_nicename, ucwords($authordata->first_name), ucwords($authordata->last_name));
680
- $title = trim(str_replace($r_title, $d_title, $title_format));
681
-
682
- // $title = $new_title;
683
- // $title = trim($title);
684
- $title = apply_filters('aioseop_title_single',$title);
685
- $header = $this->replace_title($header, $title);
686
- } else if (is_search() && isset($s) && !empty($s)) {
687
- if (function_exists('attribute_escape')) {
688
- $search = attribute_escape(stripcslashes($s));
689
- } else {
690
- $search = wp_specialchars(stripcslashes($s), true);
691
- }
692
- $search = $this->capitalize($search);
693
- $title_format = $aioseop_options['aiosp_search_title_format'];
694
- $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
695
- $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
696
- $title = str_replace('%search%', $search, $title);
697
- $header = $this->replace_title($header, $title);
698
- } else if (is_category() && !is_feed()) {
699
- $category_description = $this->internationalize(category_description());
700
- if($aioseop_options['aiosp_cap_cats']){
701
- $category_name = ucwords($this->internationalize(single_cat_title('', false)));
702
- }else{
703
- $category_name = $this->internationalize(single_cat_title('', false));
704
- }
705
- //$category_name = ucwords($this->internationalize(single_cat_title('', false)));
706
- $title_format = $aioseop_options['aiosp_category_title_format'];
707
- $title = str_replace('%category_title%', $category_name, $title_format);
708
- $title = str_replace('%category_description%', $category_description, $title);
709
- $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
710
- $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
711
- $title = $this->paged_title($title);
712
- $header = $this->replace_title($header, $title);
713
- } else if (is_page() || $this->is_static_posts_page()) {
714
- // we're not in the loop :(
715
- $authordata = get_userdata($post->post_author);
716
- if ($this->is_static_front_page()) {
717
- if ($this->internationalize($aioseop_options['aiosp_home_title'])) {
718
-
719
- //home title filter
720
- $home_title = $this->internationalize($aioseop_options['aiosp_home_title']);
721
- $home_title = apply_filters('aioseop_home_page_title',$home_title);
722
- $header = $this->replace_title($header, $home_title);
723
-
724
- }
725
- } else {
726
- $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
727
- if (!$title) {
728
- $title = $this->internationalize(wp_title('', false));
729
- }
730
- $title_format = $aioseop_options['aiosp_page_title_format'];
731
- $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
732
- $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
733
- $new_title = str_replace('%page_title%', $title, $new_title);
734
- $new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title);
735
- $new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title);
736
- $new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
737
- $new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
738
- $title = trim($new_title);
739
- $title = $this->paged_title($title);
740
- $title = apply_filters('aioseop_title_page',$title);
741
- $header = $this->replace_title($header, $title);
742
- }
743
- } else if (function_exists('is_tag') && is_tag()) {
744
- global $utw;
745
- if ($utw) {
746
- $tags = $utw->GetCurrentTagSet();
747
- $tag = $tags[0]->tag;
748
- $tag = str_replace('-', ' ', $tag);
749
- } else {
750
- // wordpress > 2.3
751
- $tag = $this->internationalize(wp_title('', false));
752
- }
753
- if ($tag) {
754
- $tag = $this->capitalize($tag);
755
- $title_format = $aioseop_options['aiosp_tag_title_format'];
756
- $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
757
- $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
758
- $title = str_replace('%tag%', $tag, $title);
759
- $title = $this->paged_title($title);
760
- $header = $this->replace_title($header, $title);
761
- }
762
- } else if (isset($STagging) && $STagging->is_tag_view()) { // simple tagging support
763
- $tag = $STagging->search_tag;
764
- if ($tag) {
765
- $tag = $this->capitalize($tag);
766
- $title_format = $aioseop_options['aiosp_tag_title_format'];
767
- $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
768
- $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
769
- $title = str_replace('%tag%', $tag, $title);
770
- $title = $this->paged_title($title);
771
- $header = $this->replace_title($header, $title);
772
- }
773
- } else if (is_archive()) {
774
- $date = $this->internationalize(wp_title('', false));
775
- $title_format = $aioseop_options['aiosp_archive_title_format'];
776
- $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
777
- $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
778
- $new_title = str_replace('%date%', $date, $new_title);
779
- $title = trim($new_title);
780
- $title = $this->paged_title($title);
781
- $header = $this->replace_title($header, $title);
782
- } else if (is_404()) {
783
- $title_format = $aioseop_options['aiosp_404_title_format'];
784
- $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
785
- $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
786
- $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
787
- $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
788
- $new_title = str_replace('%404_title%', $this->internationalize(wp_title('', false)), $new_title);
789
- $header = $this->replace_title($header, $new_title);
790
- }
791
-
792
- return $header;
793
-
794
- }
795
-
796
- /**
797
- * @return User-readable nice words for a given request.
798
- */
799
- function request_as_words($request) {
800
- $request = htmlspecialchars($request);
801
- $request = str_replace('.html', ' ', $request);
802
- $request = str_replace('.htm', ' ', $request);
803
- $request = str_replace('.', ' ', $request);
804
- $request = str_replace('/', ' ', $request);
805
- $request_a = explode(' ', $request);
806
- $request_new = array();
807
- foreach ($request_a as $token) {
808
- $request_new[] = ucwords(trim($token));
809
- }
810
- $request = implode(' ', $request_new);
811
- return $request;
812
- }
813
-
814
- function capitalize($s) {
815
- $s = trim($s);
816
- $tokens = explode(' ', $s);
817
- while (list($key, $val) = each($tokens)) {
818
- $tokens[$key] = trim($tokens[$key]);
819
- $tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
820
- }
821
- $s = implode(' ', $tokens);
822
- return $s;
823
- }
824
-
825
- function trim_excerpt_without_filters($text) {
826
- $text = str_replace(']]>', ']]&gt;', $text);
827
- $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
828
- $text = strip_tags($text);
829
- $max = $this->maximum_description_length;
830
-
831
- if ($max < strlen($text)) {
832
- while($text[$max] != ' ' && $max > $this->minimum_description_length) {
833
- $max--;
834
- }
835
- }
836
- $text = substr($text, 0, $max);
837
- return trim(stripcslashes($text));
838
- }
839
-
840
- function trim_excerpt_without_filters_full_length($text) {
841
- $text = str_replace(']]>', ']]&gt;', $text);
842
- $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
843
- $text = strip_tags($text);
844
- return trim(stripcslashes($text));
845
- }
846
-
847
- /**
848
- * @return comma-separated list of unique keywords
849
- */
850
- function get_all_keywords() {
851
- global $posts;
852
- global $aioseop_options;
853
-
854
- if (is_404()) {
855
- return null;
856
- }
857
-
858
- // if we are on synthetic pages
859
- if (!is_home() && !is_page() && !is_single() &&!$this->is_static_front_page() && !$this->is_static_posts_page()) {
860
- return null;
861
- }
862
-
863
- $keywords = array();
864
- if (is_array($posts)) {
865
- foreach ($posts as $post) {
866
- if ($post) {
867
-
868
- // custom field keywords
869
- $keywords_a = $keywords_i = null;
870
- $description_a = $description_i = null;
871
-
872
- $id = (is_attachment())?($post->post_parent):($post->ID); // if attachment then use parent post id
873
- $keywords_i = stripcslashes($this->internationalize(get_post_meta($id, "_aioseop_keywords", true)));
874
- //$id = $post->ID;
875
- //$keywords_i = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true)));
876
- $keywords_i = str_replace('"', '', $keywords_i);
877
- if (isset($keywords_i) && !empty($keywords_i)) {
878
- $traverse = explode(',', $keywords_i);
879
- foreach ($traverse as $keyword) {
880
- $keywords[] = $keyword;
881
- }
882
- }
883
-
884
- // WP 2.3 tags
885
- if ($aioseop_options['aiosp_use_tags_as_keywords']){
886
- if (function_exists('get_the_tags')) {
887
- //$tags = get_the_tags($post->ID);
888
- $tags = get_the_tags($id);
889
- if ($tags && is_array($tags)) {
890
- foreach ($tags as $tag) {
891
- $keywords[] = $this->internationalize($tag->name);
892
- }
893
- }
894
- }
895
- }
896
- // Ultimate Tag Warrior integration
897
- global $utw;
898
- if ($utw) {
899
- $tags = $utw->GetTagsForPost($post);
900
- if (is_array($tags)) {
901
- foreach ($tags as $tag) {
902
- $tag = $tag->tag;
903
- $tag = str_replace('_',' ', $tag);
904
- $tag = str_replace('-',' ',$tag);
905
- $tag = stripcslashes($tag);
906
- $keywords[] = $tag;
907
- }
908
- }
909
- }
910
-
911
- // autometa
912
- $autometa = stripcslashes(get_post_meta($id, 'autometa', true));
913
- //$autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
914
- if (isset($autometa) && !empty($autometa)) {
915
- $autometa_array = explode(' ', $autometa);
916
- foreach ($autometa_array as $e) {
917
- $keywords[] = $e;
918
- }
919
- }
920
-
921
- if ($aioseop_options['aiosp_use_categories'] && !is_page()) {
922
- $categories = get_the_category($id);
923
- //$categories = get_the_category($post->ID);
924
- foreach ($categories as $category) {
925
- $keywords[] = $this->internationalize($category->cat_name);
926
- }
927
- }
928
-
929
- }
930
- }
931
- }
932
-
933
- return $this->get_unique_keywords($keywords);
934
- }
935
-
936
- function get_meta_keywords() {
937
- global $posts;
938
-
939
- $keywords = array();
940
- if (is_array($posts)) {
941
- foreach ($posts as $post) {
942
- if ($post) {
943
- // custom field keywords
944
- $keywords_a = $keywords_i = null;
945
- $description_a = $description_i = null;
946
- $id = $post->ID;
947
- $keywords_i = stripcslashes(get_post_meta($post->ID, "_aioseop_keywords", true));
948
- $keywords_i = str_replace('"', '', $keywords_i);
949
- if (isset($keywords_i) && !empty($keywords_i)) {
950
- $keywords[] = $keywords_i;
951
- }
952
- }
953
- }
954
- }
955
-
956
- return $this->get_unique_keywords($keywords);
957
- }
958
-
959
- function get_unique_keywords($keywords) {
960
- $small_keywords = array();
961
- foreach ($keywords as $word) {
962
- if (function_exists('mb_strtolower'))
963
- $small_keywords[] = mb_strtolower($word, get_bloginfo('charset'));
964
- else
965
- $small_keywords[] = $this->strtolower($word);
966
- }
967
- $keywords_ar = array_unique($small_keywords);
968
- return implode(',', $keywords_ar);
969
- }
970
-
971
- function get_url($url) {
972
- if (function_exists('file_get_contents')) {
973
- $file = file_get_contents($url);
974
- } else {
975
- $curl = curl_init($url);
976
- curl_setopt($curl, CURLOPT_HEADER, 0);
977
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
978
- $file = curl_exec($curl);
979
- curl_close($curl);
980
- }
981
- return $file;
982
- }
983
-
984
- function log($message) {
985
- if ($this->do_log) {
986
- error_log(date('Y-m-d H:i:s') . " " . $message . "\n", 3, $this->log_file);
987
- }
988
- }
989
-
990
- function download_newest_version() {
991
- $success = true;
992
- $file_content = $this->get_url($this->upgrade_url);
993
- if ($file_content === false) {
994
- $this->upgrade_error = sprintf(__("Could not download distribution (%s)"), $this->upgrade_url);
995
- $success = false;
996
- } else if (strlen($file_content) < 100) {
997
- $this->upgrade_error = sprintf(__("Could not download distribution (%s): %s"), $this->upgrade_url, $file_content);
998
- $success = false;
999
- } else {
1000
- $this->log(sprintf("filesize of download ZIP: %d", strlen($file_content)));
1001
- $fh = @fopen($this->upgrade_filename, 'w');
1002
- $this->log("fh is $fh");
1003
- if (!$fh) {
1004
- $this->upgrade_error = sprintf(__("Could not open %s for writing"), $this->upgrade_filename);
1005
- $this->upgrade_error .= "<br />";
1006
- $this->upgrade_error .= sprintf(__("Please make sure %s is writable"), $this->upgrade_folder);
1007
- $success = false;
1008
- } else {
1009
- $bytes_written = @fwrite($fh, $file_content);
1010
- $this->log("wrote $bytes_written bytes");
1011
- if (!$bytes_written) {
1012
- $this->upgrade_error = sprintf(__("Could not write to %s"), $this->upgrade_filename);
1013
- $success = false;
1014
- }
1015
- }
1016
- if ($success) {
1017
- fclose($fh);
1018
- }
1019
- }
1020
- return $success;
1021
- }
1022
-
1023
- function install_newest_version() {
1024
- $success = $this->download_newest_version();
1025
- if ($success) {
1026
- $success = $this->extract_plugin();
1027
- unlink($this->upgrade_filename);
1028
- }
1029
- return $success;
1030
- }
1031
-
1032
- function extract_plugin() {
1033
- if (!class_exists('PclZip')) {
1034
- require_once ('pclzip.lib.php');
1035
- }
1036
- $archive = new PclZip($this->upgrade_filename);
1037
- $files = $archive->extract(PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $this->upgrade_folder);
1038
- $this->log("files is $files");
1039
- if (is_array($files)) {
1040
- $num_extracted = sizeof($files);
1041
- $this->log("extracted $num_extracted files to $this->upgrade_folder");
1042
- $this->log(print_r($files, true));
1043
- return true;
1044
- } else {
1045
- $this->upgrade_error = $archive->errorInfo();
1046
- return false;
1047
- }
1048
- }
1049
-
1050
- /** crude approximization of whether current user is an admin */
1051
- function is_admin() {
1052
- return current_user_can('level_8');
1053
- }
1054
-
1055
-
1056
- function is_directory_writable($directory) {
1057
- $filename = $directory . '/' . 'tmp_file_' . time();
1058
- $fh = @fopen($filename, 'w');
1059
- if (!$fh) {
1060
- return false;
1061
- }
1062
-
1063
- $written = fwrite($fh, "test");
1064
- fclose($fh);
1065
- unlink($filename);
1066
- if ($written) {
1067
- return true;
1068
- } else {
1069
- return false;
1070
- }
1071
- }
1072
-
1073
-
1074
- function is_upgrade_directory_writable() {
1075
- //return $this->is_directory_writable($this->upgrade_folder);
1076
- // let's assume it is
1077
- return true;
1078
- }
1079
-
1080
-
1081
- function post_meta_tags($id) {
1082
- $awmp_edit = $_POST["aiosp_edit"];
1083
- $nonce = $_POST['nonce-aioseop-edit'];
1084
- // if (!wp_verify_nonce($nonce, 'edit-aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1085
- if (isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'edit-aioseop-nonce')) {
1086
- $keywords = $_POST["aiosp_keywords"];
1087
- $description = $_POST["aiosp_description"];
1088
- $title = $_POST["aiosp_title"];
1089
- $aiosp_meta = $_POST["aiosp_meta"];
1090
- $aiosp_disable = $_POST["aiosp_disable"];
1091
- $aiosp_titleatr = $_POST["aiosp_titleatr"];
1092
- $aiosp_menulabel = $_POST["aiosp_menulabel"];
1093
-
1094
- delete_post_meta($id, '_aioseop_keywords');
1095
- delete_post_meta($id, '_aioseop_description');
1096
- delete_post_meta($id, '_aioseop_title');
1097
- delete_post_meta($id, '_aioseop_titleatr');
1098
- delete_post_meta($id, '_aioseop_menulabel');
1099
-
1100
-
1101
- if ($this->is_admin()) {
1102
- delete_post_meta($id, '_aioseop_disable');
1103
- }
1104
- //delete_post_meta($id, 'aiosp_meta');
1105
-
1106
- if (isset($keywords) && !empty($keywords)) {
1107
- add_post_meta($id, '_aioseop_keywords', $keywords);
1108
- }
1109
- if (isset($description) && !empty($description)) {
1110
- add_post_meta($id, '_aioseop_description', $description);
1111
- }
1112
- if (isset($title) && !empty($title)) {
1113
- add_post_meta($id, '_aioseop_title', $title);
1114
- }
1115
- if (isset($aiosp_titleatr) && !empty($aiosp_titleatr)) {
1116
- add_post_meta($id, '_aioseop_titleatr', $aiosp_titleatr);
1117
- }
1118
- if (isset($aiosp_menulabel) && !empty($aiosp_menulabel)) {
1119
- add_post_meta($id, '_aioseop_menulabel', $aiosp_menulabel);
1120
- }
1121
- if (isset($aiosp_disable) && !empty($aiosp_disable) && $this->is_admin()) {
1122
- add_post_meta($id, '_aioseop_disable', $aiosp_disable);
1123
- }
1124
- /*
1125
- if (isset($aiosp_meta) && !empty($aiosp_meta)) {
1126
- add_post_meta($id, 'aiosp_meta', $aiosp_meta);
1127
- }
1128
- */
1129
- }
1130
- }
1131
-
1132
- function edit_category($id) {
1133
- global $wpdb;
1134
- $id = $wpdb->escape($id);
1135
- $awmp_edit = $_POST["aiosp_edit"];
1136
- if (isset($awmp_edit) && !empty($awmp_edit)) {
1137
- $keywords = $wpdb->escape($_POST["aiosp_keywords"]);
1138
- $title = $wpdb->escape($_POST["aiosp_title"]);
1139
- $old_category = $wpdb->get_row("select * from $this->table_categories where category_id=$id", OBJECT);
1140
- if ($old_category) {
1141
- $wpdb->query($wpdb->prepare("update $this->table_categories
1142
- set meta_title='$title', meta_keywords='$keywords'
1143
- where category_id=$id"));
1144
- } else {
1145
- $wpdb->query($wpdb->prepare("insert into $this->table_categories(meta_title, meta_keywords, category_id)
1146
- values ('$title', '$keywords', $id"));
1147
- }
1148
- //$wpdb->query($wpdb->prepare("insert into $this->table_categories"))
1149
- /*
1150
- delete_post_meta($id, 'keywords');
1151
- delete_post_meta($id, 'description');
1152
- delete_post_meta($id, 'title');
1153
-
1154
- if (isset($keywords) && !empty($keywords)) {
1155
- add_post_meta($id, 'keywords', $keywords);
1156
- }
1157
- if (isset($description) && !empty($description)) {
1158
- add_post_meta($id, 'description', $description);
1159
- }
1160
- if (isset($title) && !empty($title)) {
1161
- add_post_meta($id, 'title', $title);
1162
- }
1163
- */
1164
- }
1165
- }
1166
-
1167
- /**
1168
- * @deprecated This was for the feature of dedicated meta tags for categories which never went mainstream.
1169
- */
1170
- function edit_category_form() {
1171
- global $post;
1172
- $keywords = stripcslashes(get_post_meta($post->ID, '_aioseop_keywords', true));
1173
- $title = stripcslashes(get_post_meta($post->ID, '_aioseop_title', true));
1174
- $description = stripcslashes(get_post_meta($post->ID, '_aioseop_description', true));
1175
- ?>
1176
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1177
- <table class="editform" width="100%" cellspacing="2" cellpadding="5">
1178
- <tr>
1179
- <th width="33%" scope="row" valign="top">
1180
- <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>
1181
- </th>
1182
- </tr>
1183
- <tr>
1184
- <th width="33%" scope="row" valign="top"><label for="aiosp_title"><?php _e('Title:', 'all_in_one_seo_pack') ?></label></th>
1185
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="70"/></td>
1186
- </tr>
1187
- <tr>
1188
- <th width="33%" scope="row" valign="top"><label for="aiosp_keywords"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></label></th>
1189
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="70"/></td>
1190
- </tr>
1191
- </table>
1192
- <?php
1193
- }
1194
-
1195
- function add_meta_tags_textinput() {
1196
- global $post;
1197
- $post_id = $post;
1198
- if (is_object($post_id)) {
1199
- $post_id = $post_id->ID;
1200
- }
1201
- $keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true)));
1202
- $title = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_title', true)));
1203
- $description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true)));
1204
- $aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_meta', true)));
1205
- $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_disable', true)));
1206
- $aiosp_titleatr = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_titleatr', true)));
1207
- $aiosp_menulabel = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_menulabel', true)));
1208
-
1209
- ?>
1210
- <SCRIPT LANGUAGE="JavaScript">
1211
- <!-- Begin
1212
- function countChars(field,cntfield) {
1213
- cntfield.value = field.value.length;
1214
- }
1215
- // End -->
1216
- </script>
1217
-
1218
- <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1219
- <div id="postaiosp" class="postbox closed">
1220
- <h3><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1221
- <div class="inside">
1222
- <div id="postaiosp">
1223
- <?php } else { ?>
1224
- <div class="dbx-b-ox-wrapper">
1225
- <fieldset id="seodiv" class="dbx-box">
1226
- <div class="dbx-h-andle-wrapper">
1227
- <h3 class="dbx-handle"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1228
- </div>
1229
- <div class="dbx-c-ontent-wrapper">
1230
- <div class="dbx-content">
1231
- <?php } ?>
1232
-
1233
- <a target="__blank" href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/"><?php _e('Click here for Support', 'all_in_one_seo_pack') ?></a>
1234
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1235
- <table style="margin-bottom:40px">
1236
- <tr>
1237
- <th style="text-align:left;" colspan="2">
1238
- </th>
1239
- </tr>
1240
- <tr>
1241
- <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
1242
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62"/></td>
1243
- </tr>
1244
- <tr>
1245
- <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
1246
- <td><textarea name="aiosp_description" rows="1" cols="60" onKeyDown="countChars(document.post.aiosp_description,document.post.length1)" onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?>
1247
- </textarea><br />
1248
- <input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
1249
- <?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack') ?>
1250
- </td>
1251
- </tr>
1252
- <tr>
1253
- <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
1254
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="62"/></td>
1255
- </tr>
1256
- <input type="hidden" name="nonce-aioseop-edit" value="<?php echo wp_create_nonce('edit-aioseop-nonce'); ?>" />
1257
- <?php if ($this->is_admin()) { ?>
1258
- <tr>
1259
- <th scope="row" style="text-align:right; vertical-align:top;">
1260
- <?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
1261
- </th>
1262
- <td>
1263
- <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
1264
- </td>
1265
- </tr>
1266
-
1267
- <tr>
1268
- <th scope="row" style="text-align:right;"><?php _e('Title Attribute:', 'all_in_one_seo_pack') ?></th>
1269
- <td><input value="<?php echo $aiosp_titleatr ?>" type="text" name="aiosp_titleatr" size="62"/></td>
1270
- </tr>
1271
- <tr>
1272
- <th scope="row" style="text-align:right;"><?php _e('Menu Label:', 'all_in_one_seo_pack') ?></th>
1273
- <td><input value="<?php echo $aiosp_menulabel ?>" type="text" name="aiosp_menulabel" size="62"/></td>
1274
- </tr>
1275
- <?php } ?>
1276
- </table>
1277
-
1278
- <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1279
- </div>
1280
- </div>
1281
- </div>
1282
- <?php } else { ?>
1283
- </div>
1284
- </fieldset>
1285
- </div>
1286
- <?php } ?>
1287
-
1288
- <?php
1289
- }
1290
-
1291
- function admin_menu() {
1292
- $file = __FILE__;
1293
-
1294
- // hack for 1.5
1295
- if (substr($this->wp_version, 0, 3) == '1.5') {
1296
- $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
1297
- }
1298
- //add_management_page(__('All in One SEO Title', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'management_panel'));
1299
- add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 'manage_options', $file, array($this, 'options_panel'));
1300
- }
1301
-
1302
- function management_panel() {
1303
- $message = null;
1304
- $base_url = "edit.php?page=" . __FILE__;
1305
- //echo($base_url);
1306
- $type = $_REQUEST['type'];
1307
- if (!isset($type)) {
1308
- $type = "posts";
1309
- }
1310
- ?>
1311
-
1312
- <ul class="aiosp_menu">
1313
- <li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
1314
- </li>
1315
- <li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
1316
- </li>
1317
- </ul>
1318
-
1319
- <?php
1320
-
1321
- if ($type == "posts") {
1322
- echo("posts");
1323
- } elseif ($type == "pages") {
1324
- echo("pages");
1325
- }
1326
- }
1327
-
1328
- function options_panel() {
1329
- $message = null;
1330
- //$message_updated = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1331
- global $aioseop_options;
1332
-
1333
- if(!$aioseop_options['aiosp_cap_cats']) {
1334
- $aioseop_options['aiosp_cap_cats'] = '1';
1335
- }
1336
-
1337
-
1338
- if (isset($_POST['action']) && $_POST['action'] == 'aiosp_update' && isset($_POST['Submit_Default'])) {
1339
- $nonce = $_POST['nonce-aioseop'];
1340
- if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1341
- $message = __("All in One SEO Options Reset.", 'all_in_one_seo_pack');
1342
- delete_option('aioseop_options');
1343
- $res_aioseop_options = array(
1344
- "aiosp_can"=>1,
1345
- "aiosp_donate"=>0,
1346
- "aiosp_home_title"=>null,
1347
- "aiosp_home_description"=>'',
1348
- "aiosp_home_keywords"=>null,
1349
- "aiosp_max_words_excerpt"=>'something',
1350
- "aiosp_rewrite_titles"=>1,
1351
- "aiosp_post_title_format"=>'%post_title% | %blog_title%',
1352
- "aiosp_page_title_format"=>'%page_title% | %blog_title%',
1353
- "aiosp_category_title_format"=>'%category_title% | %blog_title%',
1354
- "aiosp_archive_title_format"=>'%date% | %blog_title%',
1355
- "aiosp_tag_title_format"=>'%tag% | %blog_title%',
1356
- "aiosp_search_title_format"=>'%search% | %blog_title%',
1357
- "aiosp_description_format"=>'%description%',
1358
- "aiosp_404_title_format"=>'Nothing found for %request_words%',
1359
- "aiosp_paged_format"=>' - Part %page%',
1360
- "aiosp_use_categories"=>0,
1361
- "aiosp_dynamic_postspage_keywords"=>1,
1362
- "aiosp_category_noindex"=>1,
1363
- "aiosp_archive_noindex"=>1,
1364
- "aiosp_tags_noindex"=>0,
1365
- "aiosp_cap_cats"=>1,
1366
- "aiosp_generate_descriptions"=>1,
1367
- "aiosp_debug_info"=>null,
1368
- "aiosp_post_meta_tags"=>'',
1369
- "aiosp_enablecpost"=>'0',
1370
- "aiosp_page_meta_tags"=>'',
1371
- "aiosp_home_meta_tags"=>'',
1372
- "aiosp_enabled" =>0,
1373
- "aiosp_use_tags_as_keywords" =>1,
1374
- "aiosp_seopostcol" => 1,
1375
- "aiosp_seocustptcol" => 0,
1376
- "aiosp_posttypecolumns" => array('post','page'),
1377
- "aiosp_do_log"=>null);
1378
- update_option('aioseop_options', $res_aioseop_options);
1379
- }
1380
-
1381
-
1382
- // update options
1383
- if(isset($_POST['action'])){
1384
- if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') {
1385
- $nonce = $_POST['nonce-aioseop'];
1386
- if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1387
- $message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1388
- $aioseop_options['aiosp_can'] = $_POST['aiosp_can'];
1389
- $aioseop_options['aiosp_donate'] = $_POST['aiosp_donate'];
1390
- $aioseop_options['aiosp_home_title'] = esc_attr($_POST['aiosp_home_title']);
1391
- $aioseop_options['aiosp_home_description'] = esc_attr($_POST['aiosp_home_description']);
1392
- $aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords'];
1393
- $aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt'];
1394
- $aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles'];
1395
- $aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format'];
1396
- $aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format'];
1397
- $aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format'];
1398
- $aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format'];
1399
- $aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format'];
1400
- $aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format'];
1401
- $aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format'];
1402
- $aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format'];
1403
- $aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format'];
1404
- $aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories'];
1405
- $aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords'];
1406
- $aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex'];
1407
- $aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex'];
1408
- $aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex'];
1409
- $aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions'];
1410
- $aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats'];
1411
- $aioseop_options['aiosp_enablecpost'] = $_POST['aiosp_enablecpost'];
1412
- $aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info'];
1413
- $aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags'];
1414
- $aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags'];
1415
- $aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags'];
1416
- $aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages'];
1417
- $aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log'];
1418
- $aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled'];
1419
- $aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords'];
1420
- $aioseop_options['aiosp_seopostcol'] = $_POST['aiosp_seopostcol'];
1421
- $aioseop_options['aiosp_seocustptcol'] = $_POST['aiosp_seocustptcol'];
1422
- $aioseop_options['aiosp_posttypecolumns'] = $_POST['aiosp_posttypecolumns'];
1423
-
1424
- update_option('aioseop_options', $aioseop_options);
1425
-
1426
- if (function_exists('wp_cache_flush')) {
1427
- wp_cache_flush();
1428
- }
1429
- }
1430
- } /*elseif ($_POST['aiosp_upgrade']) {
1431
- $message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
1432
- $success = $this->install_newest_version();
1433
- if (!$success) {
1434
- $message = __("Upgrade failed", 'all_in_one_seo_pack');
1435
- if (isset($this->upgrade_error) && !empty($this->upgrade_error)) {
1436
- $message .= ": " . $this->upgrade_error;
1437
- } else {
1438
- $message .= ".";
1439
- }
1440
- }
1441
- }*/
1442
-
1443
- if ($message){
1444
- echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
1445
- }
1446
- ?>
1447
- <div id="dropmessage" class="updated" style="display:none;"></div>
1448
- <div class="wrap">
1449
-
1450
- <h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
1451
- by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>
1452
- <p>
1453
- <div style="float:left;">
1454
-
1455
- <?php //_e("This is version ", 'all_in_one_seo_pack') ?><?php //_e("$this->version ", 'all_in_one_seo_pack') ?>
1456
- &nbsp;<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
1457
- href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/"><?php _e("Changelog", 'all_in_one_seo_pack')?>
1458
- </a>
1459
- | <a target="_blank" title="<?php _e('FAQ', 'all_in_one_seo_pack') ?>"
1460
- href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/"><?php _e('FAQ', 'all_in_one_seo_pack') ?></a>
1461
- | <a target="_blank" title="<?php _e('All in One SEO Plugin Support Forum', 'all_in_one_seo_pack') ?>"
1462
- href="http://semperfiwebdesign.com/forum/"><?php _e('Support', 'all_in_one_seo_pack') ?></a>
1463
- | <a target="_blank" title="<?php _e('All in One SEO Plugin Translations', 'all_in_one_seo_pack') ?>"
1464
- href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/translations-for-all-in-one-seo-pack/"><?php _e('Translations', 'all_in_one_seo_pack') ?></a>
1465
- | <strong><a target="_blank" title="<?php _e('Pro Version', 'all_in_one_seo_pack') ?>"
1466
- href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version"><?php _e('UPGRADE TO PRO VERSION', 'all_in_one_seo_pack') ?></a></strong>
1467
- </div>
1468
-
1469
- <div style="float:left;width:370px;margin-left:10px;">
1470
- <form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
1471
- <span>Join our mailing list for tips, tricks, and WordPress secrets.<em><strong>Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress</strong></em> ($39 value).</span>
1472
- <div>
1473
- <label for="mce-EMAIL">Email Address </label>
1474
- <input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL">
1475
-
1476
-
1477
- <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn">
1478
- </div>
1479
- </form>
1480
- </div>
1481
- <div style="clear:both;">
1482
-
1483
- <br />
1484
- <!--<div style="width:75%;background-color:yellow;">
1485
- <em>Thank you for using <strong>All in One SEO Pack</strong> by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>. If you like this plugin and find it useful, feel free to click the <strong>donate</strong> button or send me a gift from my <strong>Amazon wishlist</strong>. Also, don't forget to follow me on <strong>Twitter</strong>.</em>
1486
- </div>
1487
- -->
1488
- <!--
1489
- <a target="_blank" title="<?php //echo 'Donate' ?>"
1490
- href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" width="" alt="Donate" /><?php //echo 'Donate' ?></a>
1491
- | <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web"><img src="https://images-na.ssl-images-amazon.com/images/G/01/gifts/registries/wishlist/v2/web/wl-btn-74-b._V46774601_.gif" width="74" alt="My Amazon.com Wish List" height="42" border="0" /></a>
1492
- | <a target="_blank" title="<?php //_e('Follow us on Twitter', 'all_in_one_seo_pack') ?>"
1493
- href="http://twitter.com/michaeltorbert/"><img src="<?php //echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.png" alt="<?php //_e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" height="47px" /></a>
1494
- -->
1495
- </p>
1496
-
1497
- <div style="width:832px;">
1498
- <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;margin-right:15px;border: 1px solid #ddd;">
1499
- <div style="width:350px;height:130px;">
1500
- <h3>Donate</h3>
1501
- <em>If you like this plugin and find it useful, help keep this plugin free and actively developed by clicking the <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank"><strong>donate</strong></a> button or send me a gift from my <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank"><strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.</em>
1502
- </div>
1503
- <a target="_blank" title="<?php echo 'Donate' ?>"
1504
- href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
1505
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all_in_one_seo_pack') ?>" /> </a>
1506
- <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
1507
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all_in_one_seo_pack') ?>" /> </a>
1508
- <a target="_blank" title="<?php _e('Follow us on Twitter', 'all_in_one_seo_pack') ?>" href="http://twitter.com/michaeltorbert/">
1509
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.jpg" alt="<?php _e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" /> </a>
1510
- </div>
1511
-
1512
- <div style="float:left;background-color:white;padding:10px;border:1px solid #ddd;">
1513
- <div style="width:423px;height:130px;">
1514
- <h3>Reliable WordPress Hosting</h3>
1515
- <p><a title="WebHostingHub.com" target="_blank"
1516
- href="http://ref.webhostinghub.com/scripts/click.php?ref_id=rsuog2&ad_id=54c8d95f">WebHostingHub.com</a>
1517
- is a true leader in WordPress hosting and configured for WordPress
1518
- blogs. Hub's account includes UNLIMITED Hosting, NO-DOWNTIME Transfer,
1519
- 24/7 U.S. Support & 90-Day FULL Money Back.<br />
1520
- Check our <a title="WebHostingHub reviews" target="_blank"
1521
- href="http://webhostingrating.com/companies/web-hosting-hub/">customer
1522
- reviews</a> at WebHostingRating.com.</p>
1523
- </div>
1524
- <a title="WebHostingHub.com" target="_blank"
1525
- href="http://ref.webhostinghub.com/scripts/click.php?ref_id=rsuog2&ad_id=54c8d95f"><img
1526
- src="http://webhostingrating.com/images/hub_420_wordpress.png"
1527
- alt="WebHostingHub.com" width="420" height="53" border="0" /></a>
1528
- </div>
1529
-
1530
- <div style="float:left;background-color:white;padding:10px 10px 10px 10px;border:1px solid #ddd">
1531
- <div style="width:423px;height:130px">
1532
- <h3>The Ultimate WordPress Backup Solution</h3>
1533
- <p>Running on <em>thousands</em> of sites, <a href="http://pluginbuddy.com/wordpress-backup/" target="_blank">BackupBuddy</a> is an all-in-one solution for <strong>WordPress</strong> <strong>backups, restoration, &amp; migration</strong>. Whether you’re a blogger or developer, this plugin is sure to bring you peace of mind &amp; added safety in the event of data loss. </p>
1534
- </div>
1535
- <a title="Backup WordPress Easily" href="http://pluginbuddy.com/wordpress-backup/" target="_blank"><img src="http://ithemes.com/graphics/ads/bb-AIO-ad.png" alt="Backup WordPress Easily"></a>
1536
- </div>
1537
-
1538
- <!--
1539
- <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;border: 1px solid #ddd;">
1540
- <div style="width:365px;height:130px;">
1541
-
1542
- <form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
1543
- <span>Join our mailing list for tips, tricks, and WordPress secrets. Also receive discounts on top commercial plugins and themes.<br /><em><strong>Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress</strong></em>.</span>
1544
- <div class="mc-field-group">
1545
- <label for="mce-EMAIL">Email Address </label>
1546
- <input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL">
1547
- </div>
1548
-
1549
- <div><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn"></div>
1550
- </form>
1551
- </div>
1552
- </div>
1553
- -->
1554
- </div>
1555
- <div style="clear:both";></div>
1556
- <!--
1557
- <p>
1558
- <?php
1559
- //$canwrite = $this->is_upgrade_directory_writable();
1560
- //$canwrite = false;
1561
- ?>
1562
- <form class="form-table" name="dofollow" action="" method="post">
1563
- <p class="submit">
1564
- <input type="submit" <?php //if (!$canwrite) echo(' disabled="disabled" ');?> name="aiosp_upgrade" value="<?php //_e('One Click Upgrade', 'all_in_one_seo_pack')?> &raquo;" />
1565
- <strong><?php //_e("(Remember: Backup early, backup often!)", 'all_in_one_seo_pack') ?></strong>
1566
- </form>
1567
- </p>
1568
- <p></p>
1569
-
1570
-
1571
- <?php //if (!$canwrite) {
1572
- //echo("<p><strong>"); echo(sprintf(__("Please make sure that %s is writable.", 'all_in_one_seo_pack'), $this->upgrade_folder)); echo("</p></strong>");
1573
- // } ?>
1574
- </p>
1575
- -->
1576
-
1577
- <script type="text/javascript">
1578
- <!--
1579
- function toggleVisibility(id) {
1580
- var e = document.getElementById(id);
1581
- if(e.style.display == 'block')
1582
- e.style.display = 'none';
1583
- else
1584
- e.style.display = 'block';
1585
- }
1586
- //-->
1587
- </script>
1588
-
1589
- <h3><?php _e('Click on option titles to get help!', 'all_in_one_seo_pack') ?></h3>
1590
-
1591
- <?php
1592
- function aioseop_mrt_df(){
1593
-
1594
- if(function_exists('fetch_feed')){
1595
- // start new feed
1596
- echo "Highest Donations";
1597
- // Get RSS Feed(s)
1598
- include_once(ABSPATH . WPINC . '/feed.php');
1599
-
1600
- // Get a SimplePie feed object from the specified feed source.
1601
- $rss = fetch_feed('feed://donations.semperfiwebdesign.com/category/highest-donations/feed/');
1602
-
1603
- // Figure out how many total items there are, but limit it to 5.
1604
- $maxitems = $rss->get_item_quantity(3);
1605
-
1606
- // Build an array of all the items, starting with element 0 (first element).
1607
- $rss_items = $rss->get_items(0, $maxitems);
1608
- ?>
1609
-
1610
- <ul>
1611
- <?php if ($maxitems == 0) echo '<li>No items.</li>';
1612
- else
1613
- // Loop through each feed item and display each item as a hyperlink.
1614
- foreach ( $rss_items as $item ) : ?>
1615
- <li>
1616
- <a href='<?php echo $item->get_permalink(); ?>'
1617
- title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1618
- <?php echo $item->get_title(); ?></a>
1619
- </li>
1620
- <?php endforeach; ?>
1621
- </ul>
1622
-
1623
- <?php echo "Latest Donations"; ?>
1624
- <?php // Get RSS Feed(s)
1625
- include_once(ABSPATH . WPINC . '/feed.php');
1626
-
1627
- // Get a SimplePie feed object from the specified feed source.
1628
- $rss = fetch_feed('feed://donations.semperfiwebdesign.com/category/all-in-one-seo-pack/feed/');
1629
-
1630
- // Figure out how many total items there are, but limit it to 5.
1631
- $maxitems = $rss->get_item_quantity(3);
1632
-
1633
- // Build an array of all the items, starting with element 0 (first element).
1634
- $rss_items = $rss->get_items(0, $maxitems);
1635
- ?>
1636
-
1637
- <ul>
1638
- <?php if ($maxitems == 0) echo '<li>No items.</li>';
1639
- else
1640
- // Loop through each feed item and display each item as a hyperlink.
1641
- foreach ( $rss_items as $item ) : ?>
1642
- <li>
1643
- <a href='<?php echo $item->get_permalink(); ?>'
1644
- title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1645
- <?php echo $item->get_title(); ?></a>
1646
- </li>
1647
- <?php endforeach; ?>
1648
- </ul>
1649
-
1650
-
1651
- <?php // end new feed
1652
- }else{
1653
-
1654
- $uri = "feed://donations.semperfiwebdesign.com/category/highest-donations/feed/";
1655
- include_once(ABSPATH . WPINC . '/rss.php');
1656
- $rss = fetch_rss($uri);
1657
- if($rss){
1658
- echo "Highest Donations";
1659
- $maxitems = 5;
1660
- if(is_array($rss->items)){
1661
- $items = array_slice($rss->items, 0, $maxitems);
1662
- ?>
1663
- <ul>
1664
- <?php if (empty($items)) echo '<li>No items</li>';
1665
- else
1666
- foreach ( $items as $item ) : ?>
1667
- <li><a href='<?php echo $item['description']; ?>'
1668
- title='<?php echo $item['title']; ?>'>
1669
- <?php echo $item['title']; ?>
1670
- </a></li>
1671
- <?php endforeach; ?>
1672
- </ul>
1673
- <?php } }else{
1674
- //do something else for feed here
1675
- }
1676
-
1677
-
1678
- ?>
1679
-
1680
- <?php
1681
- $uri = "feed://donations.semperfiwebdesign.com/category/all-in-one-seo-pack/feed/";
1682
- include_once(ABSPATH . WPINC . '/rss.php');
1683
- $rss = fetch_rss($uri);
1684
- if($rss){
1685
- echo "Latest Donations";
1686
- $maxitems = 5;
1687
- if(is_array($rss->items)){
1688
- $items = array_slice($rss->items, 0, $maxitems);
1689
- ?>
1690
- <ul>
1691
- <?php if (empty($items)) echo '<li>No items</li>';
1692
- else
1693
- foreach ( $items as $item ) : ?>
1694
- <li><a href='<?php echo $item['link']; ?>'
1695
- title='<?php echo $item['title']; ?>'>
1696
- <?php echo $item['title']; ?>
1697
- </a></li>
1698
- <?php endforeach; ?>
1699
- </ul>
1700
- <?php } }else{
1701
- //fall back on something else for feed here
1702
- }
1703
- }
1704
- }
1705
-
1706
- //aioseop_mrt_df();
1707
-
1708
- ?>
1709
-
1710
-
1711
-
1712
- <?php
1713
- global $wpdb;
1714
- $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'keywords'");
1715
- $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'title'") + $somecount;
1716
- $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'description'") + $somecount;
1717
- $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_meta'") + $somecount;
1718
- $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_disable'") + $somecount;
1719
- if($somecount > 0){
1720
- echo "<div class='error' style='text-align:center;'><p><strong>Your database meta needs to be updated. " . $somecount . " old fields remaining</strong> <em>(Back up your database before updating.)</em>
1721
- <FORM action='' method='post' name='aioseop-migrate'>
1722
- <input type='hidden' name='nonce-aioseop-migrate' value='" . wp_create_nonce('aioseop-migrate-nonce') . "' />
1723
- <input type='submit' name='aioseop_migrate' class='button-primary' value='Update Database'>
1724
- </FORM>
1725
- </p></div>";
1726
- }
1727
-
1728
- if(!get_option('aioseop_options')){
1729
- echo "<div class='error' style='text-align:center;'><p><strong>Your database options need to be updated.</strong><em>(Back up your database before updating.)</em>
1730
- <FORM action='' method='post' name='aioseop-migrate-options'>
1731
- <input type='hidden' name='nonce-aioseop-migrate-options' value='" . wp_create_nonce('aioseop-migrate-nonce-options') . "' />
1732
- <input type='submit' name='aioseop_migrate_options' class='button-primary' value='Update Database Options'>
1733
- </FORM>
1734
- </p></div>";
1735
-
1736
- }
1737
-
1738
- ?>
1739
-
1740
-
1741
- <form name="dofollow" action="" method="post">
1742
- <table class="form-table">
1743
- <?php $aioseop_options = get_option('aioseop_options'); ?>
1744
- <?php if (!$aioseop_options['aiosp_donate']){?>
1745
- <tr>
1746
- <th scope="row" style="text-align:right; vertical-align:top;">
1747
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_donate_tip');">
1748
- <?php _e('I enjoy this plugin and have made a donation:', 'all_in_one_seo_pack'); ?>
1749
- </a>
1750
- </td>
1751
- <td>
1752
- <input type="checkbox" name="aiosp_donate" <?php if ($aioseop_options['aiosp_donate']) echo "checked=\"1\""; ?>/>
1753
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_donate_tip">
1754
- <?php
1755
- _e('All donations support continued development of this free software.', 'all_in_one_seo_pack');
1756
- ?>
1757
- </div>
1758
- </td>
1759
- </tr>
1760
- <?php } ?>
1761
-
1762
- <tr>
1763
- <th scope="row" style="text-align:right; vertical-align:top;">
1764
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack'); ?>" onclick="toggleVisibility('aiosp_enabled_tip');">
1765
- <?php _e('Plugin Status:', 'all_in_one_seo_pack')?>
1766
- </a>
1767
- </td>
1768
- <td>
1769
- <input type="radio" name="aiosp_enabled" value="1" <?php if($aioseop_options['aiosp_enabled']) echo "checked"?> > <?php _e('Enabled', 'all_in_one_seo_pack'); ?><br>
1770
- <input type="radio" name="aiosp_enabled" value="0" <?php if(!$aioseop_options['aiosp_enabled']) echo "checked"?>> <?php _e('Disabled', 'all_in_one_seo_pack'); ?>
1771
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_enabled_tip">
1772
- <?php
1773
- _e('All in One SEO Pack must be enabled for use.', 'all_in_one_seo_pack');
1774
- ?>
1775
- </div>
1776
- </td>
1777
- </tr>
1778
-
1779
- <tr>
1780
- <th scope="row" style="text-align:right; vertical-align:top;">
1781
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_title_tip');">
1782
- <?php _e('Home Title:', 'all_in_one_seo_pack')?>
1783
- </a>
1784
- </td>
1785
- <td>
1786
- <textarea cols="57" rows="2" name="aiosp_home_title"><?php echo stripcslashes($aioseop_options['aiosp_home_title']); ?></textarea>
1787
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_title_tip">
1788
- <?php
1789
- _e('As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used.', 'all_in_one_seo_pack');
1790
- ?>
1791
- </div>
1792
- </td>
1793
- </tr>
1794
-
1795
- <tr>
1796
- <th scope="row" style="text-align:right; vertical-align:top;">
1797
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_description_tip');">
1798
- <?php _e('Home Description:', 'all_in_one_seo_pack')?>
1799
- </a>
1800
- </td>
1801
- <td>
1802
- <textarea cols="57" rows="2" name="aiosp_home_description"><?php echo stripcslashes($aioseop_options['aiosp_home_description']); ?></textarea>
1803
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_description_tip">
1804
- <?php
1805
- _e('The META description for your homepage. Independent of any other options, the default is no META description at all if this is not set.', 'all_in_one_seo_pack');
1806
- ?>
1807
- </div>
1808
- </td>
1809
- </tr>
1810
-
1811
- <tr>
1812
- <th scope="row" style="text-align:right; vertical-align:top;">
1813
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_keywords_tip');">
1814
- <?php _e('Home Keywords (comma separated):', 'all_in_one_seo_pack')?>
1815
- </a>
1816
- </td>
1817
- <td>
1818
- <textarea cols="57" rows="2" name="aiosp_home_keywords"><?php echo stripcslashes($aioseop_options['aiosp_home_keywords']); ?></textarea>
1819
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_keywords_tip">
1820
- <?php
1821
- _e("A comma separated list of your most important keywords for your site that will be written as META keywords on your homepage. Don't stuff everything in here.", 'all_in_one_seo_pack');
1822
- ?>
1823
- </div>
1824
- </td>
1825
- </tr>
1826
-
1827
- <tr>
1828
- <th scope="row" style="text-align:right; vertical-align:top;">
1829
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_can_tip');">
1830
- <?php _e('Canonical URLs:', 'all_in_one_seo_pack')?>
1831
- </a>
1832
- </td>
1833
- <td>
1834
- <input type="checkbox" name="aiosp_can" <?php if ($aioseop_options['aiosp_can']) echo "checked=\"1\""; ?>/>
1835
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_can_tip">
1836
- <?php
1837
- _e("This option will automatically generate Canonical URLS for your entire WordPress installation. This will help to prevent duplicate content penalties by <a href='http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html' target='_blank'>Google</a>.", 'all_in_one_seo_pack');
1838
- ?>
1839
- </div>
1840
- </td>
1841
- </tr>
1842
-
1843
- <tr>
1844
- <th scope="row" style="text-align:right; vertical-align:top;">
1845
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_rewrite_titles_tip');">
1846
- <?php _e('Rewrite Titles:', 'all_in_one_seo_pack')?>
1847
- </a>
1848
- </td>
1849
- <td>
1850
- <input type="checkbox" name="aiosp_rewrite_titles" <?php if ($aioseop_options['aiosp_rewrite_titles']) echo "checked=\"1\""; ?>/>
1851
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_rewrite_titles_tip">
1852
- <?php
1853
- _e("Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: “Blog Archive >> Blog Name >> Post Title” (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to “Post Title | Blog Name”. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string.", 'all_in_one_seo_pack');
1854
- ?>
1855
- </div>
1856
- </td>
1857
- </tr>
1858
-
1859
- <tr>
1860
- <th scope="row" style="text-align:right; vertical-align:top;">
1861
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_title_format_tip');">
1862
- <?php _e('Post Title Format:', 'all_in_one_seo_pack')?>
1863
- </a>
1864
- </td>
1865
- <td>
1866
- <input size="59" name="aiosp_post_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_post_title_format']); ?>"/>
1867
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_post_title_format_tip">
1868
- <?php
1869
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1870
- echo('<ul>');
1871
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1872
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1873
- echo('<li>'); _e('%post_title% - The original title of the post', 'all_in_one_seo_pack'); echo('</li>');
1874
- echo('<li>'); _e('%category_title% - The (main) category of the post', 'all_in_one_seo_pack'); echo('</li>');
1875
- echo('<li>'); _e('%category% - Alias for %category_title%', 'all_in_one_seo_pack'); echo('</li>');
1876
- echo('<li>'); _e("%post_author_login% - This post's author' login", 'all_in_one_seo_pack'); echo('</li>');
1877
- echo('<li>'); _e("%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
1878
- echo('<li>'); _e("%post_author_firstname% - This post's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1879
- echo('<li>'); _e("%post_author_lastname% - This post's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1880
- echo('</ul>');
1881
- ?>
1882
- </div>
1883
- </td>
1884
- </tr>
1885
-
1886
- <tr>
1887
- <th scope="row" style="text-align:right; vertical-align:top;">
1888
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_title_format_tip');">
1889
- <?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
1890
- </a>
1891
- </td>
1892
- <td>
1893
- <input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_page_title_format']); ?>"/>
1894
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_page_title_format_tip">
1895
- <?php
1896
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1897
- echo('<ul>');
1898
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1899
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1900
- echo('<li>'); _e('%page_title% - The original title of the page', 'all_in_one_seo_pack'); echo('</li>');
1901
- echo('<li>'); _e("%page_author_login% - This page's author' login", 'all_in_one_seo_pack'); echo('</li>');
1902
- echo('<li>'); _e("%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
1903
- echo('<li>'); _e("%page_author_firstname% - This page's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1904
- echo('<li>'); _e("%page_author_lastname% - This page's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1905
- echo('</ul>');
1906
- ?>
1907
- </div>
1908
- </td>
1909
- </tr>
1910
-
1911
- <tr>
1912
- <th scope="row" style="text-align:right; vertical-align:top;">
1913
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_title_format_tip');">
1914
- <?php _e('Category Title Format:', 'all_in_one_seo_pack')?>
1915
- </a>
1916
- </td>
1917
- <td>
1918
- <input size="59" name="aiosp_category_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_category_title_format']); ?>"/>
1919
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_category_title_format_tip">
1920
- <?php
1921
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1922
- echo('<ul>');
1923
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1924
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1925
- echo('<li>'); _e('%category_title% - The original title of the category', 'all_in_one_seo_pack'); echo('</li>');
1926
- echo('<li>'); _e('%category_description% - The description of the category', 'all_in_one_seo_pack'); echo('</li>');
1927
- echo('</ul>');
1928
- ?>
1929
- </div>
1930
- </td>
1931
- </tr>
1932
-
1933
- <tr>
1934
- <th scope="row" style="text-align:right; vertical-align:top;">
1935
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_title_format_tip');">
1936
- <?php _e('Archive Title Format:', 'all_in_one_seo_pack')?>
1937
- </a>
1938
- </td>
1939
- <td>
1940
- <input size="59" name="aiosp_archive_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_archive_title_format']); ?>"/>
1941
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_title_format_tip">
1942
- <?php
1943
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1944
- echo('<ul>');
1945
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1946
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1947
- echo('<li>'); _e('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack'); echo('</li>');
1948
- echo('</ul>');
1949
- ?>
1950
- </div>
1951
- </td>
1952
- </tr>
1953
-
1954
- <tr>
1955
- <th scope="row" style="text-align:right; vertical-align:top;">
1956
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tag_title_format_tip');">
1957
- <?php _e('Tag Title Format:', 'all_in_one_seo_pack')?>
1958
- </a>
1959
- </td>
1960
- <td>
1961
- <input size="59" name="aiosp_tag_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_tag_title_format']); ?>"/>
1962
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_tag_title_format_tip">
1963
- <?php
1964
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1965
- echo('<ul>');
1966
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1967
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1968
- echo('<li>'); _e('%tag% - The name of the tag', 'all_in_one_seo_pack'); echo('</li>');
1969
- echo('</ul>');
1970
- ?>
1971
- </div>
1972
- </td>
1973
- </tr>
1974
-
1975
- <tr>
1976
- <th scope="row" style="text-align:right; vertical-align:top;">
1977
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_search_title_format_tip');">
1978
- <?php _e('Search Title Format:', 'all_in_one_seo_pack')?>
1979
- </a>
1980
- </td>
1981
- <td>
1982
- <input size="59" name="aiosp_search_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_search_title_format']); ?>"/>
1983
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_search_title_format_tip">
1984
- <?php
1985
- _e('The following macros are supported:', 'all_in_one_seo_pack');
1986
- echo('<ul>');
1987
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1988
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1989
- echo('<li>'); _e('%search% - What was searched for', 'all_in_one_seo_pack'); echo('</li>');
1990
- echo('</ul>');
1991
- ?>
1992
- </div>
1993
- </td>
1994
- </tr>
1995
-
1996
- <tr>
1997
- <th scope="row" style="text-align:right; vertical-align:top;">
1998
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_description_format_tip');">
1999
- <?php _e('Description Format:', 'all_in_one_seo_pack')?>
2000
- </a>
2001
- </td>
2002
- <td>
2003
- <input size="59" name="aiosp_description_format" value="<?php echo stripcslashes($aioseop_options['aiosp_description_format']); ?>"/>
2004
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_description_format_tip">
2005
- <?php
2006
- _e('The following macros are supported:', 'all_in_one_seo_pack');
2007
- echo('<ul>');
2008
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
2009
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
2010
- 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>');
2011
- echo('<li>'); _e('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack'); echo('</li>');
2012
- echo('</ul>');
2013
- ?>
2014
- </div>
2015
- </td>
2016
- </tr>
2017
-
2018
- <tr>
2019
- <th scope="row" style="text-align:right; vertical-align:top;">
2020
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_404_title_format_tip');">
2021
- <?php _e('404 Title Format:', 'all_in_one_seo_pack')?>
2022
- </a>
2023
- </td>
2024
- <td>
2025
- <input size="59" name="aiosp_404_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_404_title_format']); ?>"/>
2026
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_404_title_format_tip">
2027
- <?php
2028
- _e('The following macros are supported:', 'all_in_one_seo_pack');
2029
- echo('<ul>');
2030
- echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
2031
- echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
2032
- echo('<li>'); _e('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all_in_one_seo_pack'); echo('</li>');
2033
- echo('<li>'); _e('%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all_in_one_seo_pack'); echo('</li>');
2034
- echo('<li>'); _e('%404_title% - Additional 404 title input"', 'all_in_one_seo_pack'); echo('</li>');
2035
- echo('</ul>');
2036
- ?>
2037
- </div>
2038
- </td>
2039
- </tr>
2040
-
2041
- <tr>
2042
- <th scope="row" style="text-align:right; vertical-align:top;">
2043
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_paged_format_tip');">
2044
- <?php _e('Paged Format:', 'all_in_one_seo_pack')?>
2045
- </a>
2046
- </td>
2047
- <td>
2048
- <input size="59" name="aiosp_paged_format" value="<?php echo stripcslashes($aioseop_options['aiosp_paged_format']); ?>"/>
2049
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_paged_format_tip">
2050
- <?php
2051
- _e('This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages).', 'all_in_one_seo_pack');
2052
- _e('The following macros are supported:', 'all_in_one_seo_pack');
2053
- echo('<ul>');
2054
- echo('<li>'); _e('%page% - The page number', 'all_in_one_seo_pack'); echo('</li>');
2055
- echo('</ul>');
2056
- ?>
2057
- </div>
2058
- </td>
2059
- </tr>
2060
-
2061
- <tr>
2062
- <th scope="row" style="text-align:right; vertical-align:top;">
2063
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_enablecpost_tip');">
2064
- <?php _e('SEO for Custom Post Types:', 'all_in_one_seo_pack')?>
2065
- </td>
2066
- <td>
2067
- <input type="checkbox" name="aiosp_enablecpost" <?php if ($aioseop_options['aiosp_enablecpost']) echo "checked=\"1\""; ?>/>
2068
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_enablecpost_tip">
2069
- <?php
2070
- _e('Check this if you want your enable AIOSEOP support for Custom Post Types on this site.', 'all_in_one_seo_pack');
2071
- ?>
2072
- </div>
2073
- </td>
2074
- </tr>
2075
- <?php if( function_exists('get_post_types')){ ?>
2076
- <tr>
2077
- <th scope="row" style="text-align:right; vertical-align:top;">
2078
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('123_tip');">
2079
- <?php _e('Custom Post Types for SEO Column Support:', 'all_in_one_seo_pack')?>
2080
- </td>
2081
- <td><select name="aiosp_posttypecolumns[]" MULTIPLE style="height:70px;width:300px;">
2082
- <?php
2083
- $typeswehave = array('post,revision'); //$aioseop_options['aiosp_posttypecolumns'];
2084
- $post_types=get_post_types('','names');
2085
- $rempost = array('attachment','revision','nav_menu_item');
2086
- $post_types = array_diff($post_types,$rempost);
2087
- foreach ($post_types as $post_type ) {
2088
- echo "<option ";
2089
- if(is_array($aioseop_options['aiosp_posttypecolumns']) && in_array($post_type,$aioseop_options['aiosp_posttypecolumns'])) echo "selected ";
2090
- echo "name=\"aiosp_posttypecolumns\">$post_type";
2091
- }
2092
-
2093
- ?>
2094
- </select>
2095
-
2096
- <div style="max-width:500px; text-align:left; display:none" id="123_tip">
2097
- <?php
2098
- _e('Choose which post types you want to have SEO columns on the edit.php screen. You can select as many as you like.', 'all_in_one_seo_pack');
2099
- ?>
2100
- </div>
2101
- </td>
2102
- </tr>
2103
- <?php } ?>
2104
- <tr>
2105
- <th scope="row" style="text-align:right; vertical-align:top;">
2106
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
2107
- <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
2108
- </td>
2109
- <td>
2110
- <input type="checkbox" name="aiosp_use_categories" <?php if ($aioseop_options['aiosp_use_categories']) echo "checked=\"1\""; ?>/>
2111
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_use_categories_tip">
2112
- <?php
2113
- _e('Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page).', 'all_in_one_seo_pack');
2114
- ?>
2115
- </div>
2116
- </td>
2117
- </tr>
2118
-
2119
- <tr>
2120
- <th scope="row" style="text-align:right; vertical-align:top;">
2121
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_tags_as_keywords_tip');">
2122
- <?php _e('Use Tags for META keywords:', 'all_in_one_seo_pack')?>
2123
- </td>
2124
- <td>
2125
- <input type="checkbox" name="aiosp_use_tags_as_keywords" <?php if ($aioseop_options['aiosp_use_tags_as_keywords']) echo "checked=\"1\""; ?>/>
2126
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_use_tags_as_keywords_tip">
2127
- <?php
2128
- _e('Check this if you want your tags for a given post used as the META keywords for this post (in addition to any keywords you specify on the post edit page).', 'all_in_one_seo_pack');
2129
- ?>
2130
- </div>
2131
- </td>
2132
- </tr>
2133
-
2134
-
2135
-
2136
-
2137
- <tr>
2138
- <th scope="row" style="text-align:right; vertical-align:top;">
2139
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_dynamic_postspage_keywords_tip');">
2140
- <?php _e('Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack')?>
2141
- </td>
2142
- <td>
2143
- <input type="checkbox" name="aiosp_dynamic_postspage_keywords" <?php if ($aioseop_options['aiosp_dynamic_postspage_keywords']) echo "checked=\"1\""; ?>/>
2144
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_dynamic_postspage_keywords_tip">
2145
- <?php
2146
- _e('Check this if you want your keywords on a custom posts page (set it in options->reading) to be dynamically generated from the keywords of the posts showing on that page. If unchecked, it will use the keywords set in the edit page screen for the posts page.', 'all_in_one_seo_pack');
2147
- ?>
2148
- </div>
2149
- </td>
2150
- </tr>
2151
-
2152
- <tr>
2153
- <th scope="row" style="text-align:right; vertical-align:top;">
2154
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_noindex_tip');">
2155
- <?php _e('Use noindex for Categories:', 'all_in_one_seo_pack')?>
2156
- </a>
2157
- </td>
2158
- <td>
2159
- <input type="checkbox" name="aiosp_category_noindex" <?php if ($aioseop_options['aiosp_category_noindex']) echo "checked=\"1\""; ?>/>
2160
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_category_noindex_tip">
2161
- <?php
2162
- _e('Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2163
- ?>
2164
- </div>
2165
- </td>
2166
- </tr>
2167
-
2168
- <tr>
2169
- <th scope="row" style="text-align:right; vertical-align:top;">
2170
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_noindex_tip');">
2171
- <?php _e('Use noindex for Archives:', 'all_in_one_seo_pack')?>
2172
- </a>
2173
- </td>
2174
- <td>
2175
- <input type="checkbox" name="aiosp_archive_noindex" <?php if ($aioseop_options['aiosp_archive_noindex']) echo "checked=\"1\""; ?>/>
2176
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_noindex_tip">
2177
- <?php
2178
- _e('Check this for excluding archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2179
- ?>
2180
- </div>
2181
- </td>
2182
- </tr>
2183
-
2184
- <tr>
2185
- <th scope="row" style="text-align:right; vertical-align:top;">
2186
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tags_noindex_tip');">
2187
- <?php _e('Use noindex for Tag Archives:', 'all_in_one_seo_pack')?>
2188
- </a>
2189
- </td>
2190
- <td>
2191
- <input type="checkbox" name="aiosp_tags_noindex" <?php if ($aioseop_options['aiosp_tags_noindex']) echo "checked=\"1\""; ?>/>
2192
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_tags_noindex_tip">
2193
- <?php
2194
- _e('Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2195
- ?>
2196
- </div>
2197
- </td>
2198
- </tr>
2199
-
2200
- <tr>
2201
- <th scope="row" style="text-align:right; vertical-align:top;">
2202
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_generate_descriptions_tip');">
2203
- <?php _e('Autogenerate Descriptions:', 'all_in_one_seo_pack')?>
2204
- </a>
2205
- </td>
2206
- <td>
2207
- <input type="checkbox" name="aiosp_generate_descriptions" <?php if ($aioseop_options['aiosp_generate_descriptions']) echo "checked=\"1\""; ?>/>
2208
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_generate_descriptions_tip">
2209
- <?php
2210
- _e("Check this and your META descriptions will get autogenerated if there's no excerpt.", 'all_in_one_seo_pack');
2211
- ?>
2212
- </div>
2213
- </td>
2214
- </tr>
2215
-
2216
- <tr>
2217
- <th scope="row" style="text-align:right; vertical-align:top;">
2218
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_cap_cats_tip');">
2219
- <?php _e('Capitalize Category Titles:', 'all_in_one_seo_pack')?>
2220
- </a>
2221
- </td>
2222
- <td>
2223
- <input type="checkbox" name="aiosp_cap_cats" <?php if ($aioseop_options['aiosp_cap_cats']) echo "checked=\"1\""; ?>/>
2224
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_cap_cats_tip">
2225
- <?php
2226
- _e("Check this and Category Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack');
2227
- ?>
2228
- </div>
2229
- </td>
2230
- </tr>
2231
-
2232
- <!-- new crap start -->
2233
- <tr>
2234
- <th scope="row" style="text-align:right; vertical-align:top;">
2235
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_ex_pages_tip');">
2236
- <?php _e('Exclude Pages:', 'all_in_one_seo_pack')?>
2237
- </a>
2238
- </td>
2239
- <td>
2240
- <textarea cols="57" rows="2" name="aiosp_ex_pages"><?php echo stripcslashes($aioseop_options['aiosp_ex_pages']); ?></textarea>
2241
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_ex_pages_tip">
2242
- <?php
2243
- _e("Enter any comma separated pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/,/contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is give forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage will be excluded from All in One SEO Pack.", 'all_in_one_seo_pack');
2244
- ?>
2245
- </div>
2246
- </td>
2247
- </tr>
2248
- <!-- new crap end -->
2249
-
2250
- <tr>
2251
- <th scope="row" style="text-align:right; vertical-align:top;">
2252
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_meta_tags_tip');">
2253
- <?php _e('Additional Post Headers:', 'all_in_one_seo_pack')?>
2254
- </a>
2255
- </td>
2256
- <td>
2257
- <textarea cols="57" rows="2" name="aiosp_post_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_post_meta_tags']); ?></textarea>
2258
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_post_meta_tags_tip">
2259
- <?php
2260
- _e('What you enter here will be copied verbatim to your header on post pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2261
- ?>
2262
- </div>
2263
- </td>
2264
- </tr>
2265
-
2266
- <tr>
2267
- <th scope="row" style="text-align:right; vertical-align:top;">
2268
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_meta_tags_tip');">
2269
- <?php _e('Additional Page Headers:', 'all_in_one_seo_pack')?>
2270
- </a>
2271
- </td>
2272
- <td>
2273
- <textarea cols="57" rows="2" name="aiosp_page_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_page_meta_tags']); ?></textarea>
2274
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_page_meta_tags_tip">
2275
- <?php
2276
- _e('What you enter here will be copied verbatim to your header on pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2277
- ?>
2278
- </div>
2279
- </td>
2280
- </tr>
2281
-
2282
- <tr>
2283
- <th scope="row" style="text-align:right; vertical-align:top;">
2284
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_meta_tags_tip');">
2285
- <?php _e('Additional Home Headers:', 'all_in_one_seo_pack')?>
2286
- </a>
2287
- </td>
2288
- <td>
2289
- <textarea cols="57" rows="2" name="aiosp_home_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_home_meta_tags']); ?></textarea>
2290
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_meta_tags_tip">
2291
- <?php
2292
- _e('What you enter here will be copied verbatim to your header on the home page. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2293
- ?>
2294
- </div>
2295
- </td>
2296
- </tr>
2297
-
2298
- <tr>
2299
- <th scope="row" style="text-align:right; vertical-align:top;">
2300
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'auto_social')?>" onclick="toggleVisibility('aiosp_do_log_tip');">
2301
- <?php _e('Log important events:', 'all_in_one_seo_pack')?>
2302
- </a>
2303
- </td>
2304
- <td>
2305
- <input type="checkbox" name="aiosp_do_log" <?php if ($aioseop_options['aiosp_do_log']) echo "checked=\"1\""; ?>/>
2306
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_do_log_tip">
2307
- <?php
2308
- _e('Check this and SEO pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable.', 'all_in_one_seo_pack');
2309
- ?>
2310
- </div>
2311
- </td>
2312
- </tr>
2313
-
2314
- <?php if ($aioseop_options['aiosp_donate']){?>
2315
- <tr>
2316
- <th scope="row" style="text-align:right; vertical-align:top;">
2317
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_donate_tip');">
2318
- <?php _e('Thank you for your donation:', 'all_in_one_seo_pack')?>
2319
- </a>
2320
- </td>
2321
- <td>
2322
- <input type="checkbox" name="aiosp_donate" <?php if ($aioseop_options['aiosp_donate']) echo "checked=\"1\""; ?>/>
2323
- <div style="max-width:500px; text-align:left; display:none" id="aiosp_donate_tip">
2324
- <?php _e('All donations support continued development of this free software.', 'all_in_one_seo_pack'); ?>
2325
- </div>
2326
- </td>
2327
- </tr>
2328
- <?php } ?>
2329
-
2330
- </table>
2331
- <p class="submit">
2332
- <?php if($aioseop_options) { ?>
2333
-
2334
- <input type="hidden" name="action" value="aiosp_update" />
2335
- <input type="hidden" name="nonce-aioseop" value="<?php echo wp_create_nonce('aioseop-nonce'); ?>" />
2336
- <input type="hidden" name="page_options" value="aiosp_home_description" />
2337
- <input type="submit" class='button-primary' name="Submit" value="<?php _e('Update Options', 'all_in_one_seo_pack')?> &raquo;" />
2338
- <input type="submit" class='button-primary' name="Submit_Default" value="<?php _e('Reset Settings to Defaults', 'all_in_one_seo_pack')?> &raquo;" />
2339
- </p>
2340
- <?php } ?>
2341
-
2342
- <p><br />
2343
- <strong><?php _e('Check out these other great plugins!','all_in_one_seo_pack'); ?></strong><br />
2344
- <a href="http://semperfiwebdesign.com/custom-applications/sms-text-message/" title="SMS Text Message WordPress plugin">SMS Text Message</a> - <?php _e('sends SMS updates to your readers','all_in_one_seo_pack'); ?><br />
2345
- <a href="http://semperfiwebdesign.com/custom-applications/wp-security-scan/" title="WordPress Security">WordPress Security Scan</a> - <?php _e('provides vital security for your WordPress site','all_in_one_seo_pack'); ?>
2346
- </p>
2347
- </form>
2348
- </div>
2349
- <?php
2350
-
2351
- } // options_panel
2352
-
2353
- }
2354
-
2355
- ?>
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class All_in_One_SEO_Pack {
4
+
5
+ var $version = "1.6.13.3";
6
+
7
+ /** Max numbers of chars in auto-generated description */
8
+ var $maximum_description_length = 160;
9
+
10
+ /** Minimum number of chars an excerpt should be so that it can be used
11
+ * as description. Touch only if you know what you're doing
12
+ */
13
+ var $minimum_description_length = 1;
14
+
15
+ var $ob_start_detected = false;
16
+
17
+ var $title_start = -1;
18
+
19
+ var $title_end = -1;
20
+
21
+ /** The title before rewriting */
22
+ var $orig_title = '';
23
+
24
+ /** Temp filename for the latest version. */
25
+ // var $upgrade_filename = 'temp.zip';
26
+
27
+ /** Where to extract the downloaded newest version. */
28
+ // var $upgrade_folder;
29
+
30
+ /** Any error in upgrading. */
31
+ // var $upgrade_error;
32
+
33
+ /** Which zip to download in order to upgrade .*/
34
+ // var $upgrade_url = 'http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip';
35
+
36
+ /** Filename of log file. */
37
+ var $log_file;
38
+
39
+ /** Flag whether there should be logging. */
40
+ var $do_log;
41
+
42
+ var $wp_version;
43
+
44
+ var $aioseop_op;
45
+ //var $aioseop_options = get_option('aioseop_options');
46
+
47
+ function All_in_One_SEO_Pack() {
48
+ global $wp_version;
49
+ global $aioseop_options;
50
+ $this->wp_version = $wp_version;
51
+
52
+ $this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log';
53
+ if ($aioseop_options['aiosp_do_log']) {
54
+ $this->do_log = true;
55
+ } else {
56
+ $this->do_log = false;
57
+ }
58
+
59
+ // $this->upgrade_filename = dirname(__FILE__) . '/' . $this->upgrade_filename;
60
+ // $this->upgrade_folder = dirname(__FILE__);
61
+ }
62
+
63
+ /**
64
+ * Convert a string to lower case
65
+ * Compatible with mb_strtolower(), an UTF-8 friendly replacement for strtolower()
66
+ */
67
+ function strtolower($str) {
68
+ global $UTF8_TABLES;
69
+ return strtr($str, $UTF8_TABLES['strtolower']);
70
+ }
71
+
72
+ /**
73
+ * Convert a string to upper case
74
+ * Compatible with mb_strtoupper(), an UTF-8 friendly replacement for strtoupper()
75
+ */
76
+ function strtoupper($str) {
77
+ global $UTF8_TABLES;
78
+ return strtr($str, $UTF8_TABLES['strtoupper']);
79
+ }
80
+
81
+
82
+ function template_redirect() {
83
+ global $wp_query;
84
+ global $aioseop_options;
85
+
86
+ $post = $wp_query->get_queried_object();
87
+
88
+ if( $this->aioseop_mrt_exclude_this_page()){
89
+ return;
90
+ }
91
+
92
+ if (is_feed()) {
93
+ return;
94
+ }
95
+
96
+ if (is_single() || is_page()) {
97
+ $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true)));
98
+ if ($aiosp_disable) {
99
+ return;
100
+ }
101
+ }
102
+
103
+
104
+
105
+ if ($aioseop_options['aiosp_rewrite_titles']) {
106
+ ob_start(array($this, 'output_callback_for_title'));
107
+ }
108
+ }
109
+
110
+ function aioseop_mrt_exclude_this_page(){
111
+ global $aioseop_options;
112
+ $currenturl = trim($_SERVER['REQUEST_URI'],'/');
113
+ /* echo "<br /><br />";
114
+ echo $aioseop_options['aiosp_ex_pages'];
115
+ echo "<br /><br />";
116
+ */
117
+
118
+ $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']);
119
+ foreach($excludedstuff as $exedd){
120
+ //echo $exedd;
121
+ $exedd = trim($exedd);
122
+ if($exedd){
123
+ if(stristr($currenturl, $exedd)){
124
+ return true;
125
+ }
126
+ }
127
+ }
128
+ return false;
129
+ }
130
+
131
+ function output_callback_for_title($content) {
132
+ return $this->rewrite_title($content);
133
+ }
134
+
135
+
136
+
137
+
138
+
139
+
140
+ //
141
+ //CHECK IF ARRAY EXISTS IN DB, IF SO, GET ARRAY, ADD EVERYTHING, CHECK FOR ISSET?
142
+ //
143
+ function init() {
144
+ if (function_exists('load_plugin_textdomain')) {
145
+ if ( !defined('WP_PLUGIN_DIR') ) {
146
+ load_plugin_textdomain('all_in_one_seo_pack', str_replace( ABSPATH, '', dirname(__FILE__)));
147
+ } else {
148
+ load_plugin_textdomain('all_in_one_seo_pack', false, dirname(plugin_basename(__FILE__)));
149
+ }
150
+ }
151
+
152
+
153
+ /*
154
+ if (function_exists('load_plugin_textdomain')) {
155
+ load_plugin_textdomain('all_in_one_seo_pack', WP_PLUGIN_DIR . '/all-in-one-seo-pack');
156
+ }
157
+ */
158
+
159
+ }
160
+
161
+ function is_static_front_page() {
162
+ global $wp_query;
163
+ global $aioseop_options;
164
+ $post = $wp_query->get_queried_object();
165
+ return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
166
+ }
167
+
168
+ function is_static_posts_page() {
169
+ global $wp_query;
170
+ $post = $wp_query->get_queried_object();
171
+ return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
172
+ }
173
+
174
+ function get_base() {
175
+ return '/'.end(explode('/', str_replace(array('\\','/all_in_one_seo_pack.php'),array('/',''),__FILE__)));
176
+ }
177
+
178
+ function seo_mrt_admin_head() {
179
+ $home = get_settings('siteurl');
180
+ $stylesheet = WP_PLUGIN_URL . '/all-in-one-seo-pack/style.css';
181
+ echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />';
182
+ }
183
+
184
+
185
+ function wp_head() {
186
+ if (is_feed()) {
187
+ return;
188
+ }
189
+
190
+ global $wp_query;
191
+ global $aioseop_options;
192
+ $post = $wp_query->get_queried_object();
193
+ $meta_string = null;
194
+ if($this->is_static_posts_page()){
195
+ $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
196
+
197
+ }
198
+ //echo("wp_head() " . wp_title('', false) . " is_home() => " . is_home() . ", is_page() => " . is_page() . ", is_single() => " . is_single() . ", is_static_front_page() => " . $this->is_static_front_page() . ", is_static_posts_page() => " . $this->is_static_posts_page());
199
+
200
+ if (is_single() || is_page()) {
201
+ $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true)));
202
+ if ($aiosp_disable) {
203
+ return;
204
+ }
205
+ }
206
+
207
+ if( $this->aioseop_mrt_exclude_this_page()==TRUE ){
208
+ return;
209
+ }
210
+
211
+ if ($aioseop_options['aiosp_rewrite_titles']) {
212
+ // make the title rewrite as short as possible
213
+ if (function_exists('ob_list_handlers')) {
214
+ $active_handlers = ob_list_handlers();
215
+ } else {
216
+ $active_handlers = array();
217
+ }
218
+ if (sizeof($active_handlers) > 0 &&
219
+ strtolower($active_handlers[sizeof($active_handlers) - 1]) ==
220
+ strtolower('All_in_One_SEO_Pack::output_callback_for_title')) {
221
+ ob_end_flush();
222
+ } else {
223
+ $this->log("another plugin interfering?");
224
+ // if we get here there *could* be trouble with another plugin :(
225
+ $this->ob_start_detected = true;
226
+ if (function_exists('ob_list_handlers')) {
227
+ foreach (ob_list_handlers() as $handler) {
228
+ $this->log("detected output handler $handler");
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ /*
235
+
236
+ echo trim($_SERVER['REQUEST_URI'],'/');
237
+ $currenturl = trim($_SERVER['REQUEST_URI'],'/');
238
+ echo "<br /><br />";
239
+
240
+ echo $aioseop_options['aiosp_ex_pages'];
241
+
242
+ echo "<br /><br />";
243
+
244
+ $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']);
245
+ foreach($excludedstuff as $exedd){
246
+ echo $exedd;
247
+ //echo "<br /><br />substring: ". stristr($currenturl,trim($exedd)) . "<br />";
248
+ if(stristr($currenturl, trim($exedd))){
249
+ echo "<br />match, should not display<br /><br />";
250
+ }else{
251
+ echo "<br />( " . $exedd . " was not found in " . $currenturl . " ) - no match<br /><br />";
252
+ }
253
+ }
254
+ //print_r($excludedstuff);
255
+ */
256
+ echo "\n<!-- All in One SEO Pack $this->version by Michael Torbert of Semper Fi Web Design";
257
+ if ($this->ob_start_detected) {
258
+ echo "ob_start_detected ";
259
+ }
260
+ echo "[$this->title_start,$this->title_end] ";
261
+ echo "-->\n";
262
+ if ((is_home() && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page()) || $this->is_static_front_page()) {
263
+ $keywords = trim($this->internationalize($aioseop_options['aiosp_home_keywords']));
264
+ } elseif($this->is_static_posts_page() && !$aioseop_options['aiosp_dynamic_postspage_keywords']){ // and if option = use page set keywords instead of keywords from recent posts
265
+ //$keywords = "posts keyyysss" . stripcslashes(get_post_meta($post->ID,'keywords',true));
266
+ $keywords = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true)));
267
+
268
+ // $keywords = $this->get_unique_keywords($keywords);
269
+
270
+ } else {
271
+ $keywords = $this->get_all_keywords();
272
+ }
273
+ if (is_single() || is_page() || $this->is_static_posts_page()) {
274
+ if ($this->is_static_front_page()) {
275
+ $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
276
+ } else {
277
+ $description = $this->get_post_description($post);
278
+ $description = apply_filters('aioseop_description',$description);
279
+ }
280
+ } else if (is_home()) {
281
+ $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
282
+ } else if (is_category()) {
283
+ $description = $this->internationalize(category_description());
284
+ }
285
+
286
+ if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) {
287
+ $description = trim(strip_tags($description));
288
+ $description = str_replace('"', '', $description);
289
+
290
+ // replace newlines on mac / windows?
291
+ $description = str_replace("\r\n", ' ', $description);
292
+
293
+ // maybe linux uses this alone
294
+ $description = str_replace("\n", ' ', $description);
295
+
296
+ if (isset($meta_string)) {
297
+ //$meta_string .= "\n";
298
+ } else {
299
+ $meta_string = '';
300
+ }
301
+
302
+ // description format
303
+ $description_format = $aioseop_options['aiosp_description_format'];
304
+ if (!isset($description_format) || empty($description_format)) {
305
+ $description_format = "%description%";
306
+ }
307
+ $description = str_replace('%description%', apply_filters('aioseop_description_override', $description), $description_format);
308
+ $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
309
+ $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
310
+ $description = str_replace('%wp_title%', $this->get_original_title(), $description);
311
+ //$description = html_entity_decode($description, ENT_COMPAT, get_bloginfo('charset'));
312
+ if($aioseop_options['aiosp_can'] && is_attachment()){
313
+ $url = $this->aiosp_mrt_get_url($wp_query);
314
+ if ($url) {
315
+ preg_match_all('/(\d+)/', $url, $matches);
316
+ if (is_array($matches)){
317
+ $uniqueDesc = join('',$matches[0]);
318
+ }
319
+ }
320
+ $description .= ' ' . $uniqueDesc;
321
+ }
322
+ $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
323
+ }
324
+ $keywords = apply_filters('aioseop_keywords',$keywords);
325
+ if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) {
326
+ if (isset($meta_string)) {
327
+ $meta_string .= "\n";
328
+ }
329
+ $keywords = str_replace('"','',$keywords);
330
+ $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
331
+ }
332
+
333
+ if (function_exists('is_tag')) {
334
+ $is_tag = is_tag();
335
+ }
336
+
337
+ if ((is_category() && $aioseop_options['aiosp_category_noindex']) || (!is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex']) || ($aioseop_options['aiosp_tags_noindex'] && $is_tag)) {
338
+ if (isset($meta_string)) {
339
+ $meta_string .= "\n";
340
+ }
341
+ $meta_string .= '<meta name="robots" content="noindex,follow" />';
342
+ }
343
+
344
+ $page_meta = stripcslashes($aioseop_options['aiosp_page_meta_tags']);
345
+ $post_meta = stripcslashes($aioseop_options['aiosp_post_meta_tags']);
346
+ $home_meta = stripcslashes($aioseop_options['aiosp_home_meta_tags']);
347
+ if (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page()) {
348
+ if (isset($meta_string)) {
349
+ $meta_string .= "\n";
350
+ }
351
+ echo "\n$page_meta";
352
+ }
353
+
354
+ if (is_single() && isset($post_meta) && !empty($post_meta)) {
355
+ if (isset($meta_string)) {
356
+ $meta_string .= "\n";
357
+ }
358
+ $meta_string .= "$post_meta";
359
+ }
360
+
361
+ if (is_home() && !empty($home_meta)) {
362
+ if (isset($meta_string)) {
363
+ $meta_string .= "\n";
364
+ }
365
+ $meta_string .= "$home_meta";
366
+ }
367
+
368
+ if ($meta_string != null) {
369
+ echo "$meta_string\n";
370
+ }
371
+
372
+ if($aioseop_options['aiosp_can']){
373
+ $url = $this->aiosp_mrt_get_url($wp_query);
374
+ if ($url) {
375
+ $url = apply_filters('aioseop_canonical_url',$url);
376
+
377
+ echo "".'<link rel="canonical" href="'.$url.'" />'."\n";
378
+ }
379
+ }
380
+
381
+ echo "<!-- /all in one seo pack -->\n";
382
+ }
383
+
384
+ // Thank you, Yoast de Valk, for much of this code.
385
+
386
+ function aiosp_mrt_get_url($query) {
387
+ global $aioseop_options;
388
+ if ($query->is_404 || $query->is_search) {
389
+ return false;
390
+ }
391
+ $haspost = count($query->posts) > 0;
392
+ $has_ut = function_exists('user_trailingslashit');
393
+
394
+ if (get_query_var('m')) {
395
+ $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
396
+ switch (strlen($m)) {
397
+ case 4:
398
+ $link = get_year_link($m);
399
+ break;
400
+ case 6:
401
+ $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
402
+ break;
403
+ case 8:
404
+ $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
405
+ break;
406
+ default:
407
+ return false;
408
+ }
409
+ } elseif (($query->is_single || $query->is_page) && $haspost) {
410
+ $post = $query->posts[0];
411
+ $link = get_permalink($post->ID);
412
+ $link = $this->yoast_get_paged($link);
413
+ /* if ($page && $page > 1) {
414
+ $link = trailingslashit($link) . "page/". "$page";
415
+ if ($has_ut) {
416
+ $link = user_trailingslashit($link, 'paged');
417
+ } else {
418
+ $link .= '/';
419
+ }
420
+ }
421
+ if ($query->is_page && ('page' == get_option('show_on_front')) &&
422
+ $post->ID == get_option('page_on_front'))
423
+ {
424
+ $link = trailingslashit($link);
425
+ }*/
426
+ } elseif ($query->is_author && $haspost) {
427
+ global $wp_version;
428
+ if ($wp_version >= '2') {
429
+ $author = get_userdata(get_query_var('author'));
430
+ if ($author === false)
431
+ return false;
432
+ $link = get_author_link(false, $author->ID, $author->user_nicename);
433
+ } else {
434
+ global $cache_userdata;
435
+ $userid = get_query_var('author');
436
+ $link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
437
+ }
438
+ } elseif ($query->is_category && $haspost) {
439
+ $link = get_category_link(get_query_var('cat'));
440
+ $link = $this->yoast_get_paged($link);
441
+ } else if ($query->is_tag && $haspost) {
442
+ $tag = get_term_by('slug',get_query_var('tag'),'post_tag');
443
+ if (!empty($tag->term_id)) {
444
+ $link = get_tag_link($tag->term_id);
445
+ }
446
+ $link = $this->yoast_get_paged($link);
447
+ } elseif ($query->is_day && $haspost) {
448
+ $link = get_day_link(get_query_var('year'),
449
+ get_query_var('monthnum'),
450
+ get_query_var('day'));
451
+ } elseif ($query->is_month && $haspost) {
452
+ $link = get_month_link(get_query_var('year'),
453
+ get_query_var('monthnum'));
454
+ } elseif ($query->is_year && $haspost) {
455
+ $link = get_year_link(get_query_var('year'));
456
+ } elseif ($query->is_home) {
457
+ if ((get_option('show_on_front') == 'page') &&
458
+ ($pageid = get_option('page_for_posts')))
459
+ {
460
+ $link = get_permalink($pageid);
461
+ $link = $this->yoast_get_paged($link);
462
+ $link = trailingslashit($link);
463
+ } else {
464
+ $link = get_option('home');
465
+ $link = $this->yoast_get_paged($link);
466
+ $link = trailingslashit($link); }
467
+ } else {
468
+ return false;
469
+ }
470
+
471
+ return $link;
472
+
473
+ }
474
+
475
+
476
+ function yoast_get_paged($link) {
477
+ $page = get_query_var('paged');
478
+ if ($page && $page > 1) {
479
+ $link = trailingslashit($link) ."page/". "$page";
480
+ if ($has_ut) {
481
+ $link = user_trailingslashit($link, 'paged');
482
+ } else {
483
+ $link .= '/';
484
+ }
485
+ }
486
+ return $link;
487
+ }
488
+
489
+
490
+ function get_post_description($post) {
491
+ global $aioseop_options;
492
+ $description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_description", true))));
493
+ if (!$description) {
494
+ $description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt));
495
+ if (!$description && $aioseop_options["aiosp_generate_descriptions"]) {
496
+ $description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
497
+ }
498
+ }
499
+
500
+ // "internal whitespace trim"
501
+ $description = preg_replace("/\s\s+/", " ", $description);
502
+
503
+ return $description;
504
+ }
505
+
506
+ function replace_title($content, $title) {
507
+ $title = trim(strip_tags($title));
508
+
509
+ $title_tag_start = "<title>";
510
+ $title_tag_end = "</title>";
511
+ $len_start = strlen($title_tag_start);
512
+ $len_end = strlen($title_tag_end);
513
+ $title = stripcslashes(trim($title));
514
+ $start = strpos($content, $title_tag_start);
515
+ $end = strpos($content, $title_tag_end);
516
+
517
+ $this->title_start = $start;
518
+ $this->title_end = $end;
519
+ $this->orig_title = $title;
520
+
521
+ if ($start && $end) {
522
+ $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
523
+ } else {
524
+ // this breaks some sitemap plugins (like wpg2)
525
+ //$header = $content . "<title>$title</title>";
526
+
527
+ $header = $content;
528
+ }
529
+
530
+ return $header;
531
+ }
532
+
533
+ function internationalize($in) {
534
+ if (function_exists('langswitch_filter_langs_with_message')) {
535
+ $in = langswitch_filter_langs_with_message($in);
536
+ }
537
+ if (function_exists('polyglot_filter')) {
538
+ $in = polyglot_filter($in);
539
+ }
540
+ if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
541
+ $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
542
+ }
543
+ $in = apply_filters('localization', $in);
544
+ return $in;
545
+ }
546
+
547
+ /** @return The original title as delivered by WP (well, in most cases) */
548
+ function get_original_title() {
549
+ global $wp_query;
550
+ global $aioseop_options;
551
+ if (!$wp_query) {
552
+ return null;
553
+ }
554
+
555
+ $post = $wp_query->get_queried_object();
556
+
557
+ // the_search_query() is not suitable, it cannot just return
558
+ global $s;
559
+
560
+ $title = null;
561
+
562
+ if (is_home()) {
563
+ $title = get_option('blogname');
564
+ } else if (is_single()) {
565
+ $title = $this->internationalize(wp_title('', false));
566
+ } else if (is_search() && isset($s) && !empty($s)) {
567
+ if (function_exists('attribute_escape')) {
568
+ $search = attribute_escape(stripcslashes($s));
569
+ } else {
570
+ $search = wp_specialchars(stripcslashes($s), true);
571
+ }
572
+ $search = $this->capitalize($search);
573
+ $title = $search;
574
+ } else if (is_category() && !is_feed()) {
575
+ $category_description = $this->internationalize(category_description());
576
+ $category_name = ucwords($this->internationalize(single_cat_title('', false)));
577
+ $title = $category_name;
578
+ } else if (is_page()) {
579
+ $title = $this->internationalize(wp_title('', false));
580
+ } else if (function_exists('is_tag') && is_tag()) {
581
+ global $utw;
582
+ if ($utw) {
583
+ $tags = $utw->GetCurrentTagSet();
584
+ $tag = $tags[0]->tag;
585
+ $tag = str_replace('-', ' ', $tag);
586
+ } else {
587
+ // wordpress > 2.3
588
+ $tag = $this->internationalize(wp_title('', false));
589
+ }
590
+ if ($tag) {
591
+ $title = $tag;
592
+ }
593
+ } else if (is_archive()) {
594
+ $title = $this->internationalize(wp_title('', false));
595
+ } else if (is_404()) {
596
+ $title_format = $aioseop_options['aiosp_404_title_format'];
597
+ $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
598
+ $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
599
+ $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
600
+ $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
601
+ $title = $new_title;
602
+ }
603
+
604
+ return trim($title);
605
+ }
606
+
607
+ function paged_title($title) {
608
+ // the page number if paged
609
+ global $paged;
610
+ global $aioseop_options;
611
+ // simple tagging support
612
+ global $STagging;
613
+
614
+ if (is_paged() || (isset($STagging) && $STagging->is_tag_view() && $paged)) {
615
+ $part = $this->internationalize($aioseop_options['aiosp_paged_format']);
616
+ if (isset($part) || !empty($part)) {
617
+ $part = " " . trim($part);
618
+ $part = str_replace('%page%', $paged, $part);
619
+ $this->log("paged_title() [$title] [$part]");
620
+ $title .= $part;
621
+ }
622
+ }
623
+ return $title;
624
+ }
625
+
626
+ function rewrite_title($header) {
627
+ global $aioseop_options;
628
+ global $wp_query;
629
+ if (!$wp_query) {
630
+ $header .= "<!-- no wp_query found! -->\n";
631
+ return $header;
632
+ }
633
+
634
+ $post = $wp_query->get_queried_object();
635
+
636
+ // the_search_query() is not suitable, it cannot just return
637
+ global $s;
638
+
639
+ global $STagging;
640
+
641
+ if (is_home() && !$this->is_static_posts_page()) {
642
+ $title = $this->internationalize($aioseop_options['aiosp_home_title']);
643
+ if (empty($title)) {
644
+ $title = $this->internationalize(get_option('blogname'));
645
+ }
646
+ $title = $this->paged_title($title);
647
+ $header = $this->replace_title($header, $title);
648
+ } else if (is_attachment()) {
649
+ $title = get_the_title($post->post_parent).' '.$post->post_title.' – '.get_option('blogname');
650
+ $header = $this->replace_title($header,$title);
651
+ } else if (is_single()) {
652
+ // we're not in the loop :(
653
+ $authordata = get_userdata($post->post_author);
654
+ $categories = get_the_category();
655
+ $category = '';
656
+ if (count($categories) > 0) {
657
+ $category = $categories[0]->cat_name;
658
+ }
659
+ $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
660
+ if (!$title) {
661
+ $title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
662
+ if (!$title) {
663
+ $title = $this->internationalize(wp_title('', false));
664
+ }
665
+ }
666
+ $title_format = $aioseop_options['aiosp_post_title_format'];
667
+ /*
668
+ $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
669
+ $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
670
+ $new_title = str_replace('%post_title%', $title, $new_title);
671
+ $new_title = str_replace('%category%', $category, $new_title);
672
+ $new_title = str_replace('%category_title%', $category, $new_title);
673
+ $new_title = str_replace('%post_author_login%', $authordata->user_login, $new_title);
674
+ $new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
675
+ $new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
676
+ $new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
677
+ */
678
+ $r_title = array('%blog_title%','%blog_description%','%post_title%','%category%','%category_title%','%post_author_login%','%post_author_nicename%','%post_author_firstname%','%post_author_lastname%');
679
+ $d_title = array($this->internationalize(get_bloginfo('name')),$this->internationalize(get_bloginfo('description')),$title, $category, $category, $authordata->user_login, $authordata->user_nicename, ucwords($authordata->first_name), ucwords($authordata->last_name));
680
+ $title = trim(str_replace($r_title, $d_title, $title_format));
681
+
682
+ // $title = $new_title;
683
+ // $title = trim($title);
684
+ $title = apply_filters('aioseop_title_single',$title);
685
+ $header = $this->replace_title($header, $title);
686
+ } else if (is_search() && isset($s) && !empty($s)) {
687
+ if (function_exists('attribute_escape')) {
688
+ $search = attribute_escape(stripcslashes($s));
689
+ } else {
690
+ $search = wp_specialchars(stripcslashes($s), true);
691
+ }
692
+ $search = $this->capitalize($search);
693
+ $title_format = $aioseop_options['aiosp_search_title_format'];
694
+ $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
695
+ $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
696
+ $title = str_replace('%search%', $search, $title);
697
+ $header = $this->replace_title($header, $title);
698
+ } else if (is_category() && !is_feed()) {
699
+ $category_description = $this->internationalize(category_description());
700
+ if($aioseop_options['aiosp_cap_cats']){
701
+ $category_name = ucwords($this->internationalize(single_cat_title('', false)));
702
+ }else{
703
+ $category_name = $this->internationalize(single_cat_title('', false));
704
+ }
705
+ //$category_name = ucwords($this->internationalize(single_cat_title('', false)));
706
+ $title_format = $aioseop_options['aiosp_category_title_format'];
707
+ $title = str_replace('%category_title%', $category_name, $title_format);
708
+ $title = str_replace('%category_description%', $category_description, $title);
709
+ $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
710
+ $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
711
+ $title = $this->paged_title($title);
712
+ $header = $this->replace_title($header, $title);
713
+ } else if (is_page() || $this->is_static_posts_page()) {
714
+ // we're not in the loop :(
715
+ $authordata = get_userdata($post->post_author);
716
+ if ($this->is_static_front_page()) {
717
+ if ($this->internationalize($aioseop_options['aiosp_home_title'])) {
718
+
719
+ //home title filter
720
+ $home_title = $this->internationalize($aioseop_options['aiosp_home_title']);
721
+ $home_title = apply_filters('aioseop_home_page_title',$home_title);
722
+ $header = $this->replace_title($header, $home_title);
723
+
724
+ }
725
+ } else {
726
+ $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
727
+ if (!$title) {
728
+ $title = $this->internationalize(wp_title('', false));
729
+ }
730
+ $title_format = $aioseop_options['aiosp_page_title_format'];
731
+ $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
732
+ $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
733
+ $new_title = str_replace('%page_title%', $title, $new_title);
734
+ $new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title);
735
+ $new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title);
736
+ $new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
737
+ $new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
738
+ $title = trim($new_title);
739
+ $title = $this->paged_title($title);
740
+ $title = apply_filters('aioseop_title_page',$title);
741
+ $header = $this->replace_title($header, $title);
742
+ }
743
+ } else if (function_exists('is_tag') && is_tag()) {
744
+ global $utw;
745
+ if ($utw) {
746
+ $tags = $utw->GetCurrentTagSet();
747
+ $tag = $tags[0]->tag;
748
+ $tag = str_replace('-', ' ', $tag);
749
+ } else {
750
+ // wordpress > 2.3
751
+ $tag = $this->internationalize(wp_title('', false));
752
+ }
753
+ if ($tag) {
754
+ $tag = $this->capitalize($tag);
755
+ $title_format = $aioseop_options['aiosp_tag_title_format'];
756
+ $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
757
+ $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
758
+ $title = str_replace('%tag%', $tag, $title);
759
+ $title = $this->paged_title($title);
760
+ $header = $this->replace_title($header, $title);
761
+ }
762
+ } else if (isset($STagging) && $STagging->is_tag_view()) { // simple tagging support
763
+ $tag = $STagging->search_tag;
764
+ if ($tag) {
765
+ $tag = $this->capitalize($tag);
766
+ $title_format = $aioseop_options['aiosp_tag_title_format'];
767
+ $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
768
+ $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
769
+ $title = str_replace('%tag%', $tag, $title);
770
+ $title = $this->paged_title($title);
771
+ $header = $this->replace_title($header, $title);
772
+ }
773
+ } else if (is_archive()) {
774
+ $date = $this->internationalize(wp_title('', false));
775
+ $title_format = $aioseop_options['aiosp_archive_title_format'];
776
+ $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
777
+ $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
778
+ $new_title = str_replace('%date%', $date, $new_title);
779
+ $title = trim($new_title);
780
+ $title = $this->paged_title($title);
781
+ $header = $this->replace_title($header, $title);
782
+ } else if (is_404()) {
783
+ $title_format = $aioseop_options['aiosp_404_title_format'];
784
+ $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
785
+ $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
786
+ $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
787
+ $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
788
+ $new_title = str_replace('%404_title%', $this->internationalize(wp_title('', false)), $new_title);
789
+ $header = $this->replace_title($header, $new_title);
790
+ }
791
+
792
+ return $header;
793
+
794
+ }
795
+
796
+ /**
797
+ * @return User-readable nice words for a given request.
798
+ */
799
+ function request_as_words($request) {
800
+ $request = htmlspecialchars($request);
801
+ $request = str_replace('.html', ' ', $request);
802
+ $request = str_replace('.htm', ' ', $request);
803
+ $request = str_replace('.', ' ', $request);
804
+ $request = str_replace('/', ' ', $request);
805
+ $request_a = explode(' ', $request);
806
+ $request_new = array();
807
+ foreach ($request_a as $token) {
808
+ $request_new[] = ucwords(trim($token));
809
+ }
810
+ $request = implode(' ', $request_new);
811
+ return $request;
812
+ }
813
+
814
+ function capitalize($s) {
815
+ $s = trim($s);
816
+ $tokens = explode(' ', $s);
817
+ while (list($key, $val) = each($tokens)) {
818
+ $tokens[$key] = trim($tokens[$key]);
819
+ $tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
820
+ }
821
+ $s = implode(' ', $tokens);
822
+ return $s;
823
+ }
824
+
825
+ function trim_excerpt_without_filters($text) {
826
+ $text = str_replace(']]>', ']]&gt;', $text);
827
+ $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
828
+ $text = strip_tags($text);
829
+ $max = $this->maximum_description_length;
830
+
831
+ if ($max < strlen($text)) {
832
+ while($text[$max] != ' ' && $max > $this->minimum_description_length) {
833
+ $max--;
834
+ }
835
+ }
836
+ $text = substr($text, 0, $max);
837
+ return trim(stripcslashes($text));
838
+ }
839
+
840
+ function trim_excerpt_without_filters_full_length($text) {
841
+ $text = str_replace(']]>', ']]&gt;', $text);
842
+ $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
843
+ $text = strip_tags($text);
844
+ return trim(stripcslashes($text));
845
+ }
846
+
847
+ /**
848
+ * @return comma-separated list of unique keywords
849
+ */
850
+ function get_all_keywords() {
851
+ global $posts;
852
+ global $aioseop_options;
853
+
854
+ if (is_404()) {
855
+ return null;
856
+ }
857
+
858
+ // if we are on synthetic pages
859
+ if (!is_home() && !is_page() && !is_single() &&!$this->is_static_front_page() && !$this->is_static_posts_page()) {
860
+ return null;
861
+ }
862
+
863
+ $keywords = array();
864
+ if (is_array($posts)) {
865
+ foreach ($posts as $post) {
866
+ if ($post) {
867
+
868
+ // custom field keywords
869
+ $keywords_a = $keywords_i = null;
870
+ $description_a = $description_i = null;
871
+
872
+ $id = (is_attachment())?($post->post_parent):($post->ID); // if attachment then use parent post id
873
+ $keywords_i = stripcslashes($this->internationalize(get_post_meta($id, "_aioseop_keywords", true)));
874
+ //$id = $post->ID;
875
+ //$keywords_i = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true)));
876
+ $keywords_i = str_replace('"', '', $keywords_i);
877
+ if (isset($keywords_i) && !empty($keywords_i)) {
878
+ $traverse = explode(',', $keywords_i);
879
+ foreach ($traverse as $keyword) {
880
+ $keywords[] = $keyword;
881
+ }
882
+ }
883
+
884
+ // WP 2.3 tags
885
+ if ($aioseop_options['aiosp_use_tags_as_keywords']){
886
+ if (function_exists('get_the_tags')) {
887
+ //$tags = get_the_tags($post->ID);
888
+ $tags = get_the_tags($id);
889
+ if ($tags && is_array($tags)) {
890
+ foreach ($tags as $tag) {
891
+ $keywords[] = $this->internationalize($tag->name);
892
+ }
893
+ }
894
+ }
895
+ }
896
+ // Ultimate Tag Warrior integration
897
+ global $utw;
898
+ if ($utw) {
899
+ $tags = $utw->GetTagsForPost($post);
900
+ if (is_array($tags)) {
901
+ foreach ($tags as $tag) {
902
+ $tag = $tag->tag;
903
+ $tag = str_replace('_',' ', $tag);
904
+ $tag = str_replace('-',' ',$tag);
905
+ $tag = stripcslashes($tag);
906
+ $keywords[] = $tag;
907
+ }
908
+ }
909
+ }
910
+
911
+ // autometa
912
+ $autometa = stripcslashes(get_post_meta($id, 'autometa', true));
913
+ //$autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
914
+ if (isset($autometa) && !empty($autometa)) {
915
+ $autometa_array = explode(' ', $autometa);
916
+ foreach ($autometa_array as $e) {
917
+ $keywords[] = $e;
918
+ }
919
+ }
920
+
921
+ if ($aioseop_options['aiosp_use_categories'] && !is_page()) {
922
+ $categories = get_the_category($id);
923
+ //$categories = get_the_category($post->ID);
924
+ foreach ($categories as $category) {
925
+ $keywords[] = $this->internationalize($category->cat_name);
926
+ }
927
+ }
928
+
929
+ }
930
+ }
931
+ }
932
+
933
+ return $this->get_unique_keywords($keywords);
934
+ }
935
+
936
+ function get_meta_keywords() {
937
+ global $posts;
938
+
939
+ $keywords = array();
940
+ if (is_array($posts)) {
941
+ foreach ($posts as $post) {
942
+ if ($post) {
943
+ // custom field keywords
944
+ $keywords_a = $keywords_i = null;
945
+ $description_a = $description_i = null;
946
+ $id = $post->ID;
947
+ $keywords_i = stripcslashes(get_post_meta($post->ID, "_aioseop_keywords", true));
948
+ $keywords_i = str_replace('"', '', $keywords_i);
949
+ if (isset($keywords_i) && !empty($keywords_i)) {
950
+ $keywords[] = $keywords_i;
951
+ }
952
+ }
953
+ }
954
+ }
955
+
956
+ return $this->get_unique_keywords($keywords);
957
+ }
958
+
959
+ function get_unique_keywords($keywords) {
960
+ $small_keywords = array();
961
+ foreach ($keywords as $word) {
962
+ if (function_exists('mb_strtolower'))
963
+ $small_keywords[] = mb_strtolower($word, get_bloginfo('charset'));
964
+ else
965
+ $small_keywords[] = $this->strtolower($word);
966
+ }
967
+ $keywords_ar = array_unique($small_keywords);
968
+ return implode(',', $keywords_ar);
969
+ }
970
+
971
+ function get_url($url) {
972
+ if (function_exists('file_get_contents')) {
973
+ $file = file_get_contents($url);
974
+ } else {
975
+ $curl = curl_init($url);
976
+ curl_setopt($curl, CURLOPT_HEADER, 0);
977
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
978
+ $file = curl_exec($curl);
979
+ curl_close($curl);
980
+ }
981
+ return $file;
982
+ }
983
+
984
+ function log($message) {
985
+ if ($this->do_log) {
986
+ error_log(date('Y-m-d H:i:s') . " " . $message . "\n", 3, $this->log_file);
987
+ }
988
+ }
989
+
990
+ function download_newest_version() {
991
+ $success = true;
992
+ $file_content = $this->get_url($this->upgrade_url);
993
+ if ($file_content === false) {
994
+ $this->upgrade_error = sprintf(__("Could not download distribution (%s)"), $this->upgrade_url);
995
+ $success = false;
996
+ } else if (strlen($file_content) < 100) {
997
+ $this->upgrade_error = sprintf(__("Could not download distribution (%s): %s"), $this->upgrade_url, $file_content);
998
+ $success = false;
999
+ } else {
1000
+ $this->log(sprintf("filesize of download ZIP: %d", strlen($file_content)));
1001
+ $fh = @fopen($this->upgrade_filename, 'w');
1002
+ $this->log("fh is $fh");
1003
+ if (!$fh) {
1004
+ $this->upgrade_error = sprintf(__("Could not open %s for writing"), $this->upgrade_filename);
1005
+ $this->upgrade_error .= "<br />";
1006
+ $this->upgrade_error .= sprintf(__("Please make sure %s is writable"), $this->upgrade_folder);
1007
+ $success = false;
1008
+ } else {
1009
+ $bytes_written = @fwrite($fh, $file_content);
1010
+ $this->log("wrote $bytes_written bytes");
1011
+ if (!$bytes_written) {
1012
+ $this->upgrade_error = sprintf(__("Could not write to %s"), $this->upgrade_filename);
1013
+ $success = false;
1014
+ }
1015
+ }
1016
+ if ($success) {
1017
+ fclose($fh);
1018
+ }
1019
+ }
1020
+ return $success;
1021
+ }
1022
+
1023
+ function install_newest_version() {
1024
+ $success = $this->download_newest_version();
1025
+ if ($success) {
1026
+ $success = $this->extract_plugin();
1027
+ unlink($this->upgrade_filename);
1028
+ }
1029
+ return $success;
1030
+ }
1031
+
1032
+ function extract_plugin() {
1033
+ if (!class_exists('PclZip')) {
1034
+ require_once ('pclzip.lib.php');
1035
+ }
1036
+ $archive = new PclZip($this->upgrade_filename);
1037
+ $files = $archive->extract(PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $this->upgrade_folder);
1038
+ $this->log("files is $files");
1039
+ if (is_array($files)) {
1040
+ $num_extracted = sizeof($files);
1041
+ $this->log("extracted $num_extracted files to $this->upgrade_folder");
1042
+ $this->log(print_r($files, true));
1043
+ return true;
1044
+ } else {
1045
+ $this->upgrade_error = $archive->errorInfo();
1046
+ return false;
1047
+ }
1048
+ }
1049
+
1050
+ /** crude approximization of whether current user is an admin */
1051
+ function is_admin() {
1052
+ return current_user_can('level_8');
1053
+ }
1054
+
1055
+
1056
+ function is_directory_writable($directory) {
1057
+ $filename = $directory . '/' . 'tmp_file_' . time();
1058
+ $fh = @fopen($filename, 'w');
1059
+ if (!$fh) {
1060
+ return false;
1061
+ }
1062
+
1063
+ $written = fwrite($fh, "test");
1064
+ fclose($fh);
1065
+ unlink($filename);
1066
+ if ($written) {
1067
+ return true;
1068
+ } else {
1069
+ return false;
1070
+ }
1071
+ }
1072
+
1073
+
1074
+ function is_upgrade_directory_writable() {
1075
+ //return $this->is_directory_writable($this->upgrade_folder);
1076
+ // let's assume it is
1077
+ return true;
1078
+ }
1079
+
1080
+
1081
+ function post_meta_tags($id) {
1082
+ $awmp_edit = $_POST["aiosp_edit"];
1083
+ $nonce = $_POST['nonce-aioseop-edit'];
1084
+ // if (!wp_verify_nonce($nonce, 'edit-aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1085
+ if (isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'edit-aioseop-nonce')) {
1086
+ $keywords = $_POST["aiosp_keywords"];
1087
+ $description = $_POST["aiosp_description"];
1088
+ $title = $_POST["aiosp_title"];
1089
+ $aiosp_meta = $_POST["aiosp_meta"];
1090
+ $aiosp_disable = $_POST["aiosp_disable"];
1091
+ $aiosp_titleatr = $_POST["aiosp_titleatr"];
1092
+ $aiosp_menulabel = $_POST["aiosp_menulabel"];
1093
+
1094
+ delete_post_meta($id, '_aioseop_keywords');
1095
+ delete_post_meta($id, '_aioseop_description');
1096
+ delete_post_meta($id, '_aioseop_title');
1097
+ delete_post_meta($id, '_aioseop_titleatr');
1098
+ delete_post_meta($id, '_aioseop_menulabel');
1099
+
1100
+
1101
+ if ($this->is_admin()) {
1102
+ delete_post_meta($id, '_aioseop_disable');
1103
+ }
1104
+ //delete_post_meta($id, 'aiosp_meta');
1105
+
1106
+ if (isset($keywords) && !empty($keywords)) {
1107
+ add_post_meta($id, '_aioseop_keywords', $keywords);
1108
+ }
1109
+ if (isset($description) && !empty($description)) {
1110
+ add_post_meta($id, '_aioseop_description', $description);
1111
+ }
1112
+ if (isset($title) && !empty($title)) {
1113
+ add_post_meta($id, '_aioseop_title', $title);
1114
+ }
1115
+ if (isset($aiosp_titleatr) && !empty($aiosp_titleatr)) {
1116
+ add_post_meta($id, '_aioseop_titleatr', $aiosp_titleatr);
1117
+ }
1118
+ if (isset($aiosp_menulabel) && !empty($aiosp_menulabel)) {
1119
+ add_post_meta($id, '_aioseop_menulabel', $aiosp_menulabel);
1120
+ }
1121
+ if (isset($aiosp_disable) && !empty($aiosp_disable) && $this->is_admin()) {
1122
+ add_post_meta($id, '_aioseop_disable', $aiosp_disable);
1123
+ }
1124
+ /*
1125
+ if (isset($aiosp_meta) && !empty($aiosp_meta)) {
1126
+ add_post_meta($id, 'aiosp_meta', $aiosp_meta);
1127
+ }
1128
+ */
1129
+ }
1130
+ }
1131
+
1132
+ function edit_category($id) {
1133
+ global $wpdb;
1134
+ $id = $wpdb->escape($id);
1135
+ $awmp_edit = $_POST["aiosp_edit"];
1136
+ if (isset($awmp_edit) && !empty($awmp_edit)) {
1137
+ $keywords = $wpdb->escape($_POST["aiosp_keywords"]);
1138
+ $title = $wpdb->escape($_POST["aiosp_title"]);
1139
+ $old_category = $wpdb->get_row("select * from $this->table_categories where category_id=$id", OBJECT);
1140
+ if ($old_category) {
1141
+ $wpdb->query($wpdb->prepare("update $this->table_categories
1142
+ set meta_title='$title', meta_keywords='$keywords'
1143
+ where category_id=$id"));
1144
+ } else {
1145
+ $wpdb->query($wpdb->prepare("insert into $this->table_categories(meta_title, meta_keywords, category_id)
1146
+ values ('$title', '$keywords', $id"));
1147
+ }
1148
+ //$wpdb->query($wpdb->prepare("insert into $this->table_categories"))
1149
+ /*
1150
+ delete_post_meta($id, 'keywords');
1151
+ delete_post_meta($id, 'description');
1152
+ delete_post_meta($id, 'title');
1153
+
1154
+ if (isset($keywords) && !empty($keywords)) {
1155
+ add_post_meta($id, 'keywords', $keywords);
1156
+ }
1157
+ if (isset($description) && !empty($description)) {
1158
+ add_post_meta($id, 'description', $description);
1159
+ }
1160
+ if (isset($title) && !empty($title)) {
1161
+ add_post_meta($id, 'title', $title);
1162
+ }
1163
+ */
1164
+ }
1165
+ }
1166
+
1167
+ /**
1168
+ * @deprecated This was for the feature of dedicated meta tags for categories which never went mainstream.
1169
+ */
1170
+ function edit_category_form() {
1171
+ global $post;
1172
+ $keywords = stripcslashes(get_post_meta($post->ID, '_aioseop_keywords', true));
1173
+ $title = stripcslashes(get_post_meta($post->ID, '_aioseop_title', true));
1174
+ $description = stripcslashes(get_post_meta($post->ID, '_aioseop_description', true));
1175
+ ?>
1176
+ <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1177
+ <table class="editform" width="100%" cellspacing="2" cellpadding="5">
1178
+ <tr>
1179
+ <th width="33%" scope="row" valign="top">
1180
+ <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>
1181
+ </th>
1182
+ </tr>
1183
+ <tr>
1184
+ <th width="33%" scope="row" valign="top"><label for="aiosp_title"><?php _e('Title:', 'all_in_one_seo_pack') ?></label></th>
1185
+ <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="70"/></td>
1186
+ </tr>
1187
+ <tr>
1188
+ <th width="33%" scope="row" valign="top"><label for="aiosp_keywords"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></label></th>
1189
+ <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="70"/></td>
1190
+ </tr>
1191
+ </table>
1192
+ <?php
1193
+ }
1194
+
1195
+ function add_meta_tags_textinput() {
1196
+ global $post;
1197
+ $post_id = $post;
1198
+ if (is_object($post_id)) {
1199
+ $post_id = $post_id->ID;
1200
+ }
1201
+ $keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true)));
1202
+ $title = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_title', true)));
1203
+ $description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true)));
1204
+ $aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_meta', true)));
1205
+ $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_disable', true)));
1206
+ $aiosp_titleatr = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_titleatr', true)));
1207
+ $aiosp_menulabel = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_menulabel', true)));
1208
+
1209
+ ?>
1210
+ <SCRIPT LANGUAGE="JavaScript">
1211
+ <!-- Begin
1212
+ function countChars(field,cntfield) {
1213
+ cntfield.value = field.value.length;
1214
+ }
1215
+ // End -->
1216
+ </script>
1217
+
1218
+ <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1219
+ <div id="postaiosp" class="postbox closed">
1220
+ <h3><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1221
+ <div class="inside">
1222
+ <div id="postaiosp">
1223
+ <?php } else { ?>
1224
+ <div class="dbx-b-ox-wrapper">
1225
+ <fieldset id="seodiv" class="dbx-box">
1226
+ <div class="dbx-h-andle-wrapper">
1227
+ <h3 class="dbx-handle"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1228
+ </div>
1229
+ <div class="dbx-c-ontent-wrapper">
1230
+ <div class="dbx-content">
1231
+ <?php } ?>
1232
+
1233
+ <a target="__blank" href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/"><?php _e('Click here for Support', 'all_in_one_seo_pack') ?></a>
1234
+ <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1235
+ <table style="margin-bottom:40px">
1236
+ <tr>
1237
+ <th style="text-align:left;" colspan="2">
1238
+ </th>
1239
+ </tr>
1240
+ <tr>
1241
+ <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
1242
+ <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62"/></td>
1243
+ </tr>
1244
+ <tr>
1245
+ <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
1246
+ <td><textarea name="aiosp_description" rows="1" cols="60" onKeyDown="countChars(document.post.aiosp_description,document.post.length1)" onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?>
1247
+ </textarea><br />
1248
+ <input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
1249
+ <?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack') ?>
1250
+ </td>
1251
+ </tr>
1252
+ <tr>
1253
+ <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
1254
+ <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="62"/></td>
1255
+ </tr>
1256
+ <input type="hidden" name="nonce-aioseop-edit" value="<?php echo wp_create_nonce('edit-aioseop-nonce'); ?>" />
1257
+ <?php if ($this->is_admin()) { ?>
1258
+ <tr>
1259
+ <th scope="row" style="text-align:right; vertical-align:top;">
1260
+ <?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
1261
+ </th>
1262
+ <td>
1263
+ <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
1264
+ </td>
1265
+ </tr>
1266
+
1267
+ <tr>
1268
+ <th scope="row" style="text-align:right;"><?php _e('Title Attribute:', 'all_in_one_seo_pack') ?></th>
1269
+ <td><input value="<?php echo $aiosp_titleatr ?>" type="text" name="aiosp_titleatr" size="62"/></td>
1270
+ </tr>
1271
+ <tr>
1272
+ <th scope="row" style="text-align:right;"><?php _e('Menu Label:', 'all_in_one_seo_pack') ?></th>
1273
+ <td><input value="<?php echo $aiosp_menulabel ?>" type="text" name="aiosp_menulabel" size="62"/></td>
1274
+ </tr>
1275
+ <?php } ?>
1276
+ </table>
1277
+
1278
+ <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1279
+ </div>
1280
+ </div>
1281
+ </div>
1282
+ <?php } else { ?>
1283
+ </div>
1284
+ </fieldset>
1285
+ </div>
1286
+ <?php } ?>
1287
+
1288
+ <?php
1289
+ }
1290
+
1291
+ function admin_menu() {
1292
+ $file = __FILE__;
1293
+
1294
+ // hack for 1.5
1295
+ if (substr($this->wp_version, 0, 3) == '1.5') {
1296
+ $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
1297
+ }
1298
+ //add_management_page(__('All in One SEO Title', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'management_panel'));
1299
+ add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 'manage_options', $file, array($this, 'options_panel'));
1300
+ }
1301
+
1302
+ function management_panel() {
1303
+ $message = null;
1304
+ $base_url = "edit.php?page=" . __FILE__;
1305
+ //echo($base_url);
1306
+ $type = $_REQUEST['type'];
1307
+ if (!isset($type)) {
1308
+ $type = "posts";
1309
+ }
1310
+ ?>
1311
+
1312
+ <ul class="aiosp_menu">
1313
+ <li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
1314
+ </li>
1315
+ <li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
1316
+ </li>
1317
+ </ul>
1318
+
1319
+ <?php
1320
+
1321
+ if ($type == "posts") {
1322
+ echo("posts");
1323
+ } elseif ($type == "pages") {
1324
+ echo("pages");
1325
+ }
1326
+ }
1327
+
1328
+ function options_panel() {
1329
+ $message = null;
1330
+ //$message_updated = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1331
+ global $aioseop_options;
1332
+
1333
+ if(!$aioseop_options['aiosp_cap_cats']) {
1334
+ $aioseop_options['aiosp_cap_cats'] = '1';
1335
+ }
1336
+
1337
+
1338
+ if (isset($_POST['action']) && $_POST['action'] == 'aiosp_update' && isset($_POST['Submit_Default'])) {
1339
+ $nonce = $_POST['nonce-aioseop'];
1340
+ if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1341
+ $message = __("All in One SEO Options Reset.", 'all_in_one_seo_pack');
1342
+ delete_option('aioseop_options');
1343
+ $res_aioseop_options = array(
1344
+ "aiosp_can"=>1,
1345
+ "aiosp_donate"=>0,
1346
+ "aiosp_home_title"=>null,
1347
+ "aiosp_home_description"=>'',
1348
+ "aiosp_home_keywords"=>null,
1349
+ "aiosp_max_words_excerpt"=>'something',
1350
+ "aiosp_rewrite_titles"=>1,
1351
+ "aiosp_post_title_format"=>'%post_title% | %blog_title%',
1352
+ "aiosp_page_title_format"=>'%page_title% | %blog_title%',
1353
+ "aiosp_category_title_format"=>'%category_title% | %blog_title%',
1354
+ "aiosp_archive_title_format"=>'%date% | %blog_title%',
1355
+ "aiosp_tag_title_format"=>'%tag% | %blog_title%',
1356
+ "aiosp_search_title_format"=>'%search% | %blog_title%',
1357
+ "aiosp_description_format"=>'%description%',
1358
+ "aiosp_404_title_format"=>'Nothing found for %request_words%',
1359
+ "aiosp_paged_format"=>' - Part %page%',
1360
+ "aiosp_use_categories"=>0,
1361
+ "aiosp_dynamic_postspage_keywords"=>1,
1362
+ "aiosp_category_noindex"=>1,
1363
+ "aiosp_archive_noindex"=>1,
1364
+ "aiosp_tags_noindex"=>0,
1365
+ "aiosp_cap_cats"=>1,
1366
+ "aiosp_generate_descriptions"=>1,
1367
+ "aiosp_debug_info"=>null,
1368
+ "aiosp_post_meta_tags"=>'',
1369
+ "aiosp_enablecpost"=>'0',
1370
+ "aiosp_page_meta_tags"=>'',
1371
+ "aiosp_home_meta_tags"=>'',
1372
+ "aiosp_enabled" =>0,
1373
+ "aiosp_use_tags_as_keywords" =>1,
1374
+ "aiosp_seopostcol" => 1,
1375
+ "aiosp_seocustptcol" => 0,
1376
+ "aiosp_posttypecolumns" => array('post','page'),
1377
+ "aiosp_do_log"=>null);
1378
+ update_option('aioseop_options', $res_aioseop_options);
1379
+ }
1380
+
1381
+
1382
+ // update options
1383
+ if(isset($_POST['action'])){
1384
+ if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') {
1385
+ $nonce = $_POST['nonce-aioseop'];
1386
+ if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1387
+ $message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1388
+ $aioseop_options['aiosp_can'] = $_POST['aiosp_can'];
1389
+ $aioseop_options['aiosp_donate'] = $_POST['aiosp_donate'];
1390
+ $aioseop_options['aiosp_home_title'] = esc_attr($_POST['aiosp_home_title']);
1391
+ $aioseop_options['aiosp_home_description'] = esc_attr($_POST['aiosp_home_description']);
1392
+ $aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords'];
1393
+ $aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt'];
1394
+ $aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles'];
1395
+ $aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format'];
1396
+ $aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format'];
1397
+ $aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format'];
1398
+ $aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format'];
1399
+ $aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format'];
1400
+ $aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format'];
1401
+ $aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format'];
1402
+ $aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format'];
1403
+ $aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format'];
1404
+ $aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories'];
1405
+ $aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords'];
1406
+ $aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex'];
1407
+ $aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex'];
1408
+ $aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex'];
1409
+ $aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions'];
1410
+ $aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats'];
1411
+ $aioseop_options['aiosp_enablecpost'] = $_POST['aiosp_enablecpost'];
1412
+ $aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info'];
1413
+ $aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags'];
1414
+ $aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags'];
1415
+ $aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags'];
1416
+ $aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages'];
1417
+ $aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log'];
1418
+ $aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled'];
1419
+ $aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords'];
1420
+ $aioseop_options['aiosp_seopostcol'] = $_POST['aiosp_seopostcol'];
1421
+ $aioseop_options['aiosp_seocustptcol'] = $_POST['aiosp_seocustptcol'];
1422
+ $aioseop_options['aiosp_posttypecolumns'] = $_POST['aiosp_posttypecolumns'];
1423
+
1424
+ update_option('aioseop_options', $aioseop_options);
1425
+
1426
+ if (function_exists('wp_cache_flush')) {
1427
+ wp_cache_flush();
1428
+ }
1429
+ }
1430
+ } /*elseif ($_POST['aiosp_upgrade']) {
1431
+ $message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
1432
+ $success = $this->install_newest_version();
1433
+ if (!$success) {
1434
+ $message = __("Upgrade failed", 'all_in_one_seo_pack');
1435
+ if (isset($this->upgrade_error) && !empty($this->upgrade_error)) {
1436
+ $message .= ": " . $this->upgrade_error;
1437
+ } else {
1438
+ $message .= ".";
1439
+ }
1440
+ }
1441
+ }*/
1442
+
1443
+ if ($message){
1444
+ echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
1445
+ }
1446
+ ?>
1447
+ <div id="dropmessage" class="updated" style="display:none;"></div>
1448
+ <div class="wrap">
1449
+
1450
+ <h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
1451
+ by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>
1452
+ <p>
1453
+ <div style="float:left;">
1454
+
1455
+ <?php //_e("This is version ", 'all_in_one_seo_pack') ?><?php //_e("$this->version ", 'all_in_one_seo_pack') ?>
1456
+ &nbsp;<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
1457
+ href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/"><?php _e("Changelog", 'all_in_one_seo_pack')?>
1458
+ </a>
1459
+ | <a target="_blank" title="<?php _e('FAQ', 'all_in_one_seo_pack') ?>"
1460
+ href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/"><?php _e('FAQ', 'all_in_one_seo_pack') ?></a>
1461
+ | <a target="_blank" title="<?php _e('All in One SEO Plugin Support Forum', 'all_in_one_seo_pack') ?>"
1462
+ href="http://semperfiwebdesign.com/forum/"><?php _e('Support', 'all_in_one_seo_pack') ?></a>
1463
+ | <a target="_blank" title="<?php _e('All in One SEO Plugin Translations', 'all_in_one_seo_pack') ?>"
1464
+ href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/translations-for-all-in-one-seo-pack/"><?php _e('Translations', 'all_in_one_seo_pack') ?></a>
1465
+ | <strong><a target="_blank" title="<?php _e('Pro Version', 'all_in_one_seo_pack') ?>"
1466
+ href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version"><?php _e('UPGRADE TO PRO VERSION', 'all_in_one_seo_pack') ?></a></strong>
1467
+ </div>
1468
+
1469
+ <div style="float:left;width:370px;margin-left:10px;">
1470
+ <form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
1471
+ <span>Join our mailing list for tips, tricks, and WordPress secrets.<em><strong>Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress</strong></em> ($39 value).</span>
1472
+ <div>
1473
+ <label for="mce-EMAIL">Email Address </label>
1474
+ <input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL">
1475
+
1476
+
1477
+ <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn">
1478
+ </div>
1479
+ </form>
1480
+ </div>
1481
+ <div style="clear:both;">
1482
+
1483
+ <br />
1484
+ <!--<div style="width:75%;background-color:yellow;">
1485
+ <em>Thank you for using <strong>All in One SEO Pack</strong> by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>. If you like this plugin and find it useful, feel free to click the <strong>donate</strong> button or send me a gift from my <strong>Amazon wishlist</strong>. Also, don't forget to follow me on <strong>Twitter</strong>.</em>
1486
+ </div>
1487
+ -->
1488
+ <!--
1489
+ <a target="_blank" title="<?php //echo 'Donate' ?>"
1490
+ href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" width="" alt="Donate" /><?php //echo 'Donate' ?></a>
1491
+ | <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web"><img src="https://images-na.ssl-images-amazon.com/images/G/01/gifts/registries/wishlist/v2/web/wl-btn-74-b._V46774601_.gif" width="74" alt="My Amazon.com Wish List" height="42" border="0" /></a>
1492
+ | <a target="_blank" title="<?php //_e('Follow us on Twitter', 'all_in_one_seo_pack') ?>"
1493
+ href="http://twitter.com/michaeltorbert/"><img src="<?php //echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.png" alt="<?php //_e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" height="47px" /></a>
1494
+ -->
1495
+ </p>
1496
+
1497
+ <div style="width:832px;">
1498
+ <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;margin-right:15px;border: 1px solid #ddd;">
1499
+ <div style="width:350px;height:130px;">
1500
+ <h3>Donate</h3>
1501
+ <em>If you like this plugin and find it useful, help keep this plugin free and actively developed by clicking the <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank"><strong>donate</strong></a> button or send me a gift from my <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank"><strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.</em>
1502
+ </div>
1503
+ <a target="_blank" title="<?php echo 'Donate' ?>"
1504
+ href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
1505
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all_in_one_seo_pack') ?>" /> </a>
1506
+ <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
1507
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all_in_one_seo_pack') ?>" /> </a>
1508
+ <a target="_blank" title="<?php _e('Follow us on Twitter', 'all_in_one_seo_pack') ?>" href="http://twitter.com/michaeltorbert/">
1509
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.jpg" alt="<?php _e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" /> </a>
1510
+ </div>
1511
+
1512
+ <div style="float:left;background-color:white;padding:10px;border:1px solid #ddd;">
1513
+ <div style="width:423px;height:130px;">
1514
+ <h3>Reliable WordPress Hosting</h3>
1515
+ <p><a title="WebHostingHub.com" target="_blank"
1516
+ href="http://ref.webhostinghub.com/scripts/click.php?ref_id=rsuog2&ad_id=54c8d95f">WebHostingHub.com</a>
1517
+ is a true leader in WordPress hosting and configured for WordPress
1518
+ blogs. Hub's account includes UNLIMITED Hosting, NO-DOWNTIME Transfer,
1519
+ 24/7 U.S. Support & 90-Day FULL Money Back.<br />
1520
+ Check our <a title="WebHostingHub reviews" target="_blank"
1521
+ href="http://webhostingrating.com/companies/web-hosting-hub/">customer
1522
+ reviews</a> at WebHostingRating.com.</p>
1523
+ </div>
1524
+ <a title="WebHostingHub.com" target="_blank"
1525
+ href="http://ref.webhostinghub.com/scripts/click.php?ref_id=rsuog2&ad_id=54c8d95f"><img
1526
+ src="http://webhostingrating.com/images/hub_420_wordpress.png"
1527
+ alt="WebHostingHub.com" width="420" height="53" border="0" /></a>
1528
+ </div>
1529
+
1530
+ <div style="clear:both;">
1531
+
1532
+ <div style="float:left;width:387px;padding-top:1px;">
1533
+ <a href="http://www.bestthinking.com/invitation/visibility"><img src="http://www.bestthinking.com/content/images/wordpressseoad4.gif" width="371px"></a>
1534
+ </div>
1535
+
1536
+ <div style="float:left;background-color:white;padding:10px 10px 10px 10px;border:1px solid #ddd">
1537
+ <div style="width:423px;height:130px">
1538
+ <h3>The Ultimate WordPress Backup Solution</h3>
1539
+ <p>Running on <em>thousands</em> of sites, <a href="http://pluginbuddy.com/wordpress-backup/" target="_blank">BackupBuddy</a> is an all-in-one solution for <strong>WordPress</strong> <strong>backups, restoration, &amp; migration</strong>. Whether you’re a blogger or developer, this plugin is sure to bring you peace of mind &amp; added safety in the event of data loss. </p>
1540
+ </div>
1541
+ <a title="Backup WordPress Easily" href="http://pluginbuddy.com/wordpress-backup/" target="_blank"><img src="http://ithemes.com/graphics/ads/bb-AIO-ad.png" alt="Backup WordPress Easily"></a>
1542
+ </div>
1543
+
1544
+
1545
+
1546
+
1547
+ <!--
1548
+ <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;border: 1px solid #ddd;">
1549
+ <div style="width:365px;height:130px;">
1550
+
1551
+ <form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&amp;id=af0a96d3d9" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
1552
+ <span>Join our mailing list for tips, tricks, and WordPress secrets. Also receive discounts on top commercial plugins and themes.<br /><em><strong>Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress</strong></em>.</span>
1553
+ <div class="mc-field-group">
1554
+ <label for="mce-EMAIL">Email Address </label>
1555
+ <input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL">
1556
+ </div>
1557
+
1558
+ <div><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn"></div>
1559
+ </form>
1560
+ </div>
1561
+ </div>
1562
+ -->
1563
+ </div>
1564
+ <div style="clear:both";></div>
1565
+ <!--
1566
+ <p>
1567
+ <?php
1568
+ //$canwrite = $this->is_upgrade_directory_writable();
1569
+ //$canwrite = false;
1570
+ ?>
1571
+ <form class="form-table" name="dofollow" action="" method="post">
1572
+ <p class="submit">
1573
+ <input type="submit" <?php //if (!$canwrite) echo(' disabled="disabled" ');?> name="aiosp_upgrade" value="<?php //_e('One Click Upgrade', 'all_in_one_seo_pack')?> &raquo;" />
1574
+ <strong><?php //_e("(Remember: Backup early, backup often!)", 'all_in_one_seo_pack') ?></strong>
1575
+ </form>
1576
+ </p>
1577
+ <p></p>
1578
+
1579
+
1580
+ <?php //if (!$canwrite) {
1581
+ //echo("<p><strong>"); echo(sprintf(__("Please make sure that %s is writable.", 'all_in_one_seo_pack'), $this->upgrade_folder)); echo("</p></strong>");
1582
+ // } ?>
1583
+ </p>
1584
+ -->
1585
+
1586
+ <script type="text/javascript">
1587
+ <!--
1588
+ function toggleVisibility(id) {
1589
+ var e = document.getElementById(id);
1590
+ if(e.style.display == 'block')
1591
+ e.style.display = 'none';
1592
+ else
1593
+ e.style.display = 'block';
1594
+ }
1595
+ //-->
1596
+ </script>
1597
+
1598
+ <h3><?php _e('Click on option titles to get help!', 'all_in_one_seo_pack') ?></h3>
1599
+
1600
+ <?php
1601
+ function aioseop_mrt_df(){
1602
+
1603
+ if(function_exists('fetch_feed')){
1604
+ // start new feed
1605
+ echo "Highest Donations";
1606
+ // Get RSS Feed(s)
1607
+ include_once(ABSPATH . WPINC . '/feed.php');
1608
+
1609
+ // Get a SimplePie feed object from the specified feed source.
1610
+ $rss = fetch_feed('feed://donations.semperfiwebdesign.com/category/highest-donations/feed/');
1611
+
1612
+ // Figure out how many total items there are, but limit it to 5.
1613
+ $maxitems = $rss->get_item_quantity(3);
1614
+
1615
+ // Build an array of all the items, starting with element 0 (first element).
1616
+ $rss_items = $rss->get_items(0, $maxitems);
1617
+ ?>
1618
+
1619
+ <ul>
1620
+ <?php if ($maxitems == 0) echo '<li>No items.</li>';
1621
+ else
1622
+ // Loop through each feed item and display each item as a hyperlink.
1623
+ foreach ( $rss_items as $item ) : ?>
1624
+ <li>
1625
+ <a href='<?php echo $item->get_permalink(); ?>'
1626
+ title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1627
+ <?php echo $item->get_title(); ?></a>
1628
+ </li>
1629
+ <?php endforeach; ?>
1630
+ </ul>
1631
+
1632
+ <?php echo "Latest Donations"; ?>
1633
+ <?php // Get RSS Feed(s)
1634
+ include_once(ABSPATH . WPINC . '/feed.php');
1635
+
1636
+ // Get a SimplePie feed object from the specified feed source.
1637
+ $rss = fetch_feed('feed://donations.semperfiwebdesign.com/category/all-in-one-seo-pack/feed/');
1638
+
1639
+ // Figure out how many total items there are, but limit it to 5.
1640
+ $maxitems = $rss->get_item_quantity(3);
1641
+
1642
+ // Build an array of all the items, starting with element 0 (first element).
1643
+ $rss_items = $rss->get_items(0, $maxitems);
1644
+ ?>
1645
+
1646
+ <ul>
1647
+ <?php if ($maxitems == 0) echo '<li>No items.</li>';
1648
+ else
1649
+ // Loop through each feed item and display each item as a hyperlink.
1650
+ foreach ( $rss_items as $item ) : ?>
1651
+ <li>
1652
+ <a href='<?php echo $item->get_permalink(); ?>'
1653
+ title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1654
+ <?php echo $item->get_title(); ?></a>
1655
+ </li>
1656
+ <?php endforeach; ?>
1657
+ </ul>
1658
+
1659
+
1660
+ <?php // end new feed
1661
+ }else{
1662
+
1663
+ $uri = "feed://donations.semperfiwebdesign.com/category/highest-donations/feed/";
1664
+ include_once(ABSPATH . WPINC . '/rss.php');
1665
+ $rss = fetch_rss($uri);
1666
+ if($rss){
1667
+ echo "Highest Donations";
1668
+ $maxitems = 5;
1669
+ if(is_array($rss->items)){
1670
+ $items = array_slice($rss->items, 0, $maxitems);
1671
+ ?>
1672
+ <ul>
1673
+ <?php if (empty($items)) echo '<li>No items</li>';
1674
+ else
1675
+ foreach ( $items as $item ) : ?>
1676
+ <li><a href='<?php echo $item['description']; ?>'
1677
+ title='<?php echo $item['title']; ?>'>
1678
+ <?php echo $item['title']; ?>
1679
+ </a></li>
1680
+ <?php endforeach; ?>
1681
+ </ul>
1682
+ <?php } }else{
1683
+ //do something else for feed here
1684
+ }
1685
+
1686
+
1687
+ ?>
1688
+
1689
+ <?php
1690
+ $uri = "feed://donations.semperfiwebdesign.com/category/all-in-one-seo-pack/feed/";
1691
+ include_once(ABSPATH . WPINC . '/rss.php');
1692
+ $rss = fetch_rss($uri);
1693
+ if($rss){
1694
+ echo "Latest Donations";
1695
+ $maxitems = 5;
1696
+ if(is_array($rss->items)){
1697
+ $items = array_slice($rss->items, 0, $maxitems);
1698
+ ?>
1699
+ <ul>
1700
+ <?php if (empty($items)) echo '<li>No items</li>';
1701
+ else
1702
+ foreach ( $items as $item ) : ?>
1703
+ <li><a href='<?php echo $item['link']; ?>'
1704
+ title='<?php echo $item['title']; ?>'>
1705
+ <?php echo $item['title']; ?>
1706
+ </a></li>
1707
+ <?php endforeach; ?>
1708
+ </ul>
1709
+ <?php } }else{
1710
+ //fall back on something else for feed here
1711
+ }
1712
+ }
1713
+ }
1714
+
1715
+ //aioseop_mrt_df();
1716
+
1717
+ ?>
1718
+
1719
+
1720
+
1721
+ <?php
1722
+ global $wpdb;
1723
+ $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'keywords'");
1724
+ $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'title'") + $somecount;
1725
+ $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'description'") + $somecount;
1726
+ $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_meta'") + $somecount;
1727
+ $somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_disable'") + $somecount;
1728
+ if($somecount > 0){
1729
+ echo "<div class='error' style='text-align:center;'><p><strong>Your database meta needs to be updated. " . $somecount . " old fields remaining</strong> <em>(Back up your database before updating.)</em>
1730
+ <FORM action='' method='post' name='aioseop-migrate'>
1731
+ <input type='hidden' name='nonce-aioseop-migrate' value='" . wp_create_nonce('aioseop-migrate-nonce') . "' />
1732
+ <input type='submit' name='aioseop_migrate' class='button-primary' value='Update Database'>
1733
+ </FORM>
1734
+ </p></div>";
1735
+ }
1736
+
1737
+ if(!get_option('aioseop_options')){
1738
+ echo "<div class='error' style='text-align:center;'><p><strong>Your database options need to be updated.</strong><em>(Back up your database before updating.)</em>
1739
+ <FORM action='' method='post' name='aioseop-migrate-options'>
1740
+ <input type='hidden' name='nonce-aioseop-migrate-options' value='" . wp_create_nonce('aioseop-migrate-nonce-options') . "' />
1741
+ <input type='submit' name='aioseop_migrate_options' class='button-primary' value='Update Database Options'>
1742
+ </FORM>
1743
+ </p></div>";
1744
+
1745
+ }
1746
+
1747
+ ?>
1748
+
1749
+
1750
+ <form name="dofollow" action="" method="post">
1751
+ <table class="form-table">
1752
+ <?php $aioseop_options = get_option('aioseop_options'); ?>
1753
+ <?php if (!$aioseop_options['aiosp_donate']){?>
1754
+ <tr>
1755
+ <th scope="row" style="text-align:right; vertical-align:top;">
1756
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_donate_tip');">
1757
+ <?php _e('I enjoy this plugin and have made a donation:', 'all_in_one_seo_pack'); ?>
1758
+ </a>
1759
+ </td>
1760
+ <td>
1761
+ <input type="checkbox" name="aiosp_donate" <?php if ($aioseop_options['aiosp_donate']) echo "checked=\"1\""; ?>/>
1762
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_donate_tip">
1763
+ <?php
1764
+ _e('All donations support continued development of this free software.', 'all_in_one_seo_pack');
1765
+ ?>
1766
+ </div>
1767
+ </td>
1768
+ </tr>
1769
+ <?php } ?>
1770
+
1771
+ <tr>
1772
+ <th scope="row" style="text-align:right; vertical-align:top;">
1773
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack'); ?>" onclick="toggleVisibility('aiosp_enabled_tip');">
1774
+ <?php _e('Plugin Status:', 'all_in_one_seo_pack')?>
1775
+ </a>
1776
+ </td>
1777
+ <td>
1778
+ <input type="radio" name="aiosp_enabled" value="1" <?php if($aioseop_options['aiosp_enabled']) echo "checked"?> > <?php _e('Enabled', 'all_in_one_seo_pack'); ?><br>
1779
+ <input type="radio" name="aiosp_enabled" value="0" <?php if(!$aioseop_options['aiosp_enabled']) echo "checked"?>> <?php _e('Disabled', 'all_in_one_seo_pack'); ?>
1780
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_enabled_tip">
1781
+ <?php
1782
+ _e('All in One SEO Pack must be enabled for use.', 'all_in_one_seo_pack');
1783
+ ?>
1784
+ </div>
1785
+ </td>
1786
+ </tr>
1787
+
1788
+ <tr>
1789
+ <th scope="row" style="text-align:right; vertical-align:top;">
1790
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_title_tip');">
1791
+ <?php _e('Home Title:', 'all_in_one_seo_pack')?>
1792
+ </a>
1793
+ </td>
1794
+ <td>
1795
+ <textarea cols="57" rows="2" name="aiosp_home_title"><?php echo stripcslashes($aioseop_options['aiosp_home_title']); ?></textarea>
1796
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_title_tip">
1797
+ <?php
1798
+ _e('As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used.', 'all_in_one_seo_pack');
1799
+ ?>
1800
+ </div>
1801
+ </td>
1802
+ </tr>
1803
+
1804
+ <tr>
1805
+ <th scope="row" style="text-align:right; vertical-align:top;">
1806
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_description_tip');">
1807
+ <?php _e('Home Description:', 'all_in_one_seo_pack')?>
1808
+ </a>
1809
+ </td>
1810
+ <td>
1811
+ <textarea cols="57" rows="2" name="aiosp_home_description"><?php echo stripcslashes($aioseop_options['aiosp_home_description']); ?></textarea>
1812
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_description_tip">
1813
+ <?php
1814
+ _e('The META description for your homepage. Independent of any other options, the default is no META description at all if this is not set.', 'all_in_one_seo_pack');
1815
+ ?>
1816
+ </div>
1817
+ </td>
1818
+ </tr>
1819
+
1820
+ <tr>
1821
+ <th scope="row" style="text-align:right; vertical-align:top;">
1822
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_keywords_tip');">
1823
+ <?php _e('Home Keywords (comma separated):', 'all_in_one_seo_pack')?>
1824
+ </a>
1825
+ </td>
1826
+ <td>
1827
+ <textarea cols="57" rows="2" name="aiosp_home_keywords"><?php echo stripcslashes($aioseop_options['aiosp_home_keywords']); ?></textarea>
1828
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_keywords_tip">
1829
+ <?php
1830
+ _e("A comma separated list of your most important keywords for your site that will be written as META keywords on your homepage. Don't stuff everything in here.", 'all_in_one_seo_pack');
1831
+ ?>
1832
+ </div>
1833
+ </td>
1834
+ </tr>
1835
+
1836
+ <tr>
1837
+ <th scope="row" style="text-align:right; vertical-align:top;">
1838
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_can_tip');">
1839
+ <?php _e('Canonical URLs:', 'all_in_one_seo_pack')?>
1840
+ </a>
1841
+ </td>
1842
+ <td>
1843
+ <input type="checkbox" name="aiosp_can" <?php if ($aioseop_options['aiosp_can']) echo "checked=\"1\""; ?>/>
1844
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_can_tip">
1845
+ <?php
1846
+ _e("This option will automatically generate Canonical URLS for your entire WordPress installation. This will help to prevent duplicate content penalties by <a href='http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html' target='_blank'>Google</a>.", 'all_in_one_seo_pack');
1847
+ ?>
1848
+ </div>
1849
+ </td>
1850
+ </tr>
1851
+
1852
+ <tr>
1853
+ <th scope="row" style="text-align:right; vertical-align:top;">
1854
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_rewrite_titles_tip');">
1855
+ <?php _e('Rewrite Titles:', 'all_in_one_seo_pack')?>
1856
+ </a>
1857
+ </td>
1858
+ <td>
1859
+ <input type="checkbox" name="aiosp_rewrite_titles" <?php if ($aioseop_options['aiosp_rewrite_titles']) echo "checked=\"1\""; ?>/>
1860
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_rewrite_titles_tip">
1861
+ <?php
1862
+ _e("Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: “Blog Archive >> Blog Name >> Post Title” (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to “Post Title | Blog Name”. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string.", 'all_in_one_seo_pack');
1863
+ ?>
1864
+ </div>
1865
+ </td>
1866
+ </tr>
1867
+
1868
+ <tr>
1869
+ <th scope="row" style="text-align:right; vertical-align:top;">
1870
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_title_format_tip');">
1871
+ <?php _e('Post Title Format:', 'all_in_one_seo_pack')?>
1872
+ </a>
1873
+ </td>
1874
+ <td>
1875
+ <input size="59" name="aiosp_post_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_post_title_format']); ?>"/>
1876
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_post_title_format_tip">
1877
+ <?php
1878
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1879
+ echo('<ul>');
1880
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1881
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1882
+ echo('<li>'); _e('%post_title% - The original title of the post', 'all_in_one_seo_pack'); echo('</li>');
1883
+ echo('<li>'); _e('%category_title% - The (main) category of the post', 'all_in_one_seo_pack'); echo('</li>');
1884
+ echo('<li>'); _e('%category% - Alias for %category_title%', 'all_in_one_seo_pack'); echo('</li>');
1885
+ echo('<li>'); _e("%post_author_login% - This post's author' login", 'all_in_one_seo_pack'); echo('</li>');
1886
+ echo('<li>'); _e("%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
1887
+ echo('<li>'); _e("%post_author_firstname% - This post's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1888
+ echo('<li>'); _e("%post_author_lastname% - This post's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1889
+ echo('</ul>');
1890
+ ?>
1891
+ </div>
1892
+ </td>
1893
+ </tr>
1894
+
1895
+ <tr>
1896
+ <th scope="row" style="text-align:right; vertical-align:top;">
1897
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_title_format_tip');">
1898
+ <?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
1899
+ </a>
1900
+ </td>
1901
+ <td>
1902
+ <input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_page_title_format']); ?>"/>
1903
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_page_title_format_tip">
1904
+ <?php
1905
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1906
+ echo('<ul>');
1907
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1908
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1909
+ echo('<li>'); _e('%page_title% - The original title of the page', 'all_in_one_seo_pack'); echo('</li>');
1910
+ echo('<li>'); _e("%page_author_login% - This page's author' login", 'all_in_one_seo_pack'); echo('</li>');
1911
+ echo('<li>'); _e("%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
1912
+ echo('<li>'); _e("%page_author_firstname% - This page's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1913
+ echo('<li>'); _e("%page_author_lastname% - This page's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
1914
+ echo('</ul>');
1915
+ ?>
1916
+ </div>
1917
+ </td>
1918
+ </tr>
1919
+
1920
+ <tr>
1921
+ <th scope="row" style="text-align:right; vertical-align:top;">
1922
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_title_format_tip');">
1923
+ <?php _e('Category Title Format:', 'all_in_one_seo_pack')?>
1924
+ </a>
1925
+ </td>
1926
+ <td>
1927
+ <input size="59" name="aiosp_category_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_category_title_format']); ?>"/>
1928
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_category_title_format_tip">
1929
+ <?php
1930
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1931
+ echo('<ul>');
1932
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1933
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1934
+ echo('<li>'); _e('%category_title% - The original title of the category', 'all_in_one_seo_pack'); echo('</li>');
1935
+ echo('<li>'); _e('%category_description% - The description of the category', 'all_in_one_seo_pack'); echo('</li>');
1936
+ echo('</ul>');
1937
+ ?>
1938
+ </div>
1939
+ </td>
1940
+ </tr>
1941
+
1942
+ <tr>
1943
+ <th scope="row" style="text-align:right; vertical-align:top;">
1944
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_title_format_tip');">
1945
+ <?php _e('Archive Title Format:', 'all_in_one_seo_pack')?>
1946
+ </a>
1947
+ </td>
1948
+ <td>
1949
+ <input size="59" name="aiosp_archive_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_archive_title_format']); ?>"/>
1950
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_title_format_tip">
1951
+ <?php
1952
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1953
+ echo('<ul>');
1954
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1955
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1956
+ echo('<li>'); _e('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack'); echo('</li>');
1957
+ echo('</ul>');
1958
+ ?>
1959
+ </div>
1960
+ </td>
1961
+ </tr>
1962
+
1963
+ <tr>
1964
+ <th scope="row" style="text-align:right; vertical-align:top;">
1965
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tag_title_format_tip');">
1966
+ <?php _e('Tag Title Format:', 'all_in_one_seo_pack')?>
1967
+ </a>
1968
+ </td>
1969
+ <td>
1970
+ <input size="59" name="aiosp_tag_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_tag_title_format']); ?>"/>
1971
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_tag_title_format_tip">
1972
+ <?php
1973
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1974
+ echo('<ul>');
1975
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1976
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1977
+ echo('<li>'); _e('%tag% - The name of the tag', 'all_in_one_seo_pack'); echo('</li>');
1978
+ echo('</ul>');
1979
+ ?>
1980
+ </div>
1981
+ </td>
1982
+ </tr>
1983
+
1984
+ <tr>
1985
+ <th scope="row" style="text-align:right; vertical-align:top;">
1986
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_search_title_format_tip');">
1987
+ <?php _e('Search Title Format:', 'all_in_one_seo_pack')?>
1988
+ </a>
1989
+ </td>
1990
+ <td>
1991
+ <input size="59" name="aiosp_search_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_search_title_format']); ?>"/>
1992
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_search_title_format_tip">
1993
+ <?php
1994
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
1995
+ echo('<ul>');
1996
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
1997
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
1998
+ echo('<li>'); _e('%search% - What was searched for', 'all_in_one_seo_pack'); echo('</li>');
1999
+ echo('</ul>');
2000
+ ?>
2001
+ </div>
2002
+ </td>
2003
+ </tr>
2004
+
2005
+ <tr>
2006
+ <th scope="row" style="text-align:right; vertical-align:top;">
2007
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_description_format_tip');">
2008
+ <?php _e('Description Format:', 'all_in_one_seo_pack')?>
2009
+ </a>
2010
+ </td>
2011
+ <td>
2012
+ <input size="59" name="aiosp_description_format" value="<?php echo stripcslashes($aioseop_options['aiosp_description_format']); ?>"/>
2013
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_description_format_tip">
2014
+ <?php
2015
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
2016
+ echo('<ul>');
2017
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
2018
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
2019
+ 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>');
2020
+ echo('<li>'); _e('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack'); echo('</li>');
2021
+ echo('</ul>');
2022
+ ?>
2023
+ </div>
2024
+ </td>
2025
+ </tr>
2026
+
2027
+ <tr>
2028
+ <th scope="row" style="text-align:right; vertical-align:top;">
2029
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_404_title_format_tip');">
2030
+ <?php _e('404 Title Format:', 'all_in_one_seo_pack')?>
2031
+ </a>
2032
+ </td>
2033
+ <td>
2034
+ <input size="59" name="aiosp_404_title_format" value="<?php echo stripcslashes($aioseop_options['aiosp_404_title_format']); ?>"/>
2035
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_404_title_format_tip">
2036
+ <?php
2037
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
2038
+ echo('<ul>');
2039
+ echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
2040
+ echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
2041
+ echo('<li>'); _e('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all_in_one_seo_pack'); echo('</li>');
2042
+ echo('<li>'); _e('%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all_in_one_seo_pack'); echo('</li>');
2043
+ echo('<li>'); _e('%404_title% - Additional 404 title input"', 'all_in_one_seo_pack'); echo('</li>');
2044
+ echo('</ul>');
2045
+ ?>
2046
+ </div>
2047
+ </td>
2048
+ </tr>
2049
+
2050
+ <tr>
2051
+ <th scope="row" style="text-align:right; vertical-align:top;">
2052
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_paged_format_tip');">
2053
+ <?php _e('Paged Format:', 'all_in_one_seo_pack')?>
2054
+ </a>
2055
+ </td>
2056
+ <td>
2057
+ <input size="59" name="aiosp_paged_format" value="<?php echo stripcslashes($aioseop_options['aiosp_paged_format']); ?>"/>
2058
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_paged_format_tip">
2059
+ <?php
2060
+ _e('This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages).', 'all_in_one_seo_pack');
2061
+ _e('The following macros are supported:', 'all_in_one_seo_pack');
2062
+ echo('<ul>');
2063
+ echo('<li>'); _e('%page% - The page number', 'all_in_one_seo_pack'); echo('</li>');
2064
+ echo('</ul>');
2065
+ ?>
2066
+ </div>
2067
+ </td>
2068
+ </tr>
2069
+
2070
+ <tr>
2071
+ <th scope="row" style="text-align:right; vertical-align:top;">
2072
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_enablecpost_tip');">
2073
+ <?php _e('SEO for Custom Post Types:', 'all_in_one_seo_pack')?>
2074
+ </td>
2075
+ <td>
2076
+ <input type="checkbox" name="aiosp_enablecpost" <?php if ($aioseop_options['aiosp_enablecpost']) echo "checked=\"1\""; ?>/>
2077
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_enablecpost_tip">
2078
+ <?php
2079
+ _e('Check this if you want your enable AIOSEOP support for Custom Post Types on this site.', 'all_in_one_seo_pack');
2080
+ ?>
2081
+ </div>
2082
+ </td>
2083
+ </tr>
2084
+ <?php if( function_exists('get_post_types')){ ?>
2085
+ <tr>
2086
+ <th scope="row" style="text-align:right; vertical-align:top;">
2087
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('123_tip');">
2088
+ <?php _e('Custom Post Types for SEO Column Support:', 'all_in_one_seo_pack')?>
2089
+ </td>
2090
+ <td><select name="aiosp_posttypecolumns[]" MULTIPLE style="height:70px;width:300px;">
2091
+ <?php
2092
+ $typeswehave = array('post,revision'); //$aioseop_options['aiosp_posttypecolumns'];
2093
+ $post_types=get_post_types('','names');
2094
+ $rempost = array('attachment','revision','nav_menu_item');
2095
+ $post_types = array_diff($post_types,$rempost);
2096
+ foreach ($post_types as $post_type ) {
2097
+ echo "<option ";
2098
+ if(is_array($aioseop_options['aiosp_posttypecolumns']) && in_array($post_type,$aioseop_options['aiosp_posttypecolumns'])) echo "selected ";
2099
+ echo "name=\"aiosp_posttypecolumns\">$post_type";
2100
+ }
2101
+
2102
+ ?>
2103
+ </select>
2104
+
2105
+ <div style="max-width:500px; text-align:left; display:none" id="123_tip">
2106
+ <?php
2107
+ _e('Choose which post types you want to have SEO columns on the edit.php screen. You can select as many as you like.', 'all_in_one_seo_pack');
2108
+ ?>
2109
+ </div>
2110
+ </td>
2111
+ </tr>
2112
+ <?php } ?>
2113
+ <tr>
2114
+ <th scope="row" style="text-align:right; vertical-align:top;">
2115
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
2116
+ <?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
2117
+ </td>
2118
+ <td>
2119
+ <input type="checkbox" name="aiosp_use_categories" <?php if ($aioseop_options['aiosp_use_categories']) echo "checked=\"1\""; ?>/>
2120
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_use_categories_tip">
2121
+ <?php
2122
+ _e('Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page).', 'all_in_one_seo_pack');
2123
+ ?>
2124
+ </div>
2125
+ </td>
2126
+ </tr>
2127
+
2128
+ <tr>
2129
+ <th scope="row" style="text-align:right; vertical-align:top;">
2130
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_tags_as_keywords_tip');">
2131
+ <?php _e('Use Tags for META keywords:', 'all_in_one_seo_pack')?>
2132
+ </td>
2133
+ <td>
2134
+ <input type="checkbox" name="aiosp_use_tags_as_keywords" <?php if ($aioseop_options['aiosp_use_tags_as_keywords']) echo "checked=\"1\""; ?>/>
2135
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_use_tags_as_keywords_tip">
2136
+ <?php
2137
+ _e('Check this if you want your tags for a given post used as the META keywords for this post (in addition to any keywords you specify on the post edit page).', 'all_in_one_seo_pack');
2138
+ ?>
2139
+ </div>
2140
+ </td>
2141
+ </tr>
2142
+
2143
+
2144
+
2145
+
2146
+ <tr>
2147
+ <th scope="row" style="text-align:right; vertical-align:top;">
2148
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_dynamic_postspage_keywords_tip');">
2149
+ <?php _e('Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack')?>
2150
+ </td>
2151
+ <td>
2152
+ <input type="checkbox" name="aiosp_dynamic_postspage_keywords" <?php if ($aioseop_options['aiosp_dynamic_postspage_keywords']) echo "checked=\"1\""; ?>/>
2153
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_dynamic_postspage_keywords_tip">
2154
+ <?php
2155
+ _e('Check this if you want your keywords on a custom posts page (set it in options->reading) to be dynamically generated from the keywords of the posts showing on that page. If unchecked, it will use the keywords set in the edit page screen for the posts page.', 'all_in_one_seo_pack');
2156
+ ?>
2157
+ </div>
2158
+ </td>
2159
+ </tr>
2160
+
2161
+ <tr>
2162
+ <th scope="row" style="text-align:right; vertical-align:top;">
2163
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_noindex_tip');">
2164
+ <?php _e('Use noindex for Categories:', 'all_in_one_seo_pack')?>
2165
+ </a>
2166
+ </td>
2167
+ <td>
2168
+ <input type="checkbox" name="aiosp_category_noindex" <?php if ($aioseop_options['aiosp_category_noindex']) echo "checked=\"1\""; ?>/>
2169
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_category_noindex_tip">
2170
+ <?php
2171
+ _e('Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2172
+ ?>
2173
+ </div>
2174
+ </td>
2175
+ </tr>
2176
+
2177
+ <tr>
2178
+ <th scope="row" style="text-align:right; vertical-align:top;">
2179
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_noindex_tip');">
2180
+ <?php _e('Use noindex for Archives:', 'all_in_one_seo_pack')?>
2181
+ </a>
2182
+ </td>
2183
+ <td>
2184
+ <input type="checkbox" name="aiosp_archive_noindex" <?php if ($aioseop_options['aiosp_archive_noindex']) echo "checked=\"1\""; ?>/>
2185
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_noindex_tip">
2186
+ <?php
2187
+ _e('Check this for excluding archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2188
+ ?>
2189
+ </div>
2190
+ </td>
2191
+ </tr>
2192
+
2193
+ <tr>
2194
+ <th scope="row" style="text-align:right; vertical-align:top;">
2195
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tags_noindex_tip');">
2196
+ <?php _e('Use noindex for Tag Archives:', 'all_in_one_seo_pack')?>
2197
+ </a>
2198
+ </td>
2199
+ <td>
2200
+ <input type="checkbox" name="aiosp_tags_noindex" <?php if ($aioseop_options['aiosp_tags_noindex']) echo "checked=\"1\""; ?>/>
2201
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_tags_noindex_tip">
2202
+ <?php
2203
+ _e('Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
2204
+ ?>
2205
+ </div>
2206
+ </td>
2207
+ </tr>
2208
+
2209
+ <tr>
2210
+ <th scope="row" style="text-align:right; vertical-align:top;">
2211
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_generate_descriptions_tip');">
2212
+ <?php _e('Autogenerate Descriptions:', 'all_in_one_seo_pack')?>
2213
+ </a>
2214
+ </td>
2215
+ <td>
2216
+ <input type="checkbox" name="aiosp_generate_descriptions" <?php if ($aioseop_options['aiosp_generate_descriptions']) echo "checked=\"1\""; ?>/>
2217
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_generate_descriptions_tip">
2218
+ <?php
2219
+ _e("Check this and your META descriptions will get autogenerated if there's no excerpt.", 'all_in_one_seo_pack');
2220
+ ?>
2221
+ </div>
2222
+ </td>
2223
+ </tr>
2224
+
2225
+ <tr>
2226
+ <th scope="row" style="text-align:right; vertical-align:top;">
2227
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_cap_cats_tip');">
2228
+ <?php _e('Capitalize Category Titles:', 'all_in_one_seo_pack')?>
2229
+ </a>
2230
+ </td>
2231
+ <td>
2232
+ <input type="checkbox" name="aiosp_cap_cats" <?php if ($aioseop_options['aiosp_cap_cats']) echo "checked=\"1\""; ?>/>
2233
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_cap_cats_tip">
2234
+ <?php
2235
+ _e("Check this and Category Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack');
2236
+ ?>
2237
+ </div>
2238
+ </td>
2239
+ </tr>
2240
+
2241
+ <!-- new crap start -->
2242
+ <tr>
2243
+ <th scope="row" style="text-align:right; vertical-align:top;">
2244
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_ex_pages_tip');">
2245
+ <?php _e('Exclude Pages:', 'all_in_one_seo_pack')?>
2246
+ </a>
2247
+ </td>
2248
+ <td>
2249
+ <textarea cols="57" rows="2" name="aiosp_ex_pages"><?php echo stripcslashes($aioseop_options['aiosp_ex_pages']); ?></textarea>
2250
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_ex_pages_tip">
2251
+ <?php
2252
+ _e("Enter any comma separated pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/,/contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is give forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage will be excluded from All in One SEO Pack.", 'all_in_one_seo_pack');
2253
+ ?>
2254
+ </div>
2255
+ </td>
2256
+ </tr>
2257
+ <!-- new crap end -->
2258
+
2259
+ <tr>
2260
+ <th scope="row" style="text-align:right; vertical-align:top;">
2261
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_meta_tags_tip');">
2262
+ <?php _e('Additional Post Headers:', 'all_in_one_seo_pack')?>
2263
+ </a>
2264
+ </td>
2265
+ <td>
2266
+ <textarea cols="57" rows="2" name="aiosp_post_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_post_meta_tags']); ?></textarea>
2267
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_post_meta_tags_tip">
2268
+ <?php
2269
+ _e('What you enter here will be copied verbatim to your header on post pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2270
+ ?>
2271
+ </div>
2272
+ </td>
2273
+ </tr>
2274
+
2275
+ <tr>
2276
+ <th scope="row" style="text-align:right; vertical-align:top;">
2277
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_meta_tags_tip');">
2278
+ <?php _e('Additional Page Headers:', 'all_in_one_seo_pack')?>
2279
+ </a>
2280
+ </td>
2281
+ <td>
2282
+ <textarea cols="57" rows="2" name="aiosp_page_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_page_meta_tags']); ?></textarea>
2283
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_page_meta_tags_tip">
2284
+ <?php
2285
+ _e('What you enter here will be copied verbatim to your header on pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2286
+ ?>
2287
+ </div>
2288
+ </td>
2289
+ </tr>
2290
+
2291
+ <tr>
2292
+ <th scope="row" style="text-align:right; vertical-align:top;">
2293
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_meta_tags_tip');">
2294
+ <?php _e('Additional Home Headers:', 'all_in_one_seo_pack')?>
2295
+ </a>
2296
+ </td>
2297
+ <td>
2298
+ <textarea cols="57" rows="2" name="aiosp_home_meta_tags"><?php echo stripcslashes($aioseop_options['aiosp_home_meta_tags']); ?></textarea>
2299
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_home_meta_tags_tip">
2300
+ <?php
2301
+ _e('What you enter here will be copied verbatim to your header on the home page. You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack');
2302
+ ?>
2303
+ </div>
2304
+ </td>
2305
+ </tr>
2306
+
2307
+ <tr>
2308
+ <th scope="row" style="text-align:right; vertical-align:top;">
2309
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'auto_social')?>" onclick="toggleVisibility('aiosp_do_log_tip');">
2310
+ <?php _e('Log important events:', 'all_in_one_seo_pack')?>
2311
+ </a>
2312
+ </td>
2313
+ <td>
2314
+ <input type="checkbox" name="aiosp_do_log" <?php if ($aioseop_options['aiosp_do_log']) echo "checked=\"1\""; ?>/>
2315
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_do_log_tip">
2316
+ <?php
2317
+ _e('Check this and SEO pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable.', 'all_in_one_seo_pack');
2318
+ ?>
2319
+ </div>
2320
+ </td>
2321
+ </tr>
2322
+
2323
+ <?php if ($aioseop_options['aiosp_donate']){?>
2324
+ <tr>
2325
+ <th scope="row" style="text-align:right; vertical-align:top;">
2326
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_donate_tip');">
2327
+ <?php _e('Thank you for your donation:', 'all_in_one_seo_pack')?>
2328
+ </a>
2329
+ </td>
2330
+ <td>
2331
+ <input type="checkbox" name="aiosp_donate" <?php if ($aioseop_options['aiosp_donate']) echo "checked=\"1\""; ?>/>
2332
+ <div style="max-width:500px; text-align:left; display:none" id="aiosp_donate_tip">
2333
+ <?php _e('All donations support continued development of this free software.', 'all_in_one_seo_pack'); ?>
2334
+ </div>
2335
+ </td>
2336
+ </tr>
2337
+ <?php } ?>
2338
+
2339
+ </table>
2340
+ <p class="submit">
2341
+ <?php if($aioseop_options) { ?>
2342
+
2343
+ <input type="hidden" name="action" value="aiosp_update" />
2344
+ <input type="hidden" name="nonce-aioseop" value="<?php echo wp_create_nonce('aioseop-nonce'); ?>" />
2345
+ <input type="hidden" name="page_options" value="aiosp_home_description" />
2346
+ <input type="submit" class='button-primary' name="Submit" value="<?php _e('Update Options', 'all_in_one_seo_pack')?> &raquo;" />
2347
+ <input type="submit" class='button-primary' name="Submit_Default" value="<?php _e('Reset Settings to Defaults', 'all_in_one_seo_pack')?> &raquo;" />
2348
+ </p>
2349
+ <?php } ?>
2350
+
2351
+ <p><br />
2352
+ <strong><?php _e('Check out these other great plugins!','all_in_one_seo_pack'); ?></strong><br />
2353
+ <a href="http://semperfiwebdesign.com/custom-applications/sms-text-message/" title="SMS Text Message WordPress plugin">SMS Text Message</a> - <?php _e('sends SMS updates to your readers','all_in_one_seo_pack'); ?><br />
2354
+ <a href="http://semperfiwebdesign.com/custom-applications/wp-security-scan/" title="WordPress Security">WordPress Security Scan</a> - <?php _e('provides vital security for your WordPress site','all_in_one_seo_pack'); ?>
2355
+ </p>
2356
+ </form>
2357
+ </div>
2358
+ <?php
2359
+
2360
+ } // options_panel
2361
+
2362
+ }
2363
+
2364
+ ?>
all_in_one_seo_pack.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin Name: All in One SEO Pack
6
  Plugin URI: http://semperfiwebdesign.com
7
  Description: Out-of-the-box SEO for your Wordpress blog. <a href="options-general.php?page=all-in-one-seo-pack/aioseop.class.php">Options configuration panel</a> | <a href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version">Upgrade to Pro Version</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">Donate</a> | <a href="http://semperfiwebdesign.com/forum/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
8
- Version: 1.6.13.2
9
  Author: Michael Torbert
10
  Author URI: http://michaeltorbert.com
11
  */
@@ -648,7 +648,7 @@ if($aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on'
648
  }
649
 
650
  function aioseop_get_version(){
651
- return '1.6.13.2';
652
  }
653
 
654
  function add_plugin_row($links, $file) {
5
  Plugin Name: All in One SEO Pack
6
  Plugin URI: http://semperfiwebdesign.com
7
  Description: Out-of-the-box SEO for your Wordpress blog. <a href="options-general.php?page=all-in-one-seo-pack/aioseop.class.php">Options configuration panel</a> | <a href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version">Upgrade to Pro Version</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">Donate</a> | <a href="http://semperfiwebdesign.com/forum/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
8
+ Version: 1.6.13.3
9
  Author: Michael Torbert
10
  Author URI: http://michaeltorbert.com
11
  */
648
  }
649
 
650
  function aioseop_get_version(){
651
+ return '1.6.13.3';
652
  }
653
 
654
  function add_plugin_row($links, $file) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hallsofmontezuma
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: seo,meta,keywords,description,title,post, search engine optimization, google
5
  Requires at least: 2.8
6
- Tested up to: 3.0.5
7
  Stable tag: trunk
8
 
9
  Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: seo,meta,keywords,description,title,post, search engine optimization, google
5
  Requires at least: 2.8
6
+ Tested up to: 3.1.3
7
  Stable tag: trunk
8
 
9
  Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).