Google XML Sitemaps - Version 4.0.1

Version Description

Download this release

Release Info

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

Code changes from version 4.0 to 4.0.1

Files changed (4) hide show
  1. sitemap-builder.php +5 -3
  2. sitemap-core.php +7 -7
  3. sitemap-loader.php +3 -3
  4. sitemap.php +2 -2
sitemap-builder.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
4
- $Id: sitemap-builder.php 882527 2014-03-26 19:05:29Z arnee $
5
6
*/
7
/**
@@ -96,11 +96,13 @@ class GoogleSitemapGeneratorStandardBuilder {
96
*/
97
public function BuildPosts($gsg, $type, $params) {
98
99
- if(!$pts = strpos($params, "-")) return;
100
101
$postType = substr($params, 0, $pts);
102
103
- if(!in_array($postType, $gsg->GetActivePostTypes())) return;
104
105
$params = substr($params, $pts + 1);
106
1
<?php
2
/*
3
4
+ $Id: sitemap-builder.php 885074 2014-03-31 13:24:09Z arnee $
5
6
*/
7
/**
96
*/
97
public function BuildPosts($gsg, $type, $params) {
98
99
+ if(!$pts = strrpos($params, "-")) return;
100
+
101
+ $pts = strrpos($params, "-", $pts - strlen($params) - 1);
102
103
$postType = substr($params, 0, $pts);
104
105
+ if(!$postType || !in_array($postType, $gsg->GetActivePostTypes())) return;
106
107
$params = substr($params, $pts + 1);
108
sitemap-core.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
4
- $Id: sitemap-core.php 882527 2014-03-26 19:05:29Z arnee $
5
6
*/
7
@@ -895,7 +895,7 @@ final class GoogleSitemapGenerator {
895
* @return true if compressed
896
*/
897
public function IsGzipEnabled() {
898
- return ($this->GetOption("b_gzip") === true && function_exists("gzwrite"));
899
}
900
901
/**
@@ -1356,13 +1356,14 @@ final class GoogleSitemapGenerator {
1356
$buildOptions = array_merge($this->buildOptions, $buildOptions);
1357
1358
$html = (isset($buildOptions["html"]) ? $buildOptions["html"] : false);
1359
1360
if($pl) {
1361
return trailingslashit(get_bloginfo('url')) . "sitemap" . ($options ? "-" . $options : "") . ($html
1362
- ? ".html" : ".xml");
1363
} else {
1364
return trailingslashit(get_bloginfo('url')) . "index.php?xml_sitemap=params=" . $options . ($html
1365
- ? ";html=true" : "");
1366
}
1367
}
1368
@@ -1519,7 +1520,7 @@ final class GoogleSitemapGenerator {
1519
if(!headers_sent()) header('X-Robots-Tag: noindex', true);
1520
1521
$pack = (isset($options['zip']) ? $options['zip'] : true);
1522
- if(empty($_SERVER['HTTP_ACCEPT_ENCODING']) || strpos('gzip', $_SERVER['HTTP_ACCEPT_ENCODING']) === NULL || !$this->IsGzipEnabled() || headers_sent()) $pack = false;
1523
if($pack) ob_start('ob_gzhandler');
1524
1525
$this->Initate();
@@ -1913,6 +1914,7 @@ final class GoogleSitemapGenerator {
1913
* Sends anonymous statistics
1914
*/
1915
private function SendStats() {
1916
$postData = array(
1917
"v" => 1,
1918
"tid" => "UA-65990-26",
@@ -1936,8 +1938,6 @@ final class GoogleSitemapGenerator {
1936
*/
1937
public function SendPingDaily() {
1938
1939
- global $wp_version;
1940
-
1941
$this->LoadOptions();
1942
1943
$blogUpdate = strtotime(get_lastpostdate('blog'));
1
<?php
2
/*
3
4
+ $Id: sitemap-core.php 885074 2014-03-31 13:24:09Z arnee $
5
6
*/
7
895
* @return true if compressed
896
*/
897
public function IsGzipEnabled() {
898
+ return (function_exists("gzwrite"));
899
}
900
901
/**
1356
$buildOptions = array_merge($this->buildOptions, $buildOptions);
1357
1358
$html = (isset($buildOptions["html"]) ? $buildOptions["html"] : false);
1359
+ $zip = (isset($buildOptions["zip"]) ? $buildOptions["zip"] : false);
1360
1361
if($pl) {
1362
return trailingslashit(get_bloginfo('url')) . "sitemap" . ($options ? "-" . $options : "") . ($html
1363
+ ? ".html" : ".xml") . ($zip? ".gz" : "");
1364
} else {
1365
return trailingslashit(get_bloginfo('url')) . "index.php?xml_sitemap=params=" . $options . ($html
1366
+ ? ";html=true" : "") . ($zip? ";zip=true" : "");
1367
}
1368
}
1369
1520
if(!headers_sent()) header('X-Robots-Tag: noindex', true);
1521
1522
$pack = (isset($options['zip']) ? $options['zip'] : true);
1523
+ if(empty($_SERVER['HTTP_ACCEPT_ENCODING']) || strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip') === false || !$this->IsGzipEnabled() || headers_sent()) $pack = false;
1524
if($pack) ob_start('ob_gzhandler');
1525
1526
$this->Initate();
1914
* Sends anonymous statistics
1915
*/
1916
private function SendStats() {
1917
+ global $wp_version;
1918
$postData = array(
1919
"v" => 1,
1920
"tid" => "UA-65990-26",
1938
*/
1939
public function SendPingDaily() {
1940
1941
$this->LoadOptions();
1942
1943
$blogUpdate = strtotime(get_lastpostdate('blog'));
sitemap-loader.php CHANGED
@@ -15,7 +15,7 @@ class GoogleSitemapGeneratorLoader {
15
/**
16
* @var Version of the generator in SVN
17
*/
18
- private static $svnVersion = '$Id: sitemap-loader.php 884678 2014-03-30 15:52:25Z arnee #x27;;
19
20
21
/**
@@ -84,7 +84,7 @@ class GoogleSitemapGeneratorLoader {
84
85
add_filter('template_redirect', array(__CLASS__, 'DoTemplateRedirect'), 1, 0);
86
87
- add_filter('parse_request', array(__CLASS__, 'KillFrontpageQuery'), 1, 0);
88
}
89
90
/**
@@ -186,7 +186,7 @@ class GoogleSitemapGeneratorLoader {
186
}
187
188
public static function KillFrontpageQuery() {
189
- add_filter('posts_request', array('GoogleSitemapGeneratorLoader', 'KillFrontpagePosts'), 1000, 2);
190
}
191
192
public static function KillFrontpagePosts($sql, &$query) {
15
/**
16
* @var Version of the generator in SVN
17
*/
18
+ private static $svnVersion = '$Id: sitemap-loader.php 885004 2014-03-31 11:22:56Z arnee #x27;;
19
20
21
/**
84
85
add_filter('template_redirect', array(__CLASS__, 'DoTemplateRedirect'), 1, 0);
86
87
+ //add_filter('parse_request', array(__CLASS__, 'KillFrontpageQuery'), 1, 0);
88
}
89
90
/**
186
}
187
188
public static function KillFrontpageQuery() {
189
+ //add_filter('posts_request', array('GoogleSitemapGeneratorLoader', 'KillFrontpagePosts'), 1000, 2);
190
}
191
192
public static function KillFrontpagePosts($sql, &$query) {
sitemap.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
3
/*
4
- $Id: sitemap.php 884328 2014-03-29 19:07:26Z arnee $
5
6
Google XML Sitemaps Generator for WordPress
7
==============================================================================
@@ -18,7 +18,7 @@
18
Plugin Name: Google XML Sitemaps
19
Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
20
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.
21
- Version: 4.0
22
Author: Arne Brachhold
23
Author URI: http://www.arnebrachhold.de/
24
Text Domain: sitemap
1
<?php
2
3
/*
4
+ $Id: sitemap.php 885005 2014-03-31 11:23:47Z arnee $
5
6
Google XML Sitemaps Generator for WordPress
7
==============================================================================
18
Plugin Name: Google XML Sitemaps
19
Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
20
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.
21
+ Version: 4.0.1
22
Author: Arne Brachhold
23
Author URI: http://www.arnebrachhold.de/
24
Text Domain: sitemap