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