WP Realtime Sitemap - Version 1.1

Version Description

  • Optionally show categories and tags as a bullet list, or as a tag cloud.
  • Hierarchical list of pages.
Download this release

Release Info

Developer Rincewind
Plugin Icon wp plugin WP Realtime Sitemap
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (3) hide show
  1. readme.txt +18 -6
  2. uninstall.php +9 -6
  3. wp-realtime-sitemap.php +112 -87
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Plugin Name ===
2
  Contributors: rincewind
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H6RW44JXTKANG
4
- Tags: sitemap
5
- Requires at least: 2.0.2
6
  Tested up to: 3.0
7
  Stable tag: trunk
8
 
@@ -14,15 +14,19 @@ A sitemap plugin to make it easier for your site to show all your pages, posts,
14
 
15
  1. You can show/hide hidden posts and pages.
16
  1. You can show/hide Posts, Pages, Archives, Categories and Tags.
 
 
17
  1. All of the above can be ordered in anyway order you want.
18
  1. It comes with an uninstaller, if you dont want it anymore just deactivate the plugin and delete it from within wordpress and it will delete all of its settings itself.
19
 
20
  == Installation ==
21
 
22
  1. Upload the files to `/wp-content/plugins/wp-realtime-sitemap` directory
23
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
24
- 3. Create a page to be your sitemap.
25
- 4. Click the HTML tab in the WYSIWYG editor and paste into the page you created above or an already existing page the following comment <!--wp-realtime-sitemap-->
 
 
26
 
27
  == Frequently Asked Questions ==
28
 
@@ -34,7 +38,15 @@ You can add it to either. The text will be substituted with the sitemap links.
34
 
35
  You can call it whatever you like. I would suggest you call it Site Map.
36
 
 
 
 
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = 1.0 =
40
  * First version.
1
  === Plugin Name ===
2
  Contributors: rincewind
3
+ Donate link: http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-donate
4
+ Tags: seo, sitemap, navigation
5
+ Requires at least: 2.3
6
  Tested up to: 3.0
7
  Stable tag: trunk
8
 
14
 
15
  1. You can show/hide hidden posts and pages.
16
  1. You can show/hide Posts, Pages, Archives, Categories and Tags.
17
+ 1. Can optionally show categories and tags as a bullet list, or as a tag cloud if you prefer.
18
+ 1. Hierarchical list of pages.
19
  1. All of the above can be ordered in anyway order you want.
20
  1. It comes with an uninstaller, if you dont want it anymore just deactivate the plugin and delete it from within wordpress and it will delete all of its settings itself.
21
 
22
  == Installation ==
23
 
24
  1. Upload the files to `/wp-content/plugins/wp-realtime-sitemap` directory
25
+ 1. Activate the plugin through the 'Plugins' menu in WordPress.
26
+ 1. Create a page to be your sitemap.
27
+ 1. Click the HTML tab in the WYSIWYG editor and paste into the page you created above or an already existing page the following comment `<!--wp-realtime-sitemap-->`.
28
+
29
+ You can if you wish call it via php using `<?php echo wp_realtime_sitemap('<!--wp-realtime-sitemap-->'); ?>`.
30
 
31
  == Frequently Asked Questions ==
32
 
38
 
39
  You can call it whatever you like. I would suggest you call it Site Map.
40
 
41
+ = Is there a php code so I can add it to a php template file? =
42
+
43
+ You can if do this put this php code in the php file you wish to have the sitemap shown on, `<?php echo wp_realtime_sitemap('<!--wp-realtime-sitemap-->'); ?>`.
44
+
45
  == Changelog ==
46
 
47
+ = 1.1 =
48
+ * Optionally show categories and tags as a bullet list, or as a tag cloud.
49
+ * Hierarchical list of pages.
50
+
51
  = 1.0 =
52
  * First version.
uninstall.php CHANGED
@@ -1,14 +1,17 @@
1
  <?php
2
 
3
- if (!defined( 'ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
4
  exit();
5
 
6
  delete_option('wp_realtime_sitemap_orderby');
7
- delete_option('wp_realtime_sitemap_private');
8
- delete_option('wp_realtime_sitemap_pages');
9
- delete_option('wp_realtime_sitemap_posts');
10
- delete_option('wp_realtime_sitemap_tags');
11
- delete_option('wp_realtime_sitemap_archives');
 
 
 
12
  delete_option('wp_realtime_sitemap_displayorder');
13
 
14
  ?>
1
  <?php
2
 
3
+ if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
4
  exit();
5
 
6
  delete_option('wp_realtime_sitemap_orderby');
7
+ delete_option('wp_realtime_sitemap_showprivate');
8
+ delete_option('wp_realtime_sitemap_showpages');
9
+ delete_option('wp_realtime_sitemap_showposts');
10
+ delete_option('wp_realtime_sitemap_showarchives');
11
+ delete_option('wp_realtime_sitemap_showcategories');
12
+ delete_option('wp_realtime_sitemap_showcategoriesastc');
13
+ delete_option('wp_realtime_sitemap_showtags');
14
+ delete_option('wp_realtime_sitemap_showtagsastc');
15
  delete_option('wp_realtime_sitemap_displayorder');
16
 
17
  ?>
wp-realtime-sitemap.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Realtime Sitemap
4
  Plugin URI: http://www.daniel-tweedy.co.uk/article/wp-realtime-sitemap-plugin/
5
  Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add <!--wp-realtime-sitemap--> to any page or post and the site map will be added there. Use Options->WP Realtime Sitemap to set options.
6
  Author: Daniel Tweedy
7
- Version: 1.0
8
  Author URI: http://www.daniel-tweedy.co.uk/
9
  */
10
 
@@ -27,6 +27,10 @@ along with this program; if not, write to the Free Software
27
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
 
 
 
 
 
30
  // To replace the <!--wp-realtime-sitemap--> with the actual sitemap
31
  function wp_realtime_sitemap($text) {
32
  global $wpdb, $table_prefix;
@@ -35,13 +39,16 @@ function wp_realtime_sitemap($text) {
35
  if (preg_match('|<!--wp-realtime-sitemap-->|', $text)) {
36
 
37
  // Get option values
38
- $orderby = get_option('wp_realtime_sitemap_orderby');
39
- $showprivate = get_option('wp_realtime_sitemap_private');;
40
- $showpages = get_option('wp_realtime_sitemap_pages');
41
- $showposts = get_option('wp_realtime_sitemap_posts');
42
- $showtags = get_option('wp_realtime_sitemap_tags');
43
- $showarchives = get_option('wp_realtime_sitemap_archives');
44
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
 
 
 
45
 
46
  // Do order by
47
  switch ($orderby) {
@@ -61,28 +68,20 @@ function wp_realtime_sitemap($text) {
61
 
62
  // Pages: Yes/No?
63
  if ($showpages != 'no') {
64
- // Show private: Yes/No?
65
- if ($showprivate == 'yes') {
66
- $sqlwhere = 'WHERE `post_type`="page" ';
67
- } else {
68
- $sqlwhere = 'WHERE `post_type`="page" AND `post_status`="publish" ';
69
- }
70
 
71
- $sqlpages = 'SELECT * FROM `' . $table_prefix . 'posts` ' . $sqlwhere . $sqlorder;
72
- $allpages = $wpdb->get_results($sqlpages);
73
 
74
- if (count($allpages) == 0) {
75
- $pages = '';
76
- } else {
77
- $pages = '<h3>Pages</h3><ul>';
78
 
79
- foreach($allpages as $thepage) {
80
- $permalink = get_permalink($thepage->ID);
81
- $pages .= '<li><a href="' . $permalink . '">' . $thepage->post_title . '</a></li>';
82
- }
83
 
84
- $pages .= '</ul>';
85
- }
86
  }
87
 
88
  // Posts: Yes/No?
@@ -116,34 +115,22 @@ function wp_realtime_sitemap($text) {
116
  }
117
 
118
  if ($showcategories != 'no') {
119
- $allcategories = wp_tag_cloud('format=array&taxonomy=category');
120
 
121
- if (count($allcategories) == 0) {
122
- $categories = '';
123
  } else {
124
- $categories = '<h3>Categories</h3><p>';
125
-
126
- foreach($allcategories as $thecategory) {
127
- $categories .= $thecategory . ' ';
128
- }
129
-
130
- $categories = trim($categories) . '</ul>';
131
  }
132
  }
133
 
134
  if ($showtags != 'no') {
135
- $alltags = wp_tag_cloud('format=array');
136
 
137
- if (count($alltags) == 0) {
138
- $tags = '';
139
  } else {
140
- $tags = '<h3>Tags</h3><p>';
141
-
142
- foreach($alltags as $thetag) {
143
- $tags .= $thetag . ' ';
144
- }
145
-
146
- $tags = trim($tags) . '</ul>';
147
  }
148
  }
149
 
@@ -635,29 +622,35 @@ function wp_realtime_sitemap($text) {
635
  } // End wp_realtime_sitemap()
636
 
637
  // Admin menu
638
- function wp_realtime_sitemap_admin() {
639
  if (function_exists('add_options_page')) {
640
- add_options_page('wp-realtime-sitemap', 'WP Realtime Sitemap', 1, basename(__FILE__), 'wp_realtime_sitemap_admin_panel');
641
  }
642
  }
643
 
644
- function wp_realtime_sitemap_admin_panel() {
645
 
646
- $orderby = get_option('wp_realtime_sitemap_orderby');
647
- $showprivate = get_option('wp_realtime_sitemap_private');;
648
- $showpages = get_option('wp_realtime_sitemap_pages');
649
- $showposts = get_option('wp_realtime_sitemap_posts');
650
- $showtags = get_option('wp_realtime_sitemap_tags');
651
- $showarchives = get_option('wp_realtime_sitemap_archives');
652
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
 
 
 
653
 
654
  // Add options if first time running
655
  add_option('wp_realtime_sitemap_orderby', 'datedesc', 'WP Realtime Sitemap Plugin');
656
- add_option('wp_realtime_sitemap_private', 'no', 'WP Realtime Sitemap Plugin');
657
- add_option('wp_realtime_sitemap_pages', 'yes', 'WP Realtime Sitemap Plugin');
658
- add_option('wp_realtime_sitemap_posts', 'yes', 'WP Realtime Sitemap Plugin');
659
- add_option('wp_realtime_sitemap_tags', 'yes', 'WP Realtime Sitemap Plugin');
660
- add_option('wp_realtime_sitemap_archives', 'yes', 'WP Realtime Sitemap Plugin');
 
 
 
661
  add_option('wp_realtime_sitemap_displayorder', '1', 'WP Realtime Sitemap Plugin');
662
 
663
  // Get posted options
@@ -665,30 +658,39 @@ function wp_realtime_sitemap_admin_panel() {
665
 
666
  if (isset($_POST['info_update'])) {
667
  // Update settings
668
- $orderby = $_POST['orderby'];
669
- $showprivate = $_POST['showprivate'];
670
- $showpages = $_POST['showpages'];
671
- $showposts = $_POST['showposts'];
672
- $showtags = $_POST['showtags'];
673
- $showarchives = $_POST['showarchives'];
674
- $displayorder = $_POST['displayorder'];
 
 
 
675
 
676
  update_option('wp_realtime_sitemap_orderby', $orderby);
677
- update_option('wp_realtime_sitemap_private', $showprivate);
678
- update_option('wp_realtime_sitemap_pages', $showpages);
679
- update_option('wp_realtime_sitemap_posts', $showposts);
680
- update_option('wp_realtime_sitemap_tags', $showtags);
681
- update_option('wp_realtime_sitemap_archives', $showarchives);
 
 
 
682
  update_option('wp_realtime_sitemap_displayorder', $displayorder);
683
  } else {
684
  // Load settings from database
685
- $orderby = get_option('wp_realtime_sitemap_orderby');
686
- $showprivate = get_option('wp_realtime_sitemap_private');
687
- $showpages = get_option('wp_realtime_sitemap_pages');
688
- $showposts = get_option('wp_realtime_sitemap_posts');
689
- $showtags = get_option('wp_realtime_sitemap_tags');
690
- $showarchives = get_option('wp_realtime_sitemap_archives');
691
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
 
 
 
692
  }
693
 
694
  ?>
@@ -697,9 +699,10 @@ function wp_realtime_sitemap_admin_panel() {
697
  <h2>WP Realtime Sitemap Options</h2>
698
 
699
  <form method="post">
700
- <table class="form-table">
 
701
  <tr valign="top">
702
- <th scope="row"><label for="orderby">Order Sitemap Pages By</label></th>
703
  <td><select name="orderby">
704
  <option <?php selected('datedesc', $orderby); ?> value="datedesc">Date descending (Default)</option>
705
  <option <?php selected('dateasc', $orderby); ?> value="dateasc">Date ascending</option>
@@ -728,6 +731,27 @@ function wp_realtime_sitemap_admin_panel() {
728
  <option value="no" <?php selected('no', $showposts); ?>>No</option>
729
  </select></td>
730
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
  <tr valign="top">
732
  <th scope="row"><label for="showtags">Show Tags</label></th>
733
  <td><select name="showtags">
@@ -736,10 +760,10 @@ function wp_realtime_sitemap_admin_panel() {
736
  </select></td>
737
  </tr>
738
  <tr valign="top">
739
- <th scope="row"><label for="showarchives">Show Archives</label></th>
740
- <td><select name="showarchives">
741
- <option value="yes" <?php selected('yes', $showarchives); ?>>Yes (Default)</option>
742
- <option value="no" <?php selected('no', $showarchives); ?>>No</option>
743
  </select></td>
744
  </tr>
745
  <tr>
@@ -872,12 +896,13 @@ function wp_realtime_sitemap_admin_panel() {
872
  <div class="submit">
873
  <input type="submit" name="info_update" value="Update Options" />
874
  </div>
 
875
  </form>
876
  </div><?php
877
  }
878
 
879
  // Hooks
880
  add_filter('the_content', 'wp_realtime_sitemap', 2);
881
- add_action('admin_menu', 'wp_realtime_sitemap_admin');
882
 
883
  ?>
4
  Plugin URI: http://www.daniel-tweedy.co.uk/article/wp-realtime-sitemap-plugin/
5
  Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add <!--wp-realtime-sitemap--> to any page or post and the site map will be added there. Use Options->WP Realtime Sitemap to set options.
6
  Author: Daniel Tweedy
7
+ Version: 1.1
8
  Author URI: http://www.daniel-tweedy.co.uk/
9
  */
10
 
27
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
 
30
+ function remove_style(&$item, $key) {
31
+ $item = preg_replace('/ style=\'font-size: .*;\'/', '', $item);
32
+ }
33
+
34
  // To replace the <!--wp-realtime-sitemap--> with the actual sitemap
35
  function wp_realtime_sitemap($text) {
36
  global $wpdb, $table_prefix;
39
  if (preg_match('|<!--wp-realtime-sitemap-->|', $text)) {
40
 
41
  // Get option values
42
+ $orderby = get_option('wp_realtime_sitemap_orderby');
43
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
44
+ $showpages = get_option('wp_realtime_sitemap_showpages');
45
+ $showposts = get_option('wp_realtime_sitemap_showposts');
46
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
47
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
48
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
49
+ $showtags = get_option('wp_realtime_sitemap_showtags');
50
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
51
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
52
 
53
  // Do order by
54
  switch ($orderby) {
68
 
69
  // Pages: Yes/No?
70
  if ($showpages != 'no') {
71
+ if ($orderby == 'datedesc' || $orderby == 'dateasc')
72
+ $sort_column = 'post_date';
 
 
 
 
73
 
74
+ if ($orderby == 'alphadesc' || $orderby == 'alphaasc')
75
+ $sort_column = 'post_title';
76
 
77
+ if ($orderby == 'datedesc' || $orderby == 'alphadesc')
78
+ $sort_order = 'DESC';
 
 
79
 
80
+ if ($orderby == 'dateasc' || $orderby == 'alphaasc')
81
+ $sort_order = 'ASC';
 
 
82
 
83
+ $pages = '<h3>Pages</h3>';
84
+ $pages .= '<ul>' . wp_list_pages(array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'title_li' => '', 'echo' => '0')) . '</ul>';
85
  }
86
 
87
  // Posts: Yes/No?
115
  }
116
 
117
  if ($showcategories != 'no') {
118
+ $categories = '<h3>Categories</h3>';
119
 
120
+ if ($showcategoriesastc != 'no') {
121
+ $categories .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'taxonomy' => 'category', 'echo' => '0'));
122
  } else {
123
+ $categories .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'taxonomy' => 'category', 'echo' => '0')));
 
 
 
 
 
 
124
  }
125
  }
126
 
127
  if ($showtags != 'no') {
128
+ $tags = '<h3>Tags</h3>';
129
 
130
+ if ($showtagsastc != 'no') {
131
+ $tags .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'echo' => '0'));
132
  } else {
133
+ $tags .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'echo' => '0')));
 
 
 
 
 
 
134
  }
135
  }
136
 
622
  } // End wp_realtime_sitemap()
623
 
624
  // Admin menu
625
+ function wp_realtime_sitemap_showadmin() {
626
  if (function_exists('add_options_page')) {
627
+ add_options_page('wp-realtime-sitemap', 'WP Realtime Sitemap', 1, basename(__FILE__), 'wp_realtime_sitemap_showadmin_panel');
628
  }
629
  }
630
 
631
+ function wp_realtime_sitemap_showadmin_panel() {
632
 
633
+ $orderby = get_option('wp_realtime_sitemap_orderby');
634
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
635
+ $showpages = get_option('wp_realtime_sitemap_showpages');
636
+ $showposts = get_option('wp_realtime_sitemap_showposts');
637
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
638
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
639
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
640
+ $showtags = get_option('wp_realtime_sitemap_showtags');
641
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
642
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
643
 
644
  // Add options if first time running
645
  add_option('wp_realtime_sitemap_orderby', 'datedesc', 'WP Realtime Sitemap Plugin');
646
+ add_option('wp_realtime_sitemap_showprivate', 'no', 'WP Realtime Sitemap Plugin');
647
+ add_option('wp_realtime_sitemap_showpages', 'yes', 'WP Realtime Sitemap Plugin');
648
+ add_option('wp_realtime_sitemap_showposts', 'yes', 'WP Realtime Sitemap Plugin');
649
+ add_option('wp_realtime_sitemap_showarchives', 'yes', 'WP Realtime Sitemap Plugin');
650
+ add_option('wp_realtime_sitemap_showcategories', 'yes', 'WP Realtime Sitemap Plugin');
651
+ add_option('wp_realtime_sitemap_showcategoriesastc', 'no', 'WP Realtime Sitemap Plugin');
652
+ add_option('wp_realtime_sitemap_showtags', 'yes', 'WP Realtime Sitemap Plugin');
653
+ add_option('wp_realtime_sitemap_showtagsastc', 'no', 'WP Realtime Sitemap Plugin');
654
  add_option('wp_realtime_sitemap_displayorder', '1', 'WP Realtime Sitemap Plugin');
655
 
656
  // Get posted options
658
 
659
  if (isset($_POST['info_update'])) {
660
  // Update settings
661
+ $orderby = $_POST['orderby'];
662
+ $showprivate = $_POST['showprivate'];
663
+ $showpages = $_POST['showpages'];
664
+ $showposts = $_POST['showposts'];
665
+ $showarchives = $_POST['showarchives'];
666
+ $showcategories = $_POST['showcategories'];
667
+ $showcategoriesastc = $_POST['showcategoriesastc'];
668
+ $showtags = $_POST['showtags'];
669
+ $showtagsastc = $_POST['showtagsastc'];
670
+ $displayorder = $_POST['displayorder'];
671
 
672
  update_option('wp_realtime_sitemap_orderby', $orderby);
673
+ update_option('wp_realtime_sitemap_showprivate', $showprivate);
674
+ update_option('wp_realtime_sitemap_showpages', $showpages);
675
+ update_option('wp_realtime_sitemap_showposts', $showposts);
676
+ update_option('wp_realtime_sitemap_showarchives', $showarchives);
677
+ update_option('wp_realtime_sitemap_showcategories', $showcategories);
678
+ update_option('wp_realtime_sitemap_showcategoriesastc', $showcategoriesastc);
679
+ update_option('wp_realtime_sitemap_showtags', $showtags);
680
+ update_option('wp_realtime_sitemap_showtagsastc', $showtagsastc);
681
  update_option('wp_realtime_sitemap_displayorder', $displayorder);
682
  } else {
683
  // Load settings from database
684
+ $orderby = get_option('wp_realtime_sitemap_orderby');
685
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
686
+ $showpages = get_option('wp_realtime_sitemap_showpages');
687
+ $showposts = get_option('wp_realtime_sitemap_showposts');
688
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
689
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
690
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
691
+ $showtags = get_option('wp_realtime_sitemap_showtags');
692
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
693
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
694
  }
695
 
696
  ?>
699
  <h2>WP Realtime Sitemap Options</h2>
700
 
701
  <form method="post">
702
+
703
+ <table class="form-table">
704
  <tr valign="top">
705
+ <th scope="row"><label for="orderby">Order Sitemap Pages/Posts By</label></th>
706
  <td><select name="orderby">
707
  <option <?php selected('datedesc', $orderby); ?> value="datedesc">Date descending (Default)</option>
708
  <option <?php selected('dateasc', $orderby); ?> value="dateasc">Date ascending</option>
731
  <option value="no" <?php selected('no', $showposts); ?>>No</option>
732
  </select></td>
733
  </tr>
734
+ <tr valign="top">
735
+ <th scope="row"><label for="showarchives">Show Archives</label></th>
736
+ <td><select name="showarchives">
737
+ <option value="yes" <?php selected('yes', $showarchives); ?>>Yes (Default)</option>
738
+ <option value="no" <?php selected('no', $showarchives); ?>>No</option>
739
+ </select></td>
740
+ </tr>
741
+ <tr valign="top">
742
+ <th scope="row"><label for="showcategories">Show Categories</label></th>
743
+ <td><select name="showcategories">
744
+ <option value="yes" <?php selected('yes', $showcategories); ?>>Yes (Default)</option>
745
+ <option value="no" <?php selected('no', $showcategories); ?>>No</option>
746
+ </select></td>
747
+ </tr>
748
+ <tr valign="top">
749
+ <th scope="row"><label for="showcategoriesastc">Show Categories As Tag Cloud</label></th>
750
+ <td><select name="showcategoriesastc">
751
+ <option value="yes" <?php selected('yes', $showcategoriesastc); ?>>Yes</option>
752
+ <option value="no" <?php selected('no', $showcategoriesastc); ?>>No (Default)</option>
753
+ </select></td>
754
+ </tr>
755
  <tr valign="top">
756
  <th scope="row"><label for="showtags">Show Tags</label></th>
757
  <td><select name="showtags">
760
  </select></td>
761
  </tr>
762
  <tr valign="top">
763
+ <th scope="row"><label for="showtagsastc">Show Tags As Tag Cloud</label></th>
764
+ <td><select name="showtagsastc">
765
+ <option value="yes" <?php selected('yes', $showtagsastc); ?>>Yes</option>
766
+ <option value="no" <?php selected('no', $showtagsastc); ?>>No (Default)</option>
767
  </select></td>
768
  </tr>
769
  <tr>
896
  <div class="submit">
897
  <input type="submit" name="info_update" value="Update Options" />
898
  </div>
899
+
900
  </form>
901
  </div><?php
902
  }
903
 
904
  // Hooks
905
  add_filter('the_content', 'wp_realtime_sitemap', 2);
906
+ add_action('admin_menu', 'wp_realtime_sitemap_showadmin');
907
 
908
  ?>