Simple Sitemap – Automatically Generate a Responsive Sitemap - Version 3.4

Version Description

  • August 10, 2019 =

  • FIX: Undefined index 'page_excerpt_length'.

Download this release

Release Info

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

Code changes from version 3.2 to 3.4

classes/enqueue-scripts.php CHANGED
@@ -12,8 +12,13 @@ class WPGO_Simple_Sitemap_Enqueue_Scripts {
12
 
13
  $this->module_roots = $module_roots;
14
 
 
15
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_scripts' ) );
 
 
16
  add_action( 'init', array( &$this, 'block_init' ) );
 
 
17
  add_action( 'enqueue_block_assets', array( &$this, 'enqueue_assets' ) );
18
  }
19
 
@@ -50,7 +55,7 @@ class WPGO_Simple_Sitemap_Enqueue_Scripts {
50
  }
51
  }
52
 
53
- /* Scripts just for the plugin settings page. */
54
  public function enqueue_admin_scripts($hook) {
55
 
56
  if($hook != 'toplevel_page_simple-sitemap-menu') {
@@ -70,6 +75,7 @@ class WPGO_Simple_Sitemap_Enqueue_Scripts {
70
  if( function_exists( 'register_block_type' ) ) {
71
 
72
  // Register our block editor script.
 
73
  wp_register_script(
74
  'simple-sitemap-block',
75
  plugins_url( 'block_assets/js/blocks.editor.js', $this->module_roots['file'] ),
12
 
13
  $this->module_roots = $module_roots;
14
 
15
+ // scripts for plugin settings page
16
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_scripts' ) );
17
+
18
+ // register blocks via PHP
19
  add_action( 'init', array( &$this, 'block_init' ) );
20
+
21
+ // enqueue frontend/editor scripts
22
  add_action( 'enqueue_block_assets', array( &$this, 'enqueue_assets' ) );
23
  }
24
 
55
  }
56
  }
57
 
58
+ /* Scripts for plugin settings page only. */
59
  public function enqueue_admin_scripts($hook) {
60
 
61
  if($hook != 'toplevel_page_simple-sitemap-menu') {
75
  if( function_exists( 'register_block_type' ) ) {
76
 
77
  // Register our block editor script.
78
+ // @todo if not used then this and all refs. can be removed
79
  wp_register_script(
80
  'simple-sitemap-block',
81
  plugins_url( 'block_assets/js/blocks.editor.js', $this->module_roots['file'] ),
classes/settings.php CHANGED
@@ -85,8 +85,8 @@
85
  ?>
86
  <div class="wrap">
87
 
88
- <h2 style="float:left;"><?php _e( 'Welcome to Simple Sitemap!', 'simple-sitemap' ); ?></h2>
89
- <div style="float:right;margin-top:5px;padding:10px 12px;"><a style="text-decoration:none;" title="Check out some of our other plugins" alt="WPGO Plugins Site" href="https://wpgoplugins.com/" target="_blank">wpgoplugins.com</a></div>
90
 
91
  <div style="clear:both;"></div>
92
 
85
  ?>
86
  <div class="wrap">
87
 
88
+ <h2><?php _e( 'Welcome to Simple Sitemap!', 'simple-sitemap' ); ?></h2>
89
+ <div style="position:absolute;padding:15px;top:5px;right:0;"><a style="text-decoration:none;" title="Check out some of our other plugins" alt="WPGO Plugins Site" href="https://wpgoplugins.com/" target="_blank">wpgoplugins.com</a></div>
90
 
91
  <div style="clear:both;"></div>
92
 
classes/shortcodes/simple-sitemap-shortcode.php CHANGED
@@ -28,6 +28,7 @@ class WPGO_Simple_Sitemap_Shortcode {
28
  'show_excerpt' => 'false',
29
  'show_label' => 'true',
30
  'links' => 'true',
 
31
 
32
  // following attributes don't have block support yet
33
  'title_tag' => '',
@@ -84,6 +85,7 @@ class WPGO_Simple_Sitemap_Shortcode {
84
  $args['horizontal_separator'] = ', ';
85
  $args['num_posts'] = -1;
86
  $args['separator'] = 'false';
 
87
 
88
  // escape tag names
89
  $args['container_tag'] = tag_escape( $args['container_tag'] );
28
  'show_excerpt' => 'false',
29
  'show_label' => 'true',
30
  'links' => 'true',
31
+ 'page_excerpt_length' => '',
32
 
33
  // following attributes don't have block support yet
34
  'title_tag' => '',
85
  $args['horizontal_separator'] = ', ';
86
  $args['num_posts'] = -1;
87
  $args['separator'] = 'false';
88
+ $args['page_excerpt_length'] = '25';
89
 
90
  // escape tag names
91
  $args['container_tag'] = tag_escape( $args['container_tag'] );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dgwyer, wpgoplugins
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FBAG4ZHA4TTUC
4
  Tags: seo sitemap, html, sitemap, html sitemap, seo, global, sort, shortcode, pages, posts, custom post types, post types, responsive, responsive sitemap
5
  Requires at least: 5.0
6
- Tested up to: 5.2
7
- Stable tag: 3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,7 +18,7 @@ There's no need to use confusing and complicated shortcodes anymore. Constant sw
18
 
19
  Simple Sitemap helps improve your SEO ranking by automatically generating an HTML sitemap of your content. Add a full sitemap literally in seconds. No coding or setup required. Works straight out of the box and includes plenty of flexible customization options.
20
 
21
- The latest version (3.1) now also includes a responsive tabbed layout option that looks fantastic. We're super excited to share this with you.
22
 
23
  = KEEPS ON GETTING BETTER =
24
 
@@ -159,6 +159,16 @@ No. This plugin is for generating an HTML sitemap only.
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
 
 
 
 
162
  = 3.2 - July 12, 2019 =
163
 
164
  * Some minor bug fixes and improvements.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FBAG4ZHA4TTUC
4
  Tags: seo sitemap, html, sitemap, html sitemap, seo, global, sort, shortcode, pages, posts, custom post types, post types, responsive, responsive sitemap
5
  Requires at least: 5.0
6
+ Tested up to: 5.2.2
7
+ Stable tag: 3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  Simple Sitemap helps improve your SEO ranking by automatically generating an HTML sitemap of your content. Add a full sitemap literally in seconds. No coding or setup required. Works straight out of the box and includes plenty of flexible customization options.
20
 
21
+ The latest version now also includes a responsive tabbed layout option that looks fantastic. We're super excited to share this with you.
22
 
23
  = KEEPS ON GETTING BETTER =
24
 
159
 
160
  == Changelog ==
161
 
162
+ = 3.4 - August 10, 2019 =
163
+
164
+ * FIX: Undefined index 'page_excerpt_length'.
165
+
166
+ = 3.3 - July 22, 2019 =
167
+
168
+ * NEW: Added details to plugin settings page about a recent update that included breaking changes.
169
+ * Fix: Page depth setting not saving.
170
+ * Fix: Plugin settings heading styles broken because of EDD license renewal nag notice.
171
+
172
  = 3.2 - July 12, 2019 =
173
 
174
  * Some minor bug fixes and improvements.
shared/class-wpgo-walker-page.php CHANGED
@@ -113,7 +113,7 @@ class WPGO_Walker_Page extends Walker {
113
  $title_text = WPGO_Simple_Sitemap_Hooks::simple_sitemap_title_text($page->post_title, $page->ID);
114
 
115
  $permalink = get_permalink($page->ID);
116
- $excerpt_text = wp_trim_words( strip_shortcodes( $page->post_content ), 55 );
117
  $title = WPGO_Shortcode_Utility::get_the_title( $title_text, $permalink, $args, $parent_page, $tmp['chk_parent_page_link'] );
118
  $title = WPGO_Simple_Sitemap_Hooks::simple_sitemap_title_link_text($title, $page->ID);
119
 
113
  $title_text = WPGO_Simple_Sitemap_Hooks::simple_sitemap_title_text($page->post_title, $page->ID);
114
 
115
  $permalink = get_permalink($page->ID);
116
+ $excerpt_text = wp_trim_words( strip_shortcodes( $page->post_content ), $args['page_excerpt_length'] );
117
  $title = WPGO_Shortcode_Utility::get_the_title( $title_text, $permalink, $args, $parent_page, $tmp['chk_parent_page_link'] );
118
  $title = WPGO_Simple_Sitemap_Hooks::simple_sitemap_title_link_text($title, $page->ID);
119
 
shared/links.php CHANGED
@@ -51,7 +51,8 @@ class WPGO_Simple_Sitemap_Links {
51
  //}
52
 
53
  if ( $file == 'simple-sitemap/simple-sitemap.php') {
54
- $pccf_links = '<a href="https://wpgoplugins.com/plugins/simple-sitemap-pro/" target="_blank" title="More sitemap features"><b>More features</b></a>';
 
55
  array_push( $links, $pccf_links );
56
  }
57
 
51
  //}
52
 
53
  if ( $file == 'simple-sitemap/simple-sitemap.php') {
54
+ $freemius_upgrade_url = admin_url() . "admin.php?page=simple-sitemap-menu-pricing";
55
+ $pccf_links = '<a href="' . $freemius_upgrade_url . '" title="More sitemap features"><b>More features</b></a>';
56
  array_push( $links, $pccf_links );
57
  }
58
 
shared/rest-api-endpoints.php CHANGED
@@ -47,6 +47,30 @@ class WPGO_Custom_Sitemap_Endpoints {
47
  );
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Get taxonomies for specific post type
52
  *
@@ -75,29 +99,5 @@ class WPGO_Custom_Sitemap_Endpoints {
75
 
76
  return $taxonomies;
77
  }
78
-
79
- /**
80
- * Get public post types
81
- *
82
- */
83
- public function get_post_types() {
84
-
85
- $post_type_args = array(
86
- 'public' => true
87
- );
88
- $registered_post_types = get_post_types($post_type_args);
89
-
90
- // remove 'attachment' (media) from list of post types
91
- if( in_array('attachment', $registered_post_types) ) {
92
- unset($registered_post_types['attachment']);
93
- }
94
-
95
- $sitemap_post_types = array();
96
- foreach( $registered_post_types as $key => $value ) {
97
- $sitemap_post_types[$key] = get_post_type_object( $key )->label;
98
- }
99
-
100
- return $sitemap_post_types;
101
- }
102
 
103
  } /* End class definition */
47
  );
48
  }
49
 
50
+ /**
51
+ * Get public post types
52
+ *
53
+ */
54
+ public function get_post_types() {
55
+
56
+ $post_type_args = array(
57
+ 'public' => true
58
+ );
59
+ $registered_post_types = get_post_types($post_type_args);
60
+
61
+ // remove 'attachment' (media) from list of post types
62
+ if( in_array('attachment', $registered_post_types) ) {
63
+ unset($registered_post_types['attachment']);
64
+ }
65
+
66
+ $sitemap_post_types = array();
67
+ foreach( $registered_post_types as $key => $value ) {
68
+ $sitemap_post_types[$key] = get_post_type_object( $key )->label;
69
+ }
70
+
71
+ return $sitemap_post_types;
72
+ }
73
+
74
  /**
75
  * Get taxonomies for specific post type
76
  *
99
 
100
  return $taxonomies;
101
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  } /* End class definition */
simple-sitemap.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Simple Sitemap
5
  Plugin URI: http://wordpress.org/plugins/simple-sitemap/
6
  Description: HTML sitemap to display content as a single linked list of posts, pages, or custom post types. You can even display posts in groups sorted by taxonomy!
7
- Version: 3.2
8
  Author: David Gwyer
9
  Author URI: http://www.wpgoplugins.com
10
  Text Domain: simple-sitemap
@@ -78,6 +78,7 @@ if ( function_exists( 'ss_fs' ) ) {
78
  $this->module_roots = $module_roots;
79
  $this->bootstrap();
80
  // Add custom block category
 
81
  add_filter(
82
  'block_categories',
83
  function ( $categories, $post ) {
4
  Plugin Name: Simple Sitemap
5
  Plugin URI: http://wordpress.org/plugins/simple-sitemap/
6
  Description: HTML sitemap to display content as a single linked list of posts, pages, or custom post types. You can even display posts in groups sorted by taxonomy!
7
+ Version: 3.4
8
  Author: David Gwyer
9
  Author URI: http://www.wpgoplugins.com
10
  Text Domain: simple-sitemap
78
  $this->module_roots = $module_roots;
79
  $this->bootstrap();
80
  // Add custom block category
81
+ // @todo move to another location
82
  add_filter(
83
  'block_categories',
84
  function ( $categories, $post ) {