HTML Page Sitemap - Version 1.3.2

Version Description

  • Released on 10/05/2018
  • Fixed warning messages in PHP7 when modifying the $args value when it is not an array.
Download this release

Release Info

Developer amandato
Plugin Icon wp plugin HTML Page Sitemap
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

Files changed (2) hide show
  1. html-sitemap.php +40 -30
  2. readme.txt +10 -7
html-sitemap.php CHANGED
@@ -2,19 +2,19 @@
2
  /*
3
  Plugin Name: HTML Page Sitemap
4
  Plugin URI: http://www.pluginspodcast.com/plugins/html-page-sitemap/
5
- Description: <a href="http://www.pluginspodcast.com/plugins/html-page-sitemap/" target="_blank">HTML Page Sitemap</a> Adds an HTML (Not XML) sitemap of your blog pages (not posts) by entering the shortcode [html_sitemap]. A plugin from <a href="http://www.pluginspodcast.com/" target="_blank">Plugins: The WordPress Plugins Podcast</a>.
6
- Version: 1.3.1
7
- Contributors: Angelo Mandato, CIO RawVoice and host of the PluginsPodcast.com
8
- Author URI: http://www.pluginspodcast.com/
9
 
10
  Requires at least: 3.7
11
- Tested up to: 4.4
12
  Text Domain: html-sitemap
13
  Change Log: See readme.txt for complete change log
14
- Contributors: Angelo Mandato, CIO RawVoice and host of the PluginsPodcast.com
15
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
16
 
17
- Copyright 2009-2015 Angelo Mandato, host of the Plugins Podcast (http://www.pluginspodcast.com)
18
  */
19
 
20
 
@@ -29,49 +29,59 @@ function html_sitemap_shortcode_handler( $args, $content = null )
29
  if( is_feed() )
30
  return '';
31
 
 
 
 
 
 
32
  $class_tag = '';
33
- if( isset($args['class']) ) {
34
- if( !empty($args['class']) )
35
- $class_tag = $args['class'];
36
- unset($args['class']);
37
  }
38
 
39
  $id_tag = '';
40
- if( isset($args['id']) ) {
41
- if( !empty($args['id']) )
42
- $id_tag = $args['id'];
43
- unset($args['id']);
44
  }
45
 
46
  $ordered_type = '';
47
- if( isset($args['ordered_list_type']) ) {
48
- if( !empty($args['ordered_list_type'])) {
49
- switch( $args['ordered_list_type'] ) {
50
  case '1':
51
  case 'i':
52
  case 'I':
53
  case 'a':
54
- case 'A': { $ordered_type = $args['ordered_list_type']; }; break;
55
  }
56
  }
57
- unset($args['ordered_list_type']);
 
 
 
 
 
 
 
 
 
58
  }
59
 
60
- $args['echo'] = 0;
61
- $args['title_li'] = '';
62
- unset($args['link_before']);
63
- unset($args['link_after']);
64
- if( isset($args['child_of']) && $args['child_of'] == 'CURRENT' ) {
65
- $args['child_of'] = get_the_ID();
66
- } else if( isset($args['child_of']) && $args['child_of'] == 'PARENT' ) {
67
  $post = &get_post( get_the_ID() );
68
  if( $post->post_parent )
69
- $args['child_of'] = $post->post_parent;
70
  else
71
- unset( $args['child_of'] );
72
  }
73
 
74
- $html = wp_list_pages($args);
75
 
76
  // Remove the classes added by WordPress
77
  $html = preg_replace('/( class="[^"]+")/is', '', $html);
2
  /*
3
  Plugin Name: HTML Page Sitemap
4
  Plugin URI: http://www.pluginspodcast.com/plugins/html-page-sitemap/
5
+ Description: <a href="https://wordpress.org/plugins/html-sitemap/" target="_blank">HTML Page Sitemap</a> Adds an HTML (Not XML) sitemap of your blog pages (not posts) by entering the shortcode [html_sitemap]. A plugin from <a href="http://angelo.mandato.com/" target="_blank">Angelo Mandato</a>.
6
+ Version: 1.3.2
7
+ Contributors: Angelo Mandato, CIO Blubrry Podcasting
8
+ Author URI: http://angelo.mandato.com/
9
 
10
  Requires at least: 3.7
11
+ Tested up to: 4.9.9
12
  Text Domain: html-sitemap
13
  Change Log: See readme.txt for complete change log
14
+ Contributors: Angelo Mandato, CIO Blubrry Podcasting
15
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
16
 
17
+ Copyright 2009-2018 Angelo Mandato, (http://angelo.mandato.com)
18
  */
19
 
20
 
29
  if( is_feed() )
30
  return '';
31
 
32
+ $argsLocal = array();
33
+ if( is_array($args) ) {
34
+ $argsLocal = $args;
35
+ }
36
+
37
  $class_tag = '';
38
+ if( isset($argsLocal['class']) ) {
39
+ if( !empty($argsLocal['class']) )
40
+ $class_tag = $argsLocal['class'];
41
+ unset($argsLocal['class']);
42
  }
43
 
44
  $id_tag = '';
45
+ if( isset($argsLocal['id']) ) {
46
+ if( !empty($argsLocal['id']) )
47
+ $id_tag = $argsLocal['id'];
48
+ unset($argsLocal['id']);
49
  }
50
 
51
  $ordered_type = '';
52
+ if( isset($argsLocal['ordered_list_type']) ) {
53
+ if( !empty($argsLocal['ordered_list_type'])) {
54
+ switch( $argsLocal['ordered_list_type'] ) {
55
  case '1':
56
  case 'i':
57
  case 'I':
58
  case 'a':
59
+ case 'A': { $ordered_type = $argsLocal['ordered_list_type']; }; break;
60
  }
61
  }
62
+ unset($argsLocal['ordered_list_type']);
63
+ }
64
+
65
+ $argsLocal['echo'] = 0;
66
+ $argsLocal['title_li'] = '';
67
+ if( isset($argsLocal['link_before']) ) {
68
+ unset($argsLocal['link_before']);
69
+ }
70
+ if( isset($argsLocal['link_before']) ) {
71
+ unset($argsLocal['link_befoe']);
72
  }
73
 
74
+ if( isset($argsLocal['child_of']) && $argsLocal['child_of'] == 'CURRENT' ) {
75
+ $argsLocal['child_of'] = get_the_ID();
76
+ } else if( isset($argsLocal['child_of']) && $argsLocal['child_of'] == 'PARENT' ) {
 
 
 
 
77
  $post = &get_post( get_the_ID() );
78
  if( $post->post_parent )
79
+ $argsLocal['child_of'] = $post->post_parent;
80
  else
81
+ unset( $argsLocal['child_of'] );
82
  }
83
 
84
+ $html = wp_list_pages($argsLocal);
85
 
86
  // Remove the classes added by WordPress
87
  $html = preg_replace('/( class="[^"]+")/is', '', $html);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === HTML Page Sitemap ===
2
- Contributors: amandato, pluginspodcast
3
- Donate link: http://www.pluginspodcast.com/contact/
4
  Tags: sitemap, page, pages, shortcode, cms, static, short code, map, pagemap, site, html, html sitemap, nav, navigation
5
  Requires at least: 2.7.0
6
- Tested up to: 4.9.1
7
- Stable tag: 1.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,11 @@ Install using the [built-in plugin installer](https://codex.wordpress.org/Admini
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
110
  = 1.3.1 =
111
  * Released on 1/8/2018
112
  * Added a blank index.php to root plugin folder for extra security.
@@ -164,7 +169,5 @@ None at this time.
164
 
165
 
166
  == Contributors ==
167
- Angelo Mandato, CIO [RawVoice](http://www.rawvoice.com) and host of the [Plugins Podcast](http://www.pluginspodcast.com) - Plugin author
168
 
169
- == Follow us on Twitter ==
170
- [http://twitter.com/pluginspodcast](http://twitter.com/pluginspodcast)
1
  === HTML Page Sitemap ===
2
+ Contributors: amandato
3
+ Donate link: http://angelo.mandato.com/contact/
4
  Tags: sitemap, page, pages, shortcode, cms, static, short code, map, pagemap, site, html, html sitemap, nav, navigation
5
  Requires at least: 2.7.0
6
+ Tested up to: 4.9.9
7
+ Stable tag: 1.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.3.2 =
111
+ * Released on 10/05/2018
112
+ * Fixed warning messages in PHP7 when modifying the $args value when it is not an array.
113
+
114
+
115
  = 1.3.1 =
116
  * Released on 1/8/2018
117
  * Added a blank index.php to root plugin folder for extra security.
169
 
170
 
171
  == Contributors ==
172
+ Angelo Mandato, CIO [Blubrry Podcasting](https://www.blubrry.com) - Plugin author
173