Version Description
Bugfix release.
=
Download this release
Release Info
Developer | RavanH |
Plugin | XML Sitemap & Google News feeds |
Version | 5.2.3 |
Comparing to | |
See all releases |
Code changes from version 5.2.2 to 5.2.3
- controllers/class.xmlsf-admin-sitemap.php +10 -3
- controllers/class.xmlsf-sitemap-news.php +3 -2
- controllers/class.xmlsf-sitemap.php +1 -1
- models/class-xmlsitemapfeed.php +0 -0
- models/class.xmlsf-admin-sitemap-sanitize.php +4 -5
- models/functions.sitemap.php +2 -2
- readme.txt +7 -2
- uninstall.php +0 -0
- views/_generator.php +0 -0
- views/_usage.php +0 -0
- views/admin/field-news-categories.php +0 -0
- views/admin/field-news-labels.php +0 -0
- views/admin/field-news-name.php +0 -0
- views/admin/field-news-post-type.php +0 -0
- views/admin/field-ping.php +0 -0
- views/admin/field-robots.php +0 -0
- views/admin/field-sitemap-custom.php +0 -0
- views/admin/field-sitemap-domains.php +0 -0
- views/admin/field-sitemap-post-type.php +0 -0
- views/admin/field-sitemap-taxonomies.php +0 -0
- views/admin/field-sitemap-taxonomy-settings.php +0 -0
- views/admin/field-sitemap-urls.php +0 -0
- views/admin/field-sitemaps.php +0 -0
- views/admin/help-tab-advanced.php +0 -0
- views/admin/help-tab-allowed-domains.php +0 -0
- views/admin/help-tab-news-categories.php +0 -0
- views/admin/help-tab-news-labels.php +0 -0
- views/admin/help-tab-news-name.php +0 -0
- views/admin/help-tab-news-sidebar.php +0 -0
- views/admin/help-tab-news.php +0 -0
- views/admin/help-tab-ping.php +0 -0
- views/admin/help-tab-post-types.php +0 -0
- views/admin/help-tab-robots.php +0 -0
- views/admin/help-tab-sidebar.php +0 -0
- views/admin/help-tab-sitemaps.php +0 -0
- views/admin/help-tab-support.php +0 -0
- views/admin/help-tab-taxonomies.php +0 -0
- views/admin/meta-box-news.php +4 -4
- views/admin/meta-box.php +1 -1
- views/admin/notice-seopress-date-redirect.php +0 -0
- views/admin/notice-seopress-sitemap.php +0 -0
- views/admin/notice-static-files.php +0 -0
- views/admin/notice-wpseo-date-redirect.php +0 -0
- views/admin/notice-wpseo-sitemap.php +0 -0
- views/admin/page-sitemap-news.php +0 -0
- views/admin/page-sitemap.php +0 -0
- views/admin/sidebar-contribute.php +0 -0
- views/admin/sidebar-help.php +0 -0
- views/feed-sitemap-custom.php +0 -0
- views/feed-sitemap-home.php +0 -0
- views/feed-sitemap-news.php +0 -0
- views/feed-sitemap-post_type.php +0 -0
- views/feed-sitemap-taxonomy.php +0 -0
- views/feed-sitemap.php +0 -0
- xml-sitemap.php +2 -2
controllers/class.xmlsf-admin-sitemap.php
CHANGED
@@ -159,6 +159,13 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin
|
|
159 |
$priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
|
160 |
$disabled = false;
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
// disable options and (visibly) set excluded to true for private posts
|
163 |
if ( 'private' == $post->post_status ) {
|
164 |
$disabled = true;
|
@@ -193,7 +200,7 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin
|
|
193 |
) return;
|
194 |
|
195 |
// _xmlsf_priority
|
196 |
-
if ( empty($_POST['xmlsf_priority']) )
|
197 |
delete_post_meta($post_id, '_xmlsf_priority');
|
198 |
else
|
199 |
update_post_meta($post_id, '_xmlsf_priority', xmlsf_sanitize_priority( $_POST['xmlsf_priority'] ) );
|
@@ -255,8 +262,8 @@ class XMLSF_Admin_Sitemap extends XMLSF_Admin
|
|
255 |
// taxonomies
|
256 |
add_settings_section( 'xml_sitemap_taxonomies_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_taxonomies' );
|
257 |
add_settings_field( 'xmlsf_taxonomy_settings', translate('General'), array($this,'taxonomy_settings_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
|
258 |
-
|
259 |
-
if ( apply_filters( 'xmlsf_taxonomies', ! empty(
|
260 |
add_settings_field( 'xmlsf_taxonomies', __('Taxonomies','xml-sitemap-feed'), array($this,'taxonomies_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
|
261 |
|
262 |
add_settings_section( 'xml_sitemap_advanced_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_advanced' );
|
159 |
$priority = get_post_meta( $post->ID, '_xmlsf_priority', true );
|
160 |
$disabled = false;
|
161 |
|
162 |
+
// priority value precheck to prevent "invalid form control not focusable" when meta box is hidden
|
163 |
+
if ( !empty($priority) && is_numeric($priority) ) {
|
164 |
+
$priority = xmlsf_sanitize_priority( $priority );
|
165 |
+
} else {
|
166 |
+
$priority = '';
|
167 |
+
}
|
168 |
+
|
169 |
// disable options and (visibly) set excluded to true for private posts
|
170 |
if ( 'private' == $post->post_status ) {
|
171 |
$disabled = true;
|
200 |
) return;
|
201 |
|
202 |
// _xmlsf_priority
|
203 |
+
if ( empty($_POST['xmlsf_priority']) || ! is_numeric($_POST['xmlsf_priority']) )
|
204 |
delete_post_meta($post_id, '_xmlsf_priority');
|
205 |
else
|
206 |
update_post_meta($post_id, '_xmlsf_priority', xmlsf_sanitize_priority( $_POST['xmlsf_priority'] ) );
|
262 |
// taxonomies
|
263 |
add_settings_section( 'xml_sitemap_taxonomies_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_taxonomies' );
|
264 |
add_settings_field( 'xmlsf_taxonomy_settings', translate('General'), array($this,'taxonomy_settings_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
|
265 |
+
$taxonomies = get_option( 'xmlsf_taxonomies' );
|
266 |
+
if ( apply_filters( 'xmlsf_taxonomies', ! empty( $taxonomies ) ) )
|
267 |
add_settings_field( 'xmlsf_taxonomies', __('Taxonomies','xml-sitemap-feed'), array($this,'taxonomies_field'), 'xmlsf_taxonomies', 'xml_sitemap_taxonomies_section' );
|
268 |
|
269 |
add_settings_section( 'xml_sitemap_advanced_section', /*'<a name="xmlsf"></a>'.__('XML Sitemap','xml-sitemap-feed')*/ '', '', 'xmlsf_advanced' );
|
controllers/class.xmlsf-sitemap-news.php
CHANGED
@@ -54,7 +54,7 @@ class XMLSF_Sitemap_News
|
|
54 |
if ( ! in_array( 'google', (array) get_option( 'xmlsf_ping' ) ) ) return;
|
55 |
|
56 |
// we're saving from post edit screen
|
57 |
-
if ( ! empty( $_POST ) && 'editpost' == $_POST['action'] ) {
|
58 |
// bail out when exclude field is checked
|
59 |
if ( ! empty( $_POST['_xmlsf_news_exclude'] ) ) return;
|
60 |
} else {
|
@@ -70,7 +70,8 @@ class XMLSF_Sitemap_News
|
|
70 |
// are categories limited and is not in correct category?
|
71 |
if ( ! empty( $news_tags['categories'] ) ) {
|
72 |
$cats = wp_get_post_categories( $post->ID, array( 'fields' => 'ids' ) );
|
73 |
-
|
|
|
74 |
}
|
75 |
|
76 |
// PING
|
54 |
if ( ! in_array( 'google', (array) get_option( 'xmlsf_ping' ) ) ) return;
|
55 |
|
56 |
// we're saving from post edit screen
|
57 |
+
if ( ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'editpost' == $_POST['action'] ) {
|
58 |
// bail out when exclude field is checked
|
59 |
if ( ! empty( $_POST['_xmlsf_news_exclude'] ) ) return;
|
60 |
} else {
|
70 |
// are categories limited and is not in correct category?
|
71 |
if ( ! empty( $news_tags['categories'] ) ) {
|
72 |
$cats = wp_get_post_categories( $post->ID, array( 'fields' => 'ids' ) );
|
73 |
+
$intersect = array_intersect( (array) $cats, (array) $news_tags['categories'] );
|
74 |
+
if ( empty( $intersect ) ) return;
|
75 |
}
|
76 |
|
77 |
// PING
|
controllers/class.xmlsf-sitemap.php
CHANGED
@@ -85,7 +85,7 @@ class XMLSF_Sitemap
|
|
85 |
if ( ! array_key_exists( $post->post_type, (array) $this->post_types ) ) return;
|
86 |
|
87 |
// we're saving from post edit screen (f.e. 'inline-save' would be from quick edit)
|
88 |
-
if ( ! empty( $_POST ) && 'editpost' == $_POST['action'] ) {
|
89 |
// bail out when exclude field is checked
|
90 |
if ( ! empty( $_POST['_xmlsf_exclude'] ) ) return;
|
91 |
} else {
|
85 |
if ( ! array_key_exists( $post->post_type, (array) $this->post_types ) ) return;
|
86 |
|
87 |
// we're saving from post edit screen (f.e. 'inline-save' would be from quick edit)
|
88 |
+
if ( ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'editpost' == $_POST['action'] ) {
|
89 |
// bail out when exclude field is checked
|
90 |
if ( ! empty( $_POST['_xmlsf_exclude'] ) ) return;
|
91 |
} else {
|
models/class-xmlsitemapfeed.php
CHANGED
File without changes
|
models/class.xmlsf-admin-sitemap-sanitize.php
CHANGED
@@ -4,11 +4,10 @@ class XMLSF_Admin_Sitemap_Sanitize
|
|
4 |
{
|
5 |
public static function taxonomies( $new )
|
6 |
{
|
7 |
-
$old =
|
8 |
-
if (
|
9 |
-
|
10 |
-
|
11 |
-
) {
|
12 |
global $wpdb;
|
13 |
$wpdb->delete( $wpdb->prefix.'termmeta', array( 'meta_key' => 'term_modified' ) );
|
14 |
}
|
4 |
{
|
5 |
public static function taxonomies( $new )
|
6 |
{
|
7 |
+
$old = get_option( 'xmlsf_taxonomies' );
|
8 |
+
if ( empty( $old ) ) $old = array();
|
9 |
+
$diff = array_diff( (array) $old, (array) $new );
|
10 |
+
if ( ! empty( $diff ) ) {
|
|
|
11 |
global $wpdb;
|
12 |
$wpdb->delete( $wpdb->prefix.'termmeta', array( 'meta_key' => 'term_modified' ) );
|
13 |
}
|
models/functions.sitemap.php
CHANGED
@@ -55,7 +55,7 @@ function xmlsf_get_archives( $post_type = 'post', $type = '' ) {
|
|
55 |
|
56 |
if ( 'monthly' == $type ) :
|
57 |
|
58 |
-
$query = "SELECT YEAR(post_date) as `year`, LPAD(MONTH(post_date),2,'0') as `month`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY
|
59 |
$arcresults = xmlsf_cache_get_archives( $query );
|
60 |
|
61 |
foreach ( (array) $arcresults as $arcresult ) {
|
@@ -64,7 +64,7 @@ function xmlsf_get_archives( $post_type = 'post', $type = '' ) {
|
|
64 |
|
65 |
elseif ( 'yearly' == $type ) :
|
66 |
|
67 |
-
$query = "SELECT YEAR(post_date) as `year`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY
|
68 |
$arcresults = xmlsf_cache_get_archives( $query );
|
69 |
|
70 |
foreach ( (array) $arcresults as $arcresult ) {
|
55 |
|
56 |
if ( 'monthly' == $type ) :
|
57 |
|
58 |
+
$query = "SELECT YEAR(post_date) as `year`, LPAD(MONTH(post_date),2,'0') as `month`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date), LPAD(MONTH(post_date),2,'0') ORDER BY `year` DESC, `month` DESC";
|
59 |
$arcresults = xmlsf_cache_get_archives( $query );
|
60 |
|
61 |
foreach ( (array) $arcresults as $arcresult ) {
|
64 |
|
65 |
elseif ( 'yearly' == $type ) :
|
66 |
|
67 |
+
$query = "SELECT YEAR(post_date) as `year`, count(ID) as posts FROM {$wpdb->posts} WHERE post_type = '{$post_type}' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY `year` DESC";
|
68 |
$arcresults = xmlsf_cache_get_archives( $query );
|
69 |
|
70 |
foreach ( (array) $arcresults as $arcresult ) {
|
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.2
|
8 |
-
Stable tag: 5.2.
|
9 |
|
10 |
XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
|
11 |
|
@@ -291,13 +291,18 @@ Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3+ both
|
|
291 |
|
292 |
== Upgrade Notice ==
|
293 |
|
294 |
-
= 5.2.
|
295 |
|
296 |
Bugfix release.
|
297 |
|
298 |
|
299 |
== Changelog ==
|
300 |
|
|
|
|
|
|
|
|
|
|
|
301 |
= 5.2.2 =
|
302 |
* FIX invalid date format on some PHP versions
|
303 |
* FIX Can't use function return value in write context
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.4
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 5.2.3
|
9 |
|
10 |
XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.
|
11 |
|
291 |
|
292 |
== Upgrade Notice ==
|
293 |
|
294 |
+
= 5.2.3 =
|
295 |
|
296 |
Bugfix release.
|
297 |
|
298 |
|
299 |
== Changelog ==
|
300 |
|
301 |
+
= 5.2.3 =
|
302 |
+
* FIX Cannot use return value in write context
|
303 |
+
* FIX issue #30 for sql_mode=ONLY_FULL_GROUP_BY, thanks @silvios
|
304 |
+
* FIX invalid form control not focusable when meta box is hidden
|
305 |
+
|
306 |
= 5.2.2 =
|
307 |
* FIX invalid date format on some PHP versions
|
308 |
* FIX Can't use function return value in write context
|
uninstall.php
CHANGED
File without changes
|
views/_generator.php
CHANGED
File without changes
|
views/_usage.php
CHANGED
File without changes
|
views/admin/field-news-categories.php
CHANGED
File without changes
|
views/admin/field-news-labels.php
CHANGED
File without changes
|
views/admin/field-news-name.php
CHANGED
File without changes
|
views/admin/field-news-post-type.php
CHANGED
File without changes
|
views/admin/field-ping.php
CHANGED
File without changes
|
views/admin/field-robots.php
CHANGED
File without changes
|
views/admin/field-sitemap-custom.php
CHANGED
File without changes
|
views/admin/field-sitemap-domains.php
CHANGED
File without changes
|
views/admin/field-sitemap-post-type.php
CHANGED
File without changes
|
views/admin/field-sitemap-taxonomies.php
CHANGED
File without changes
|
views/admin/field-sitemap-taxonomy-settings.php
CHANGED
File without changes
|
views/admin/field-sitemap-urls.php
CHANGED
File without changes
|
views/admin/field-sitemaps.php
CHANGED
File without changes
|
views/admin/help-tab-advanced.php
CHANGED
File without changes
|
views/admin/help-tab-allowed-domains.php
CHANGED
File without changes
|
views/admin/help-tab-news-categories.php
CHANGED
File without changes
|
views/admin/help-tab-news-labels.php
CHANGED
File without changes
|
views/admin/help-tab-news-name.php
CHANGED
File without changes
|
views/admin/help-tab-news-sidebar.php
CHANGED
File without changes
|
views/admin/help-tab-news.php
CHANGED
File without changes
|
views/admin/help-tab-ping.php
CHANGED
File without changes
|
views/admin/help-tab-post-types.php
CHANGED
File without changes
|
views/admin/help-tab-robots.php
CHANGED
File without changes
|
views/admin/help-tab-sidebar.php
CHANGED
File without changes
|
views/admin/help-tab-sitemaps.php
CHANGED
File without changes
|
views/admin/help-tab-support.php
CHANGED
File without changes
|
views/admin/help-tab-taxonomies.php
CHANGED
File without changes
|
views/admin/meta-box-news.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<p>
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
</p>
|
1 |
<p>
|
2 |
+
<label>
|
3 |
+
<input type="checkbox" name="xmlsf_news_exclude" id="xmlsf_news_exclude" value="1"<?php checked( !empty($exclude) ); disabled( $disabled ); ?> />
|
4 |
+
<?php _e('Exclude from Google News Sitemap','xml-sitemap-feed'); ?>
|
5 |
+
</label>
|
6 |
</p>
|
views/admin/meta-box.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<p>
|
2 |
<label>
|
3 |
<?php _e('Priority','xml-sitemap-feed'); ?>
|
4 |
-
|
5 |
</label>
|
6 |
<span class="description">
|
7 |
<?php printf(
|
1 |
<p>
|
2 |
<label>
|
3 |
<?php _e('Priority','xml-sitemap-feed'); ?>
|
4 |
+
<input type="number" step="0.1" min="0.1" max="1" name="xmlsf_priority" id="xmlsf_priority" value="<?php echo $priority; ?>" class="small-text"<?php disabled( $disabled )?> />
|
5 |
</label>
|
6 |
<span class="description">
|
7 |
<?php printf(
|
views/admin/notice-seopress-date-redirect.php
CHANGED
File without changes
|
views/admin/notice-seopress-sitemap.php
CHANGED
File without changes
|
views/admin/notice-static-files.php
CHANGED
File without changes
|
views/admin/notice-wpseo-date-redirect.php
CHANGED
File without changes
|
views/admin/notice-wpseo-sitemap.php
CHANGED
File without changes
|
views/admin/page-sitemap-news.php
CHANGED
File without changes
|
views/admin/page-sitemap.php
CHANGED
File without changes
|
views/admin/sidebar-contribute.php
CHANGED
File without changes
|
views/admin/sidebar-help.php
CHANGED
File without changes
|
views/feed-sitemap-custom.php
CHANGED
File without changes
|
views/feed-sitemap-home.php
CHANGED
File without changes
|
views/feed-sitemap-news.php
CHANGED
File without changes
|
views/feed-sitemap-post_type.php
CHANGED
File without changes
|
views/feed-sitemap-taxonomy.php
CHANGED
File without changes
|
views/feed-sitemap.php
CHANGED
File without changes
|
xml-sitemap.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.2.
|
7 |
Text Domain: xml-sitemap-feed
|
8 |
Requires at least: 4.6
|
9 |
Requires PHP: 5.4
|
@@ -11,7 +11,7 @@ Author: RavanH
|
|
11 |
Author URI: http://status301.net/
|
12 |
*/
|
13 |
|
14 |
-
define( 'XMLSF_VERSION', '5.2.
|
15 |
|
16 |
/* Copyright 2019 RavanH
|
17 |
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.2.3
|
7 |
Text Domain: xml-sitemap-feed
|
8 |
Requires at least: 4.6
|
9 |
Requires PHP: 5.4
|
11 |
Author URI: http://status301.net/
|
12 |
*/
|
13 |
|
14 |
+
define( 'XMLSF_VERSION', '5.2.3' );
|
15 |
|
16 |
/* Copyright 2019 RavanH
|
17 |
http://status301.net/
|