Platinum SEO Pack - Version 1.2.4

Version Description

Download this release

Release Info

Developer Rajesh Babu
Plugin Icon 128x128 Platinum SEO Pack
Version 1.2.4
Comparing to
See all releases

Code changes from version 1.2.3 to 1.2.4

Files changed (2) hide show
  1. Changelog.txt +7 -0
  2. platinum_seo_pack.php +203 -36
Changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  2008-01-04 Rajesh (http://techblissonline.com/) - Version 1.2.3
2
 
3
  * Introduced an option to noindex comments pages of posts, if the option to break comments into pages is chosen in Wordpress 2.7
1
+ 2009-05-18 Rajesh (http://techblissonline.com/) - Version 1.2.4
2
+
3
+ * Introduced Option to generate Canonical URLs.
4
+ * Introduced an Option to use tags as keywords for posts (Earlier tags were automatically included and now it is optional)
5
+ * Intorudce an option to link to the plugin blog, if you cannot donate
6
+ platinum_seo_pack.php
7
+
8
  2008-01-04 Rajesh (http://techblissonline.com/) - Version 1.2.3
9
 
10
  * Introduced an option to noindex comments pages of posts, if the option to break comments into pages is chosen in Wordpress 2.7
platinum_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Platinum SEO Pack
5
  Plugin URI: http://techblissonline.com/platinum-seo-pack/
6
  Description: Complete SEO solution for your Wordpress blog.
7
- Version: 1.2.3
8
  Author: Rajesh - Techblissonline Dot Com
9
  Author URI: http://techblissonline.com/
10
  */
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
29
 
30
  class Platinum_SEO_Pack {
31
 
32
- var $version = "1.2.3";
33
 
34
  /** Max numbers of chars in auto-generated description */
35
  var $max_description_length = 160;
@@ -242,16 +242,18 @@ class Platinum_SEO_Pack {
242
  $post = $wp_query->get_queried_object();
243
  $meta_string = null;
244
  $meta = null;
 
 
245
 
246
  //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());
247
 
248
  if (is_single() || is_page()) {
249
  $psp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_disable', true)));
250
-
251
  if ($psp_disable) {
252
- return;
253
  }
254
-
255
  //$pspmeta = $_POST["psp_robotsmeta"];
256
  $pspmeta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'robotsmeta', true)));
257
 
@@ -353,12 +355,87 @@ class Platinum_SEO_Pack {
353
  // $description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
354
  //} else {
355
  $description = $this->get_post_description($post);
 
 
 
 
 
356
  // }
357
  } else if (is_home()) {
358
  $description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
 
 
 
 
 
 
 
 
 
 
 
 
359
  } else if (is_category()) {
360
  $description = $this->internationalize(category_description());
361
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
 
363
  if (isset($description) && (strlen($description) > $this->min_description_length) && !(is_home() && is_paged())) {
364
  $description = trim(strip_tags($description));
@@ -423,9 +500,27 @@ class Platinum_SEO_Pack {
423
  if ($meta_string != null) {
424
  echo "$meta_string\n";
425
  }
 
 
 
 
426
 
427
  echo "<!-- /platinum one seo pack -->\n";
428
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
 
430
  function get_post_description($post) {
431
  $description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "description", true))));
@@ -731,7 +826,11 @@ class Platinum_SEO_Pack {
731
  $tokens = explode(' ', $s);
732
  while (list($key, $val) = each($tokens)) {
733
  $tokens[$key] = trim($tokens[$key]);
734
- $tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
 
 
 
 
735
  }
736
  $s = implode(' ', $tokens);
737
  return $s;
@@ -790,31 +889,32 @@ class Platinum_SEO_Pack {
790
  }
791
  }
792
 
793
- // WP 2.3 tags
794
- if (function_exists('get_the_tags')) {
795
- $tags = get_the_tags($post->ID);
796
- if ($tags && is_array($tags)) {
797
- foreach ($tags as $tag) {
798
- $keywords[] = $this->internationalize($tag->name);
 
 
799
  }
800
- }
801
- }
802
 
803
- // Ultimate Tag Warrior integration
804
- global $utw;
805
- if ($utw) {
806
- $tags = $utw->GetTagsForPost($post);
807
- if (is_array($tags)) {
808
- foreach ($tags as $tag) {
809
- $tag = $tag->tag;
810
- $tag = str_replace('_',' ', $tag);
811
- $tag = str_replace('-',' ',$tag);
812
- $tag = stripcslashes($tag);
813
- $keywords[] = $tag;
 
814
  }
815
- }
816
- }
817
-
818
  // autometa
819
  $autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
820
  if (isset($autometa) && !empty($autometa)) {
@@ -864,7 +964,11 @@ class Platinum_SEO_Pack {
864
  function get_unique_keywords($keywords) {
865
  $small_keywords = array();
866
  foreach ($keywords as $word) {
867
- $small_keywords[] = strtolower($word);
 
 
 
 
868
  }
869
  $keywords_ar = array_unique($small_keywords);
870
  return implode(',', $keywords_ar);
@@ -882,6 +986,13 @@ class Platinum_SEO_Pack {
882
  }
883
  return $file;
884
  }
 
 
 
 
 
 
 
885
 
886
  function log($message) {
887
  if ($this->do_log) {
@@ -1176,6 +1287,7 @@ class Platinum_SEO_Pack {
1176
  update_option('aiosp_home_description', $_POST['psp_home_description']);
1177
  update_option('aiosp_home_keywords', $_POST['psp_home_keywords']);
1178
  update_option('psp_max_words_excerpt', $_POST['psp_max_words_excerpt']);
 
1179
  update_option('aiosp_rewrite_titles', $_POST['psp_rewrite_titles']);
1180
  update_option('aiosp_post_title_format', $_POST['psp_post_title_format']);
1181
  update_option('aiosp_page_title_format', $_POST['psp_page_title_format']);
@@ -1187,6 +1299,7 @@ class Platinum_SEO_Pack {
1187
  update_option('aiosp_404_title_format', $_POST['psp_404_title_format']);
1188
  update_option('aiosp_paged_format', $_POST['psp_paged_format']);
1189
  update_option('aiosp_use_categories', $_POST['psp_use_categories']);
 
1190
  update_option('psp_category_noindex', $_POST['psp_category_noindex']);
1191
  update_option('psp_archive_noindex', $_POST['psp_archive_noindex']);
1192
  update_option('psp_tags_noindex', $_POST['psp_tags_noindex']);
@@ -1212,6 +1325,7 @@ class Platinum_SEO_Pack {
1212
  update_option('aiosp_page_meta_tags', $_POST['psp_page_meta_tags']);
1213
  update_option('aiosp_home_meta_tags', $_POST['psp_home_meta_tags']);
1214
  update_option('aiosp_do_log', $_POST['psp_do_log']);
 
1215
  if (function_exists('wp_cache_flush')) {
1216
  wp_cache_flush();
1217
  }
@@ -1243,8 +1357,7 @@ href="http://techblissonline.com/platinum-seo-pack-faq/"><?php _e('FAQ', 'platin
1243
  | <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('Feedback', 'platinum_seo_pack') ?></a>
1244
  | <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>"
1245
  href="http://techblissonline.com/wordpress-seo-plugin-smart-options-benefits/"><?php _e('Wordpress SEO options', 'platinum_seo_pack') ?></a>
1246
- | <a target="_blank" title="<?php _e('Donations for Platinum SEO Plugin', 'platinum_seo_pack') ?>"
1247
- href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rrajeshbab%40gmail%2ecom&item_name=Platinum%20SEO%20plugin%20development%20and%20support%20expenses&item_number=1&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=IN&bn=PP%2dDonationsBF&charset=UTF%2d8"><?php _e('Please Donate', 'platinum_seo_pack') ?></a>
1248
  </p>
1249
 
1250
  <script type="text/javascript">
@@ -1258,7 +1371,7 @@ href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rrajeshbab%4
1258
  }
1259
  //-->
1260
  </script>
1261
-
1262
  <h3><?php _e('Click on option titles to get help!', 'platinum_seo_pack') ?></h3>
1263
 
1264
  <form name="dofollow" action="" method="post">
@@ -1328,6 +1441,22 @@ _e("A comma separated list of the most important keywords for your site homepage
1328
  </td>
1329
  </tr>
1330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1331
  <tr>
1332
  <th scope="row" style="text-align:right; vertical-align:top;">
1333
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_rewrite_titles_tip');">
@@ -1554,7 +1683,7 @@ echo('</ul>');
1554
  <input type="checkbox" name="psp_use_categories" <?php if (get_option('aiosp_use_categories')) echo "checked=\"1\""; ?>/>
1555
  <div style="max-width:500px; text-align:left; display:none" id="psp_use_categories_tip">
1556
  <?php
1557
- _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).', 'platinum_seo_pack');
1558
  ?>
1559
  </div>
1560
  </td>
@@ -1592,6 +1721,21 @@ _e('Check this for excluding date based archive pages from being crawled. Useful
1592
  </td>
1593
  </tr>
1594
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1595
  <tr>
1596
  <th scope="row" style="text-align:right; vertical-align:top;">
1597
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_tags_noindex_tip');">
@@ -1618,7 +1762,7 @@ _e('Check this for excluding tag pages from being crawled. Might help to avoid d
1618
  <input type="checkbox" name="psp_comnts_pages_noindex" <?php if (get_option('psp_comnts_pages_noindex')) echo "checked=\"1\""; ?>/>
1619
  <div style="max-width:500px; text-align:left; display:none" id="psp_comnts_pages_noindex_tip">
1620
  <?php
1621
- _e('Check this for excluding comments pages from being indexed. Thereby avoid duplicate content if you wish to use Comment paging (from wordpress 2.7)', 'platinum_seo_pack');
1622
  ?>
1623
  </div>
1624
  </td>
@@ -1914,7 +2058,7 @@ _e('What you enter here will be copied verbatim to your header on the home page.
1914
 
1915
  <tr>
1916
  <th scope="row" style="text-align:right; vertical-align:top;">
1917
- <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'auto_social')?>" onclick="toggleVisibility('psp_do_log_tip');">
1918
  <?php _e('Log important events:', 'platinum_seo_pack')?>
1919
  </a>
1920
  </td>
@@ -1928,6 +2072,22 @@ _e('Check this and Platinum SEO pack will create a log of important events (plat
1928
  </td>
1929
  </tr>
1930
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1931
  </table>
1932
  <p class="submit">
1933
  <input type="hidden" name="action" value="psp_update" />
@@ -1943,9 +2103,11 @@ _e('Check this and Platinum SEO pack will create a log of important events (plat
1943
 
1944
  add_option("aiosp_home_description", null, 'Platinum SEO Plugin Home Description', 'yes');
1945
  add_option("aiosp_home_title", null, 'Platinum SEO Plugin Home Title', 'yes');
 
1946
  add_option("aiosp_home_keywords", null, 'Platinum SEO Plugin Home Title', 'yes');
1947
  add_option("aiosp_rewrite_titles", 1, 'Platinum SEO Plugin Rewrite Titles', 'yes');
1948
  add_option("aiosp_use_categories", 0, 'Platinum SEO Plugin Use Categories', 'yes');
 
1949
  add_option("psp_category_noindex", 0, 'Platinum SEO Plugin Noindex for Categories', 'yes');
1950
  add_option("psp_archive_noindex", 1, 'Platinum SEO Plugin Noindex for date based archives', 'yes');
1951
  add_option("psp_tags_noindex", 0, 'Platinum SEO Plugin Noindex for Tag Archives', 'yes');
@@ -1979,6 +2141,7 @@ add_option("aiosp_post_meta_tags", '', 'Platinum SEO Plugin Additional Post Meta
1979
  add_option("aiosp_page_meta_tags", '', 'Platinum SEO Plugin Additional Post Meta Tags', 'yes');
1980
  add_option("aiosp_home_meta_tags", '', 'Platinum SEO Plugin Additional Home Meta Tags', 'yes');
1981
  add_option("aiosp_do_log", null, 'Platinum SEO Plugin write log file', 'yes');
 
1982
 
1983
  $psp = new Platinum_SEO_Pack();
1984
  add_action('wp_head', array($psp, 'echo_to_blog_header'));
@@ -2024,6 +2187,10 @@ if (get_option('psp_nofollow_tag_pages')) {
2024
  add_filter('the_tags',array($psp,'nofollow_taglinks'));
2025
  }
2026
 
 
 
 
 
2027
  /** if (get_option('psp_nofollow_ext_links')) {
2028
  add_filter('the_content',array($psp,'nofollow_home_category'));
2029
  } **/
4
  Plugin Name: Platinum SEO Pack
5
  Plugin URI: http://techblissonline.com/platinum-seo-pack/
6
  Description: Complete SEO solution for your Wordpress blog.
7
+ Version: 1.2.4
8
  Author: Rajesh - Techblissonline Dot Com
9
  Author URI: http://techblissonline.com/
10
  */
29
 
30
  class Platinum_SEO_Pack {
31
 
32
+ var $version = "1.2.4";
33
 
34
  /** Max numbers of chars in auto-generated description */
35
  var $max_description_length = 160;
242
  $post = $wp_query->get_queried_object();
243
  $meta_string = null;
244
  $meta = null;
245
+ $can_link = '';
246
+ $canonical = get_option('psp_canonical');
247
 
248
  //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());
249
 
250
  if (is_single() || is_page()) {
251
  $psp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_disable', true)));
252
+
253
  if ($psp_disable) {
254
+ return;
255
  }
256
+
257
  //$pspmeta = $_POST["psp_robotsmeta"];
258
  $pspmeta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'robotsmeta', true)));
259
 
355
  // $description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
356
  //} else {
357
  $description = $this->get_post_description($post);
358
+ if ($canonical) {
359
+ $post_link = get_permalink($post->ID);
360
+ $can_link = $this->paged_link($post_link);
361
+ $can_link = trailingslashit($can_link);
362
+ }
363
  // }
364
  } else if (is_home()) {
365
  $description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
366
+ if ($canonical) {
367
+ if ((get_option('show_on_front') == 'page') && ($pageid = get_option('page_for_posts')))
368
+ {
369
+ $page_for_posts_link = get_permalink($pageid);
370
+ $can_link = $this->paged_link($page_for_posts_link);
371
+ $can_link = trailingslashit($can_link);
372
+ } else {
373
+ $home_link = get_option('home');
374
+ $can_link = $this->paged_link($home_link);
375
+ $can_link = trailingslashit($can_link);
376
+ }
377
+ }
378
  } else if (is_category()) {
379
  $description = $this->internationalize(category_description());
380
+ if ($canonical) {
381
+ $cat_link = get_category_link(get_query_var('cat'));
382
+ $can_link = $this->paged_link($cat_link);
383
+ }
384
+ } else if (is_date() && ($canonical)) {
385
+ if (get_query_var('m')) {
386
+ $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
387
+ switch (strlen($m)) {
388
+ case 4:
389
+ $can_link = get_year_link($m);
390
+ $can_link = $this->paged_link($can_link);
391
+ break;
392
+ case 6:
393
+ $can_link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
394
+ $can_link = $this->paged_link($can_link);
395
+ break;
396
+ case 8:
397
+ $can_link = get_day_link(substr($m, 0, 4), substr($m, 4, 2),
398
+ substr($m, 6, 2));
399
+ $can_link = $this->paged_link($can_link);
400
+ break;
401
+ default:
402
+ $can_link = '';
403
+ }
404
+ }
405
+ if ($wp_query->is_day) {
406
+ $can_link = get_day_link(get_query_var('year'),
407
+ get_query_var('monthnum'),
408
+ get_query_var('day'));
409
+ $can_link = $this->paged_link($can_link);
410
+ } else if ($wp_query->is_month) {
411
+ $can_link = get_month_link(get_query_var('year'),
412
+ get_query_var('monthnum'));
413
+ $can_link = $this->paged_link($can_link);
414
+ } else if ($wp_query->is_year) {
415
+ $can_link = get_year_link(get_query_var('year'));
416
+ $can_link = $this->paged_link($can_link);
417
+ }
418
+ } else if (function_exists(is_tag) && is_tag() && ($canonical)) {
419
+ $tag = get_term_by('slug',get_query_var('tag'),'post_tag');
420
+ if (!empty($tag->term_id)) {
421
+ $tag_link = get_tag_link($tag->term_id);
422
+ }
423
+ $can_link = $this->paged_link($tag_link);
424
+ } else if (is_author() && ($canonical)) {
425
+ global $wp_version;
426
+ if ($wp_version >= '2') {
427
+ $author = get_userdata(get_query_var('author'));
428
+ if ($author === false)
429
+ return false;
430
+ $auth_link = get_author_link(false, $author->ID, $author->user_nicename);
431
+ $can_link = $this->paged_link($auth_link);
432
+ } else {
433
+ global $cache_userdata;
434
+ $userid = get_query_var('author');
435
+ $auth_link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
436
+ $can_link = $this->paged_link($auth_link);
437
+ }
438
+ }
439
 
440
  if (isset($description) && (strlen($description) > $this->min_description_length) && !(is_home() && is_paged())) {
441
  $description = trim(strip_tags($description));
500
  if ($meta_string != null) {
501
  echo "$meta_string\n";
502
  }
503
+
504
+ if ($can_link != '' && ($canonical)) {
505
+ echo "".'<link rel="canonical" href="'.$can_link.'" />'."\n";
506
+ }
507
 
508
  echo "<!-- /platinum one seo pack -->\n";
509
  }
510
+
511
+ function paged_link($link) {
512
+ $page = get_query_var('paged');
513
+ $has_ut = function_exists('user_trailingslashit');
514
+ if ($page && $page > 1) {
515
+ $link = trailingslashit($link) ."page/". "$page";
516
+ if ($has_ut) {
517
+ $link = user_trailingslashit($link, 'paged');
518
+ } else {
519
+ $link .= '/';
520
+ }
521
+ }
522
+ return $link;
523
+ }
524
 
525
  function get_post_description($post) {
526
  $description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "description", true))));
826
  $tokens = explode(' ', $s);
827
  while (list($key, $val) = each($tokens)) {
828
  $tokens[$key] = trim($tokens[$key]);
829
+ if (function_exists('mb_strtoupper')) {
830
+ $tokens[$key] = mb_strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
831
+ } else {
832
+ $tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
833
+ }
834
  }
835
  $s = implode(' ', $tokens);
836
  return $s;
889
  }
890
  }
891
 
892
+ if (get_option('psp_use_tags') && !is_page()) {
893
+ // WP 2.3 tags
894
+ if (function_exists('get_the_tags')) {
895
+ $tags = get_the_tags($post->ID);
896
+ if ($tags && is_array($tags)) {
897
+ foreach ($tags as $tag) {
898
+ $keywords[] = $this->internationalize($tag->name);
899
+ }
900
  }
901
+ }
 
902
 
903
+ // Ultimate Tag Warrior integration
904
+ global $utw;
905
+ if ($utw) {
906
+ $tags = $utw->GetTagsForPost($post);
907
+ if (is_array($tags)) {
908
+ foreach ($tags as $tag) {
909
+ $tag = $tag->tag;
910
+ $tag = str_replace('_',' ', $tag);
911
+ $tag = str_replace('-',' ',$tag);
912
+ $tag = stripcslashes($tag);
913
+ $keywords[] = $tag;
914
+ }
915
  }
916
+ }
917
+ }
 
918
  // autometa
919
  $autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
920
  if (isset($autometa) && !empty($autometa)) {
964
  function get_unique_keywords($keywords) {
965
  $small_keywords = array();
966
  foreach ($keywords as $word) {
967
+ if (function_exists('mb_strtolower')) {
968
+ $small_keywords[] = mb_strtolower($word);
969
+ } else {
970
+ $small_keywords[] = strtolower($word);
971
+ }
972
  }
973
  $keywords_ar = array_unique($small_keywords);
974
  return implode(',', $keywords_ar);
986
  }
987
  return $file;
988
  }
989
+
990
+ function add_footer_link()
991
+ {
992
+ ?>
993
+ <small>SEO Powered by <a href="http://techblissonline.com/platinum-seo-pack/" target="_blank">Platinum SEO</a> from <a href="http://techblissonline.com/" target="_blank">Techblissonline</a></small>
994
+ <?php
995
+ }
996
 
997
  function log($message) {
998
  if ($this->do_log) {
1287
  update_option('aiosp_home_description', $_POST['psp_home_description']);
1288
  update_option('aiosp_home_keywords', $_POST['psp_home_keywords']);
1289
  update_option('psp_max_words_excerpt', $_POST['psp_max_words_excerpt']);
1290
+ update_option('psp_canonical', $_POST['psp_canonical']);
1291
  update_option('aiosp_rewrite_titles', $_POST['psp_rewrite_titles']);
1292
  update_option('aiosp_post_title_format', $_POST['psp_post_title_format']);
1293
  update_option('aiosp_page_title_format', $_POST['psp_page_title_format']);
1299
  update_option('aiosp_404_title_format', $_POST['psp_404_title_format']);
1300
  update_option('aiosp_paged_format', $_POST['psp_paged_format']);
1301
  update_option('aiosp_use_categories', $_POST['psp_use_categories']);
1302
+ update_option('psp_use_tags', $_POST['psp_use_tags']);
1303
  update_option('psp_category_noindex', $_POST['psp_category_noindex']);
1304
  update_option('psp_archive_noindex', $_POST['psp_archive_noindex']);
1305
  update_option('psp_tags_noindex', $_POST['psp_tags_noindex']);
1325
  update_option('aiosp_page_meta_tags', $_POST['psp_page_meta_tags']);
1326
  update_option('aiosp_home_meta_tags', $_POST['psp_home_meta_tags']);
1327
  update_option('aiosp_do_log', $_POST['psp_do_log']);
1328
+ update_option('psp_link_home', $_POST['psp_link_home']);
1329
  if (function_exists('wp_cache_flush')) {
1330
  wp_cache_flush();
1331
  }
1357
  | <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('Feedback', 'platinum_seo_pack') ?></a>
1358
  | <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>"
1359
  href="http://techblissonline.com/wordpress-seo-plugin-smart-options-benefits/"><?php _e('Wordpress SEO options', 'platinum_seo_pack') ?></a>
1360
+ | <a target="_blank" title="<?php _e('Donations for Platinum SEO Plugin', 'platinum_seo_pack') ?>" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rrajeshbab%40gmail%2ecom&item_name=Platinum%20SEO%20plugin%20development%20and%20support%20expenses&item_number=1&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=IN&bn=PP%2dDonationsBF&charset=UTF%2d8"><?php _e('Please Donate', 'platinum_seo_pack') ?></a>
 
1361
  </p>
1362
 
1363
  <script type="text/javascript">
1371
  }
1372
  //-->
1373
  </script>
1374
+ <h3><?php _e('Pls. write a review or choose to link back, if you cannot donate', 'platinum_seo_pack') ?></h3>
1375
  <h3><?php _e('Click on option titles to get help!', 'platinum_seo_pack') ?></h3>
1376
 
1377
  <form name="dofollow" action="" method="post">
1441
  </td>
1442
  </tr>
1443
 
1444
+ <tr>
1445
+ <th scope="row" style="text-align:right; vertical-align:top;">
1446
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_canonical_tip');">
1447
+ <?php _e('Canonical URLs:', 'platinum_seo_pack')?>
1448
+ </a>
1449
+ </td>
1450
+ <td>
1451
+ <input type="checkbox" name="psp_canonical" <?php if (get_option('psp_canonical')) echo "checked=\"1\""; ?>/>
1452
+ <div style="max-width:500px; text-align:left; display:none" id="psp_canonical_tip">
1453
+ <?php
1454
+ _e("Choose this option to set up canonical URLs for your Home page, Single Post, Category and Tag Pages.", 'platinum_seo_pack');
1455
+ ?>
1456
+ </div>
1457
+ </td>
1458
+ </tr>
1459
+
1460
  <tr>
1461
  <th scope="row" style="text-align:right; vertical-align:top;">
1462
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_rewrite_titles_tip');">
1683
  <input type="checkbox" name="psp_use_categories" <?php if (get_option('aiosp_use_categories')) echo "checked=\"1\""; ?>/>
1684
  <div style="max-width:500px; text-align:left; display:none" id="psp_use_categories_tip">
1685
  <?php
1686
+ _e('Check this if you want your categories for a given post to be used as META keywords for the post (in addition to any keywords you specify on the post edit page).', 'platinum_seo_pack');
1687
  ?>
1688
  </div>
1689
  </td>
1721
  </td>
1722
  </tr>
1723
 
1724
+ <tr>
1725
+ <th scope="row" style="text-align:right; vertical-align:top;">
1726
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_use_tags_tip');">
1727
+ <?php _e('Use Tags for META keywords:', 'platinum_seo_pack')?>
1728
+ </td>
1729
+ <td>
1730
+ <input type="checkbox" name="psp_use_tags" <?php if (get_option('psp_use_tags')) echo "checked=\"1\""; ?>/>
1731
+ <div style="max-width:500px; text-align:left; display:none" id="psp_use_tags_tip">
1732
+ <?php
1733
+ _e('Check this if you want your tags for a given post to be used as META keywords for the post (in addition to any keywords you specify on the post edit page).', 'platinum_seo_pack');
1734
+ ?>
1735
+ </div>
1736
+ </td>
1737
+ </tr>
1738
+
1739
  <tr>
1740
  <th scope="row" style="text-align:right; vertical-align:top;">
1741
  <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_tags_noindex_tip');">
1762
  <input type="checkbox" name="psp_comnts_pages_noindex" <?php if (get_option('psp_comnts_pages_noindex')) echo "checked=\"1\""; ?>/>
1763
  <div style="max-width:500px; text-align:left; display:none" id="psp_comnts_pages_noindex_tip">
1764
  <?php
1765
+ _e('Check this for excluding comments pages from being indexed. Thereby avoid duplicate content if you wish to use Comment paging (from wordpress 2.7). Note that wordpress 2.7 creates comments pages when the option to break comments into pages is chosen in WP 2.7 under Settings-->Discussion', 'platinum_seo_pack');
1766
  ?>
1767
  </div>
1768
  </td>
2058
 
2059
  <tr>
2060
  <th scope="row" style="text-align:right; vertical-align:top;">
2061
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_do_log_tip');">
2062
  <?php _e('Log important events:', 'platinum_seo_pack')?>
2063
  </a>
2064
  </td>
2072
  </td>
2073
  </tr>
2074
 
2075
+ <tr>
2076
+ <th scope="row" style="text-align:right; vertical-align:top;">
2077
+ <a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_link_home_tip');">
2078
+ <?php _e('Link To Platinum SEO:', 'platinum_seo_pack')?>
2079
+ </a>
2080
+ </td>
2081
+ <td>
2082
+ <input type="checkbox" name="psp_link_home" <?php if (get_option('psp_link_home')) echo "checked=\"1\""; ?>/>
2083
+ <div style="max-width:500px; text-align:left; display:none" id="psp_link_home_tip">
2084
+ <?php
2085
+ _e('Check this to link to Platinum SEO and spread the word.If you do not want to donate, atleast link to home.', 'platinum_seo_pack');
2086
+ ?>
2087
+ </div>
2088
+ </td>
2089
+ </tr>
2090
+
2091
  </table>
2092
  <p class="submit">
2093
  <input type="hidden" name="action" value="psp_update" />
2103
 
2104
  add_option("aiosp_home_description", null, 'Platinum SEO Plugin Home Description', 'yes');
2105
  add_option("aiosp_home_title", null, 'Platinum SEO Plugin Home Title', 'yes');
2106
+ add_option("psp_canonical", 1, 'Platinum SEO Plugin Canonical URLs', 'yes');
2107
  add_option("aiosp_home_keywords", null, 'Platinum SEO Plugin Home Title', 'yes');
2108
  add_option("aiosp_rewrite_titles", 1, 'Platinum SEO Plugin Rewrite Titles', 'yes');
2109
  add_option("aiosp_use_categories", 0, 'Platinum SEO Plugin Use Categories', 'yes');
2110
+ add_option("psp_use_tags", 0, 'Platinum SEO Plugin Use Tags', 'yes');
2111
  add_option("psp_category_noindex", 0, 'Platinum SEO Plugin Noindex for Categories', 'yes');
2112
  add_option("psp_archive_noindex", 1, 'Platinum SEO Plugin Noindex for date based archives', 'yes');
2113
  add_option("psp_tags_noindex", 0, 'Platinum SEO Plugin Noindex for Tag Archives', 'yes');
2141
  add_option("aiosp_page_meta_tags", '', 'Platinum SEO Plugin Additional Post Meta Tags', 'yes');
2142
  add_option("aiosp_home_meta_tags", '', 'Platinum SEO Plugin Additional Home Meta Tags', 'yes');
2143
  add_option("aiosp_do_log", null, 'Platinum SEO Plugin write log file', 'yes');
2144
+ add_option("psp_link_home", 1, 'Platinum SEO Plugin write log file', 'yes');
2145
 
2146
  $psp = new Platinum_SEO_Pack();
2147
  add_action('wp_head', array($psp, 'echo_to_blog_header'));
2187
  add_filter('the_tags',array($psp,'nofollow_taglinks'));
2188
  }
2189
 
2190
+ if (get_option('psp_link_home')) {
2191
+ add_action('wp_footer',array($psp,'add_footer_link'));
2192
+ }
2193
+
2194
  /** if (get_option('psp_nofollow_ext_links')) {
2195
  add_filter('the_content',array($psp,'nofollow_home_category'));
2196
  } **/