Version Description
Download this release
Release Info
Developer | auctollo |
Plugin | Google XML Sitemaps |
Version | 4.1.6 |
Comparing to | |
See all releases |
Code changes from version 4.1.5 to 4.1.6
- class-googlesitemapgeneratorloader.php +4 -1
- class-googlesitemapgeneratorstandardbuilder.php +30 -14
- class-googlesitemapgeneratorstatus.php +0 -0
- class-googlesitemapgeneratorui.php +14 -28
- documentation.txt +4 -3
- google-sitemap-generator-prio-provider-base.php +0 -0
- img/icon-amazon.gif +0 -0
- img/icon-arne.gif +0 -0
- img/icon-bing.gif +0 -0
- img/icon-donate.gif +0 -0
- img/icon-email.gif +0 -0
- img/icon-google.gif +0 -0
- img/icon-help.png +0 -0
- img/icon-paypal.gif +0 -0
- img/icon-trac.gif +0 -0
- img/icon-wordpress.gif +0 -0
- img/icon-yahoo.gif +0 -0
- img/sitemap.js +0 -0
- lang/sitemap-ar.mo +0 -0
- lang/sitemap-ar.po +0 -0
- lang/sitemap-bg_BG.mo +0 -0
- lang/sitemap-bg_BG.po +0 -0
- lang/sitemap-by_BY.mo +0 -0
- lang/sitemap-by_BY.po +0 -0
- lang/sitemap-cs_CZ.mo +0 -0
- lang/sitemap-cs_CZ.po +0 -0
- lang/sitemap-da_DK.mo +0 -0
- lang/sitemap-da_DK.po +0 -0
- lang/sitemap-de_DE.mo +0 -0
- lang/sitemap-de_DE.po +0 -0
- lang/sitemap-es_ES.mo +0 -0
- lang/sitemap-es_ES.po +0 -0
- lang/sitemap-fi_FI.mo +0 -0
- lang/sitemap-fi_FI.po +0 -0
- lang/sitemap-fr_FR.mo +0 -0
- lang/sitemap-fr_FR.po +0 -0
- lang/sitemap-hi_IN.mo +0 -0
- lang/sitemap-hi_IN.po +0 -0
- lang/sitemap-hu_HU.mo +0 -0
- lang/sitemap-hu_HU.po +0 -0
- lang/sitemap-it_IT.mo +0 -0
- lang/sitemap-it_IT.po +0 -0
- lang/sitemap-ja.mo +0 -0
- lang/sitemap-ja.po +0 -0
- lang/sitemap-ja_EUC.mo +0 -0
- lang/sitemap-ja_EUC.po +0 -0
- lang/sitemap-ja_SJIS.mo +0 -0
- lang/sitemap-ja_SJIS.po +0 -0
- lang/sitemap-ja_UTF.mo +0 -0
- lang/sitemap-ja_UTF.po +0 -0
- lang/sitemap-ko_KR.mo +0 -0
- lang/sitemap-ko_KR.po +0 -0
- lang/sitemap-nl_NL.mo +0 -0
- lang/sitemap-nl_NL.po +0 -0
- lang/sitemap-pl_PL.mo +0 -0
- lang/sitemap-pl_PL.po +0 -0
- lang/sitemap-pt_BR.mo +0 -0
- lang/sitemap-pt_BR.po +0 -0
- lang/sitemap-pt_PT.mo +0 -0
- lang/sitemap-pt_PT.po +0 -0
- lang/sitemap-ru_RU.mo +0 -0
- lang/sitemap-ru_RU.po +0 -0
- lang/sitemap-sl_SI.mo +0 -0
- lang/sitemap-sl_SI.po +0 -0
- lang/sitemap-sr_RS.mo +0 -0
- lang/sitemap-sr_RS.po +0 -0
- lang/sitemap-sv_SE.mo +0 -0
- lang/sitemap-sv_SE.po +0 -0
- lang/sitemap-tr_TR.mo +0 -0
- lang/sitemap-tr_TR.po +0 -0
- lang/sitemap-uk_UA.mo +0 -0
- lang/sitemap-uk_UA.po +0 -0
- lang/sitemap-zh_CN.mo +0 -0
- lang/sitemap-zh_CN.po +0 -0
- lang/sitemap-zh_TW.mo +0 -0
- lang/sitemap-zh_TW.po +0 -0
- lang/sitemap.pot +0 -0
- license.txt +0 -0
- readme.txt +11 -1
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- sitemap-core.php +13 -9
- sitemap-wpmu.php +0 -0
- sitemap.php +2 -2
- sitemap.xsl +6 -6
class-googlesitemapgeneratorloader.php
CHANGED
@@ -185,7 +185,10 @@ class GoogleSitemapGeneratorLoader {
|
|
185 |
* Remove rewrite hooks method
|
186 |
*/
|
187 |
public static function remove_rewrite_hooks() {
|
188 |
-
|
|
|
|
|
|
|
189 |
}
|
190 |
|
191 |
/**
|
185 |
* Remove rewrite hooks method
|
186 |
*/
|
187 |
public static function remove_rewrite_hooks() {
|
188 |
+
$sg = GoogleSitemapGenerator::get_instance();
|
189 |
+
if ( $sg->get_option( 'b_sitemap_name' ) !== $sg->get_option( 'b_old_sm_name' ) ) {
|
190 |
+
add_filter( 'rewrite_rules_array', array( __CLASS__, 'remove_rewrite_rules' ), 1, 1 );
|
191 |
+
}
|
192 |
}
|
193 |
|
194 |
/**
|
class-googlesitemapgeneratorstandardbuilder.php
CHANGED
@@ -76,7 +76,12 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
76 |
$pts = strrpos( $params, '-', $pts - strlen( $params ) - 1 );
|
77 |
|
78 |
$post_type = substr( $params, 0, $pts );
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
80 |
if ( ! $post_type || ! in_array( $post_type, $gsg->get_active_post_types(), true ) ) {
|
81 |
return;
|
82 |
}
|
@@ -137,6 +142,8 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
137 |
{$ex_cat_s_q_l}
|
138 |
ORDER BY
|
139 |
p.post_date_gmt DESC
|
|
|
|
|
140 |
";
|
141 |
// Query for counting all relevant posts for this post type.
|
142 |
$qsc = "
|
@@ -155,6 +162,7 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
155 |
$q = $wpdb->prepare( $qs, $post_type, $year, $month );
|
156 |
// phpcs:enable
|
157 |
$posts = $wpdb->get_results( $q ); // phpcs:ignore
|
|
|
158 |
$post_count = count( $posts );
|
159 |
if ( ( $post_count ) > 0 ) {
|
160 |
/**
|
@@ -290,7 +298,7 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
290 |
FROM
|
291 |
$wpdb->posts
|
292 |
WHERE
|
293 |
-
post_date_gmt < %s
|
294 |
AND post_status = 'publish'
|
295 |
AND post_type = 'post'
|
296 |
GROUP BY
|
@@ -489,6 +497,8 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
489 |
if ( strpos( $taxonomy, '-' ) !== false ) {
|
490 |
$offset = substr( $taxonomy, strrpos( $taxonomy, '-' ) + 1 );
|
491 |
$taxonomy = str_replace( '-' . $offset, '', $taxonomy );
|
|
|
|
|
492 |
}
|
493 |
$offset = ( --$offset ) * $links_per_page;
|
494 |
|
@@ -687,16 +697,17 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
687 |
$excludes = $excl_cats;
|
688 |
}
|
689 |
|
690 |
-
foreach ( $taxonomies as $
|
691 |
-
if ( ! in_array( $
|
692 |
$step = 1;
|
693 |
-
$taxs = get_terms( $
|
694 |
-
$
|
695 |
-
|
696 |
-
if ( 0 === ( $
|
697 |
-
$gsg->add_sitemap( 'tax-' . $
|
698 |
$step = ++$step;
|
699 |
}
|
|
|
700 |
}
|
701 |
}
|
702 |
}
|
@@ -743,7 +754,7 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
743 |
$pages = $gsg->get_pages();
|
744 |
if ( count( $pages ) > 0 ) {
|
745 |
foreach ( $pages as $page ) {
|
746 |
-
$url = ! empty( $page->get_url() ) ? $page->get_url() : $page->_url;
|
747 |
if ( $page instanceof GoogleSitemapGeneratorPage && $url ) {
|
748 |
$gsg->add_sitemap( 'externals', null, $blog_update );
|
749 |
break;
|
@@ -786,7 +797,7 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
786 |
{$wpdb->posts} p
|
787 |
WHERE
|
788 |
p.post_password = ''
|
789 |
-
AND p.post_type = %s
|
790 |
AND p.post_status = 'publish'
|
791 |
" . $ex_post_s_q_l . ""
|
792 |
. $ex_cat_s_q_l . "
|
@@ -802,11 +813,16 @@ class GoogleSitemapGeneratorStandardBuilder {
|
|
802 |
if ( 'post' === $post_type_custom ) {
|
803 |
$has_posts = true;
|
804 |
}
|
805 |
-
|
806 |
$has_enabled_post_types_posts = true;
|
807 |
-
|
808 |
foreach ( $posts as $post ) {
|
809 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
810 |
}
|
811 |
}
|
812 |
// phpcs:enable
|
76 |
$pts = strrpos( $params, '-', $pts - strlen( $params ) - 1 );
|
77 |
|
78 |
$post_type = substr( $params, 0, $pts );
|
79 |
+
$type = explode( '-', $post_type );
|
80 |
+
$post_type = $type[0];
|
81 |
+
$limit = $type[1];
|
82 |
+
$limits = substr( $limit, 1 );
|
83 |
+
$links_per_page = $gsg->get_option( 'links_page' );
|
84 |
+
$limit = ( (int) $limits ) * $links_per_page;
|
85 |
if ( ! $post_type || ! in_array( $post_type, $gsg->get_active_post_types(), true ) ) {
|
86 |
return;
|
87 |
}
|
142 |
{$ex_cat_s_q_l}
|
143 |
ORDER BY
|
144 |
p.post_date_gmt DESC
|
145 |
+
LIMIT
|
146 |
+
{$limit}
|
147 |
";
|
148 |
// Query for counting all relevant posts for this post type.
|
149 |
$qsc = "
|
162 |
$q = $wpdb->prepare( $qs, $post_type, $year, $month );
|
163 |
// phpcs:enable
|
164 |
$posts = $wpdb->get_results( $q ); // phpcs:ignore
|
165 |
+
$posts = array_slice( $posts, ( $limit - $links_per_page) );
|
166 |
$post_count = count( $posts );
|
167 |
if ( ( $post_count ) > 0 ) {
|
168 |
/**
|
298 |
FROM
|
299 |
$wpdb->posts
|
300 |
WHERE
|
301 |
+
post_date_gmt < '%s'
|
302 |
AND post_status = 'publish'
|
303 |
AND post_type = 'post'
|
304 |
GROUP BY
|
497 |
if ( strpos( $taxonomy, '-' ) !== false ) {
|
498 |
$offset = substr( $taxonomy, strrpos( $taxonomy, '-' ) + 1 );
|
499 |
$taxonomy = str_replace( '-' . $offset, '', $taxonomy );
|
500 |
+
} else {
|
501 |
+
$offset = 1;
|
502 |
}
|
503 |
$offset = ( --$offset ) * $links_per_page;
|
504 |
|
697 |
$excludes = $excl_cats;
|
698 |
}
|
699 |
|
700 |
+
foreach ( $taxonomies as $taxonomy ) {
|
701 |
+
if ( ! in_array( $taxonomy, $taxonomies_to_exclude, true ) ) {
|
702 |
$step = 1;
|
703 |
+
$taxs = get_terms( $taxonomy, array( 'exclude' => $excludes ) );
|
704 |
+
$i = 0;
|
705 |
+
foreach ( $taxs as $tax ) {
|
706 |
+
if ( 0 === ( $i % $links_per_page ) && '' !== $tax->taxonomy ) {
|
707 |
+
$gsg->add_sitemap( 'tax-' . $tax->taxonomy, $step, $blog_update );
|
708 |
$step = ++$step;
|
709 |
}
|
710 |
+
$i++;
|
711 |
}
|
712 |
}
|
713 |
}
|
754 |
$pages = $gsg->get_pages();
|
755 |
if ( count( $pages ) > 0 ) {
|
756 |
foreach ( $pages as $page ) {
|
757 |
+
$url = ! empty( $page->get_url() ) ? $page->get_url() : ( property_exists( $page, '_url' ) ? $page->_url : '' );
|
758 |
if ( $page instanceof GoogleSitemapGeneratorPage && $url ) {
|
759 |
$gsg->add_sitemap( 'externals', null, $blog_update );
|
760 |
break;
|
797 |
{$wpdb->posts} p
|
798 |
WHERE
|
799 |
p.post_password = ''
|
800 |
+
AND p.post_type = '%s'
|
801 |
AND p.post_status = 'publish'
|
802 |
" . $ex_post_s_q_l . ""
|
803 |
. $ex_cat_s_q_l . "
|
813 |
if ( 'post' === $post_type_custom ) {
|
814 |
$has_posts = true;
|
815 |
}
|
|
|
816 |
$has_enabled_post_types_posts = true;
|
|
|
817 |
foreach ( $posts as $post ) {
|
818 |
+
$step = 1;
|
819 |
+
for ( $i = 0; $i < $post->numposts; $i++ ) {
|
820 |
+
if ( 0 === ( $i % $links_per_page ) ) {
|
821 |
+
$gsg->add_sitemap( 'pt', $post_type_custom . '-p' . $step . '-' . sprintf( '%04d-%02d', $post->year, $post->month ), $gsg->get_timestamp_from_my_sql( $post->last_mod ), 'p' . $step );
|
822 |
+
$step = ++$step;
|
823 |
+
}
|
824 |
+
}
|
825 |
+
// $gsg->add_sitemap( 'pt', $post_type_custom . '-' . sprintf( '%04d-%02d', $post->year, $post->month ), $gsg->get_timestamp_from_my_sql( $post->last_mod ) );
|
826 |
}
|
827 |
}
|
828 |
// phpcs:enable
|
class-googlesitemapgeneratorstatus.php
CHANGED
File without changes
|
class-googlesitemapgeneratorui.php
CHANGED
@@ -368,6 +368,7 @@ class GoogleSitemapGeneratorUI {
|
|
368 |
$_POST['sm_b_style'] = '';
|
369 |
}
|
370 |
|
|
|
371 |
foreach ( $this->sg->get_options() as $k => $v ) {
|
372 |
// Skip some options if the user is not super admin...
|
373 |
if ( ! is_super_admin() && in_array( $k, array( 'sm_b_time', 'sm_b_memory', 'sm_b_style', 'sm_b_style_default' ), true ) ) {
|
@@ -380,7 +381,7 @@ class GoogleSitemapGeneratorUI {
|
|
380 |
} // Empty string will get false on 2bool and 0 on 2float
|
381 |
// Options of the category 'Basic Settings' are boolean, except the filename and the autoprio provider.
|
382 |
if ( substr( $k, 0, 5 ) === 'sm_b_' ) {
|
383 |
-
if ( 'sm_b_prio_provider' === $k || 'sm_b_style' === $k || 'sm_b_memory' === $k || 'sm_b_baseurl' === $k || 'sm_b_sitemap_name' === $k ) {
|
384 |
if ( 'sm_b_filename_manual' === $k && strpos( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ), '\\' ) !== false ) {
|
385 |
$_POST[ $k ] = stripslashes( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) );
|
386 |
} elseif ( 'sm_b_baseurl' === $k ) {
|
@@ -394,6 +395,7 @@ class GoogleSitemapGeneratorUI {
|
|
394 |
$_POST[ $k ] = untrailingslashit( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) );
|
395 |
}
|
396 |
} elseif ( 'sm_b_sitemap_name' === $k ) {
|
|
|
397 |
if ( '' === $_POST[ $k ] ) {
|
398 |
$_POST[ $k ] = 'sitemap';
|
399 |
} else {
|
@@ -402,6 +404,8 @@ class GoogleSitemapGeneratorUI {
|
|
402 |
$this->sg->delete_old_files();
|
403 |
}
|
404 |
}
|
|
|
|
|
405 |
}
|
406 |
$this->sg->set_option( $k, (string) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) );
|
407 |
} elseif ( 'sm_b_time' === $k ) {
|
@@ -612,34 +616,16 @@ class GoogleSitemapGeneratorUI {
|
|
612 |
<?php
|
613 |
exit;
|
614 |
} elseif ( ! empty( $_GET['sm_ping_main'] ) ) {
|
615 |
-
|
616 |
-
check_admin_referer( 'sitemap' );
|
617 |
-
|
618 |
-
// Check again, just for the case that something went wrong before.
|
619 |
-
if ( ! current_user_can( 'administrator' ) ) {
|
620 |
-
echo '<p>Please log in as admin</p>';
|
621 |
-
return;
|
622 |
-
}
|
623 |
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
<div class='error'>
|
629 |
-
<p>
|
630 |
-
<?php
|
631 |
-
$arr = array(
|
632 |
-
'br' => array(),
|
633 |
-
'p' => array(),
|
634 |
-
'strong' => array(),
|
635 |
-
);
|
636 |
-
/* translators: %s: search term */
|
637 |
-
echo wp_kses( __( 'Please add Google analytics tid in order to notify Google bots.', 'sitemap' ), $arr );
|
638 |
-
?>
|
639 |
-
</p>
|
640 |
-
</div>
|
641 |
-
<?php
|
642 |
}
|
|
|
|
|
|
|
643 |
}
|
644 |
|
645 |
// Print out the message to the user, if any.
|
@@ -1086,7 +1072,7 @@ class GoogleSitemapGeneratorUI {
|
|
1086 |
<?php
|
1087 |
$rules = GoogleSitemapGeneratorLoader::get_ngin_x_rules();
|
1088 |
foreach ( $rules as $rule ) {
|
1089 |
-
echo esc_html( $rule . '<br />'
|
1090 |
}
|
1091 |
?>
|
1092 |
</code>
|
368 |
$_POST['sm_b_style'] = '';
|
369 |
}
|
370 |
|
371 |
+
$old_name = '';
|
372 |
foreach ( $this->sg->get_options() as $k => $v ) {
|
373 |
// Skip some options if the user is not super admin...
|
374 |
if ( ! is_super_admin() && in_array( $k, array( 'sm_b_time', 'sm_b_memory', 'sm_b_style', 'sm_b_style_default' ), true ) ) {
|
381 |
} // Empty string will get false on 2bool and 0 on 2float
|
382 |
// Options of the category 'Basic Settings' are boolean, except the filename and the autoprio provider.
|
383 |
if ( substr( $k, 0, 5 ) === 'sm_b_' ) {
|
384 |
+
if ( 'sm_b_prio_provider' === $k || 'sm_b_style' === $k || 'sm_b_memory' === $k || 'sm_b_baseurl' === $k || 'sm_b_sitemap_name' === $k || 'sm_b_old_sm_name' === $k ) {
|
385 |
if ( 'sm_b_filename_manual' === $k && strpos( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ), '\\' ) !== false ) {
|
386 |
$_POST[ $k ] = stripslashes( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) );
|
387 |
} elseif ( 'sm_b_baseurl' === $k ) {
|
395 |
$_POST[ $k ] = untrailingslashit( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) );
|
396 |
}
|
397 |
} elseif ( 'sm_b_sitemap_name' === $k ) {
|
398 |
+
$old_name = $v;
|
399 |
if ( '' === $_POST[ $k ] ) {
|
400 |
$_POST[ $k ] = 'sitemap';
|
401 |
} else {
|
404 |
$this->sg->delete_old_files();
|
405 |
}
|
406 |
}
|
407 |
+
} elseif ( 'sm_b_old_sm_name' === $k ) {
|
408 |
+
$_POST[ $k ] = $old_name;
|
409 |
}
|
410 |
$this->sg->set_option( $k, (string) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) );
|
411 |
} elseif ( 'sm_b_time' === $k ) {
|
616 |
<?php
|
617 |
exit;
|
618 |
} elseif ( ! empty( $_GET['sm_ping_main'] ) ) {
|
619 |
+
check_admin_referer( 'sitemap' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
|
621 |
+
// Check again, just for the case that something went wrong before.
|
622 |
+
if ( ! current_user_can( 'administrator' ) ) {
|
623 |
+
echo '<p>Please log in as admin</p>';
|
624 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
}
|
626 |
+
|
627 |
+
$this->sg->send_ping();
|
628 |
+
$message = __( 'Ping was executed, please see below for the result.', 'sitemap' );
|
629 |
}
|
630 |
|
631 |
// Print out the message to the user, if any.
|
1072 |
<?php
|
1073 |
$rules = GoogleSitemapGeneratorLoader::get_ngin_x_rules();
|
1074 |
foreach ( $rules as $rule ) {
|
1075 |
+
echo esc_html( $rule ) . '<br />'; // phpcs:ignore
|
1076 |
}
|
1077 |
?>
|
1078 |
</code>
|
documentation.txt
CHANGED
@@ -316,6 +316,7 @@ Release History:
|
|
316 |
2022-05-31 4.1.3 Added backward compatibility settings, Changed Google Tracking ID field to optional, Fixed PHP warnings
|
317 |
2022-06-06 4.1.4 Fixed the issue of PHP warnings, Fixed links per page issue, Improved WordPress 6.0 compatibility
|
318 |
2022-06-14 4.1.5 Fixed code regressions moving from git to svn
|
|
|
319 |
|
320 |
|
321 |
|
@@ -353,14 +354,14 @@ Adding other pages to the sitemap via other plugins
|
|
353 |
This plugin uses the action system of WordPress to allow other plugins
|
354 |
to add urls to the sitemap. Simply add your function with add_action to
|
355 |
the list and the plugin will execute yours every time the sitemap is build.
|
356 |
-
Use the static method "
|
357 |
to add your content.
|
358 |
|
359 |
Sample:
|
360 |
|
361 |
function your_pages() {
|
362 |
-
$generatorObject = &GoogleSitemapGenerator::
|
363 |
-
if($generatorObject!=null) $generatorObject->
|
364 |
}
|
365 |
add_action("sm_buildmap", "your_pages");
|
366 |
|
316 |
2022-05-31 4.1.3 Added backward compatibility settings, Changed Google Tracking ID field to optional, Fixed PHP warnings
|
317 |
2022-06-06 4.1.4 Fixed the issue of PHP warnings, Fixed links per page issue, Improved WordPress 6.0 compatibility
|
318 |
2022-06-14 4.1.5 Fixed code regressions moving from git to svn
|
319 |
+
2022-11-23 4.1.6 Made the Google TID field non mandatory in order to ping Google
|
320 |
|
321 |
|
322 |
|
354 |
This plugin uses the action system of WordPress to allow other plugins
|
355 |
to add urls to the sitemap. Simply add your function with add_action to
|
356 |
the list and the plugin will execute yours every time the sitemap is build.
|
357 |
+
Use the static method "get_instance" to get the generator and add_url method
|
358 |
to add your content.
|
359 |
|
360 |
Sample:
|
361 |
|
362 |
function your_pages() {
|
363 |
+
$generatorObject = &GoogleSitemapGenerator::get_instance();
|
364 |
+
if($generatorObject!=null) $generatorObject->add_url("http://blog.uri/tags/hello/",time(),"daily",0.5);
|
365 |
}
|
366 |
add_action("sm_buildmap", "your_pages");
|
367 |
|
google-sitemap-generator-prio-provider-base.php
CHANGED
File without changes
|
img/icon-amazon.gif
CHANGED
File without changes
|
img/icon-arne.gif
CHANGED
File without changes
|
img/icon-bing.gif
CHANGED
File without changes
|
img/icon-donate.gif
CHANGED
File without changes
|
img/icon-email.gif
CHANGED
File without changes
|
img/icon-google.gif
CHANGED
File without changes
|
img/icon-help.png
CHANGED
File without changes
|
img/icon-paypal.gif
CHANGED
File without changes
|
img/icon-trac.gif
CHANGED
File without changes
|
img/icon-wordpress.gif
CHANGED
File without changes
|
img/icon-yahoo.gif
CHANGED
File without changes
|
img/sitemap.js
CHANGED
File without changes
|
lang/sitemap-ar.mo
CHANGED
File without changes
|
lang/sitemap-ar.po
CHANGED
File without changes
|
lang/sitemap-bg_BG.mo
CHANGED
File without changes
|
lang/sitemap-bg_BG.po
CHANGED
File without changes
|
lang/sitemap-by_BY.mo
CHANGED
File without changes
|
lang/sitemap-by_BY.po
CHANGED
File without changes
|
lang/sitemap-cs_CZ.mo
CHANGED
File without changes
|
lang/sitemap-cs_CZ.po
CHANGED
File without changes
|
lang/sitemap-da_DK.mo
CHANGED
File without changes
|
lang/sitemap-da_DK.po
CHANGED
File without changes
|
lang/sitemap-de_DE.mo
CHANGED
File without changes
|
lang/sitemap-de_DE.po
CHANGED
File without changes
|
lang/sitemap-es_ES.mo
CHANGED
File without changes
|
lang/sitemap-es_ES.po
CHANGED
File without changes
|
lang/sitemap-fi_FI.mo
CHANGED
File without changes
|
lang/sitemap-fi_FI.po
CHANGED
File without changes
|
lang/sitemap-fr_FR.mo
CHANGED
File without changes
|
lang/sitemap-fr_FR.po
CHANGED
File without changes
|
lang/sitemap-hi_IN.mo
CHANGED
File without changes
|
lang/sitemap-hi_IN.po
CHANGED
File without changes
|
lang/sitemap-hu_HU.mo
CHANGED
File without changes
|
lang/sitemap-hu_HU.po
CHANGED
File without changes
|
lang/sitemap-it_IT.mo
CHANGED
File without changes
|
lang/sitemap-it_IT.po
CHANGED
File without changes
|
lang/sitemap-ja.mo
CHANGED
File without changes
|
lang/sitemap-ja.po
CHANGED
File without changes
|
lang/sitemap-ja_EUC.mo
CHANGED
File without changes
|
lang/sitemap-ja_EUC.po
CHANGED
File without changes
|
lang/sitemap-ja_SJIS.mo
CHANGED
File without changes
|
lang/sitemap-ja_SJIS.po
CHANGED
File without changes
|
lang/sitemap-ja_UTF.mo
CHANGED
File without changes
|
lang/sitemap-ja_UTF.po
CHANGED
File without changes
|
lang/sitemap-ko_KR.mo
CHANGED
File without changes
|
lang/sitemap-ko_KR.po
CHANGED
File without changes
|
lang/sitemap-nl_NL.mo
CHANGED
File without changes
|
lang/sitemap-nl_NL.po
CHANGED
File without changes
|
lang/sitemap-pl_PL.mo
CHANGED
File without changes
|
lang/sitemap-pl_PL.po
CHANGED
File without changes
|
lang/sitemap-pt_BR.mo
CHANGED
File without changes
|
lang/sitemap-pt_BR.po
CHANGED
File without changes
|
lang/sitemap-pt_PT.mo
CHANGED
File without changes
|
lang/sitemap-pt_PT.po
CHANGED
File without changes
|
lang/sitemap-ru_RU.mo
CHANGED
File without changes
|
lang/sitemap-ru_RU.po
CHANGED
File without changes
|
lang/sitemap-sl_SI.mo
CHANGED
File without changes
|
lang/sitemap-sl_SI.po
CHANGED
File without changes
|
lang/sitemap-sr_RS.mo
CHANGED
File without changes
|
lang/sitemap-sr_RS.po
CHANGED
File without changes
|
lang/sitemap-sv_SE.mo
CHANGED
File without changes
|
lang/sitemap-sv_SE.po
CHANGED
File without changes
|
lang/sitemap-tr_TR.mo
CHANGED
File without changes
|
lang/sitemap-tr_TR.po
CHANGED
File without changes
|
lang/sitemap-uk_UA.mo
CHANGED
File without changes
|
lang/sitemap-uk_UA.po
CHANGED
File without changes
|
lang/sitemap-zh_CN.mo
CHANGED
File without changes
|
lang/sitemap-zh_CN.po
CHANGED
File without changes
|
lang/sitemap-zh_TW.mo
CHANGED
File without changes
|
lang/sitemap-zh_TW.po
CHANGED
File without changes
|
lang/sitemap.pot
CHANGED
File without changes
|
license.txt
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: auctollo
|
|
3 |
Tags: seo, google, bing, yahoo, msn, ask, live, sitemaps, google sitemaps, xml sitemap, xml
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 6.0
|
6 |
-
Stable tag: 4.1.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -77,6 +77,16 @@ The WordPress.org repository is just another place to download this plugin. I do
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 4.1.5 (2022-06-14) =
|
81 |
* Fixed code regressions moving from git to svn (preventing recent fixes from being available)
|
82 |
|
3 |
Tags: seo, google, bing, yahoo, msn, ask, live, sitemaps, google sitemaps, xml sitemap, xml
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 6.0
|
6 |
+
Stable tag: 4.1.6
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 4.1.5 (2022-11-23) =
|
81 |
+
* Fixed mishandling of empty categories
|
82 |
+
* Fixed _url undefined notice error
|
83 |
+
* Fixed error when build_taxonomies throws a fatal error when accessing sub-sitemap without pagination
|
84 |
+
* Improved handling of line breaks e.g. showing <br/> tag without escaping HTML
|
85 |
+
* Improved handling of the Google TID field optional to ping Google
|
86 |
+
* Improved documentation, given some renaming of the methods
|
87 |
+
* Added support for paginated sitemap posts, pages, and product links
|
88 |
+
* Added conditional statements to prevent rewrite rules from being checked every time the sitemap loads
|
89 |
+
|
90 |
= 4.1.5 (2022-06-14) =
|
91 |
* Fixed code regressions moving from git to svn (preventing recent fixes from being available)
|
92 |
|
screenshot-1.png
CHANGED
File without changes
|
screenshot-2.png
CHANGED
File without changes
|
screenshot-3.png
CHANGED
File without changes
|
sitemap-core.php
CHANGED
@@ -1360,6 +1360,7 @@ final class GoogleSitemapGenerator {
|
|
1360 |
$this->options['sm_in_customtypes'] = array(); // Include custom post types .
|
1361 |
$this->options['sm_in_lastmod'] = true; // Include the last modification date .
|
1362 |
$this->options['sm_b_sitemap_name'] = 'sitemap'; // Name of custom sitemap.
|
|
|
1363 |
$this->options['sm_cf_home'] = 'daily'; // Change frequency of the homepage .
|
1364 |
$this->options['sm_cf_posts'] = 'monthly'; // Change frequency of posts .
|
1365 |
$this->options['sm_cf_pages'] = 'weekly'; // Change frequency of static pages .
|
@@ -1458,7 +1459,6 @@ final class GoogleSitemapGenerator {
|
|
1458 |
if ( 0 !== strpos( $key, 'sm_' ) ) {
|
1459 |
$key = 'sm_' . $key;
|
1460 |
}
|
1461 |
-
|
1462 |
$this->options[ $key ] = $value;
|
1463 |
}
|
1464 |
|
@@ -1702,18 +1702,22 @@ final class GoogleSitemapGenerator {
|
|
1702 |
// Manual override for root URL .
|
1703 |
$base_url_settings = $this->get_option( 'b_baseurl' );
|
1704 |
$sm_sitemap_name = $this->get_option( 'b_sitemap_name' );
|
|
|
1705 |
if ( ! empty( $base_url_settings ) ) {
|
1706 |
$base_url = $base_url_settings;
|
1707 |
} elseif ( defined( 'SM_BASE_URL' ) && SM_BASE_URL ) {
|
1708 |
$base_url = SM_BASE_URL;
|
1709 |
}
|
1710 |
global $wp_rewrite;
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
|
|
|
|
|
|
1717 |
if ( $pl ) {
|
1718 |
return trailingslashit( $base_url ) . ( '' === $sm_sitemap_name ? 'sitemap' : $sm_sitemap_name ) . ( $options ? '-' . $options : '' ) . ( $html
|
1719 |
? '.html' : '.xml' ) . ( $zip ? '.gz' : '' );
|
@@ -2077,7 +2081,7 @@ final class GoogleSitemapGenerator {
|
|
2077 |
if ( ! empty( $style_sheet ) ) {
|
2078 |
$this->add_element( new GoogleSitemapGeneratorXmlEntry( '<' . '?xml-stylesheet type=\'text/xsl\' href=\'' . esc_url( $style_sheet ) . '\'?>' ) );
|
2079 |
}
|
2080 |
-
$this->add_element( new GoogleSitemapGeneratorDebugEntry( 'sitemap-generator-url=\'
|
2081 |
$this->add_element( new GoogleSitemapGeneratorDebugEntry( 'generated-on=\'' . gmdate( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) . '\'' ) );
|
2082 |
|
2083 |
switch ( $format ) {
|
@@ -2501,7 +2505,7 @@ final class GoogleSitemapGenerator {
|
|
2501 |
*/
|
2502 |
private function send_stats() {
|
2503 |
global $wp_version, $wpdb;
|
2504 |
-
$post_count = $wpdb->get_var(
|
2505 |
|
2506 |
// Send simple post count statistic to get an idea in which direction this plugin should be optimized .
|
2507 |
// Only a rough number is required, so we are rounding things up .
|
1360 |
$this->options['sm_in_customtypes'] = array(); // Include custom post types .
|
1361 |
$this->options['sm_in_lastmod'] = true; // Include the last modification date .
|
1362 |
$this->options['sm_b_sitemap_name'] = 'sitemap'; // Name of custom sitemap.
|
1363 |
+
$this->options['sm_b_old_sm_name'] = 'sitemap'; // Name of previously defined sitemap.
|
1364 |
$this->options['sm_cf_home'] = 'daily'; // Change frequency of the homepage .
|
1365 |
$this->options['sm_cf_posts'] = 'monthly'; // Change frequency of posts .
|
1366 |
$this->options['sm_cf_pages'] = 'weekly'; // Change frequency of static pages .
|
1459 |
if ( 0 !== strpos( $key, 'sm_' ) ) {
|
1460 |
$key = 'sm_' . $key;
|
1461 |
}
|
|
|
1462 |
$this->options[ $key ] = $value;
|
1463 |
}
|
1464 |
|
1702 |
// Manual override for root URL .
|
1703 |
$base_url_settings = $this->get_option( 'b_baseurl' );
|
1704 |
$sm_sitemap_name = $this->get_option( 'b_sitemap_name' );
|
1705 |
+
$old_sm_name = $this->get_option( 'b_old_sm_name' );
|
1706 |
if ( ! empty( $base_url_settings ) ) {
|
1707 |
$base_url = $base_url_settings;
|
1708 |
} elseif ( defined( 'SM_BASE_URL' ) && SM_BASE_URL ) {
|
1709 |
$base_url = SM_BASE_URL;
|
1710 |
}
|
1711 |
global $wp_rewrite;
|
1712 |
+
if ( $old_sm_name !== $sm_sitemap_name ) {
|
1713 |
+
$this->set_option( 'sm_b_old_sm_name', $sm_sitemap_name );
|
1714 |
+
delete_option( 'sm_rewrite_done' );
|
1715 |
+
wp_clear_scheduled_hook( 'sm_ping_daily' );
|
1716 |
+
self::remove_rewrite_hooks();
|
1717 |
+
$wp_rewrite->flush_rules( false );
|
1718 |
+
self::setup_rewrite_hooks();
|
1719 |
+
GoogleSitemapGeneratorLoader::activate_rewrite();
|
1720 |
+
}
|
1721 |
if ( $pl ) {
|
1722 |
return trailingslashit( $base_url ) . ( '' === $sm_sitemap_name ? 'sitemap' : $sm_sitemap_name ) . ( $options ? '-' . $options : '' ) . ( $html
|
1723 |
? '.html' : '.xml' ) . ( $zip ? '.gz' : '' );
|
2081 |
if ( ! empty( $style_sheet ) ) {
|
2082 |
$this->add_element( new GoogleSitemapGeneratorXmlEntry( '<' . '?xml-stylesheet type=\'text/xsl\' href=\'' . esc_url( $style_sheet ) . '\'?>' ) );
|
2083 |
}
|
2084 |
+
$this->add_element( new GoogleSitemapGeneratorDebugEntry( 'sitemap-generator-url=\'http://www.arnebrachhold.de\' sitemap-generator-version=\'' . $this->get_version() . '\'' ) );
|
2085 |
$this->add_element( new GoogleSitemapGeneratorDebugEntry( 'generated-on=\'' . gmdate( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) . '\'' ) );
|
2086 |
|
2087 |
switch ( $format ) {
|
2505 |
*/
|
2506 |
private function send_stats() {
|
2507 |
global $wp_version, $wpdb;
|
2508 |
+
$post_count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} p WHERE p.post_status='publish'" ); // db call ok; no-cache ok.
|
2509 |
|
2510 |
// Send simple post count statistic to get an idea in which direction this plugin should be optimized .
|
2511 |
// Only a rough number is required, so we are rounding things up .
|
sitemap-wpmu.php
CHANGED
File without changes
|
sitemap.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* $Id: sitemap.php
|
4 |
|
5 |
* Google XML Sitemaps Generator for WordPress
|
6 |
* ==============================================================================
|
@@ -17,7 +17,7 @@
|
|
17 |
* Plugin Name: Google XML Sitemaps
|
18 |
* Plugin URI: https://auctollo.com/
|
19 |
* Description: This plugin improves SEO using sitemaps for best indexation by search engines like Google, Bing, Yahoo and others.
|
20 |
-
* Version: 4.1.
|
21 |
* Author: Auctollo
|
22 |
* Author URI: https://acutollo.com/
|
23 |
* Text Domain: sitemap
|
1 |
<?php
|
2 |
/**
|
3 |
+
* $Id: sitemap.php 2743211 2022-06-16 04:18:21Z auctollo $
|
4 |
|
5 |
* Google XML Sitemaps Generator for WordPress
|
6 |
* ==============================================================================
|
17 |
* Plugin Name: Google XML Sitemaps
|
18 |
* Plugin URI: https://auctollo.com/
|
19 |
* Description: This plugin improves SEO using sitemaps for best indexation by search engines like Google, Bing, Yahoo and others.
|
20 |
+
* Version: 4.1.6
|
21 |
* Author: Auctollo
|
22 |
* Author URI: https://acutollo.com/
|
23 |
* Text Domain: sitemap
|
sitemap.xsl
CHANGED
@@ -62,8 +62,8 @@
|
|
62 |
<body>
|
63 |
<xsl:apply-templates></xsl:apply-templates>
|
64 |
<div id="footer">
|
65 |
-
Generated with <a rel="external nofollow" href="
|
66 |
-
If you have problems with your sitemap please visit the <a rel="external nofollow" href="https://wordpress.org/support/plugin/google-sitemap-generator">support forum</a>.
|
67 |
</div>
|
68 |
</body>
|
69 |
</html>
|
@@ -75,8 +75,8 @@
|
|
75 |
<div id="intro">
|
76 |
<p>
|
77 |
This is a XML Sitemap which is supposed to be processed by search engines which follow the XML Sitemap standard like Ask.com, Bing, Google and Yahoo.<br />
|
78 |
-
It was generated using the <a rel="external nofollow" href="
|
79 |
-
You can find more information about XML sitemaps on <a rel="external nofollow" href="http://sitemaps.org">sitemaps.org</a> and Google's <a rel="external nofollow" href="
|
80 |
</p>
|
81 |
</div>
|
82 |
<div id="content">
|
@@ -123,8 +123,8 @@
|
|
123 |
<div id="intro">
|
124 |
<p>
|
125 |
This is a XML Sitemap which is supposed to be processed by search engines which follow the XML Sitemap standard like Ask.com, Bing, Google and Yahoo.<br />
|
126 |
-
It was generated using the <a rel="external nofollow" href="
|
127 |
-
You can find more information about XML sitemaps on <a rel="external nofollow" href="http://sitemaps.org">sitemaps.org</a> and Google's <a rel="external nofollow" href="
|
128 |
<br />
|
129 |
This file contains links to sub-sitemaps, follow them to see the actual sitemap content.
|
130 |
</p>
|
62 |
<body>
|
63 |
<xsl:apply-templates></xsl:apply-templates>
|
64 |
<div id="footer">
|
65 |
+
Generated with <a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-home/" title="Google (XML) Sitemap Generator Plugin for WordPress">Google (XML) Sitemaps Generator Plugin for WordPress</a> by <a rel="external nofollow" href="http://www.arnebrachhold.de/">Arne Brachhold</a>. This XSLT template is released under the GPL and free to use.<br />
|
66 |
+
If you have problems with your sitemap please visit the <a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-x-faq/" title="Google (XML) sitemaps FAQ">plugin FAQ</a> or the <a rel="external nofollow" href="https://wordpress.org/support/plugin/google-sitemap-generator">support forum</a>.
|
67 |
</div>
|
68 |
</body>
|
69 |
</html>
|
75 |
<div id="intro">
|
76 |
<p>
|
77 |
This is a XML Sitemap which is supposed to be processed by search engines which follow the XML Sitemap standard like Ask.com, Bing, Google and Yahoo.<br />
|
78 |
+
It was generated using the <a rel="external nofollow" href="http://wordpress.org/">WordPress</a> content management system and the <strong><a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-home/" title="Google (XML) Sitemaps Generator Plugin for WordPress">XML Sitemap Generator Plugin</a></strong> by <a rel="external nofollow" href="http://www.arnebrachhold.de/">Arne Brachhold</a>.<br />
|
79 |
+
You can find more information about XML sitemaps on <a rel="external nofollow" href="http://sitemaps.org">sitemaps.org</a> and Google's <a rel="external nofollow" href="http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators">list of sitemap programs</a>.
|
80 |
</p>
|
81 |
</div>
|
82 |
<div id="content">
|
123 |
<div id="intro">
|
124 |
<p>
|
125 |
This is a XML Sitemap which is supposed to be processed by search engines which follow the XML Sitemap standard like Ask.com, Bing, Google and Yahoo.<br />
|
126 |
+
It was generated using the <a rel="external nofollow" href="http://wordpress.org/">WordPress</a> content management system and the <strong><a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-home/" title="XML Sitemaps Generator Plugin for WordPress">XML Sitemap Generator Plugin</a></strong> by <a rel="external nofollow" href="http://www.arnebrachhold.de/">Arne Brachhold</a>.<br />
|
127 |
+
You can find more information about XML sitemaps on <a rel="external nofollow" href="http://sitemaps.org">sitemaps.org</a> and Google's <a rel="external nofollow" href="http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators">list of sitemap programs</a>.<br />
|
128 |
<br />
|
129 |
This file contains links to sub-sitemaps, follow them to see the actual sitemap content.
|
130 |
</p>
|