Google XML Sitemaps - Version 3.2.4

Version Description

Download this release

Release Info

Developer arnee
Plugin Icon 128x128 Google XML Sitemaps
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.3 to 3.2.4

Files changed (6) hide show
  1. documentation.txt +6 -0
  2. readme.txt +4 -2
  3. sitemap-core.php +7 -7
  4. sitemap-ui.php +2 -2
  5. sitemap.php +21 -5
  6. sitemap.xsl +1 -1
documentation.txt CHANGED
@@ -225,6 +225,12 @@
225
  Updated Spanish language files
226
  2009-12-19 3.2.2 Fixed PHP4 problems
227
  2010-04-02 3.2.3 Fixed that all pages were not included in the sitemap if the "Uncategorized" category was excluded
 
 
 
 
 
 
228
 
229
  Maybe Todo:
230
  ==============================================================================
225
  Updated Spanish language files
226
  2009-12-19 3.2.2 Fixed PHP4 problems
227
  2010-04-02 3.2.3 Fixed that all pages were not included in the sitemap if the "Uncategorized" category was excluded
228
+ 2010-05-29 3.2.4 Fixed more deprecated function calls
229
+ Added (GMT) to sitemap xslt template to avoid confusion with time zone
230
+ Added warning and don't activate plugin if multisite mode is enabled (this mode is NOT tested yet)
231
+ Changed get_bloginfo('siteurl') to get_bloginfo('url') to avoid deprecation warning
232
+ Changed has_cap(10) to has_cap('level_10') to avoid deprecation warning
233
+ Fixed wrong SQL statement for author pages (Ticket #1108), thanks to twoenough
234
 
235
  Maybe Todo:
236
  ==============================================================================
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: arnee
3
  Donate link: http://www.arnebrachhold.de/redir/sitemap-paypal
4
  Tags: seo, google, sitemaps, google sitemaps, yahoo, msn, ask, live, xml sitemap, xml
5
  Requires at least: 2.1
6
- Tested up to: 2.9
7
- Stable tag: 3.2.2
8
 
9
  This plugin will generate a special XML sitemap which will help search engines to better index your blog.
10
 
@@ -19,6 +19,8 @@ Related Links:
19
  * <a href="http://www.arnebrachhold.de/2006/04/07/google-sitemaps-faq-sitemap-issues-errors-and-problems/" title="Google Sitemaps FAQ">Plugin and sitemaps FAQ</a>
20
  * <a href="http://wordpress.org/tags/google-sitemap-generator?forum_id=10">Support Forum</a>
21
 
 
 
22
  *This release is compatible with all WordPress versions since 2.1. If you are still using an older one, use <a href="http://downloads.wordpress.org/plugin/google-sitemap-generator.2.7.1.zip">version 2.7.1</a> instead.*
23
 
24
  == Installation ==
3
  Donate link: http://www.arnebrachhold.de/redir/sitemap-paypal
4
  Tags: seo, google, sitemaps, google sitemaps, yahoo, msn, ask, live, xml sitemap, xml
5
  Requires at least: 2.1
6
+ Tested up to: 3.3
7
+ Stable tag: 3.2.3
8
 
9
  This plugin will generate a special XML sitemap which will help search engines to better index your blog.
10
 
19
  * <a href="http://www.arnebrachhold.de/2006/04/07/google-sitemaps-faq-sitemap-issues-errors-and-problems/" title="Google Sitemaps FAQ">Plugin and sitemaps FAQ</a>
20
  * <a href="http://wordpress.org/tags/google-sitemap-generator?forum_id=10">Support Forum</a>
21
 
22
+ *This release is not compatible with the new multisite feature of WordPress 3.0 yet. The plugin will remain inactive as long as this feature is enabled. If you are using this feature, try out the new <a href="http://www.arnebrachhold.de/redir/sitemap-dl-beta/">Beta version</a> which fully supports multisite mode as well as network activation!*
23
+
24
  *This release is compatible with all WordPress versions since 2.1. If you are still using an older one, use <a href="http://downloads.wordpress.org/plugin/google-sitemap-generator.2.7.1.zip">version 2.7.1</a> instead.*
25
 
26
  == Installation ==
sitemap-core.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
 
4
- $Id: sitemap-core.php 224413 2010-04-02 15:54:52Z arnee $
5
 
6
  */
7
 
@@ -22,7 +22,7 @@ class GoogleSitemapGeneratorStatus {
22
 
23
  $exists = get_option("sm_status");
24
 
25
- if($exists === false) add_option("sm_status","","Status","no");
26
 
27
  $this->Save();
28
  }
@@ -746,7 +746,7 @@ class GoogleSitemapGenerator {
746
  /**
747
  * @var Version of the generator in SVN
748
  */
749
- var $_svnVersion = '$Id: sitemap-core.php 224413 2010-04-02 15:54:52Z arnee $';
750
 
751
  /**
752
  * @var array The unserialized array with the stored options
@@ -831,7 +831,7 @@ class GoogleSitemapGenerator {
831
  //function to detect if you are on an admin page. So we have to copy
832
  //the get_home_path function in our own...
833
  $home = get_option( 'home' );
834
- if ( $home != '' && $home != get_option( 'siteurl' ) ) {
835
  $home_path = parse_url( $home );
836
  $home_path = $home_path['path'];
837
  $root = str_replace( $_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"] );
@@ -1333,7 +1333,7 @@ class GoogleSitemapGenerator {
1333
  } else {
1334
  delete_option("sm_cpages");
1335
  //Add the option, Note the autoload=false because when the autoload happens, our class GoogleSitemapGeneratorPage doesn't exist
1336
- add_option("sm_cpages",$this->_pages,"Storage for custom pages of the sitemap plugin","no");
1337
  return true;
1338
  }
1339
  }
@@ -1353,7 +1353,7 @@ class GoogleSitemapGenerator {
1353
  if(!$forceAuto && $this->GetOption("b_location_mode")=="manual") {
1354
  return $this->GetOption("b_fileurl_manual");
1355
  } else {
1356
- return trailingslashit(get_bloginfo('siteurl')). $this->GetOption("b_filename");
1357
  }
1358
  }
1359
 
@@ -2047,7 +2047,7 @@ class GoogleSitemapGenerator {
2047
  //We retrieve only users with published and not password protected posts (and not pages)
2048
  //WP2.1 introduced post_status='future', for earlier WP versions we need to check the post_date_gmt
2049
  $sql = "SELECT DISTINCT
2050
- p.ID,
2051
  u.user_nicename,
2052
  MAX(p.post_modified_gmt) AS last_post
2053
  FROM
1
  <?php
2
  /*
3
 
4
+ $Id: sitemap-core.php 246875 2010-05-29 07:22:02Z arnee $
5
 
6
  */
7
 
22
 
23
  $exists = get_option("sm_status");
24
 
25
+ if($exists === false) add_option("sm_status","",null,"no");
26
 
27
  $this->Save();
28
  }
746
  /**
747
  * @var Version of the generator in SVN
748
  */
749
+ var $_svnVersion = '$Id: sitemap-core.php 246875 2010-05-29 07:22:02Z arnee $';
750
 
751
  /**
752
  * @var array The unserialized array with the stored options
831
  //function to detect if you are on an admin page. So we have to copy
832
  //the get_home_path function in our own...
833
  $home = get_option( 'home' );
834
+ if ( $home != '' && $home != get_option( 'url' ) ) {
835
  $home_path = parse_url( $home );
836
  $home_path = $home_path['path'];
837
  $root = str_replace( $_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"] );
1333
  } else {
1334
  delete_option("sm_cpages");
1335
  //Add the option, Note the autoload=false because when the autoload happens, our class GoogleSitemapGeneratorPage doesn't exist
1336
+ add_option("sm_cpages",$this->_pages,null,"no");
1337
  return true;
1338
  }
1339
  }
1353
  if(!$forceAuto && $this->GetOption("b_location_mode")=="manual") {
1354
  return $this->GetOption("b_fileurl_manual");
1355
  } else {
1356
+ return trailingslashit(get_bloginfo('url')). $this->GetOption("b_filename");
1357
  }
1358
  }
1359
 
2047
  //We retrieve only users with published and not password protected posts (and not pages)
2048
  //WP2.1 introduced post_status='future', for earlier WP versions we need to check the post_date_gmt
2049
  $sql = "SELECT DISTINCT
2050
+ u.ID,
2051
  u.user_nicename,
2052
  MAX(p.post_modified_gmt) AS last_post
2053
  FROM
sitemap-ui.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
 
4
- $Id: sitemap-ui.php 183641 2009-12-17 00:45:09Z arnee $
5
 
6
  */
7
 
@@ -796,7 +796,7 @@ class GoogleSitemapGeneratorUI {
796
  </label>
797
  <a href="javascript:void(document.getElementById('sm_manual_help').style.display='');">[?]</a>
798
  <span id="sm_manual_help" style="display:none;"><br />
799
- <?php echo str_replace("%1",trailingslashit(get_bloginfo('siteurl')) . "?sm_command=build&amp;sm_key=" . $this->sg->GetOption("b_manual_key"),__('This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: <a href="%1">%1</a> Please check the result box above to see if sitemap was successfully built.', 'sitemap')); ?>
800
  </span>
801
  </li>
802
  </ul>
1
  <?php
2
  /*
3
 
4
+ $Id: sitemap-ui.php 241392 2010-05-15 09:51:44Z arnee $
5
 
6
  */
7
 
796
  </label>
797
  <a href="javascript:void(document.getElementById('sm_manual_help').style.display='');">[?]</a>
798
  <span id="sm_manual_help" style="display:none;"><br />
799
+ <?php echo str_replace("%1",trailingslashit(get_bloginfo('url')) . "?sm_command=build&amp;sm_key=" . $this->sg->GetOption("b_manual_key"),__('This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: <a href="%1">%1</a> Please check the result box above to see if sitemap was successfully built.', 'sitemap')); ?>
800
  </span>
801
  </li>
802
  </ul>
sitemap.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: sitemap.php 224413 2010-04-02 15:54:52Z arnee $
5
 
6
  Google XML Sitemaps Generator for WordPress
7
  ==============================================================================
@@ -25,7 +25,7 @@
25
  Plugin Name: Google XML Sitemaps
26
  Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
27
  Description: This plugin will generate a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog.
28
- Version: 3.2.3
29
  Author: Arne Brachhold
30
  Author URI: http://www.arnebrachhold.de/
31
  Text Domain: sitemap
@@ -47,6 +47,15 @@ class GoogleSitemapGeneratorLoader {
47
  * If the sm_command and sm_key GET params are given, the function will init the generator to rebuild the sitemap.
48
  */
49
  function Enable() {
 
 
 
 
 
 
 
 
 
50
 
51
  //Register the sitemap creator to wordpress...
52
  add_action('admin_menu', array('GoogleSitemapGeneratorLoader', 'RegisterAdminPage'));
@@ -88,6 +97,13 @@ class GoogleSitemapGeneratorLoader {
88
  GoogleSitemapGeneratorLoader::CallShowPingResult();
89
  }
90
  }
 
 
 
 
 
 
 
91
 
92
  /**
93
  * Registers the plugin in the admin menu system
@@ -95,7 +111,7 @@ class GoogleSitemapGeneratorLoader {
95
  function RegisterAdminPage() {
96
 
97
  if (function_exists('add_options_page')) {
98
- add_options_page(__('XML-Sitemap Generator','sitemap'), __('XML-Sitemap','sitemap'), 10, GoogleSitemapGeneratorLoader::GetBaseName(), array('GoogleSitemapGeneratorLoader','CallHtmlShowOptionsPage'));
99
  }
100
  }
101
 
@@ -214,8 +230,8 @@ class GoogleSitemapGeneratorLoader {
214
  function LoadPlugin() {
215
 
216
  $mem = abs(intval(@ini_get('memory_limit')));
217
- if($mem && $mem < 32) {
218
- @ini_set('memory_limit', '32M');
219
  }
220
 
221
  $time = abs(intval(@ini_get("max_execution_time")));
1
  <?php
2
 
3
  /*
4
+ $Id: sitemap.php 246883 2010-05-29 07:28:03Z arnee $
5
 
6
  Google XML Sitemaps Generator for WordPress
7
  ==============================================================================
25
  Plugin Name: Google XML Sitemaps
26
  Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
27
  Description: This plugin will generate a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog.
28
+ Version: 3.2.4
29
  Author: Arne Brachhold
30
  Author URI: http://www.arnebrachhold.de/
31
  Text Domain: sitemap
47
  * If the sm_command and sm_key GET params are given, the function will init the generator to rebuild the sitemap.
48
  */
49
  function Enable() {
50
+
51
+ //Check for 3.0 multisite, NOT supported yet!
52
+ if((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE) || (function_exists('is_multisite') && is_multisite())) {
53
+ if(function_exists('is_super_admin') && is_super_admin()) {
54
+ add_action('admin_notices', array('GoogleSitemapGeneratorLoader', 'AddMultisiteWarning'));
55
+ }
56
+
57
+ return;
58
+ }
59
 
60
  //Register the sitemap creator to wordpress...
61
  add_action('admin_menu', array('GoogleSitemapGeneratorLoader', 'RegisterAdminPage'));
97
  GoogleSitemapGeneratorLoader::CallShowPingResult();
98
  }
99
  }
100
+
101
+ /**
102
+ * Outputs the warning bar if multisite mode is activated
103
+ */
104
+ function AddMultisiteWarning() {
105
+ echo "<div id='sm-multisite-warning' class='error fade'><p><strong>".__('Google XML Sitemaps is not multisite compatible.','sitemap')."</strong><br /> ".sprintf(__('Unfortunately the Google XML Sitemaps plugin was not tested with the multisite feature of WordPress 3.0 yet. The plugin will not be active until you disable the multisite mode. Otherwise go to <a href="%1$s">active plugins</a> and deactivate the Google XML Sitemaps plugin to make this message disappear.','sitemap'), "plugins.php?plugin_status=active")."</p></div>";
106
+ }
107
 
108
  /**
109
  * Registers the plugin in the admin menu system
111
  function RegisterAdminPage() {
112
 
113
  if (function_exists('add_options_page')) {
114
+ add_options_page(__('XML-Sitemap Generator','sitemap'), __('XML-Sitemap','sitemap'), 'level_10', GoogleSitemapGeneratorLoader::GetBaseName(), array('GoogleSitemapGeneratorLoader','CallHtmlShowOptionsPage'));
115
  }
116
  }
117
 
230
  function LoadPlugin() {
231
 
232
  $mem = abs(intval(@ini_get('memory_limit')));
233
+ if($mem && $mem < 64) {
234
+ @ini_set('memory_limit', '64M');
235
  }
236
 
237
  $time = abs(intval(@ini_get("max_execution_time")));
sitemap.xsl CHANGED
@@ -71,7 +71,7 @@
71
  <th>URL</th>
72
  <th>Priority</th>
73
  <th>Change Frequency</th>
74
- <th>LastChange</th>
75
  </tr>
76
  <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
77
  <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
71
  <th>URL</th>
72
  <th>Priority</th>
73
  <th>Change Frequency</th>
74
+ <th>LastChange (GMT)</th>
75
  </tr>
76
  <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
77
  <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>