WP Realtime Sitemap - Version 1.4.3

Version Description

  • Fixed issue where overwritting sort_column variable.
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

Files changed (2) hide show
  1. readme.txt +3 -0
  2. wp-realtime-sitemap.php +10 -10
readme.txt CHANGED
@@ -90,6 +90,9 @@ Please see the installation page for information about the short code usage for
90
 
91
  == Changelog ==
92
 
 
 
 
93
  = 1.4.2 =
94
  * Fixed minor bug, where content output would be before whatever was put into the wysiwyg editor, instead of after.
95
  * Wrapped date for posts in a span tag so easier for this to be styled.
90
 
91
  == Changelog ==
92
 
93
+ = 1.4.3 =
94
+ * Fixed issue where overwritting `sort_column` variable.
95
+
96
  = 1.4.2 =
97
  * Fixed minor bug, where content output would be before whatever was put into the wysiwyg editor, instead of after.
98
  * Wrapped date for posts in a span tag so easier for this to be styled.
wp-realtime-sitemap.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: WP Realtime Sitemap
5
  Plugin URI: http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-home/
6
  Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add `[wp-realtime-sitemap show="all"]` to any page or post and the site map will be added there. Use Settings->WP Realtime Sitemap to set options.
7
- Version: 1.4.2
8
  Author: Daniel Tweedy
9
  Author URI: http://www.daniel-tweedy.co.uk/
10
  License: GPL2
@@ -79,9 +79,9 @@ function wprs_options_form() {
79
  <option <?php selected('menu_order', $sort_column); ?> value="menu_order">Page order</option>
80
  <option <?php selected('date', $sort_column); ?> value="date">Creation time</option>
81
  <option <?php selected('modified', $sort_column); ?> value="modified">Time last modified</option>
82
- <option <?php selected('ID', $sort_order); ?> value="ID">Numeric Page ID</option>
83
- <option <?php selected('author', $sort_order); ?> value="author">Page author</option>
84
- <option <?php selected('name', $sort_order); ?> value="name">Alphabetically (by post slug)</option>
85
  </select></td>
86
  </tr>
87
  <tr valign="top">
@@ -190,10 +190,10 @@ function wp_realtime_sitemap($atts, $content=null, $code='') {
190
  // Pages: Yes/No?
191
  if ($all_options['show_pages'] != 'no' && $all_options['show_pages'] != 'off') {
192
  if ($sort_column == 'title' || $sort_column == 'date' || $sort_column == 'modified' || $sort_column == 'author' || $sort_column == 'name')
193
- $sort_column = 'post_' . $sort_column;
194
 
195
  $pages = '<h3>'.__('Pages', 'wp-realtime-sitemap').'</h3>';
196
- $pages .= '<ul>' . wp_list_pages(array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'title_li' => '', 'echo' => '0')) . '</ul>';
197
  }
198
 
199
  // Posts: Yes/No?
@@ -246,10 +246,10 @@ function wp_realtime_sitemap($atts, $content=null, $code='') {
246
  $categories .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'taxonomy' => 'category', 'echo' => '0'));
247
  } else {
248
  if ($sort_column != 'ID' || $sort_column != 'name' || $sort_column != 'slug' || $sort_column != 'count' || $sort_column != 'term_group') {
249
- $sort_column = 'name';
250
  }
251
 
252
- $categories .= '<ul>' . wp_list_categories(array('orderby' => $sort_column, 'order' => $sort_order, 'show_count' => ($show_count == 'yes') ? true : false, 'hierarchical' => true, 'title_li' => '', 'echo' => '0', 'taxonomy' => 'category')) . '</ul>';
253
  }
254
  }
255
 
@@ -262,10 +262,10 @@ function wp_realtime_sitemap($atts, $content=null, $code='') {
262
  $tags .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'echo' => '0'));
263
  } else {
264
  if ($sort_column != 'ID' || $sort_column != 'name' || $sort_column != 'slug' || $sort_column != 'count' || $sort_column != 'term_group') {
265
- $sort_column = 'name';
266
  }
267
 
268
- $tags .= '<ul>' . wp_list_categories(array('orderby' => $sort_column, 'order' => $sort_order, 'show_count' => ($show_count == 'yes') ? true : false, 'hierarchical' => true, 'title_li' => '', 'echo' => '0', 'taxonomy' => 'post_tag')) . '</ul>';
269
  }
270
  }
271
 
4
  Plugin Name: WP Realtime Sitemap
5
  Plugin URI: http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-home/
6
  Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add `[wp-realtime-sitemap show="all"]` to any page or post and the site map will be added there. Use Settings->WP Realtime Sitemap to set options.
7
+ Version: 1.4.3
8
  Author: Daniel Tweedy
9
  Author URI: http://www.daniel-tweedy.co.uk/
10
  License: GPL2
79
  <option <?php selected('menu_order', $sort_column); ?> value="menu_order">Page order</option>
80
  <option <?php selected('date', $sort_column); ?> value="date">Creation time</option>
81
  <option <?php selected('modified', $sort_column); ?> value="modified">Time last modified</option>
82
+ <option <?php selected('ID', $sort_column); ?> value="ID">Numeric Page ID</option>
83
+ <option <?php selected('author', $sort_column); ?> value="author">Page author</option>
84
+ <option <?php selected('name', $sort_column); ?> value="name">Alphabetically (by post slug)</option>
85
  </select></td>
86
  </tr>
87
  <tr valign="top">
190
  // Pages: Yes/No?
191
  if ($all_options['show_pages'] != 'no' && $all_options['show_pages'] != 'off') {
192
  if ($sort_column == 'title' || $sort_column == 'date' || $sort_column == 'modified' || $sort_column == 'author' || $sort_column == 'name')
193
+ $page_sort_column = 'post_' . $sort_column;
194
 
195
  $pages = '<h3>'.__('Pages', 'wp-realtime-sitemap').'</h3>';
196
+ $pages .= '<ul>' . wp_list_pages(array('sort_column' => (!isset($page_sort_column)) ? $sort_column : $page_sort_column, 'sort_order' => $sort_order, 'title_li' => '', 'echo' => '0')) . '</ul>';
197
  }
198
 
199
  // Posts: Yes/No?
246
  $categories .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'taxonomy' => 'category', 'echo' => '0'));
247
  } else {
248
  if ($sort_column != 'ID' || $sort_column != 'name' || $sort_column != 'slug' || $sort_column != 'count' || $sort_column != 'term_group') {
249
+ $categories_sort_column = 'name';
250
  }
251
 
252
+ $categories .= '<ul>' . wp_list_categories(array('orderby' => (!isset($categories_sort_column)) ? $sort_column : $categories_sort_column, 'order' => $sort_order, 'show_count' => ($show_count == 'yes') ? true : false, 'hierarchical' => true, 'title_li' => '', 'echo' => '0', 'taxonomy' => 'category')) . '</ul>';
253
  }
254
  }
255
 
262
  $tags .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'echo' => '0'));
263
  } else {
264
  if ($sort_column != 'ID' || $sort_column != 'name' || $sort_column != 'slug' || $sort_column != 'count' || $sort_column != 'term_group') {
265
+ $tags_sort_column = 'name';
266
  }
267
 
268
+ $tags .= '<ul>' . wp_list_categories(array('orderby' => (!isset($tags_sort_column)) ? $sort_column : $tags_sort_column, 'order' => $sort_order, 'show_count' => ($show_count == 'yes') ? true : false, 'hierarchical' => true, 'title_li' => '', 'echo' => '0', 'taxonomy' => 'post_tag')) . '</ul>';
269
  }
270
  }
271