XML Sitemap & Google News feeds - Version 5.1.2

Version Description

  • FIX: admin notice dismiss button failing
  • FIX: date archive redirect notice showing for inactive post types
  • Plugin support and rate links on plugins page
Download this release

Release Info

Developer RavanH
Plugin Icon 128x128 XML Sitemap & Google News feeds
Version 5.1.2
Comparing to
See all releases

Code changes from version 5.1.1 to 5.1.2

.gitignore DELETED
@@ -1 +0,0 @@
1
- .vscode
 
README.md DELETED
@@ -1,6 +0,0 @@
1
- # XML Sitemap & Google News feeds
2
-
3
- XML and Google News Sitemaps for WordPress to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
4
-
5
- [https://wordpress.org/plugins/xml-sitemap-feed/](https://wordpress.org/plugins/xml-sitemap-feed/)
6
-
 
 
 
 
 
 
controllers/admin/main.php CHANGED
@@ -41,6 +41,7 @@ class XMLSF_Admin_Controller
41
 
42
  // ACTION LINK
43
  add_filter( 'plugin_action_links_' . XMLSF_BASENAME, 'xmlsf_add_action_link' );
 
44
 
45
  add_action( 'admin_init', array( $this, 'notices_actions' ) );
46
  add_action( 'admin_init', array( $this, 'transients_actions' ) );
41
 
42
  // ACTION LINK
43
  add_filter( 'plugin_action_links_' . XMLSF_BASENAME, 'xmlsf_add_action_link' );
44
+ add_filter( 'plugin_row_meta', 'xmlsf_plugin_meta_links', 10, 2);
45
 
46
  add_action( 'admin_init', array( $this, 'notices_actions' ) );
47
  add_action( 'admin_init', array( $this, 'transients_actions' ) );
controllers/admin/sitemap.php CHANGED
@@ -19,7 +19,7 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin_Controller
19
  {
20
  add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
21
  add_action( 'admin_init', array( $this, 'tools_actions' ) );
22
- add_action( 'admin_init', array( $this, 'check_plugin_conflicts' ) );
23
  add_action( 'admin_init', array( $this, 'register_settings' ) );
24
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
25
  add_action( 'save_post', array( $this, 'save_metadata' ) );
@@ -85,7 +85,7 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin_Controller
85
  if ( !empty( $wpseo_titles['disable-date'] ) ) {
86
  // check if Split by option is set anywhere
87
  foreach ( (array) get_option( 'xmlsf_post_types', array() ) as $type => $settings ) {
88
- if ( is_array( $settings ) && !empty( $settings['archive'] ) ) {
89
  add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_wpseo_date_redirect' ) );
90
  break;
91
  }
@@ -112,7 +112,7 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin_Controller
112
  if ( ! empty( $seopress_toggle['toggle-titles'] ) && ! empty( $seopress_titles['seopress_titles_archives_date_disable'] ) ) {
113
  // check if Split by option is set anywhere
114
  foreach ( (array) get_option( 'xmlsf_post_types', array() ) as $type => $settings ) {
115
- if ( is_array( $settings ) && !empty( $settings['archive'] ) ) {
116
  add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_seopress_date_redirect' ) );
117
  break;
118
  }
19
  {
20
  add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
21
  add_action( 'admin_init', array( $this, 'tools_actions' ) );
22
+ add_action( 'admin_init', array( $this, 'check_plugin_conflicts' ), 11 );
23
  add_action( 'admin_init', array( $this, 'register_settings' ) );
24
  add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
25
  add_action( 'save_post', array( $this, 'save_metadata' ) );
85
  if ( !empty( $wpseo_titles['disable-date'] ) ) {
86
  // check if Split by option is set anywhere
87
  foreach ( (array) get_option( 'xmlsf_post_types', array() ) as $type => $settings ) {
88
+ if ( !empty( $settings['active'] ) && !empty( $settings['archive'] ) ) {
89
  add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_wpseo_date_redirect' ) );
90
  break;
91
  }
112
  if ( ! empty( $seopress_toggle['toggle-titles'] ) && ! empty( $seopress_titles['seopress_titles_archives_date_disable'] ) ) {
113
  // check if Split by option is set anywhere
114
  foreach ( (array) get_option( 'xmlsf_post_types', array() ) as $type => $settings ) {
115
+ if ( !empty( $settings['active'] ) && !empty( $settings['archive'] ) ) {
116
  add_action( 'admin_notices', array( 'XMLSF_Admin_Notices', 'notice_seopress_date_redirect' ) );
117
  break;
118
  }
models/admin/main.php CHANGED
@@ -8,6 +8,20 @@ function xmlsf_add_action_link( $links ) {
8
  return $links;
9
  }
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  class XMLSF_Admin_Sanitize
12
  {
13
 
8
  return $links;
9
  }
10
 
11
+ function xmlsf_plugin_meta_links( $links, $file ) {
12
+ $support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/xml-sitemap-feed/">' . __('Support','xml-sitemap-feed') . '</a>';
13
+ $rate_link = '<a target="_blank" href="https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/?filter=5#new-post">' . __('Rate ★★★★★','xml-sitemap-feed') . '</a>';
14
+
15
+ if ( $file == XMLSF_BASENAME ) {
16
+ $links[] = $support_link;
17
+ $links[] = $rate_link;
18
+ }
19
+
20
+ return $links;
21
+ }
22
+
23
+ // sanitization
24
+
25
  class XMLSF_Admin_Sanitize
26
  {
27
 
models/main.php CHANGED
@@ -20,7 +20,7 @@ function xmlsf_filter_request( $request ) {
20
  xmlsf()->is_sitemap = true;
21
 
22
  // REPSONSE HEADERS filtering
23
- add_filter( 'wp_headers', 'xmlsf_headers');
24
 
25
  // modify request parameters
26
  $request['post_status'] = 'publish';
20
  xmlsf()->is_sitemap = true;
21
 
22
  // REPSONSE HEADERS filtering
23
+ add_filter( 'wp_headers', 'xmlsf_headers' );
24
 
25
  // modify request parameters
26
  $request['post_status'] = 'publish';
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: sitemap, xml sitemap, news sitemap, sitemap.xml, robots.txt, Google, Googl
5
  Requires at least: 4.4
6
  Requires PHP: 5.4
7
  Tested up to: 5.1
8
- Stable tag: 5.1.1
9
 
10
  XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
11
 
@@ -124,7 +124,7 @@ Installed alongside [WordPress MU Sitewide Tags Pages](http://wordpress.org/plug
124
 
125
  = Uninstallation =
126
 
127
- Upon uninstalling the plugin from the Admin > Plugins page, most plugins options will be cleared from the database. Only specific per post settings like post priority or explude option, and taxonomy term lastmod dates will remain dormant in the database. See notes in the uninstall.php file.
128
 
129
  On multisite, the uninstall.php *can* loop through all sites in the network to perform the uninstalltion process for each site. However, this does not scale for large networks so it *only* does a per-site uninstallation when `define('XMLSF_MULTISITE_UNINSTALL', true);` is explicitly set in wp-config.php.
130
 
@@ -289,14 +289,24 @@ Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3+ both
289
 
290
  == Upgrade Notice ==
291
 
292
- = 5.1.1 =
293
 
294
- Bugfix release: options page and news pings.
295
 
296
 
297
  == Changelog ==
298
 
 
 
 
 
 
 
 
 
299
  = 5.1.2 =
 
 
300
  * Plugin support and rate links on plugins page
301
 
302
  = 5.1.1 =
5
  Requires at least: 4.4
6
  Requires PHP: 5.4
7
  Tested up to: 5.1
8
+ Stable tag: 5.1.2
9
 
10
  XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
11
 
124
 
125
  = Uninstallation =
126
 
127
+ Upon uninstalling the plugin from the Admin > Plugins page, plugin options and meta data will be cleared from the database. See notes in the uninstall.php file.
128
 
129
  On multisite, the uninstall.php *can* loop through all sites in the network to perform the uninstalltion process for each site. However, this does not scale for large networks so it *only* does a per-site uninstallation when `define('XMLSF_MULTISITE_UNINSTALL', true);` is explicitly set in wp-config.php.
130
 
289
 
290
  == Upgrade Notice ==
291
 
292
+ = 5.2 =
293
 
294
+ Major query reduction and speed improvements. Some bugfixes.
295
 
296
 
297
  == Changelog ==
298
 
299
+ = 5.2 =
300
+ * Image query optimization and meta caching
301
+ * Last comment date meta caching
302
+ * Lastmod and publication dates in local time
303
+ * Removed ignored image tag from news sitemap
304
+ * FIX: possible division by zero
305
+ * FIX: update_term_modified_meta
306
+
307
  = 5.1.2 =
308
+ * FIX: admin notice dismiss button failing
309
+ * FIX: date archive redirect notice showing for inactive post types
310
  * Plugin support and rate links on plugins page
311
 
312
  = 5.1.1 =
views/admin/help-tab-support.php CHANGED
@@ -8,7 +8,7 @@
8
  <?php printf (
9
  /* translators: Review page URL and Translation page URL on WordPress.org */
10
  __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
11
- 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
12
  ); ?>
13
  <?php printf (
14
  /* translators: Github project URL */
8
  <?php printf (
9
  /* translators: Review page URL and Translation page URL on WordPress.org */
10
  __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
11
+ 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/?filter=5#new-post', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
12
  ); ?>
13
  <?php printf (
14
  /* translators: Github project URL */
views/admin/sidebar-contribute.php CHANGED
@@ -7,7 +7,7 @@
7
  <?php printf (
8
  /* translators: Review page URL and Translation page URL on WordPress.org */
9
  __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
10
- 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
11
  ); ?>
12
  </p>
13
  <p>
7
  <?php printf (
8
  /* translators: Review page URL and Translation page URL on WordPress.org */
9
  __( 'If you would like to contribute and share with the rest of the WordPress community, please consider writing a quick <a href="%1$s" target="_blank">Review</a> or help out with <a href="%2$s" target="_blank">Translating</a>!', 'xml-sitemap-feed' ),
10
+ 'https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/?filter=5#new-post', 'https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed'
11
  ); ?>
12
  </p>
13
  <p>
xml-sitemap.php CHANGED
@@ -3,14 +3,15 @@
3
  Plugin Name: XML Sitemap & Google News
4
  Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
5
  Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. Happy with the results? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed">tip</a></strong> for continued development and support. Thanks :)
 
6
  Text Domain: xml-sitemap-feed
7
- Version: 5.1.1
8
  Requires PHP: 5.4
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
12
 
13
- define( 'XMLSF_VERSION', '5.1.1' );
14
 
15
  /* Copyright 2019 RavanH
16
  http://status301.net/
3
  Plugin Name: XML Sitemap & Google News
4
  Plugin URI: http://status301.net/wordpress-plugins/xml-sitemap-feed/
5
  Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. Happy with the results? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed">tip</a></strong> for continued development and support. Thanks :)
6
+ Version: 5.1.2
7
  Text Domain: xml-sitemap-feed
8
+ Requires at least: 4.6
9
  Requires PHP: 5.4
10
  Author: RavanH
11
  Author URI: http://status301.net/
12
  */
13
 
14
+ define( 'XMLSF_VERSION', '5.1.2' );
15
 
16
  /* Copyright 2019 RavanH
17
  http://status301.net/