Simple Sitemap – Automatically Generate a Responsive Sitemap - Version 1.52

Version Description

Download this release

Release Info

Developer dgwyer
Plugin Icon Simple Sitemap – Automatically Generate a Responsive Sitemap
Version 1.52
Comparing to
See all releases

Code changes from version 1.51 to 1.52

Files changed (2) hide show
  1. readme.txt +10 -3
  2. simple-sitemap.php +32 -4
readme.txt CHANGED
@@ -4,17 +4,17 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: sitemap, html, global, sort, shortcode, pages, posts
5
  Requires at least: 2.7
6
  Tested up to: 3.5.1
7
- Stable tag: 1.51
8
 
9
  HTML sitemap to display content as a single linked list of posts and pages, or as groups sorted by taxonomy (via a drop-down box).
10
 
11
  == Description ==
12
 
13
- Note: From version 1.4 you can now exclude pages by ID! This was a commonly requested feature. Also, ALL posts are now listed and are not restricted by the Settings -> Reading value.
14
 
15
  This is probably the easiest way to add a powerful HTML sitemap to your site!
16
 
17
- Unique and intuitive way to display your website content by simply adding a single shortcode [simple-sitemap] to a page. See the Plugin screenshots for examples.
18
 
19
  The order and style in which your blog posts and pages are displayed on the screen depends on the drop-down box option chosen. Post/pages are rendered as a single linked list of titles, or they can be grouped by date, author, category, and tag (each heading acts as a link the the relevant taxonomy type as well).
20
 
@@ -67,6 +67,13 @@ The Plugin can also be installed directly from the main WordPress Plugin page.
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
 
 
70
  *1.51*
71
 
72
  * Updated WordPress compatibility version.
4
  Tags: sitemap, html, global, sort, shortcode, pages, posts
5
  Requires at least: 2.7
6
  Tested up to: 3.5.1
7
+ Stable tag: 1.52
8
 
9
  HTML sitemap to display content as a single linked list of posts and pages, or as groups sorted by taxonomy (via a drop-down box).
10
 
11
  == Description ==
12
 
13
+ Note: From version 1.52 you can add the [simple-sitemap] shortcode to a Text widget too! Rendering of the sitemap is now one column so it fits nicely on posts, pages, or your sidebar.
14
 
15
  This is probably the easiest way to add a powerful HTML sitemap to your site!
16
 
17
+ Unique and intuitive way to display your website content by simply adding a single shortcode [simple-sitemap] to a post, page, or sidebar (via a Text widget). See the Plugin screenshots for examples.
18
 
19
  The order and style in which your blog posts and pages are displayed on the screen depends on the drop-down box option chosen. Post/pages are rendered as a single linked list of titles, or they can be grouped by date, author, category, and tag (each heading acts as a link the the relevant taxonomy type as well).
20
 
67
 
68
  == Changelog ==
69
 
70
+ *1.52*
71
+
72
+ * Updated Plugin options page text.
73
+ * Now works nicely in sidebars (via a Text widget)!
74
+ * Fixed bug where existing Plugin users saw no posts/pages on the sitemap after upgrade to 1.51.
75
+ * Added a 'Settings' link to the main Plugins page, next to the 'Deactivate' link to allow easy navigation to the Simple Sitemap Plugin options page.
76
+
77
  *1.51*
78
 
79
  * Updated WordPress compatibility version.
simple-sitemap.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple Sitemap
4
  Plugin URI: http://www.presscoders.com/plugins/free-plugins/simple-sitemap/
5
  Description: HTML sitemap to display content as a single linked list of posts and pages, or as groups sorted by taxonomy (via a drop-down box).
6
- Version: 1.51
7
  Author: David Gwyer
8
  Author URI: http://www.presscoders.com
9
  */
@@ -34,7 +34,8 @@ Author URI: http://www.presscoders.com
34
  - Use the 'prepare' WP feature when querying the db directly.
35
  - Use translation functions _e(), __() etc.
36
  - Show all the posts in each category not just the maximum allowed in Settings -> Reading.
37
- - Update Plugin description and other sections, as well as the images which are out of date.
 
38
  */
39
 
40
  /* wpss_ prefix is derived from [W]ord[P]ress [s]imple [s]itemap. */
@@ -45,6 +46,7 @@ register_activation_hook(__FILE__, 'wpss_add_defaults');
45
  register_uninstall_hook(__FILE__, 'wpss_delete_plugin_options');
46
  add_action('admin_init', 'wpss_init' );
47
  add_action('admin_menu', 'wpss_add_options_page');
 
48
 
49
  // ***************************************
50
  // *** START - Create Admin Options ***
@@ -57,6 +59,7 @@ function wpss_delete_plugin_options() {
57
 
58
  /* Define default option settings. */
59
  function wpss_add_defaults() {
 
60
  $tmp = get_option('wpss_options');
61
  if( ( (isset($tmp['chk_default_options_db']) && $tmp['chk_default_options_db']=='1')) || (!is_array($tmp)) ) {
62
  delete_option('wpss_options');
@@ -65,11 +68,23 @@ function wpss_add_defaults() {
65
  "chk_default_options_db" => "0",
66
  "chk_show_dropdowns" => "0",
67
  "chk_show_pages" => "1",
68
- "chk_show_posts" => "0",
69
  "txt_page_ids" => ""
70
  );
71
  update_option( 'wpss_options', $arr );
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
74
 
75
  /* Init plugin options to white list our options. */
@@ -100,7 +115,7 @@ function wpss_render_form() {
100
  <p>Here's a little a bonus AVAILABLE ONLY to our free Plugin users! <strong>Get $20 OFF</strong> the price of our fully responsive, cutting edge <a href="http://www.presscoders.com/designfolio-offer/" target="_blank">Designfolio</a> theme.<br /><a style="margin-top:4px;" class="button" href="http://www.presscoders.com/designfolio-offer#buy" target="_blank"><strong>GET $20 OFF DESIGNFOLIO PRO NOW!!</strong></a></p>
101
  </div>
102
 
103
- <div style="background:#eee;border: 1px dashed #ccc;font-size: 13px;margin: 20px 0 10px 0;padding: 5px 0 5px 8px;">To display the Simple Sitemap on a post/page, enter the following <a href="http://codex.wordpress.org/Shortcode_API" target="_blank">shortcode</a>: <b>[simple-sitemap]</b></div>
104
  <form method="post" action="options.php">
105
  <?php settings_fields('wpss_plugin_options'); ?>
106
  <?php $options = get_option('wpss_options'); ?>
@@ -524,6 +539,19 @@ ob_end_clean();
524
  return $output;
525
 
526
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
527
  // ***************************************
528
  // *** END - Plugin Core Functions ***
529
  // ***************************************
3
  Plugin Name: Simple Sitemap
4
  Plugin URI: http://www.presscoders.com/plugins/free-plugins/simple-sitemap/
5
  Description: HTML sitemap to display content as a single linked list of posts and pages, or as groups sorted by taxonomy (via a drop-down box).
6
+ Version: 1.52
7
  Author: David Gwyer
8
  Author URI: http://www.presscoders.com
9
  */
34
  - Use the 'prepare' WP feature when querying the db directly.
35
  - Use translation functions _e(), __() etc.
36
  - Show all the posts in each category not just the maximum allowed in Settings -> Reading.
37
+ - Update Plugin description and other sections, as well as the images which are out of date (show the single column working on the sidebar).
38
+ - Maybe support shortcode attributes so that users can specify to add custom behaviour for individual sitemaps if more than one is needed on a site. Any attributes would override global Plugin settings that affects all sitemaps by default.
39
  */
40
 
41
  /* wpss_ prefix is derived from [W]ord[P]ress [s]imple [s]itemap. */
46
  register_uninstall_hook(__FILE__, 'wpss_delete_plugin_options');
47
  add_action('admin_init', 'wpss_init' );
48
  add_action('admin_menu', 'wpss_add_options_page');
49
+ add_filter( 'plugin_action_links', 'wpss_plugin_action_links', 10, 2 );
50
 
51
  // ***************************************
52
  // *** START - Create Admin Options ***
59
 
60
  /* Define default option settings. */
61
  function wpss_add_defaults() {
62
+
63
  $tmp = get_option('wpss_options');
64
  if( ( (isset($tmp['chk_default_options_db']) && $tmp['chk_default_options_db']=='1')) || (!is_array($tmp)) ) {
65
  delete_option('wpss_options');
68
  "chk_default_options_db" => "0",
69
  "chk_show_dropdowns" => "0",
70
  "chk_show_pages" => "1",
71
+ "chk_show_posts" => "1",
72
  "txt_page_ids" => ""
73
  );
74
  update_option( 'wpss_options', $arr );
75
  }
76
+
77
+ // Make sure that something displays on the front end (i.e. the post, page, CPT check boxes are not all off)
78
+ $tmp1 = get_option('wpss_options');
79
+ if( isset($tmp1) && is_array($tmp1) ) {
80
+ if( !( isset($tmp1['chk_show_posts']) && $tmp1['chk_show_posts'] ) && !( isset($tmp1['chk_show_pages']) && $tmp1['chk_show_pages'] ) ) {
81
+ // show pages and posts if nothing selected
82
+ $tmp1['chk_show_pages'] = "1";
83
+ $tmp1['chk_show_posts'] = "1";
84
+ }
85
+
86
+ update_option( 'wpss_options', $tmp1 );
87
+ }
88
  }
89
 
90
  /* Init plugin options to white list our options. */
115
  <p>Here's a little a bonus AVAILABLE ONLY to our free Plugin users! <strong>Get $20 OFF</strong> the price of our fully responsive, cutting edge <a href="http://www.presscoders.com/designfolio-offer/" target="_blank">Designfolio</a> theme.<br /><a style="margin-top:4px;" class="button" href="http://www.presscoders.com/designfolio-offer#buy" target="_blank"><strong>GET $20 OFF DESIGNFOLIO PRO NOW!!</strong></a></p>
116
  </div>
117
 
118
+ <div style="background:#eee;border: 1px dashed #ccc;font-size: 13px;margin: 20px 0 10px 0;padding: 5px 0 5px 8px;">To display the Simple Sitemap on a post, page, or sidebar (via a Text widget), enter the following <a href="http://codex.wordpress.org/Shortcode_API" target="_blank">shortcode</a>: <b>[simple-sitemap]</b></div>
119
  <form method="post" action="options.php">
120
  <?php settings_fields('wpss_plugin_options'); ?>
121
  <?php $options = get_option('wpss_options'); ?>
539
  return $output;
540
 
541
  }
542
+
543
+ // Display a Settings link on the main Plugins page
544
+ function wpss_plugin_action_links( $links, $file ) {
545
+
546
+ if ( $file == plugin_basename( __FILE__ ) ) {
547
+ $posk_links = '<a href="'.get_admin_url().'options-general.php?page=simple-sitemap/simple-sitemap.php">'.__('Settings').'</a>';
548
+ // make the 'Settings' link appear first
549
+ array_unshift( $links, $posk_links );
550
+ }
551
+
552
+ return $links;
553
+ }
554
+
555
  // ***************************************
556
  // *** END - Plugin Core Functions ***
557
  // ***************************************