Version Description
Download this release
Release Info
Developer | hallsofmontezuma |
Plugin | All in One SEO Pack |
Version | 1.4.6.10 |
Comparing to | |
See all releases |
Code changes from version 1.4.6.8 to 1.4.6.10
- all_in_one_seo_pack-bg_BG.mo +0 -0
- all_in_one_seo_pack-bg_NO.mo +0 -0
- all_in_one_seo_pack-da_DK.mo +0 -0
- all_in_one_seo_pack-de_DE.mo +0 -0
- all_in_one_seo_pack-es_ES.mo +0 -0
- all_in_one_seo_pack-fr_FR.mo +0 -0
- all_in_one_seo_pack-he_IL.mo +0 -0
- all_in_one_seo_pack-hu_HU.mo +0 -0
- all_in_one_seo_pack-it_IT.mo +0 -0
- all_in_one_seo_pack-ja.mo +0 -0
- all_in_one_seo_pack-nl_NL.mo +0 -0
- all_in_one_seo_pack-pl_PL.mo +0 -0
- all_in_one_seo_pack-pt_BR.mo +0 -0
- all_in_one_seo_pack-ru_RU.mo +0 -0
- all_in_one_seo_pack-tr_TR.mo +0 -0
- all_in_one_seo_pack-uk.mo +0 -0
- all_in_one_seo_pack-zh_CN.mo +0 -0
- all_in_one_seo_pack-zh_TW.mo +0 -0
- all_in_one_seo_pack.php +1627 -1620
- readme.txt +50 -45
all_in_one_seo_pack-bg_BG.mo
CHANGED
Binary file
|
all_in_one_seo_pack-bg_NO.mo
CHANGED
Binary file
|
all_in_one_seo_pack-da_DK.mo
CHANGED
Binary file
|
all_in_one_seo_pack-de_DE.mo
CHANGED
Binary file
|
all_in_one_seo_pack-es_ES.mo
CHANGED
Binary file
|
all_in_one_seo_pack-fr_FR.mo
CHANGED
Binary file
|
all_in_one_seo_pack-he_IL.mo
CHANGED
Binary file
|
all_in_one_seo_pack-hu_HU.mo
CHANGED
Binary file
|
all_in_one_seo_pack-it_IT.mo
CHANGED
Binary file
|
all_in_one_seo_pack-ja.mo
CHANGED
Binary file
|
all_in_one_seo_pack-nl_NL.mo
CHANGED
Binary file
|
all_in_one_seo_pack-pl_PL.mo
CHANGED
Binary file
|
all_in_one_seo_pack-pt_BR.mo
CHANGED
Binary file
|
all_in_one_seo_pack-ru_RU.mo
CHANGED
Binary file
|
all_in_one_seo_pack-tr_TR.mo
CHANGED
Binary file
|
all_in_one_seo_pack-uk.mo
CHANGED
Binary file
|
all_in_one_seo_pack-zh_CN.mo
CHANGED
Binary file
|
all_in_one_seo_pack-zh_TW.mo
CHANGED
Binary file
|
all_in_one_seo_pack.php
CHANGED
@@ -1,1620 +1,1627 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: All in One SEO Pack
|
5 |
-
Plugin URI: http://
|
6 |
-
Description: Out-of-the-box SEO for your Wordpress blog.
|
7 |
-
Version: 1.4.6.
|
8 |
-
Author:
|
9 |
-
Author URI: http://
|
10 |
-
*/
|
11 |
-
|
12 |
-
/*
|
13 |
-
Copyright (C) 2008
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
$this->
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
$
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
$
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
strtolower(
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
echo "
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
$description =
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
$description = str_replace('%
|
225 |
-
$description = str_replace('%
|
226 |
-
$description = str_replace('%
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
(
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
$
|
253 |
-
$
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
$
|
302 |
-
$
|
303 |
-
$
|
304 |
-
$
|
305 |
-
$
|
306 |
-
$
|
307 |
-
|
308 |
-
|
309 |
-
$this->
|
310 |
-
$this->
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
$
|
364 |
-
|
365 |
-
|
366 |
-
$
|
367 |
-
$
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
$
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
$
|
388 |
-
$new_title = str_replace('%
|
389 |
-
$new_title = str_replace('%
|
390 |
-
$new_title = str_replace('%
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
$part =
|
409 |
-
$
|
410 |
-
$title
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
$
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
$
|
442 |
-
$
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
$
|
455 |
-
$new_title = str_replace('%
|
456 |
-
$new_title = str_replace('%
|
457 |
-
$new_title = str_replace('%
|
458 |
-
$new_title = str_replace('%
|
459 |
-
$new_title = str_replace('%
|
460 |
-
$new_title = str_replace('%
|
461 |
-
$new_title = str_replace('%
|
462 |
-
$new_title = str_replace('%
|
463 |
-
|
464 |
-
$title =
|
465 |
-
$
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
$
|
475 |
-
$title = str_replace('%
|
476 |
-
$title = str_replace('%
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
$
|
481 |
-
|
482 |
-
$
|
483 |
-
$title = str_replace('%
|
484 |
-
$title = str_replace('%
|
485 |
-
$title = str_replace('%
|
486 |
-
$title = $this->
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
$
|
502 |
-
$new_title = str_replace('%
|
503 |
-
$new_title = str_replace('%
|
504 |
-
$new_title = str_replace('%
|
505 |
-
$new_title = str_replace('%
|
506 |
-
$new_title = str_replace('%
|
507 |
-
$new_title = str_replace('%
|
508 |
-
|
509 |
-
$
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
$
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
$
|
524 |
-
$
|
525 |
-
$title = str_replace('%
|
526 |
-
$title = str_replace('%
|
527 |
-
$title =
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
$
|
535 |
-
$
|
536 |
-
$title = str_replace('%
|
537 |
-
$title = str_replace('%
|
538 |
-
$title =
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
$
|
545 |
-
$new_title = str_replace('%
|
546 |
-
$new_title = str_replace('%
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
$
|
553 |
-
$new_title = str_replace('%
|
554 |
-
$new_title = str_replace('%
|
555 |
-
$new_title = str_replace('%
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
$request =
|
569 |
-
$request = str_replace('.
|
570 |
-
$request = str_replace('.', ' ', $request);
|
571 |
-
$request = str_replace('
|
572 |
-
$
|
573 |
-
$
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
$
|
584 |
-
|
585 |
-
|
586 |
-
$tokens[$key] =
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
$text =
|
595 |
-
$
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
$text =
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
if
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
$
|
635 |
-
$
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
$tag =
|
663 |
-
$tag = str_replace('
|
664 |
-
$tag =
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
$
|
703 |
-
$
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
curl_setopt($curl,
|
732 |
-
$
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
$
|
757 |
-
|
758 |
-
|
759 |
-
$this->upgrade_error
|
760 |
-
$this->upgrade_error .=
|
761 |
-
$
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
$
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
$
|
792 |
-
$
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
$this->log(
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
$
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
//
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
$
|
837 |
-
$
|
838 |
-
$
|
839 |
-
$
|
840 |
-
|
841 |
-
|
842 |
-
delete_post_meta($id, '
|
843 |
-
delete_post_meta($id, '
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
$
|
876 |
-
$
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
delete_post_meta($id, '
|
889 |
-
delete_post_meta($id, '
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
$
|
911 |
-
$
|
912 |
-
|
913 |
-
|
914 |
-
<
|
915 |
-
<
|
916 |
-
<
|
917 |
-
<
|
918 |
-
|
919 |
-
</
|
920 |
-
|
921 |
-
<
|
922 |
-
<
|
923 |
-
|
924 |
-
|
925 |
-
<
|
926 |
-
<
|
927 |
-
|
928 |
-
</
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
$
|
940 |
-
$
|
941 |
-
$
|
942 |
-
$
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
cntfield
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
<
|
955 |
-
<
|
956 |
-
<div
|
957 |
-
|
958 |
-
|
959 |
-
<
|
960 |
-
<
|
961 |
-
<
|
962 |
-
|
963 |
-
|
964 |
-
<div class="dbx-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
<
|
969 |
-
<
|
970 |
-
<
|
971 |
-
<
|
972 |
-
|
973 |
-
</
|
974 |
-
|
975 |
-
<
|
976 |
-
<
|
977 |
-
|
978 |
-
|
979 |
-
<
|
980 |
-
<
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
</
|
987 |
-
|
988 |
-
<
|
989 |
-
<
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
<
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
<
|
999 |
-
|
1000 |
-
</
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
</
|
1010 |
-
</
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
$
|
1030 |
-
|
1031 |
-
$
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
$
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
update_option('
|
1063 |
-
update_option('
|
1064 |
-
update_option('
|
1065 |
-
update_option('
|
1066 |
-
update_option('
|
1067 |
-
update_option('
|
1068 |
-
update_option('
|
1069 |
-
update_option('
|
1070 |
-
update_option('
|
1071 |
-
update_option('
|
1072 |
-
update_option('
|
1073 |
-
update_option('
|
1074 |
-
update_option('
|
1075 |
-
update_option('
|
1076 |
-
update_option('
|
1077 |
-
update_option('
|
1078 |
-
update_option('
|
1079 |
-
update_option('
|
1080 |
-
update_option('
|
1081 |
-
update_option('
|
1082 |
-
update_option('
|
1083 |
-
update_option('
|
1084 |
-
update_option('
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
$
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
<div class="
|
1107 |
-
<
|
1108 |
-
<
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
<
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
<
|
1129 |
-
|
1130 |
-
|
1131 |
-
<
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
<
|
1154 |
-
|
1155 |
-
<
|
1156 |
-
<
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
echo('<
|
1234 |
-
echo('<li>'); _e('%
|
1235 |
-
echo('<li>'); _e('%
|
1236 |
-
echo('<li>'); _e(
|
1237 |
-
echo('<li>'); _e(
|
1238 |
-
echo('<li>'); _e(
|
1239 |
-
echo('<li>'); _e("%
|
1240 |
-
echo('</
|
1241 |
-
|
1242 |
-
</
|
1243 |
-
</
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
echo('<
|
1261 |
-
echo('<li>'); _e(
|
1262 |
-
echo('<li>'); _e(
|
1263 |
-
echo('<li>'); _e(
|
1264 |
-
echo('<li>'); _e("%
|
1265 |
-
echo('</
|
1266 |
-
|
1267 |
-
</
|
1268 |
-
</
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
echo('<
|
1286 |
-
echo('<li>'); _e('%
|
1287 |
-
echo('</
|
1288 |
-
|
1289 |
-
</
|
1290 |
-
</
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
echo('<
|
1308 |
-
echo('</
|
1309 |
-
|
1310 |
-
</
|
1311 |
-
</
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
echo('<
|
1329 |
-
echo('</
|
1330 |
-
|
1331 |
-
</
|
1332 |
-
</
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
echo('<
|
1350 |
-
echo('</
|
1351 |
-
|
1352 |
-
</
|
1353 |
-
</
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
echo('<
|
1371 |
-
echo('<li>'); _e('%
|
1372 |
-
echo('</
|
1373 |
-
|
1374 |
-
</
|
1375 |
-
</
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
echo('<
|
1393 |
-
echo('<li>'); _e('%
|
1394 |
-
echo('</
|
1395 |
-
|
1396 |
-
</
|
1397 |
-
</
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
</
|
1417 |
-
</
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
<
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
</
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
<
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
add_option("
|
1586 |
-
add_option("
|
1587 |
-
add_option("
|
1588 |
-
add_option("
|
1589 |
-
add_option("
|
1590 |
-
add_option("
|
1591 |
-
add_option("
|
1592 |
-
add_option("
|
1593 |
-
add_option("
|
1594 |
-
add_option("
|
1595 |
-
add_option("
|
1596 |
-
add_option("
|
1597 |
-
add_option("
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
add_action('
|
1615 |
-
add_action('
|
1616 |
-
|
1617 |
-
|
1618 |
-
add_action('
|
1619 |
-
|
1620 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: All in One SEO Pack
|
5 |
+
Plugin URI: http://semperfiwebdesign.com
|
6 |
+
Description: Out-of-the-box SEO for your Wordpress blog.
|
7 |
+
Version: 1.4.6.10
|
8 |
+
Author: Michael Torbert
|
9 |
+
Author URI: http://semperfiwebdesign.com
|
10 |
+
*/
|
11 |
+
|
12 |
+
/*
|
13 |
+
Copyright (C) 2008 Michael Torbert, semperfiwebdesign.com (michael AT semperfiwebdesign DOT com)
|
14 |
+
Original code by uberdose of uberdose.com
|
15 |
+
|
16 |
+
This program is free software; you can redistribute it and/or modify
|
17 |
+
it under the terms of the GNU General Public License as published by
|
18 |
+
the Free Software Foundation; either version 3 of the License, or
|
19 |
+
(at your option) any later version.
|
20 |
+
|
21 |
+
This program is distributed in the hope that it will be useful,
|
22 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
+
GNU General Public License for more details.
|
25 |
+
|
26 |
+
You should have received a copy of the GNU General Public License
|
27 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28 |
+
*/
|
29 |
+
|
30 |
+
class All_in_One_SEO_Pack {
|
31 |
+
|
32 |
+
var $version = "1.4.6.10";
|
33 |
+
|
34 |
+
/** Max numbers of chars in auto-generated description */
|
35 |
+
var $maximum_description_length = 160;
|
36 |
+
|
37 |
+
/** Minimum number of chars an excerpt should be so that it can be used
|
38 |
+
* as description. Touch only if you know what you're doing
|
39 |
+
*/
|
40 |
+
var $minimum_description_length = 1;
|
41 |
+
|
42 |
+
var $ob_start_detected = false;
|
43 |
+
|
44 |
+
var $title_start = -1;
|
45 |
+
|
46 |
+
var $title_end = -1;
|
47 |
+
|
48 |
+
/** The title before rewriting */
|
49 |
+
var $orig_title = '';
|
50 |
+
|
51 |
+
/** Temp filename for the latest version. */
|
52 |
+
var $upgrade_filename = 'temp.zip';
|
53 |
+
|
54 |
+
/** Where to extract the downloaded newest version. */
|
55 |
+
var $upgrade_folder;
|
56 |
+
|
57 |
+
/** Any error in upgrading. */
|
58 |
+
var $upgrade_error;
|
59 |
+
|
60 |
+
/** Which zip to download in order to upgrade .*/
|
61 |
+
var $upgrade_url = 'http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip';
|
62 |
+
|
63 |
+
/** Filename of log file. */
|
64 |
+
var $log_file;
|
65 |
+
|
66 |
+
/** Flag whether there should be logging. */
|
67 |
+
var $do_log;
|
68 |
+
|
69 |
+
var $wp_version;
|
70 |
+
|
71 |
+
function All_in_One_SEO_Pack() {
|
72 |
+
global $wp_version;
|
73 |
+
$this->wp_version = $wp_version;
|
74 |
+
|
75 |
+
$this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log';
|
76 |
+
if (get_option('aiosp_do_log')) {
|
77 |
+
$this->do_log = true;
|
78 |
+
} else {
|
79 |
+
$this->do_log = false;
|
80 |
+
}
|
81 |
+
|
82 |
+
$this->upgrade_filename = dirname(__FILE__) . '/' . $this->upgrade_filename;
|
83 |
+
$this->upgrade_folder = dirname(__FILE__);
|
84 |
+
}
|
85 |
+
|
86 |
+
function template_redirect() {
|
87 |
+
global $wp_query;
|
88 |
+
$post = $wp_query->get_queried_object();
|
89 |
+
|
90 |
+
if (is_feed()) {
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
|
94 |
+
if (is_single() || is_page()) {
|
95 |
+
$aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'aiosp_disable', true)));
|
96 |
+
if ($aiosp_disable) {
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
if (get_option('aiosp_rewrite_titles')) {
|
102 |
+
ob_start(array($this, 'output_callback_for_title'));
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
function output_callback_for_title($content) {
|
107 |
+
return $this->rewrite_title($content);
|
108 |
+
}
|
109 |
+
|
110 |
+
function init() {
|
111 |
+
if (function_exists('load_plugin_textdomain')) {
|
112 |
+
load_plugin_textdomain('all_in_one_seo_pack', 'wp-content/plugins/all-in-one-seo-pack');
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
function is_static_front_page() {
|
117 |
+
global $wp_query;
|
118 |
+
$post = $wp_query->get_queried_object();
|
119 |
+
return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
|
120 |
+
}
|
121 |
+
|
122 |
+
function is_static_posts_page() {
|
123 |
+
global $wp_query;
|
124 |
+
$post = $wp_query->get_queried_object();
|
125 |
+
return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
|
126 |
+
}
|
127 |
+
|
128 |
+
function get_base() {
|
129 |
+
return '/'.end(explode('/', str_replace(array('\\','/all_in_one_seo_pack.php'),array('/',''),__FILE__)));
|
130 |
+
}
|
131 |
+
|
132 |
+
function admin_head() {
|
133 |
+
$home = get_settings('siteurl');
|
134 |
+
$stylesheet = $home.'/wp-content/plugins' . $this->get_base() . '/css/all_in_one_seo_pack.css';
|
135 |
+
echo('<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />');
|
136 |
+
}
|
137 |
+
|
138 |
+
function wp_head() {
|
139 |
+
if (is_feed()) {
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
|
143 |
+
global $wp_query;
|
144 |
+
$post = $wp_query->get_queried_object();
|
145 |
+
$meta_string = null;
|
146 |
+
|
147 |
+
//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());
|
148 |
+
|
149 |
+
if (is_single() || is_page()) {
|
150 |
+
$aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'aiosp_disable', true)));
|
151 |
+
if ($aiosp_disable) {
|
152 |
+
return;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
if (get_option('aiosp_rewrite_titles')) {
|
157 |
+
// make the title rewrite as short as possible
|
158 |
+
if (function_exists('ob_list_handlers')) {
|
159 |
+
$active_handlers = ob_list_handlers();
|
160 |
+
} else {
|
161 |
+
$active_handlers = array();
|
162 |
+
}
|
163 |
+
if (sizeof($active_handlers) > 0 &&
|
164 |
+
strtolower($active_handlers[sizeof($active_handlers) - 1]) ==
|
165 |
+
strtolower('All_in_One_SEO_Pack::output_callback_for_title')) {
|
166 |
+
ob_end_flush();
|
167 |
+
} else {
|
168 |
+
$this->log("another plugin interfering?");
|
169 |
+
// if we get here there *could* be trouble with another plugin :(
|
170 |
+
$this->ob_start_detected = true;
|
171 |
+
if (function_exists('ob_list_handlers')) {
|
172 |
+
foreach (ob_list_handlers() as $handler) {
|
173 |
+
$this->log("detected output handler $handler");
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
echo "\n<!-- all in one seo pack $this->version ";
|
180 |
+
if ($this->ob_start_detected) {
|
181 |
+
echo "ob_start_detected ";
|
182 |
+
}
|
183 |
+
echo "[$this->title_start,$this->title_end] ";
|
184 |
+
echo "-->\n";
|
185 |
+
|
186 |
+
if ((is_home() && get_option('aiosp_home_keywords')) || $this->is_static_front_page()) {
|
187 |
+
$keywords = trim($this->internationalize(get_option('aiosp_home_keywords')));
|
188 |
+
} else {
|
189 |
+
$keywords = $this->get_all_keywords();
|
190 |
+
}
|
191 |
+
if (is_single() || is_page()) {
|
192 |
+
if ($this->is_static_front_page()) {
|
193 |
+
$description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
194 |
+
} else {
|
195 |
+
$description = $this->get_post_description($post);
|
196 |
+
}
|
197 |
+
} else if (is_home()) {
|
198 |
+
$description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
199 |
+
} else if (is_category()) {
|
200 |
+
$description = $this->internationalize(category_description());
|
201 |
+
}
|
202 |
+
|
203 |
+
if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) {
|
204 |
+
$description = trim(strip_tags($description));
|
205 |
+
$description = str_replace('"', '', $description);
|
206 |
+
|
207 |
+
// replace newlines on mac / windows?
|
208 |
+
$description = str_replace("\r\n", ' ', $description);
|
209 |
+
|
210 |
+
// maybe linux uses this alone
|
211 |
+
$description = str_replace("\n", ' ', $description);
|
212 |
+
|
213 |
+
if (isset($meta_string)) {
|
214 |
+
//$meta_string .= "\n";
|
215 |
+
} else {
|
216 |
+
$meta_string = '';
|
217 |
+
}
|
218 |
+
|
219 |
+
// description format
|
220 |
+
$description_format = get_option('aiosp_description_format');
|
221 |
+
if (!isset($description_format) || empty($description_format)) {
|
222 |
+
$description_format = "%description%";
|
223 |
+
}
|
224 |
+
$description = str_replace('%description%', $description, $description_format);
|
225 |
+
$description = str_replace('%blog_title%', get_bloginfo('name'), $description);
|
226 |
+
$description = str_replace('%blog_description%', get_bloginfo('description'), $description);
|
227 |
+
$description = str_replace('%wp_title%', $this->get_original_title(), $description);
|
228 |
+
|
229 |
+
$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
|
230 |
+
}
|
231 |
+
|
232 |
+
if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) {
|
233 |
+
if (isset($meta_string)) {
|
234 |
+
$meta_string .= "\n";
|
235 |
+
}
|
236 |
+
$meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
|
237 |
+
}
|
238 |
+
|
239 |
+
if (function_exists('is_tag')) {
|
240 |
+
$is_tag = is_tag();
|
241 |
+
}
|
242 |
+
|
243 |
+
if ((is_category() && get_option('aiosp_category_noindex')) ||
|
244 |
+
(!is_category() && is_archive() &&!$is_tag && get_option('aiosp_archive_noindex')) ||
|
245 |
+
(get_option('aiosp_tags_noindex') && $is_tag)) {
|
246 |
+
if (isset($meta_string)) {
|
247 |
+
$meta_string .= "\n";
|
248 |
+
}
|
249 |
+
$meta_string .= '<meta name="robots" content="noindex,follow" />';
|
250 |
+
}
|
251 |
+
|
252 |
+
$page_meta = stripcslashes(get_option('aiosp_page_meta_tags'));
|
253 |
+
$post_meta = stripcslashes(get_option('aiosp_post_meta_tags'));
|
254 |
+
$home_meta = stripcslashes(get_option('aiosp_home_meta_tags'));
|
255 |
+
if (is_page() && isset($page_meta) && !empty($page_meta)) {
|
256 |
+
if (isset($meta_string)) {
|
257 |
+
$meta_string .= "\n";
|
258 |
+
}
|
259 |
+
echo "\n$page_meta";
|
260 |
+
}
|
261 |
+
|
262 |
+
if (is_single() && isset($post_meta) && !empty($post_meta)) {
|
263 |
+
if (isset($meta_string)) {
|
264 |
+
$meta_string .= "\n";
|
265 |
+
}
|
266 |
+
$meta_string .= "$post_meta";
|
267 |
+
}
|
268 |
+
|
269 |
+
if (is_home() && !empty($home_meta)) {
|
270 |
+
if (isset($meta_string)) {
|
271 |
+
$meta_string .= "\n";
|
272 |
+
}
|
273 |
+
$meta_string .= "$home_meta";
|
274 |
+
}
|
275 |
+
|
276 |
+
if ($meta_string != null) {
|
277 |
+
echo "$meta_string\n";
|
278 |
+
}
|
279 |
+
|
280 |
+
echo "<!-- /all in one seo pack -->\n";
|
281 |
+
}
|
282 |
+
|
283 |
+
function get_post_description($post) {
|
284 |
+
$description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "description", true))));
|
285 |
+
if (!$description) {
|
286 |
+
$description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt));
|
287 |
+
if (!$description && get_option("aiosp_generate_descriptions")) {
|
288 |
+
$description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
// "internal whitespace trim"
|
293 |
+
$description = preg_replace("/\s\s+/", " ", $description);
|
294 |
+
|
295 |
+
return $description;
|
296 |
+
}
|
297 |
+
|
298 |
+
function replace_title($content, $title) {
|
299 |
+
$title = trim(strip_tags($title));
|
300 |
+
|
301 |
+
$title_tag_start = "<title>";
|
302 |
+
$title_tag_end = "</title>";
|
303 |
+
$len_start = strlen($title_tag_start);
|
304 |
+
$len_end = strlen($title_tag_end);
|
305 |
+
$title = stripcslashes(trim($title));
|
306 |
+
$start = strpos($content, $title_tag_start);
|
307 |
+
$end = strpos($content, $title_tag_end);
|
308 |
+
|
309 |
+
$this->title_start = $start;
|
310 |
+
$this->title_end = $end;
|
311 |
+
$this->orig_title = $title;
|
312 |
+
|
313 |
+
if ($start && $end) {
|
314 |
+
$header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
|
315 |
+
} else {
|
316 |
+
// this breaks some sitemap plugins (like wpg2)
|
317 |
+
//$header = $content . "<title>$title</title>";
|
318 |
+
|
319 |
+
$header = $content;
|
320 |
+
}
|
321 |
+
|
322 |
+
return $header;
|
323 |
+
}
|
324 |
+
|
325 |
+
function internationalize($in) {
|
326 |
+
if (function_exists('langswitch_filter_langs_with_message')) {
|
327 |
+
$in = langswitch_filter_langs_with_message($in);
|
328 |
+
}
|
329 |
+
if (function_exists('polyglot_filter')) {
|
330 |
+
$in = polyglot_filter($in);
|
331 |
+
}
|
332 |
+
if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
|
333 |
+
$in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
|
334 |
+
}
|
335 |
+
$in = apply_filters('localization', $in);
|
336 |
+
return $in;
|
337 |
+
}
|
338 |
+
|
339 |
+
/** @return The original title as delivered by WP (well, in most cases) */
|
340 |
+
function get_original_title() {
|
341 |
+
global $wp_query;
|
342 |
+
if (!$wp_query) {
|
343 |
+
return null;
|
344 |
+
}
|
345 |
+
|
346 |
+
$post = $wp_query->get_queried_object();
|
347 |
+
|
348 |
+
// the_search_query() is not suitable, it cannot just return
|
349 |
+
global $s;
|
350 |
+
|
351 |
+
$title = null;
|
352 |
+
|
353 |
+
if (is_home()) {
|
354 |
+
$title = get_option('blogname');
|
355 |
+
} else if (is_single()) {
|
356 |
+
$title = $this->internationalize(wp_title('', false));
|
357 |
+
} else if (is_search() && isset($s) && !empty($s)) {
|
358 |
+
if (function_exists('attribute_escape')) {
|
359 |
+
$search = attribute_escape(stripcslashes($s));
|
360 |
+
} else {
|
361 |
+
$search = wp_specialchars(stripcslashes($s), true);
|
362 |
+
}
|
363 |
+
$search = $this->capitalize($search);
|
364 |
+
$title = $search;
|
365 |
+
} else if (is_category() && !is_feed()) {
|
366 |
+
$category_description = $this->internationalize(category_description());
|
367 |
+
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
368 |
+
$title = $category_name;
|
369 |
+
} else if (is_page()) {
|
370 |
+
$title = $this->internationalize(wp_title('', false));
|
371 |
+
} else if (function_exists('is_tag') && is_tag()) {
|
372 |
+
global $utw;
|
373 |
+
if ($utw) {
|
374 |
+
$tags = $utw->GetCurrentTagSet();
|
375 |
+
$tag = $tags[0]->tag;
|
376 |
+
$tag = str_replace('-', ' ', $tag);
|
377 |
+
} else {
|
378 |
+
// wordpress > 2.3
|
379 |
+
$tag = $this->internationalize(wp_title('', false));
|
380 |
+
}
|
381 |
+
if ($tag) {
|
382 |
+
$title = $tag;
|
383 |
+
}
|
384 |
+
} else if (is_archive()) {
|
385 |
+
$title = $this->internationalize(wp_title('', false));
|
386 |
+
} else if (is_404()) {
|
387 |
+
$title_format = get_option('aiosp_404_title_format');
|
388 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
389 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
390 |
+
$new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
|
391 |
+
$new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
|
392 |
+
$title = $new_title;
|
393 |
+
}
|
394 |
+
|
395 |
+
return trim($title);
|
396 |
+
}
|
397 |
+
|
398 |
+
function paged_title($title) {
|
399 |
+
// the page number if paged
|
400 |
+
global $paged;
|
401 |
+
|
402 |
+
// simple tagging support
|
403 |
+
global $STagging;
|
404 |
+
|
405 |
+
if (is_paged() || (isset($STagging) && $STagging->is_tag_view() && $paged)) {
|
406 |
+
$part = $this->internationalize(get_option('aiosp_paged_format'));
|
407 |
+
if (isset($part) || !empty($part)) {
|
408 |
+
$part = " " . trim($part);
|
409 |
+
$part = str_replace('%page%', $paged, $part);
|
410 |
+
$this->log("paged_title() [$title] [$part]");
|
411 |
+
$title .= $part;
|
412 |
+
}
|
413 |
+
}
|
414 |
+
return $title;
|
415 |
+
}
|
416 |
+
|
417 |
+
function rewrite_title($header) {
|
418 |
+
global $wp_query;
|
419 |
+
if (!$wp_query) {
|
420 |
+
$header .= "<!-- no wp_query found! -->\n";
|
421 |
+
return $header;
|
422 |
+
}
|
423 |
+
|
424 |
+
$post = $wp_query->get_queried_object();
|
425 |
+
|
426 |
+
// the_search_query() is not suitable, it cannot just return
|
427 |
+
global $s;
|
428 |
+
|
429 |
+
// simple tagging support
|
430 |
+
global $STagging;
|
431 |
+
|
432 |
+
if (is_home()) {
|
433 |
+
$title = $this->internationalize(get_option('aiosp_home_title'));
|
434 |
+
if (empty($title)) {
|
435 |
+
$title = $this->internationalize(get_option('blogname'));
|
436 |
+
}
|
437 |
+
$title = $this->paged_title($title);
|
438 |
+
$header = $this->replace_title($header, $title);
|
439 |
+
} else if (is_single()) {
|
440 |
+
// we're not in the loop :(
|
441 |
+
$authordata = get_userdata($post->post_author);
|
442 |
+
$categories = get_the_category();
|
443 |
+
$category = '';
|
444 |
+
if (count($categories) > 0) {
|
445 |
+
$category = $categories[0]->cat_name;
|
446 |
+
}
|
447 |
+
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
448 |
+
if (!$title) {
|
449 |
+
$title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
|
450 |
+
if (!$title) {
|
451 |
+
$title = $this->internationalize(wp_title('', false));
|
452 |
+
}
|
453 |
+
}
|
454 |
+
$title_format = get_option('aiosp_post_title_format');
|
455 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
456 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
457 |
+
$new_title = str_replace('%post_title%', $title, $new_title);
|
458 |
+
$new_title = str_replace('%category%', $category, $new_title);
|
459 |
+
$new_title = str_replace('%category_title%', $category, $new_title);
|
460 |
+
$new_title = str_replace('%post_author_login%', $authordata->user_login, $new_title);
|
461 |
+
$new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
|
462 |
+
$new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
|
463 |
+
$new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
|
464 |
+
$title = $new_title;
|
465 |
+
$title = trim($title);
|
466 |
+
$header = $this->replace_title($header, $title);
|
467 |
+
} else if (is_search() && isset($s) && !empty($s)) {
|
468 |
+
if (function_exists('attribute_escape')) {
|
469 |
+
$search = attribute_escape(stripcslashes($s));
|
470 |
+
} else {
|
471 |
+
$search = wp_specialchars(stripcslashes($s), true);
|
472 |
+
}
|
473 |
+
$search = $this->capitalize($search);
|
474 |
+
$title_format = get_option('aiosp_search_title_format');
|
475 |
+
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
476 |
+
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
477 |
+
$title = str_replace('%search%', $search, $title);
|
478 |
+
$header = $this->replace_title($header, $title);
|
479 |
+
} else if (is_category() && !is_feed()) {
|
480 |
+
$category_description = $this->internationalize(category_description());
|
481 |
+
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
482 |
+
$title_format = get_option('aiosp_category_title_format');
|
483 |
+
$title = str_replace('%category_title%', $category_name, $title_format);
|
484 |
+
$title = str_replace('%category_description%', $category_description, $title);
|
485 |
+
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
|
486 |
+
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
487 |
+
$title = $this->paged_title($title);
|
488 |
+
$header = $this->replace_title($header, $title);
|
489 |
+
} else if (is_page()) {
|
490 |
+
// we're not in the loop :(
|
491 |
+
$authordata = get_userdata($post->post_author);
|
492 |
+
if ($this->is_static_front_page()) {
|
493 |
+
if ($this->internationalize(get_option('aiosp_home_title'))) {
|
494 |
+
$header = $this->replace_title($header, $this->internationalize(get_option('aiosp_home_title')));
|
495 |
+
}
|
496 |
+
} else {
|
497 |
+
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
498 |
+
if (!$title) {
|
499 |
+
$title = $this->internationalize(wp_title('', false));
|
500 |
+
}
|
501 |
+
$title_format = get_option('aiosp_page_title_format');
|
502 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
503 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
504 |
+
$new_title = str_replace('%page_title%', $title, $new_title);
|
505 |
+
$new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title);
|
506 |
+
$new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title);
|
507 |
+
$new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
|
508 |
+
$new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
|
509 |
+
$title = trim($new_title);
|
510 |
+
$header = $this->replace_title($header, $title);
|
511 |
+
}
|
512 |
+
} else if (function_exists('is_tag') && is_tag()) {
|
513 |
+
global $utw;
|
514 |
+
if ($utw) {
|
515 |
+
$tags = $utw->GetCurrentTagSet();
|
516 |
+
$tag = $tags[0]->tag;
|
517 |
+
$tag = str_replace('-', ' ', $tag);
|
518 |
+
} else {
|
519 |
+
// wordpress > 2.3
|
520 |
+
$tag = $this->internationalize(wp_title('', false));
|
521 |
+
}
|
522 |
+
if ($tag) {
|
523 |
+
$tag = $this->capitalize($tag);
|
524 |
+
$title_format = get_option('aiosp_tag_title_format');
|
525 |
+
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
526 |
+
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
527 |
+
$title = str_replace('%tag%', $tag, $title);
|
528 |
+
$title = $this->paged_title($title);
|
529 |
+
$header = $this->replace_title($header, $title);
|
530 |
+
}
|
531 |
+
} else if (isset($STagging) && $STagging->is_tag_view()) { // simple tagging support
|
532 |
+
$tag = $STagging->search_tag;
|
533 |
+
if ($tag) {
|
534 |
+
$tag = $this->capitalize($tag);
|
535 |
+
$title_format = get_option('aiosp_tag_title_format');
|
536 |
+
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
537 |
+
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
538 |
+
$title = str_replace('%tag%', $tag, $title);
|
539 |
+
$title = $this->paged_title($title);
|
540 |
+
$header = $this->replace_title($header, $title);
|
541 |
+
}
|
542 |
+
} else if (is_archive()) {
|
543 |
+
$date = $this->internationalize(wp_title('', false));
|
544 |
+
$title_format = get_option('aiosp_archive_title_format');
|
545 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
546 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
547 |
+
$new_title = str_replace('%date%', $date, $new_title);
|
548 |
+
$title = trim($new_title);
|
549 |
+
$title = $this->paged_title($title);
|
550 |
+
$header = $this->replace_title($header, $title);
|
551 |
+
} else if (is_404()) {
|
552 |
+
$title_format = get_option('aiosp_404_title_format');
|
553 |
+
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
554 |
+
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
555 |
+
$new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
|
556 |
+
$new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
|
557 |
+
$header = $this->replace_title($header, $new_title);
|
558 |
+
}
|
559 |
+
|
560 |
+
return $header;
|
561 |
+
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
* @return User-readable nice words for a given request.
|
566 |
+
*/
|
567 |
+
function request_as_words($request) {
|
568 |
+
$request = htmlspecialchars($request);
|
569 |
+
$request = str_replace('.html', ' ', $request);
|
570 |
+
$request = str_replace('.htm', ' ', $request);
|
571 |
+
$request = str_replace('.', ' ', $request);
|
572 |
+
$request = str_replace('/', ' ', $request);
|
573 |
+
$request_a = explode(' ', $request);
|
574 |
+
$request_new = array();
|
575 |
+
foreach ($request_a as $token) {
|
576 |
+
$request_new[] = ucwords(trim($token));
|
577 |
+
}
|
578 |
+
$request = implode(' ', $request_new);
|
579 |
+
return $request;
|
580 |
+
}
|
581 |
+
|
582 |
+
function capitalize($s) {
|
583 |
+
$s = trim($s);
|
584 |
+
$tokens = explode(' ', $s);
|
585 |
+
while (list($key, $val) = each($tokens)) {
|
586 |
+
$tokens[$key] = trim($tokens[$key]);
|
587 |
+
$tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
|
588 |
+
}
|
589 |
+
$s = implode(' ', $tokens);
|
590 |
+
return $s;
|
591 |
+
}
|
592 |
+
|
593 |
+
function trim_excerpt_without_filters($text) {
|
594 |
+
$text = str_replace(']]>', ']]>', $text);
|
595 |
+
$text = strip_tags($text);
|
596 |
+
$max = $this->maximum_description_length;
|
597 |
+
|
598 |
+
if ($max < strlen($text)) {
|
599 |
+
while($text[$max] != ' ' && $max > $this->minimum_description_length) {
|
600 |
+
$max--;
|
601 |
+
}
|
602 |
+
}
|
603 |
+
$text = substr($text, 0, $max);
|
604 |
+
return trim(stripcslashes($text));
|
605 |
+
}
|
606 |
+
|
607 |
+
function trim_excerpt_without_filters_full_length($text) {
|
608 |
+
$text = str_replace(']]>', ']]>', $text);
|
609 |
+
$text = strip_tags($text);
|
610 |
+
return trim(stripcslashes($text));
|
611 |
+
}
|
612 |
+
|
613 |
+
/**
|
614 |
+
* @return comma-separated list of unique keywords
|
615 |
+
*/
|
616 |
+
function get_all_keywords() {
|
617 |
+
global $posts;
|
618 |
+
|
619 |
+
if (is_404()) {
|
620 |
+
return null;
|
621 |
+
}
|
622 |
+
|
623 |
+
// if we are on synthetic pages
|
624 |
+
if (!is_home() && !is_page() && !is_single() &&!$this->is_static_front_page() && !$this->is_static_posts_page()) {
|
625 |
+
return null;
|
626 |
+
}
|
627 |
+
|
628 |
+
$keywords = array();
|
629 |
+
if (is_array($posts)) {
|
630 |
+
foreach ($posts as $post) {
|
631 |
+
if ($post) {
|
632 |
+
|
633 |
+
// custom field keywords
|
634 |
+
$keywords_a = $keywords_i = null;
|
635 |
+
$description_a = $description_i = null;
|
636 |
+
$id = $post->ID;
|
637 |
+
$keywords_i = stripcslashes($this->internationalize(get_post_meta($post->ID, "keywords", true)));
|
638 |
+
$keywords_i = str_replace('"', '', $keywords_i);
|
639 |
+
if (isset($keywords_i) && !empty($keywords_i)) {
|
640 |
+
$traverse = explode(',', $keywords_i);
|
641 |
+
foreach ($traverse as $keyword) {
|
642 |
+
$keywords[] = $keyword;
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
// WP 2.3 tags
|
647 |
+
if (function_exists('get_the_tags')) {
|
648 |
+
$tags = get_the_tags($post->ID);
|
649 |
+
if ($tags && is_array($tags)) {
|
650 |
+
foreach ($tags as $tag) {
|
651 |
+
$keywords[] = $this->internationalize($tag->name);
|
652 |
+
}
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
// Ultimate Tag Warrior integration
|
657 |
+
global $utw;
|
658 |
+
if ($utw) {
|
659 |
+
$tags = $utw->GetTagsForPost($post);
|
660 |
+
if (is_array($tags)) {
|
661 |
+
foreach ($tags as $tag) {
|
662 |
+
$tag = $tag->tag;
|
663 |
+
$tag = str_replace('_',' ', $tag);
|
664 |
+
$tag = str_replace('-',' ',$tag);
|
665 |
+
$tag = stripcslashes($tag);
|
666 |
+
$keywords[] = $tag;
|
667 |
+
}
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
// autometa
|
672 |
+
$autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
|
673 |
+
if (isset($autometa) && !empty($autometa)) {
|
674 |
+
$autometa_array = explode(' ', $autometa);
|
675 |
+
foreach ($autometa_array as $e) {
|
676 |
+
$keywords[] = $e;
|
677 |
+
}
|
678 |
+
}
|
679 |
+
|
680 |
+
if (get_option('aiosp_use_categories') && !is_page()) {
|
681 |
+
$categories = get_the_category($post->ID);
|
682 |
+
foreach ($categories as $category) {
|
683 |
+
$keywords[] = $this->internationalize($category->cat_name);
|
684 |
+
}
|
685 |
+
}
|
686 |
+
|
687 |
+
}
|
688 |
+
}
|
689 |
+
}
|
690 |
+
|
691 |
+
return $this->get_unique_keywords($keywords);
|
692 |
+
}
|
693 |
+
|
694 |
+
function get_meta_keywords() {
|
695 |
+
global $posts;
|
696 |
+
|
697 |
+
$keywords = array();
|
698 |
+
if (is_array($posts)) {
|
699 |
+
foreach ($posts as $post) {
|
700 |
+
if ($post) {
|
701 |
+
// custom field keywords
|
702 |
+
$keywords_a = $keywords_i = null;
|
703 |
+
$description_a = $description_i = null;
|
704 |
+
$id = $post->ID;
|
705 |
+
$keywords_i = stripcslashes(get_post_meta($post->ID, "keywords", true));
|
706 |
+
$keywords_i = str_replace('"', '', $keywords_i);
|
707 |
+
if (isset($keywords_i) && !empty($keywords_i)) {
|
708 |
+
$keywords[] = $keywords_i;
|
709 |
+
}
|
710 |
+
}
|
711 |
+
}
|
712 |
+
}
|
713 |
+
|
714 |
+
return $this->get_unique_keywords($keywords);
|
715 |
+
}
|
716 |
+
|
717 |
+
function get_unique_keywords($keywords) {
|
718 |
+
$small_keywords = array();
|
719 |
+
foreach ($keywords as $word) {
|
720 |
+
$small_keywords[] = mb_strtolower($word);
|
721 |
+
}
|
722 |
+
$keywords_ar = array_unique($small_keywords);
|
723 |
+
return implode(',', $keywords_ar);
|
724 |
+
}
|
725 |
+
|
726 |
+
function get_url($url) {
|
727 |
+
if (function_exists('file_get_contents')) {
|
728 |
+
$file = file_get_contents($url);
|
729 |
+
} else {
|
730 |
+
$curl = curl_init($url);
|
731 |
+
curl_setopt($curl, CURLOPT_HEADER, 0);
|
732 |
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
733 |
+
$file = curl_exec($curl);
|
734 |
+
curl_close($curl);
|
735 |
+
}
|
736 |
+
return $file;
|
737 |
+
}
|
738 |
+
|
739 |
+
function log($message) {
|
740 |
+
if ($this->do_log) {
|
741 |
+
error_log(date('Y-m-d H:i:s') . " " . $message . "\n", 3, $this->log_file);
|
742 |
+
}
|
743 |
+
}
|
744 |
+
|
745 |
+
function download_newest_version() {
|
746 |
+
$success = true;
|
747 |
+
$file_content = $this->get_url($this->upgrade_url);
|
748 |
+
if ($file_content === false) {
|
749 |
+
$this->upgrade_error = sprintf(__("Could not download distribution (%s)"), $this->upgrade_url);
|
750 |
+
$success = false;
|
751 |
+
} else if (strlen($file_content) < 100) {
|
752 |
+
$this->upgrade_error = sprintf(__("Could not download distribution (%s): %s"), $this->upgrade_url, $file_content);
|
753 |
+
$success = false;
|
754 |
+
} else {
|
755 |
+
$this->log(sprintf("filesize of download ZIP: %d", strlen($file_content)));
|
756 |
+
$fh = @fopen($this->upgrade_filename, 'w');
|
757 |
+
$this->log("fh is $fh");
|
758 |
+
if (!$fh) {
|
759 |
+
$this->upgrade_error = sprintf(__("Could not open %s for writing"), $this->upgrade_filename);
|
760 |
+
$this->upgrade_error .= "<br />";
|
761 |
+
$this->upgrade_error .= sprintf(__("Please make sure %s is writable"), $this->upgrade_folder);
|
762 |
+
$success = false;
|
763 |
+
} else {
|
764 |
+
$bytes_written = @fwrite($fh, $file_content);
|
765 |
+
$this->log("wrote $bytes_written bytes");
|
766 |
+
if (!$bytes_written) {
|
767 |
+
$this->upgrade_error = sprintf(__("Could not write to %s"), $this->upgrade_filename);
|
768 |
+
$success = false;
|
769 |
+
}
|
770 |
+
}
|
771 |
+
if ($success) {
|
772 |
+
fclose($fh);
|
773 |
+
}
|
774 |
+
}
|
775 |
+
return $success;
|
776 |
+
}
|
777 |
+
|
778 |
+
function install_newest_version() {
|
779 |
+
$success = $this->download_newest_version();
|
780 |
+
if ($success) {
|
781 |
+
$success = $this->extract_plugin();
|
782 |
+
unlink($this->upgrade_filename);
|
783 |
+
}
|
784 |
+
return $success;
|
785 |
+
}
|
786 |
+
|
787 |
+
function extract_plugin() {
|
788 |
+
if (!class_exists('PclZip')) {
|
789 |
+
require_once ('pclzip.lib.php');
|
790 |
+
}
|
791 |
+
$archive = new PclZip($this->upgrade_filename);
|
792 |
+
$files = $archive->extract(PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $this->upgrade_folder);
|
793 |
+
$this->log("files is $files");
|
794 |
+
if (is_array($files)) {
|
795 |
+
$num_extracted = sizeof($files);
|
796 |
+
$this->log("extracted $num_extracted files to $this->upgrade_folder");
|
797 |
+
$this->log(print_r($files, true));
|
798 |
+
return true;
|
799 |
+
} else {
|
800 |
+
$this->upgrade_error = $archive->errorInfo();
|
801 |
+
return false;
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
/** crude approximization of whether current user is an admin */
|
806 |
+
function is_admin() {
|
807 |
+
return current_user_can('level_8');
|
808 |
+
}
|
809 |
+
|
810 |
+
function is_directory_writable($directory) {
|
811 |
+
$filename = $directory . '/' . 'tmp_file_' . time();
|
812 |
+
$fh = @fopen($filename, 'w');
|
813 |
+
if (!$fh) {
|
814 |
+
return false;
|
815 |
+
}
|
816 |
+
|
817 |
+
$written = fwrite($fh, "test");
|
818 |
+
fclose($fh);
|
819 |
+
unlink($filename);
|
820 |
+
if ($written) {
|
821 |
+
return true;
|
822 |
+
} else {
|
823 |
+
return false;
|
824 |
+
}
|
825 |
+
}
|
826 |
+
|
827 |
+
function is_upgrade_directory_writable() {
|
828 |
+
//return $this->is_directory_writable($this->upgrade_folder);
|
829 |
+
// let's assume it is
|
830 |
+
return true;
|
831 |
+
}
|
832 |
+
|
833 |
+
function post_meta_tags($id) {
|
834 |
+
$awmp_edit = $_POST["aiosp_edit"];
|
835 |
+
if (isset($awmp_edit) && !empty($awmp_edit)) {
|
836 |
+
$keywords = $_POST["aiosp_keywords"];
|
837 |
+
$description = $_POST["aiosp_description"];
|
838 |
+
$title = $_POST["aiosp_title"];
|
839 |
+
$aiosp_meta = $_POST["aiosp_meta"];
|
840 |
+
$aiosp_disable = $_POST["aiosp_disable"];
|
841 |
+
|
842 |
+
delete_post_meta($id, 'keywords');
|
843 |
+
delete_post_meta($id, 'description');
|
844 |
+
delete_post_meta($id, 'title');
|
845 |
+
if ($this->is_admin()) {
|
846 |
+
delete_post_meta($id, 'aiosp_disable');
|
847 |
+
}
|
848 |
+
//delete_post_meta($id, 'aiosp_meta');
|
849 |
+
|
850 |
+
if (isset($keywords) && !empty($keywords)) {
|
851 |
+
add_post_meta($id, 'keywords', $keywords);
|
852 |
+
}
|
853 |
+
if (isset($description) && !empty($description)) {
|
854 |
+
add_post_meta($id, 'description', $description);
|
855 |
+
}
|
856 |
+
if (isset($title) && !empty($title)) {
|
857 |
+
add_post_meta($id, 'title', $title);
|
858 |
+
}
|
859 |
+
if (isset($aiosp_disable) && !empty($aiosp_disable) && $this->is_admin()) {
|
860 |
+
add_post_meta($id, 'aiosp_disable', $aiosp_disable);
|
861 |
+
}
|
862 |
+
/*
|
863 |
+
if (isset($aiosp_meta) && !empty($aiosp_meta)) {
|
864 |
+
add_post_meta($id, 'aiosp_meta', $aiosp_meta);
|
865 |
+
}
|
866 |
+
*/
|
867 |
+
}
|
868 |
+
}
|
869 |
+
|
870 |
+
function edit_category($id) {
|
871 |
+
global $wpdb;
|
872 |
+
$id = $wpdb->escape($id);
|
873 |
+
$awmp_edit = $_POST["aiosp_edit"];
|
874 |
+
if (isset($awmp_edit) && !empty($awmp_edit)) {
|
875 |
+
$keywords = $wpdb->escape($_POST["aiosp_keywords"]);
|
876 |
+
$title = $wpdb->escape($_POST["aiosp_title"]);
|
877 |
+
$old_category = $wpdb->get_row("select * from $this->table_categories where category_id=$id", OBJECT);
|
878 |
+
if ($old_category) {
|
879 |
+
$wpdb->query("update $this->table_categories
|
880 |
+
set meta_title='$title', meta_keywords='$keywords'
|
881 |
+
where category_id=$id");
|
882 |
+
} else {
|
883 |
+
$wpdb->query("insert into $this->table_categories(meta_title, meta_keywords, category_id)
|
884 |
+
values ('$title', '$keywords', $id");
|
885 |
+
}
|
886 |
+
//$wpdb->query("insert into $this->table_categories")
|
887 |
+
/*
|
888 |
+
delete_post_meta($id, 'keywords');
|
889 |
+
delete_post_meta($id, 'description');
|
890 |
+
delete_post_meta($id, 'title');
|
891 |
+
|
892 |
+
if (isset($keywords) && !empty($keywords)) {
|
893 |
+
add_post_meta($id, 'keywords', $keywords);
|
894 |
+
}
|
895 |
+
if (isset($description) && !empty($description)) {
|
896 |
+
add_post_meta($id, 'description', $description);
|
897 |
+
}
|
898 |
+
if (isset($title) && !empty($title)) {
|
899 |
+
add_post_meta($id, 'title', $title);
|
900 |
+
}
|
901 |
+
*/
|
902 |
+
}
|
903 |
+
}
|
904 |
+
|
905 |
+
/**
|
906 |
+
* @deprecated This was for the feature of dedicated meta tags for categories which never went mainstream.
|
907 |
+
*/
|
908 |
+
function edit_category_form() {
|
909 |
+
global $post;
|
910 |
+
$keywords = stripcslashes(get_post_meta($post->ID, 'keywords', true));
|
911 |
+
$title = stripcslashes(get_post_meta($post->ID, 'title', true));
|
912 |
+
$description = stripcslashes(get_post_meta($post->ID, 'description', true));
|
913 |
+
?>
|
914 |
+
<input value="aiosp_edit" type="hidden" name="aiosp_edit" />
|
915 |
+
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
916 |
+
<tr>
|
917 |
+
<th width="33%" scope="row" valign="top">
|
918 |
+
<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>
|
919 |
+
</th>
|
920 |
+
</tr>
|
921 |
+
<tr>
|
922 |
+
<th width="33%" scope="row" valign="top"><label for="aiosp_title"><?php _e('Title:', 'all_in_one_seo_pack') ?></label></th>
|
923 |
+
<td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="70"/></td>
|
924 |
+
</tr>
|
925 |
+
<tr>
|
926 |
+
<th width="33%" scope="row" valign="top"><label for="aiosp_keywords"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></label></th>
|
927 |
+
<td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="70"/></td>
|
928 |
+
</tr>
|
929 |
+
</table>
|
930 |
+
<?php
|
931 |
+
}
|
932 |
+
|
933 |
+
function add_meta_tags_textinput() {
|
934 |
+
global $post;
|
935 |
+
$post_id = $post;
|
936 |
+
if (is_object($post_id)) {
|
937 |
+
$post_id = $post_id->ID;
|
938 |
+
}
|
939 |
+
$keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'keywords', true)));
|
940 |
+
$title = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'title', true)));
|
941 |
+
$description = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'description', true)));
|
942 |
+
$aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'aiosp_meta', true)));
|
943 |
+
$aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'aiosp_disable', true)));
|
944 |
+
?>
|
945 |
+
<SCRIPT LANGUAGE="JavaScript">
|
946 |
+
<!-- Begin
|
947 |
+
function countChars(field,cntfield) {
|
948 |
+
cntfield.value = field.value.length;
|
949 |
+
}
|
950 |
+
// End -->
|
951 |
+
</script>
|
952 |
+
|
953 |
+
<?php if (substr($this->wp_version, 0, 3) == '2.5') { ?>
|
954 |
+
<div id="postaiosp" class="postbox closed">
|
955 |
+
<h3><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
|
956 |
+
<div class="inside">
|
957 |
+
<div id="postaiosp">
|
958 |
+
<?php } else { ?>
|
959 |
+
<div class="dbx-b-ox-wrapper">
|
960 |
+
<fieldset id="seodiv" class="dbx-box">
|
961 |
+
<div class="dbx-h-andle-wrapper">
|
962 |
+
<h3 class="dbx-handle"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
|
963 |
+
</div>
|
964 |
+
<div class="dbx-c-ontent-wrapper">
|
965 |
+
<div class="dbx-content">
|
966 |
+
<?php } ?>
|
967 |
+
|
968 |
+
<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>
|
969 |
+
<input value="aiosp_edit" type="hidden" name="aiosp_edit" />
|
970 |
+
<table style="margin-bottom:40px">
|
971 |
+
<tr>
|
972 |
+
<th style="text-align:left;" colspan="2">
|
973 |
+
</th>
|
974 |
+
</tr>
|
975 |
+
<tr>
|
976 |
+
<th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
|
977 |
+
<td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62"/></td>
|
978 |
+
</tr>
|
979 |
+
<tr>
|
980 |
+
<th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
|
981 |
+
<td><textarea name="aiosp_description" rows="1" cols="60"
|
982 |
+
onKeyDown="countChars(document.post.aiosp_description,document.post.length1)"
|
983 |
+
onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?></textarea><br />
|
984 |
+
<input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
|
985 |
+
<?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack') ?>
|
986 |
+
</td>
|
987 |
+
</tr>
|
988 |
+
<tr>
|
989 |
+
<th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
|
990 |
+
<td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="62"/></td>
|
991 |
+
</tr>
|
992 |
+
|
993 |
+
<?php if ($this->is_admin()) { ?>
|
994 |
+
<tr>
|
995 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
996 |
+
<?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
|
997 |
+
</th>
|
998 |
+
<td>
|
999 |
+
<input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
|
1000 |
+
</td>
|
1001 |
+
</tr>
|
1002 |
+
<?php } ?>
|
1003 |
+
|
1004 |
+
</table>
|
1005 |
+
|
1006 |
+
<?php if (substr($this->wp_version, 0, 3) == '2.5') { ?>
|
1007 |
+
</div></div></div>
|
1008 |
+
<?php } else { ?>
|
1009 |
+
</div>
|
1010 |
+
</fieldset>
|
1011 |
+
</div>
|
1012 |
+
<?php } ?>
|
1013 |
+
|
1014 |
+
<?php
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
function admin_menu() {
|
1018 |
+
$file = __FILE__;
|
1019 |
+
|
1020 |
+
// hack for 1.5
|
1021 |
+
if (substr($this->wp_version, 0, 3) == '1.5') {
|
1022 |
+
$file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
|
1023 |
+
}
|
1024 |
+
//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'));
|
1025 |
+
add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'options_panel'));
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
function management_panel() {
|
1029 |
+
$message = null;
|
1030 |
+
$base_url = "edit.php?page=" . __FILE__;
|
1031 |
+
//echo($base_url);
|
1032 |
+
$type = $_REQUEST['type'];
|
1033 |
+
if (!isset($type)) {
|
1034 |
+
$type = "posts";
|
1035 |
+
}
|
1036 |
+
?>
|
1037 |
+
|
1038 |
+
<ul class="aiosp_menu">
|
1039 |
+
<li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
|
1040 |
+
</li>
|
1041 |
+
<li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
|
1042 |
+
</li>
|
1043 |
+
</ul>
|
1044 |
+
|
1045 |
+
<?php
|
1046 |
+
|
1047 |
+
if ($type == "posts") {
|
1048 |
+
echo("posts");
|
1049 |
+
} elseif ($type == "pages") {
|
1050 |
+
echo("pages");
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
function options_panel() {
|
1056 |
+
$message = null;
|
1057 |
+
$message_updated = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
|
1058 |
+
|
1059 |
+
// update options
|
1060 |
+
if ($_POST['action'] && $_POST['action'] == 'aiosp_update') {
|
1061 |
+
$message = $message_updated;
|
1062 |
+
update_option('aiosp_home_title', $_POST['aiosp_home_title']);
|
1063 |
+
update_option('aiosp_home_description', $_POST['aiosp_home_description']);
|
1064 |
+
update_option('aiosp_home_keywords', $_POST['aiosp_home_keywords']);
|
1065 |
+
update_option('aiosp_max_words_excerpt', $_POST['aiosp_max_words_excerpt']);
|
1066 |
+
update_option('aiosp_rewrite_titles', $_POST['aiosp_rewrite_titles']);
|
1067 |
+
update_option('aiosp_post_title_format', $_POST['aiosp_post_title_format']);
|
1068 |
+
update_option('aiosp_page_title_format', $_POST['aiosp_page_title_format']);
|
1069 |
+
update_option('aiosp_category_title_format', $_POST['aiosp_category_title_format']);
|
1070 |
+
update_option('aiosp_archive_title_format', $_POST['aiosp_archive_title_format']);
|
1071 |
+
update_option('aiosp_tag_title_format', $_POST['aiosp_tag_title_format']);
|
1072 |
+
update_option('aiosp_search_title_format', $_POST['aiosp_search_title_format']);
|
1073 |
+
update_option('aiosp_description_format', $_POST['aiosp_description_format']);
|
1074 |
+
update_option('aiosp_404_title_format', $_POST['aiosp_404_title_format']);
|
1075 |
+
update_option('aiosp_paged_format', $_POST['aiosp_paged_format']);
|
1076 |
+
update_option('aiosp_use_categories', $_POST['aiosp_use_categories']);
|
1077 |
+
update_option('aiosp_category_noindex', $_POST['aiosp_category_noindex']);
|
1078 |
+
update_option('aiosp_archive_noindex', $_POST['aiosp_archive_noindex']);
|
1079 |
+
update_option('aiosp_tags_noindex', $_POST['aiosp_tags_noindex']);
|
1080 |
+
update_option('aiosp_generate_descriptions', $_POST['aiosp_generate_descriptions']);
|
1081 |
+
update_option('aiosp_debug_info', $_POST['aiosp_debug_info']);
|
1082 |
+
update_option('aiosp_post_meta_tags', $_POST['aiosp_post_meta_tags']);
|
1083 |
+
update_option('aiosp_page_meta_tags', $_POST['aiosp_page_meta_tags']);
|
1084 |
+
update_option('aiosp_home_meta_tags', $_POST['aiosp_home_meta_tags']);
|
1085 |
+
update_option('aiosp_do_log', $_POST['aiosp_do_log']);
|
1086 |
+
if (function_exists('wp_cache_flush')) {
|
1087 |
+
wp_cache_flush();
|
1088 |
+
}
|
1089 |
+
} elseif ($_POST['aiosp_upgrade']) {
|
1090 |
+
$message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
|
1091 |
+
$success = $this->install_newest_version();
|
1092 |
+
if (!$success) {
|
1093 |
+
$message = __("Upgrade failed", 'all_in_one_seo_pack');
|
1094 |
+
if (isset($this->upgrade_error) && !empty($this->upgrade_error)) {
|
1095 |
+
$message .= ": " . $this->upgrade_error;
|
1096 |
+
} else {
|
1097 |
+
$message .= ".";
|
1098 |
+
}
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
?>
|
1103 |
+
<?php if ($message) : ?>
|
1104 |
+
<div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
|
1105 |
+
<?php endif; ?>
|
1106 |
+
<div id="dropmessage" class="updated" style="display:none;"></div>
|
1107 |
+
<div class="wrap">
|
1108 |
+
<h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
|
1109 |
+
<p>
|
1110 |
+
<?php _e("This is version ", 'all_in_one_seo_pack') ?><?php _e("$this->version ", 'all_in_one_seo_pack') ?>
|
1111 |
+
<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
|
1112 |
+
href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/"><?php _e("Should I upgrade?", 'all_in_one_seo_pack')?>
|
1113 |
+
</a>
|
1114 |
+
| <a target="_blank" title="<?php _e('FAQ', 'all_in_one_seo_pack') ?>"
|
1115 |
+
href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/"><?php _e('FAQ', 'all_in_one_seo_pack') ?></a>
|
1116 |
+
| <a target="_blank" title="<?php _e('All in One SEO Plugin Feedback', 'all_in_one_seo_pack') ?>"
|
1117 |
+
href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/"><?php _e('Feedback', 'all_in_one_seo_pack') ?></a>
|
1118 |
+
| <a target="_blank" title="<?php _e('All in One SEO Plugin Translations', 'all_in_one_seo_pack') ?>"
|
1119 |
+
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>
|
1120 |
+
| <a target="_blank" title="<?php echo 'Donate' ?>"
|
1121 |
+
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¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8"><?php echo 'Donate' ?></a>
|
1122 |
+
</p>
|
1123 |
+
<p>
|
1124 |
+
<?php
|
1125 |
+
$canwrite = $this->is_upgrade_directory_writable();
|
1126 |
+
//$canwrite = false;
|
1127 |
+
?>
|
1128 |
+
<form class="form-table" name="dofollow" action="" method="post">
|
1129 |
+
<p class="submit">
|
1130 |
+
<input type="submit" <?php if (!$canwrite) echo(' disabled="disabled" ');?> name="aiosp_upgrade" value="<?php _e('One Click Upgrade', 'all_in_one_seo_pack')?> »" />
|
1131 |
+
<strong><?php _e("(Remember: Backup early, backup often!)", 'all_in_one_seo_pack') ?></strong>
|
1132 |
+
</form>
|
1133 |
+
</p>
|
1134 |
+
<p></p>
|
1135 |
+
|
1136 |
+
<?php if (!$canwrite) {
|
1137 |
+
echo("<p><strong>"); echo(sprintf(__("Please make sure that %s is writable.", 'all_in_one_seo_pack'), $this->upgrade_folder)); echo("</p></strong>");
|
1138 |
+
} ?>
|
1139 |
+
</p>
|
1140 |
+
|
1141 |
+
<script type="text/javascript">
|
1142 |
+
<!--
|
1143 |
+
function toggleVisibility(id) {
|
1144 |
+
var e = document.getElementById(id);
|
1145 |
+
if(e.style.display == 'block')
|
1146 |
+
e.style.display = 'none';
|
1147 |
+
else
|
1148 |
+
e.style.display = 'block';
|
1149 |
+
}
|
1150 |
+
//-->
|
1151 |
+
</script>
|
1152 |
+
|
1153 |
+
<h3><?php _e('Click on option titles to get help!', 'all_in_one_seo_pack') ?></h3>
|
1154 |
+
|
1155 |
+
<form name="dofollow" action="" method="post">
|
1156 |
+
<table class="form-table">
|
1157 |
+
|
1158 |
+
<tr>
|
1159 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1160 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_title_tip');">
|
1161 |
+
<?php _e('Home Title:', 'all_in_one_seo_pack')?>
|
1162 |
+
</a>
|
1163 |
+
</td>
|
1164 |
+
<td>
|
1165 |
+
<textarea cols="57" rows="2" name="aiosp_home_title"><?php echo stripcslashes(get_option('aiosp_home_title')); ?></textarea>
|
1166 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_home_title_tip">
|
1167 |
+
<?php
|
1168 |
+
_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');
|
1169 |
+
?>
|
1170 |
+
</div>
|
1171 |
+
</td>
|
1172 |
+
</tr>
|
1173 |
+
|
1174 |
+
<tr>
|
1175 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1176 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_description_tip');">
|
1177 |
+
<?php _e('Home Description:', 'all_in_one_seo_pack')?>
|
1178 |
+
</a>
|
1179 |
+
</td>
|
1180 |
+
<td>
|
1181 |
+
<textarea cols="57" rows="2" name="aiosp_home_description"><?php echo stripcslashes(get_option('aiosp_home_description')); ?></textarea>
|
1182 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_home_description_tip">
|
1183 |
+
<?php
|
1184 |
+
_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');
|
1185 |
+
?>
|
1186 |
+
</div>
|
1187 |
+
</td>
|
1188 |
+
</tr>
|
1189 |
+
|
1190 |
+
<tr>
|
1191 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1192 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_keywords_tip');">
|
1193 |
+
<?php _e('Home Keywords (comma separated):', 'all_in_one_seo_pack')?>
|
1194 |
+
</a>
|
1195 |
+
</td>
|
1196 |
+
<td>
|
1197 |
+
<textarea cols="57" rows="2" name="aiosp_home_keywords"><?php echo stripcslashes(get_option('aiosp_home_keywords')); ?></textarea>
|
1198 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_home_keywords_tip">
|
1199 |
+
<?php
|
1200 |
+
_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');
|
1201 |
+
?>
|
1202 |
+
</div>
|
1203 |
+
</td>
|
1204 |
+
</tr>
|
1205 |
+
|
1206 |
+
<tr>
|
1207 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1208 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_rewrite_titles_tip');">
|
1209 |
+
<?php _e('Rewrite Titles:', 'all_in_one_seo_pack')?>
|
1210 |
+
</a>
|
1211 |
+
</td>
|
1212 |
+
<td>
|
1213 |
+
<input type="checkbox" name="aiosp_rewrite_titles" <?php if (get_option('aiosp_rewrite_titles')) echo "checked=\"1\""; ?>/>
|
1214 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_rewrite_titles_tip">
|
1215 |
+
<?php
|
1216 |
+
_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');
|
1217 |
+
?>
|
1218 |
+
</div>
|
1219 |
+
</td>
|
1220 |
+
</tr>
|
1221 |
+
|
1222 |
+
<tr>
|
1223 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1224 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_title_format_tip');">
|
1225 |
+
<?php _e('Post Title Format:', 'all_in_one_seo_pack')?>
|
1226 |
+
</a>
|
1227 |
+
</td>
|
1228 |
+
<td>
|
1229 |
+
<input size="59" name="aiosp_post_title_format" value="<?php echo stripcslashes(get_option('aiosp_post_title_format')); ?>"/>
|
1230 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_post_title_format_tip">
|
1231 |
+
<?php
|
1232 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1233 |
+
echo('<ul>');
|
1234 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1235 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1236 |
+
echo('<li>'); _e('%post_title% - The original title of the post', 'all_in_one_seo_pack'); echo('</li>');
|
1237 |
+
echo('<li>'); _e('%category_title% - The (main) category of the post', 'all_in_one_seo_pack'); echo('</li>');
|
1238 |
+
echo('<li>'); _e('%category% - Alias for %category_title%', 'all_in_one_seo_pack'); echo('</li>');
|
1239 |
+
echo('<li>'); _e("%post_author_login% - This post's author' login", 'all_in_one_seo_pack'); echo('</li>');
|
1240 |
+
echo('<li>'); _e("%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
|
1241 |
+
echo('<li>'); _e("%post_author_firstname% - This post's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
|
1242 |
+
echo('<li>'); _e("%post_author_lastname% - This post's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
|
1243 |
+
echo('</ul>');
|
1244 |
+
?>
|
1245 |
+
</div>
|
1246 |
+
</td>
|
1247 |
+
</tr>
|
1248 |
+
|
1249 |
+
<tr>
|
1250 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1251 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_title_format_tip');">
|
1252 |
+
<?php _e('Page Title Format:', 'all_in_one_seo_pack')?>
|
1253 |
+
</a>
|
1254 |
+
</td>
|
1255 |
+
<td>
|
1256 |
+
<input size="59" name="aiosp_page_title_format" value="<?php echo stripcslashes(get_option('aiosp_page_title_format')); ?>"/>
|
1257 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_page_title_format_tip">
|
1258 |
+
<?php
|
1259 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1260 |
+
echo('<ul>');
|
1261 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1262 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1263 |
+
echo('<li>'); _e('%page_title% - The original title of the page', 'all_in_one_seo_pack'); echo('</li>');
|
1264 |
+
echo('<li>'); _e("%page_author_login% - This page's author' login", 'all_in_one_seo_pack'); echo('</li>');
|
1265 |
+
echo('<li>'); _e("%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack'); echo('</li>');
|
1266 |
+
echo('<li>'); _e("%page_author_firstname% - This page's author' first name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
|
1267 |
+
echo('<li>'); _e("%page_author_lastname% - This page's author' last name (capitalized)", 'all_in_one_seo_pack'); echo('</li>');
|
1268 |
+
echo('</ul>');
|
1269 |
+
?>
|
1270 |
+
</div>
|
1271 |
+
</td>
|
1272 |
+
</tr>
|
1273 |
+
|
1274 |
+
<tr>
|
1275 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1276 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_title_format_tip');">
|
1277 |
+
<?php _e('Category Title Format:', 'all_in_one_seo_pack')?>
|
1278 |
+
</a>
|
1279 |
+
</td>
|
1280 |
+
<td>
|
1281 |
+
<input size="59" name="aiosp_category_title_format" value="<?php echo stripcslashes(get_option('aiosp_category_title_format')); ?>"/>
|
1282 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_category_title_format_tip">
|
1283 |
+
<?php
|
1284 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1285 |
+
echo('<ul>');
|
1286 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1287 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1288 |
+
echo('<li>'); _e('%category_title% - The original title of the category', 'all_in_one_seo_pack'); echo('</li>');
|
1289 |
+
echo('<li>'); _e('%category_description% - The description of the category', 'all_in_one_seo_pack'); echo('</li>');
|
1290 |
+
echo('</ul>');
|
1291 |
+
?>
|
1292 |
+
</div>
|
1293 |
+
</td>
|
1294 |
+
</tr>
|
1295 |
+
|
1296 |
+
<tr>
|
1297 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1298 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_title_format_tip');">
|
1299 |
+
<?php _e('Archive Title Format:', 'all_in_one_seo_pack')?>
|
1300 |
+
</a>
|
1301 |
+
</td>
|
1302 |
+
<td>
|
1303 |
+
<input size="59" name="aiosp_archive_title_format" value="<?php echo stripcslashes(get_option('aiosp_archive_title_format')); ?>"/>
|
1304 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_title_format_tip">
|
1305 |
+
<?php
|
1306 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1307 |
+
echo('<ul>');
|
1308 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1309 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1310 |
+
echo('<li>'); _e('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack'); echo('</li>');
|
1311 |
+
echo('</ul>');
|
1312 |
+
?>
|
1313 |
+
</div>
|
1314 |
+
</td>
|
1315 |
+
</tr>
|
1316 |
+
|
1317 |
+
<tr>
|
1318 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1319 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tag_title_format_tip');">
|
1320 |
+
<?php _e('Tag Title Format:', 'all_in_one_seo_pack')?>
|
1321 |
+
</a>
|
1322 |
+
</td>
|
1323 |
+
<td>
|
1324 |
+
<input size="59" name="aiosp_tag_title_format" value="<?php echo stripcslashes(get_option('aiosp_tag_title_format')); ?>"/>
|
1325 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_tag_title_format_tip">
|
1326 |
+
<?php
|
1327 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1328 |
+
echo('<ul>');
|
1329 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1330 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1331 |
+
echo('<li>'); _e('%tag% - The name of the tag', 'all_in_one_seo_pack'); echo('</li>');
|
1332 |
+
echo('</ul>');
|
1333 |
+
?>
|
1334 |
+
</div>
|
1335 |
+
</td>
|
1336 |
+
</tr>
|
1337 |
+
|
1338 |
+
<tr>
|
1339 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1340 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_search_title_format_tip');">
|
1341 |
+
<?php _e('Search Title Format:', 'all_in_one_seo_pack')?>
|
1342 |
+
</a>
|
1343 |
+
</td>
|
1344 |
+
<td>
|
1345 |
+
<input size="59" name="aiosp_search_title_format" value="<?php echo stripcslashes(get_option('aiosp_search_title_format')); ?>"/>
|
1346 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_search_title_format_tip">
|
1347 |
+
<?php
|
1348 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1349 |
+
echo('<ul>');
|
1350 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1351 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1352 |
+
echo('<li>'); _e('%search% - What was searched for', 'all_in_one_seo_pack'); echo('</li>');
|
1353 |
+
echo('</ul>');
|
1354 |
+
?>
|
1355 |
+
</div>
|
1356 |
+
</td>
|
1357 |
+
</tr>
|
1358 |
+
|
1359 |
+
<tr>
|
1360 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1361 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_description_format_tip');">
|
1362 |
+
<?php _e('Description Format:', 'all_in_one_seo_pack')?>
|
1363 |
+
</a>
|
1364 |
+
</td>
|
1365 |
+
<td>
|
1366 |
+
<input size="59" name="aiosp_description_format" value="<?php echo stripcslashes(get_option('aiosp_description_format')); ?>"/>
|
1367 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_description_format_tip">
|
1368 |
+
<?php
|
1369 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1370 |
+
echo('<ul>');
|
1371 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1372 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1373 |
+
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>');
|
1374 |
+
echo('<li>'); _e('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack'); echo('</li>');
|
1375 |
+
echo('</ul>');
|
1376 |
+
?>
|
1377 |
+
</div>
|
1378 |
+
</td>
|
1379 |
+
</tr>
|
1380 |
+
|
1381 |
+
<tr>
|
1382 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1383 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_404_title_format_tip');">
|
1384 |
+
<?php _e('404 Title Format:', 'all_in_one_seo_pack')?>
|
1385 |
+
</a>
|
1386 |
+
</td>
|
1387 |
+
<td>
|
1388 |
+
<input size="59" name="aiosp_404_title_format" value="<?php echo stripcslashes(get_option('aiosp_404_title_format')); ?>"/>
|
1389 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_404_title_format_tip">
|
1390 |
+
<?php
|
1391 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1392 |
+
echo('<ul>');
|
1393 |
+
echo('<li>'); _e('%blog_title% - Your blog title', 'all_in_one_seo_pack'); echo('</li>');
|
1394 |
+
echo('<li>'); _e('%blog_description% - Your blog description', 'all_in_one_seo_pack'); echo('</li>');
|
1395 |
+
echo('<li>'); _e('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all_in_one_seo_pack'); echo('</li>');
|
1396 |
+
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>');
|
1397 |
+
echo('</ul>');
|
1398 |
+
?>
|
1399 |
+
</div>
|
1400 |
+
</td>
|
1401 |
+
</tr>
|
1402 |
+
|
1403 |
+
<tr>
|
1404 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1405 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_paged_format_tip');">
|
1406 |
+
<?php _e('Paged Format:', 'all_in_one_seo_pack')?>
|
1407 |
+
</a>
|
1408 |
+
</td>
|
1409 |
+
<td>
|
1410 |
+
<input size="59" name="aiosp_paged_format" value="<?php echo stripcslashes(get_option('aiosp_paged_format')); ?>"/>
|
1411 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_paged_format_tip">
|
1412 |
+
<?php
|
1413 |
+
_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');
|
1414 |
+
_e('The following macros are supported:', 'all_in_one_seo_pack');
|
1415 |
+
echo('<ul>');
|
1416 |
+
echo('<li>'); _e('%page% - The page number', 'all_in_one_seo_pack'); echo('</li>');
|
1417 |
+
echo('</ul>');
|
1418 |
+
?>
|
1419 |
+
</div>
|
1420 |
+
</td>
|
1421 |
+
</tr>
|
1422 |
+
|
1423 |
+
<tr>
|
1424 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1425 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
|
1426 |
+
<?php _e('Use Categories for META keywords:', 'all_in_one_seo_pack')?>
|
1427 |
+
</td>
|
1428 |
+
<td>
|
1429 |
+
<input type="checkbox" name="aiosp_use_categories" <?php if (get_option('aiosp_use_categories')) echo "checked=\"1\""; ?>/>
|
1430 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_use_categories_tip">
|
1431 |
+
<?php
|
1432 |
+
_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');
|
1433 |
+
?>
|
1434 |
+
</div>
|
1435 |
+
</td>
|
1436 |
+
</tr>
|
1437 |
+
|
1438 |
+
<tr>
|
1439 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1440 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_category_noindex_tip');">
|
1441 |
+
<?php _e('Use noindex for Categories:', 'all_in_one_seo_pack')?>
|
1442 |
+
</a>
|
1443 |
+
</td>
|
1444 |
+
<td>
|
1445 |
+
<input type="checkbox" name="aiosp_category_noindex" <?php if (get_option('aiosp_category_noindex')) echo "checked=\"1\""; ?>/>
|
1446 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_category_noindex_tip">
|
1447 |
+
<?php
|
1448 |
+
_e('Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
|
1449 |
+
?>
|
1450 |
+
</div>
|
1451 |
+
</td>
|
1452 |
+
</tr>
|
1453 |
+
|
1454 |
+
<tr>
|
1455 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1456 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_archive_noindex_tip');">
|
1457 |
+
<?php _e('Use noindex for Archives:', 'all_in_one_seo_pack')?>
|
1458 |
+
</a>
|
1459 |
+
</td>
|
1460 |
+
<td>
|
1461 |
+
<input type="checkbox" name="aiosp_archive_noindex" <?php if (get_option('aiosp_archive_noindex')) echo "checked=\"1\""; ?>/>
|
1462 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_archive_noindex_tip">
|
1463 |
+
<?php
|
1464 |
+
_e('Check this for excluding archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
|
1465 |
+
?>
|
1466 |
+
</div>
|
1467 |
+
</td>
|
1468 |
+
</tr>
|
1469 |
+
|
1470 |
+
<tr>
|
1471 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1472 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_tags_noindex_tip');">
|
1473 |
+
<?php _e('Use noindex for Tag Archives:', 'all_in_one_seo_pack')?>
|
1474 |
+
</a>
|
1475 |
+
</td>
|
1476 |
+
<td>
|
1477 |
+
<input type="checkbox" name="aiosp_tags_noindex" <?php if (get_option('aiosp_tags_noindex')) echo "checked=\"1\""; ?>/>
|
1478 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_tags_noindex_tip">
|
1479 |
+
<?php
|
1480 |
+
_e('Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack');
|
1481 |
+
?>
|
1482 |
+
</div>
|
1483 |
+
</td>
|
1484 |
+
</tr>
|
1485 |
+
|
1486 |
+
<tr>
|
1487 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1488 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_generate_descriptions_tip');">
|
1489 |
+
<?php _e('Autogenerate Descriptions:', 'all_in_one_seo_pack')?>
|
1490 |
+
</a>
|
1491 |
+
</td>
|
1492 |
+
<td>
|
1493 |
+
<input type="checkbox" name="aiosp_generate_descriptions" <?php if (get_option('aiosp_generate_descriptions')) echo "checked=\"1\""; ?>/>
|
1494 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_generate_descriptions_tip">
|
1495 |
+
<?php
|
1496 |
+
_e("Check this and your META descriptions will get autogenerated if there's no excerpt.", 'all_in_one_seo_pack');
|
1497 |
+
?>
|
1498 |
+
</div>
|
1499 |
+
</td>
|
1500 |
+
</tr>
|
1501 |
+
|
1502 |
+
<tr>
|
1503 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1504 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_post_meta_tags_tip');">
|
1505 |
+
<?php _e('Additional Post Headers:', 'all_in_one_seo_pack')?>
|
1506 |
+
</a>
|
1507 |
+
</td>
|
1508 |
+
<td>
|
1509 |
+
<textarea cols="57" rows="2" name="aiosp_post_meta_tags"><?php echo stripcslashes(get_option('aiosp_post_meta_tags')); ?></textarea>
|
1510 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_post_meta_tags_tip">
|
1511 |
+
<?php
|
1512 |
+
_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');
|
1513 |
+
?>
|
1514 |
+
</div>
|
1515 |
+
</td>
|
1516 |
+
</tr>
|
1517 |
+
|
1518 |
+
<tr>
|
1519 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1520 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_page_meta_tags_tip');">
|
1521 |
+
<?php _e('Additional Page Headers:', 'all_in_one_seo_pack')?>
|
1522 |
+
</a>
|
1523 |
+
</td>
|
1524 |
+
<td>
|
1525 |
+
<textarea cols="57" rows="2" name="aiosp_page_meta_tags"><?php echo stripcslashes(get_option('aiosp_page_meta_tags')); ?></textarea>
|
1526 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_page_meta_tags_tip">
|
1527 |
+
<?php
|
1528 |
+
_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');
|
1529 |
+
?>
|
1530 |
+
</div>
|
1531 |
+
</td>
|
1532 |
+
</tr>
|
1533 |
+
|
1534 |
+
<tr>
|
1535 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1536 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_home_meta_tags_tip');">
|
1537 |
+
<?php _e('Additional Home Headers:', 'all_in_one_seo_pack')?>
|
1538 |
+
</a>
|
1539 |
+
</td>
|
1540 |
+
<td>
|
1541 |
+
<textarea cols="57" rows="2" name="aiosp_home_meta_tags"><?php echo stripcslashes(get_option('aiosp_home_meta_tags')); ?></textarea>
|
1542 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_home_meta_tags_tip">
|
1543 |
+
<?php
|
1544 |
+
_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');
|
1545 |
+
?>
|
1546 |
+
</div>
|
1547 |
+
</td>
|
1548 |
+
</tr>
|
1549 |
+
|
1550 |
+
<tr>
|
1551 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
1552 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'auto_social')?>" onclick="toggleVisibility('aiosp_do_log_tip');">
|
1553 |
+
<?php _e('Log important events:', 'all_in_one_seo_pack')?>
|
1554 |
+
</a>
|
1555 |
+
</td>
|
1556 |
+
<td>
|
1557 |
+
<input type="checkbox" name="aiosp_do_log" <?php if (get_option('aiosp_do_log')) echo "checked=\"1\""; ?>/>
|
1558 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_do_log_tip">
|
1559 |
+
<?php
|
1560 |
+
_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');
|
1561 |
+
?>
|
1562 |
+
</div>
|
1563 |
+
</td>
|
1564 |
+
</tr>
|
1565 |
+
|
1566 |
+
</table>
|
1567 |
+
<p class="submit">
|
1568 |
+
<input type="hidden" name="action" value="aiosp_update" />
|
1569 |
+
<input type="hidden" name="page_options" value="aiosp_home_description" />
|
1570 |
+
<input type="submit" name="Submit" value="<?php _e('Update Options', 'all_in_one_seo_pack')?> »" />
|
1571 |
+
</p>
|
1572 |
+
<p><br />
|
1573 |
+
<strong>Check out these other great plugins!</strong><br />
|
1574 |
+
<a href="http://semperfiwebdesign.com/custom-applications/sms-text-message/" title="SMS Text Message WordPress plugin">SMS Text Message</a> - sends SMS updates to your readers<br />
|
1575 |
+
<a href="http://semperfiwebdesign.com/custom-applications/wp-security-scan/" title="WordPress Security">WordPress Security Scan</a> - provides vital security for your WordPress site
|
1576 |
+
</p>
|
1577 |
+
</form>
|
1578 |
+
</div>
|
1579 |
+
<?php
|
1580 |
+
|
1581 |
+
} // options_panel
|
1582 |
+
|
1583 |
+
}
|
1584 |
+
|
1585 |
+
add_option("aiosp_home_description", null, 'All in One SEO Plugin Home Description', 'yes');
|
1586 |
+
add_option("aiosp_home_title", null, 'All in One SEO Plugin Home Title', 'yes');
|
1587 |
+
add_option("aiosp_rewrite_titles", 1, 'All in One SEO Plugin Rewrite Titles', 'yes');
|
1588 |
+
add_option("aiosp_use_categories", 0, 'All in One SEO Plugin Use Categories', 'yes');
|
1589 |
+
add_option("aiosp_category_noindex", 1, 'All in One SEO Plugin Noindex for Categories', 'yes');
|
1590 |
+
add_option("aiosp_archive_noindex", 1, 'All in One SEO Plugin Noindex for Archives', 'yes');
|
1591 |
+
add_option("aiosp_tags_noindex", 0, 'All in One SEO Plugin Noindex for Tag Archives', 'yes');
|
1592 |
+
add_option("aiosp_generate_descriptions", 1, 'All in One SEO Plugin Autogenerate Descriptions', 'yes');
|
1593 |
+
add_option("aiosp_post_title_format", '%post_title% | %blog_title%', 'All in One SEO Plugin Post Title Format', 'yes');
|
1594 |
+
add_option("aiosp_page_title_format", '%page_title% | %blog_title%', 'All in One SEO Plugin Page Title Format', 'yes');
|
1595 |
+
add_option("aiosp_category_title_format", '%category_title% | %blog_title%', 'All in One SEO Plugin Category Title Format', 'yes');
|
1596 |
+
add_option("aiosp_archive_title_format", '%date% | %blog_title%', 'All in One SEO Plugin Archive Title Format', 'yes');
|
1597 |
+
add_option("aiosp_tag_title_format", '%tag% | %blog_title%', 'All in One SEO Plugin Tag Title Format', 'yes');
|
1598 |
+
add_option("aiosp_search_title_format", '%search% | %blog_title%', 'All in One SEO Plugin Search Title Format', 'yes');
|
1599 |
+
add_option("aiosp_description_format", '%description%', 'All in One SEO Plugin Description Format', 'yes');
|
1600 |
+
add_option("aiosp_paged_format", ' - Part %page%', 'All in One SEO Plugin Paged Format', 'yes');
|
1601 |
+
add_option("aiosp_404_title_format", 'Nothing found for %request_words%', 'All in One SEO Plugin 404 Title Format', 'yes');
|
1602 |
+
add_option("aiosp_post_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
|
1603 |
+
add_option("aiosp_page_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
|
1604 |
+
add_option("aiosp_home_meta_tags", '', 'All in One SEO Plugin Additional Home Meta Tags', 'yes');
|
1605 |
+
add_option("aiosp_do_log", null, 'All in One SEO Plugin write log file', 'yes');
|
1606 |
+
|
1607 |
+
$aiosp = new All_in_One_SEO_Pack();
|
1608 |
+
add_action('wp_head', array($aiosp, 'wp_head'));
|
1609 |
+
add_action('template_redirect', array($aiosp, 'template_redirect'));
|
1610 |
+
|
1611 |
+
add_action('init', array($aiosp, 'init'));
|
1612 |
+
|
1613 |
+
if (substr($aiosp->wp_version, 0, 3) == '2.5') {
|
1614 |
+
add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
1615 |
+
add_action('edit_page_form', array($aiosp, 'add_meta_tags_textinput'));
|
1616 |
+
} else {
|
1617 |
+
add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
1618 |
+
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
add_action('edit_post', array($aiosp, 'post_meta_tags'));
|
1622 |
+
add_action('publish_post', array($aiosp, 'post_meta_tags'));
|
1623 |
+
add_action('save_post', array($aiosp, 'post_meta_tags'));
|
1624 |
+
add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
|
1625 |
+
|
1626 |
+
add_action('admin_menu', array($aiosp, 'admin_menu'));
|
1627 |
+
?>
|
readme.txt
CHANGED
@@ -1,45 +1,50 @@
|
|
1 |
-
=== All in One SEO Pack ===
|
2 |
-
Contributors: uberdose
|
3 |
-
Donate link:
|
4 |
-
Tags: post,google,seo,meta,meta keywords,meta description,title,posts,plugin
|
5 |
-
Requires at least: 1.5
|
6 |
-
Tested up to: 2.5
|
7 |
-
Stable tag: trunk
|
8 |
-
|
9 |
-
Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
|
10 |
-
|
11 |
-
== Description ==
|
12 |
-
|
13 |
-
**Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**).
|
14 |
-
|
15 |
-
**[Download now!](http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip)**
|
16 |
-
|
17 |
-
[Support](http://
|
18 |
-
[Version History](http://
|
19 |
-
[FAQ](http://
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
*
|
25 |
-
*
|
26 |
-
*
|
27 |
-
*
|
28 |
-
* You can
|
29 |
-
*
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
=== All in One SEO Pack ===
|
2 |
+
Contributors: hallsofmontezuma, uberdose
|
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¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
|
4 |
+
Tags: post,google,seo,meta,meta keywords,meta description,title,posts,plugin, search engine optimization
|
5 |
+
Requires at least: 1.5
|
6 |
+
Tested up to: 2.5
|
7 |
+
Stable tag: trunk
|
8 |
+
|
9 |
+
Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
**Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**).
|
14 |
+
|
15 |
+
**[Download now!](http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip)**
|
16 |
+
|
17 |
+
[Support](http://semperfiwebdesign.com/contact/) |
|
18 |
+
[Version History](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/) |
|
19 |
+
[FAQ](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/)|
|
20 |
+
[Translations](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/translations-for-all-in-one-seo-pack/)
|
21 |
+
|
22 |
+
Some features:
|
23 |
+
|
24 |
+
* Automatically optimizes your **titles** for search engines
|
25 |
+
* Generates **META tags automatically**
|
26 |
+
* Avoids the typical duplicate content found on Wordpress blogs
|
27 |
+
* For Wordpress 2.3 you don't even have to look at the options, it works out-of-the-box. Just install.
|
28 |
+
* You can override any title and set any META description and any META keywords you want.
|
29 |
+
* You can fine-tune everything
|
30 |
+
* Backward-Compatibility with many other plugins, like Auto Meta, Ultimate Tag Warrior and others.
|
31 |
+
|
32 |
+
Be sure to check out:
|
33 |
+
[WP Security Scan](http://wordpress.org/extend/plugins/wp-security-scan/)
|
34 |
+
[SMS Text Message](http://wordpress.org/extend/plugins/sms-text-message/)
|
35 |
+
|
36 |
+
== Installation ==
|
37 |
+
|
38 |
+
1. Unzip into your `/wp-content/plugins/` directory. If you're uploading it make sure to upload
|
39 |
+
the top-level folder. Don't just upload all the php files and put them in `/wp-content/plugins/`.
|
40 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
41 |
+
1. Visit your SEO options (*Options - All in One SEO*) for Wordpress 2.3.x, (*Settings - All in One SEO*) for Wordpress 2.5.x
|
42 |
+
1. That's it!
|
43 |
+
|
44 |
+
For upgrading please use the built-in one-click updater (*Options - All in One SEO*).
|
45 |
+
If you have to upgrade manually simply repeat the installation steps.
|
46 |
+
|
47 |
+
== Frequently Asked Questions ==
|
48 |
+
|
49 |
+
Please read these **[FAQs](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/)** before requesting
|
50 |
+
**[Support](http://semperfiwebdesign.com/contact/)**
|