XML Sitemap & Google News feeds - Version 3.8.3

Version Description

  • filter external URLs inserted by plugins like Page Links To (thanks, Francois)
  • minified sitemap and stylesheet output

  • BUGFIX: qTranslate non-default language home URL

Download this release

Release Info

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

Code changes from version 3.8 to 3.8.3

Files changed (4) hide show
  1. feed-sitemap.php +21 -31
  2. readme.txt +33 -18
  3. sitemap.xsl.php +1 -70
  4. xml-sitemap.php +8 -9
feed-sitemap.php CHANGED
@@ -6,10 +6,9 @@
6
  */
7
 
8
  status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
9
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
10
 
11
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?>
12
- <?xml-stylesheet type="text/xsl" href="'.XMLSF_PLUGIN_URL.'/sitemap.xsl.php?v='.XMLSF_VERSION.'&amp;uri='.str_replace(get_option('home'),"",XMLSF_PLUGIN_URL).'"?>
13
  <!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
14
  <!-- generator="XML Sitemap Feed plugin for WordPress" -->
15
  <!-- generator-url="http://4visions.nl/wordpress-plugins/xml-sitemap-feed/" -->
@@ -79,19 +78,18 @@ $counter = 1;
79
 
80
  // start with the main URL
81
  ?>
82
- <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
83
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
84
- xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
85
- <url>
86
- <loc><?php bloginfo_rss('url') ?>/</loc>
87
- <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified_gmt, false); ?></lastmod>
88
- <changefreq>daily</changefreq>
89
- <priority>1.0</priority>
90
- </url>
91
- <?php
92
  // and loop away!
93
  if ( have_posts() ) : while ( have_posts() && $counter < $maxURLS ) : the_post();
94
 
 
 
 
95
  $thispostmodified_gmt = $post->post_modified_gmt; // post GMT timestamp
96
  $thispostmodified = mysql2date('U',$thispostmodified_gmt); // post Unix timestamp
97
  $lastcomment = array();
@@ -133,24 +131,16 @@ if ( have_posts() ) : while ( have_posts() && $counter < $maxURLS ) : the_post()
133
  // trim priority
134
  $priority = ($priority > $max_priority) ? $max_priority : $priority;
135
  $priority = ($priority < $min_priority) ? $min_priority : $priority;
136
- ?>
137
- <url>
138
- <loc><?php the_permalink() ?></loc>
139
- <lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $thispostmodified_gmt, false) ?></lastmod>
140
- <?php if(($lastactivityage/86400) < 7) { // last activity less than 1 week old ?>
141
- <changefreq>daily</changefreq>
142
- <?php } else if(($lastactivityage/604800) < 12) { // last activity between 1 and 12 weeks old ?>
143
- <changefreq>weekly</changefreq>
144
- <?php } else if(($lastactivityage/604800) < 52) { // last activity between 12 and 52 weeks old ?>
145
- <changefreq>monthly</changefreq>
146
- <?php } else { ?>
147
- <changefreq>yearly</changefreq>
148
- <?php } ?>
149
- <priority><?php echo round($priority,1) ?></priority>
150
- </url>
151
- <?php
152
  $counter++;
153
 
154
  endwhile; endif;
155
- ?>
156
- </urlset>
6
  */
7
 
8
  status_header('200'); // force header('HTTP/1.1 200 OK') for sites without posts
9
+ header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
10
 
11
+ echo '<?xml version="1.0" encoding="'.get_bloginfo('charset').'"?><?xml-stylesheet type="text/xsl" href="'.XMLSF_PLUGIN_URL.'/sitemap.xsl.php?v='.XMLSF_VERSION.'"?>
 
12
  <!-- generated-on="'.date('Y-m-d\TH:i:s+00:00').'" -->
13
  <!-- generator="XML Sitemap Feed plugin for WordPress" -->
14
  <!-- generator-url="http://4visions.nl/wordpress-plugins/xml-sitemap-feed/" -->
78
 
79
  // start with the main URL
80
  ?>
81
+ <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc><?php
82
+ if (function_exists('qtrans_convertURL')) {
83
+ echo esc_url( qtrans_convertURL(trailingslashit(get_bloginfo('url'))) );
84
+ } else {
85
+ echo esc_url( trailingslashit(get_bloginfo('url')) );
86
+ } ?></loc><lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $lastmodified_gmt, false); ?></lastmod><changefreq>daily</changefreq><priority>1.0</priority></url><?php
 
 
 
 
87
  // and loop away!
88
  if ( have_posts() ) : while ( have_posts() && $counter < $maxURLS ) : the_post();
89
 
90
+ // check if we are not dealing with an external URL :: Thanks, Francois Deschenes :)
91
+ if(!preg_match('/^' . preg_quote(get_bloginfo('url'), '/') . '/i', get_permalink())) continue;
92
+
93
  $thispostmodified_gmt = $post->post_modified_gmt; // post GMT timestamp
94
  $thispostmodified = mysql2date('U',$thispostmodified_gmt); // post Unix timestamp
95
  $lastcomment = array();
131
  // trim priority
132
  $priority = ($priority > $max_priority) ? $max_priority : $priority;
133
  $priority = ($priority < $min_priority) ? $min_priority : $priority;
134
+ ?><url><loc><?php echo esc_url( get_permalink() ) ?></loc><lastmod><?php echo mysql2date('Y-m-d\TH:i:s+00:00', $thispostmodified_gmt, false) ?></lastmod><?php
135
+ if(($lastactivityage/86400) < 7) { // last activity less than 1 week old
136
+ ?><changefreq>daily</changefreq><?php
137
+ } else if(($lastactivityage/604800) < 12) { // last activity between 1 and 12 weeks old
138
+ ?><changefreq>weekly</changefreq><?php
139
+ } else if(($lastactivityage/604800) < 52) { // last activity between 12 and 52 weeks old
140
+ ?><changefreq>monthly</changefreq><?php
141
+ } else { ?><changefreq>yearly</changefreq><?php
142
+ } ?><priority><?php echo round($priority,1) ?></priority></url><?php
 
 
 
 
 
 
 
143
  $counter++;
144
 
145
  endwhile; endif;
146
+ ?></urlset>
 
readme.txt CHANGED
@@ -1,23 +1,25 @@
1
  === XML Sitemap Feed ===
2
  Contributors: RavanH
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=3%2e8&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: xml, sitemap, xml sitemap, sitemap.xml, Google, Yahoo, Bing, Live, MSN, wpmu, feed
5
  Requires at least: 2.6
6
- Tested up to: 3.0
7
- Stable tag: 3.8
8
 
9
  Creates a feed (or more when using qTranlate) that complies with the XML Sitemap protocol for indexing by Google, Yahoo, Bing, Ask and others.
10
 
11
  == Description ==
12
 
13
- This plugin dynamically creates an feed that complies with the **XML Sitemap** protocol. There are no options to be set and the feed becomes instantly available after activation on yourblogurl.tld/sitemap.xml and on yourblogurl.tld/?feed=sitemap for if you do not use a fancy permalink structure, ready for indexing by search engines like Google, Yahoo, MSN, Ask.com and others.
14
 
15
- **Now qTranslate compatible!** Tested in Pre-Path and Query Modus. Each language on your site will have its own XML Sitemap.
16
 
17
- A reference to it (or them when using qTranslate) is added to the dynamically created **robots.txt** on yourblogurl.tld/robots.txt to tell search engines where to find your XML Sitemap(s).
 
 
 
 
18
 
19
- *NOTES:*
20
- 1. If you _do not use fancy URL's_ or you have WordPress installed in a _subdirectory_, a dynamic robots.txt will **not** be generated. _You'll have to create your own and upload it to your site root!_ See FAQ's.
21
  2. On large sites, it is advised to use a good caching plugin like **Quick Cache**, **WP Super Cache** or **W3 Total Cache** to improve your site _and_ sitemap performance.
22
 
23
  = Advantages =
@@ -25,15 +27,15 @@ A reference to it (or them when using qTranslate) is added to the dynamically cr
25
  * The main advantage of this plugin over other XML Sitemap plugins is **simplicity**. No need to change file or folder permissions, move files or spend time on a difficult plugin options page. In fact, there are no options at all!
26
  * Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post age and comment/trackback activity.
27
  * Works out-of-the-box, even on **multi-site / shared codebase / multi-blog setups** like WordPress MU, WP 3.0 in MultiSite (WPMS) mode and others.
28
- * Also works when **Network Activated** or placed in **/mu-plugins/** on WP 3.0 in MS mode and WPMU and even takes care to exclude any tags blogs to avoid malus points for link spamming.
29
- * Now **qTranslate** compatible to allow all your languages to be indexed equally.
30
 
31
  = Limitations =
32
 
33
- * The feed contains the front page and all posts and pages but _excludes_ category, tag and other dynamic archive pages. This should not be a problem and by most it is advised to exclude them. There even are SEO plugins around that actively block these archive pages from search engines.
34
- * Except by _re-saving_ older posts from time to time (keeping the lastmod date fairly recent to ensure automatic high priority calculation for those urls) there is no way to manually set the priority of individual posts/pages in the sitemap. See the Faq's for more.
35
  * This plugin does not ping any search engines. But then, WordPress does this by default already via the Ping-o-Matic service so why bother? See the Faq's for more.
36
- * Because the feed is dynamically created, on _very_ large sites the creation process might take a while. Search engines are said to have a short fuse about waiting for a sitemap, so you may want to consider using a cache plugin that also (pre)caches feeds. If you are unfamiliar with caching and server setup start with a simple plugin such as **Quick Cache**. For more options you might find solace in **WP Super Cache** or **W3 Total Cache**.
37
 
38
  = Translations =
39
 
@@ -47,11 +49,15 @@ XML Sitemap Feed was originally based on the (discontinued?) plugin Standard XML
47
 
48
  = Wordpress =
49
 
50
- Just use that slick installation and auto update feature on your Pugins page
 
 
 
 
51
 
52
- &hellip; OR &hellip;
53
 
54
- follow these simple steps:
55
 
56
  1. Download archive.
57
 
@@ -200,7 +206,7 @@ Yes.
200
 
201
  = Can I run this plugin from /mu-plugins/ on WP3.0 MS / WPMU ? =
202
 
203
- Yes.
204
 
205
  == Screenshots ==
206
 
@@ -209,6 +215,12 @@ Yes.
209
 
210
  == Changelog ==
211
 
 
 
 
 
 
 
212
  = 3.8 =
213
  * qTranslate support !
214
  * no more Sitemap reference in robots.txt on non-public blogs
@@ -266,6 +278,9 @@ Yes.
266
 
267
  == Upgrade Notice ==
268
 
 
 
 
269
  = 3.8 =
270
- Now support for **qTranslate**: one XML Sitemap for each language! Plus no more sitemap when site is set to block spidering.
271
 
1
  === XML Sitemap Feed ===
2
  Contributors: RavanH
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=ravanhagen%40gmail%2ecom&amp;item_name=XML%20Sitemap%20Feed&amp;item_number=3%2e8&amp;no_shipping=0&amp;tax=0&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8
4
  Tags: xml, sitemap, xml sitemap, sitemap.xml, Google, Yahoo, Bing, Live, MSN, wpmu, feed
5
  Requires at least: 2.6
6
+ Tested up to: 3.0.1
7
+ Stable tag: 3.8.3
8
 
9
  Creates a feed (or more when using qTranlate) that complies with the XML Sitemap protocol for indexing by Google, Yahoo, Bing, Ask and others.
10
 
11
  == Description ==
12
 
13
+ This plugin dynamically creates an feed that complies with the **XML Sitemap** protocol. There are no options to be set and the feed becomes instantly available on yourblogurl.tld/sitemap.xml (or yourblogurl.tld/?feed=sitemap), ready for indexing by search engines like Google, Yahoo, MSN, Ask.com and others.
14
 
15
+ **Now qTranslate compatible!** Tested in Pre-Path Mode and Query Mode. Each language on your site will have its own XML Sitemap.
16
 
17
+ A reference to it (or _them_, when using qTranslate) is added to the dynamically created **robots.txt** on yourblogurl.tld/robots.txt to tell search engines where to find your XML Sitemap(s).
18
+
19
+ **NOTES:**
20
+
21
+ 1. If you _do not use fancy URL's_ or you have WordPress installed in a _subdirectory_, a dynamic **robots.txt will not be generated**. _You'll have to create your own and upload it to your site root!_ See FAQ's.
22
 
 
 
23
  2. On large sites, it is advised to use a good caching plugin like **Quick Cache**, **WP Super Cache** or **W3 Total Cache** to improve your site _and_ sitemap performance.
24
 
25
  = Advantages =
27
  * The main advantage of this plugin over other XML Sitemap plugins is **simplicity**. No need to change file or folder permissions, move files or spend time on a difficult plugin options page. In fact, there are no options at all!
28
  * Completely **automatic** post URL _priority_ and _change frequency_ calculation based on post age and comment/trackback activity.
29
  * Works out-of-the-box, even on **multi-site / shared codebase / multi-blog setups** like WordPress MU, WP 3.0 in MultiSite (WPMS) mode and others.
30
+ * Also works upon **Network Activate** or placed in **/mu-plugins/** on WP 3.0 in MS mode and WPMU and even takes care to exclude any tags blogs to avoid malus points for link spamming.
31
+ * Compatible with multi-lingual sites using **qTranslate** to allow all languages to be indexed equally.
32
 
33
  = Limitations =
34
 
35
+ * The feed contains the front page and all posts and pages but _excludes_ category, tag and other dynamic archive pages. This should not be a problem and by most it is even _advised_ to exclude them. There are SEO plugins around that actively block these archive pages from search engines.
36
+ * Except by _re-saving_ older posts from time to time (keeping the lastmod date fairly recent) there is no way to manually control the priority of individual posts/pages in the sitemap. See the Faq's for more.
37
  * This plugin does not ping any search engines. But then, WordPress does this by default already via the Ping-o-Matic service so why bother? See the Faq's for more.
38
+ * Because the feed is dynamically created, on _very_ large sites the creation process might take a while. Search engines are said to have a short fuse about waiting for a sitemap, so you may want to consider using a cache plugin that also (pre)caches feeds. If you are unfamiliar with caching and server setup start with an easy caching plugin such as **Quick Cache**. For more options you might find solace in **WP Super Cache** or **W3 Total Cache**.
39
 
40
  = Translations =
41
 
49
 
50
  = Wordpress =
51
 
52
+ Quick installation: [Install now](http://coveredwebservices.com/wp-plugin-install/?plugin=xml-sitemap-feed) !
53
+
54
+ &hellip; OR &hellip;
55
+
56
+ Search for "xml sitemap feed" and install with that slick **Plugins > Add New** back-end page.
57
 
58
+ &hellip; OR &hellip;
59
 
60
+ Follow these steps:
61
 
62
  1. Download archive.
63
 
206
 
207
  = Can I run this plugin from /mu-plugins/ on WP3.0 MS / WPMU ? =
208
 
209
+ Yes. Upload the complete /xml-sitemap-feed/ directory to /wp-content/mu-plugins/ and move the file xml-sitemap.php one dir up.
210
 
211
  == Screenshots ==
212
 
215
 
216
  == Changelog ==
217
 
218
+ = 3.8.3 =
219
+ * filter external URLs inserted by plugins like Page Links To (thanks, Francois)
220
+ * minified sitemap and stylesheet output
221
+
222
+ * BUGFIX: qTranslate non-default language home URL
223
+
224
  = 3.8 =
225
  * qTranslate support !
226
  * no more Sitemap reference in robots.txt on non-public blogs
278
 
279
  == Upgrade Notice ==
280
 
281
+ = 3.8.3 =
282
+ BUGFIX RELEASE. Filter external links (thanks to Francois Deschenes) plus improved qTranslate support.
283
+
284
  = 3.8 =
285
+ Now support for qTranslate: one XML Sitemap for each language! Plus no more sitemap when site is set to block spidering.
286
 
sitemap.xsl.php CHANGED
@@ -5,73 +5,4 @@
5
 
6
  header('Content-Type: text/xsl; charset=utf-8', true);
7
 
8
- echo '<?xml version="1.0" encoding="UTF-8"?>
9
- '; ?>
10
- <xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
11
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
12
- <xsl:template match="/">
13
- <html xmlns="http://www.w3.org/1999/xhtml">
14
- <head>
15
- <title>XML Sitemap Feed</title>
16
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
17
- <style type="text/css">
18
- body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}
19
- #header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}
20
- a{color:black}
21
- td{font-size:11px}
22
- th{text-align:left;padding-right:30px;font-size:11px}
23
- tr.high{background-color:whitesmoke}
24
- </style>
25
- </head>
26
- <body>
27
- <h1>XML Sitemap Feed</h1>
28
- <div id="header">
29
- This is an XML Sitemap to aid search engines like <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com/">Bing</a>, <a href="http://www.yahoo.com">Yahoo!</a> and <a href="http://www.ask.com">Ask</a> indexing your site better. Read more about XML sitemaps on <a href="http://sitemaps.org">Sitemaps.org</a>.
30
- </div>
31
- <div id="content">
32
- <table cellpadding="5">
33
- <tr style="border-bottom:1px black solid;">
34
- <th>#</th>
35
- <th>URL</th>
36
- <th>Priority</th>
37
- <th>Change Frequency</th>
38
- <th>Last Changed</th>
39
- </tr>
40
- <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
41
- <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
42
- <xsl:for-each select="sitemap:urlset/sitemap:url">
43
- <tr>
44
- <xsl:if test="position() mod 2 != 1">
45
- <xsl:attribute name="class">high</xsl:attribute>
46
- </xsl:if>
47
- <td>
48
- <xsl:value-of select="position()"/>
49
- </td>
50
- <td>
51
- <xsl:variable name="itemURL">
52
- <xsl:value-of select="sitemap:loc"/>
53
- </xsl:variable>
54
- <a href="{$itemURL}">
55
- <xsl:value-of select="sitemap:loc"/>
56
- </a>
57
- </td>
58
- <td>
59
- <xsl:value-of select="concat(sitemap:priority*100,'%')"/>
60
- </td>
61
- <td>
62
- <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
63
- </td>
64
- <td>
65
- <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/>
66
- </td>
67
- </tr>
68
- </xsl:for-each>
69
- </table>
70
- </div>
71
- <div id="footer">
72
- <img src="<?php echo $_GET['uri'] ?>/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://4visions.nl/en/index.php?section=57" title="XML Sitemap Feed plugin for WordPress">XML Sitemap Feed <?php echo $_GET['v'] ?></a> running on <a href="http://wordpress.org/">WordPress</a>.
73
- </div>
74
- </body>
75
- </html>
76
- </xsl:template>
77
- </xsl:stylesheet>
5
 
6
  header('Content-Type: text/xsl; charset=utf-8', true);
7
 
8
+ echo '<?xml version="1.0" encoding="UTF-8"?>'; ?><xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/><xsl:template match="/"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>XML Sitemap Feed</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}</style></head><body><h1>XML Sitemap Feed</h1><div id="header">This is an XML Sitemap to aid search engines like <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com/">Bing</a>, <a href="http://www.yahoo.com">Yahoo!</a> and <a href="http://www.ask.com">Ask</a> indexing your site better. Read more about XML sitemaps on <a href="http://sitemaps.org">Sitemaps.org</a>.</div><div id="content"><table cellpadding="5"><tr style="border-bottom:1px black solid;"><th>#</th><th>URL</th><th>Priority</th><th>Change Frequency</th><th>Last Changed</th></tr><xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/><xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/><xsl:for-each select="sitemap:urlset/sitemap:url"><tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if><td><xsl:value-of select="position()"/></td><td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td><td><xsl:value-of select="concat(sitemap:priority*100,'%')"/></td><td><xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/></td><td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td></tr></xsl:for-each></table></div><div id="footer"><img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); ?>/sitemapxml.gif" alt="XML Sitemap" title="XML Sitemap" /> generated by <a href="http://4visions.nl/en/index.php?section=57" title="XML Sitemap Feed plugin for WordPress">XML Sitemap Feed <?php echo $_GET['v'] ?></a> running on <a href="http://wordpress.org/">WordPress</a>.</div></body></html></xsl:template></xsl:stylesheet>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
xml-sitemap.php CHANGED
@@ -2,11 +2,10 @@
2
  /*
3
  Plugin Name: XML Sitemap Feed
4
  Plugin URI: http://4visions.nl/wordpress-plugins/xml-sitemap-feed/
5
- Description: Creates a feed that complies with the XML Sitemap protocol ready for indexing by Google, Yahoo, Bing, Ask and others. Happy with it? 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&item_number=3%2e8&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8">Tip</a></strong> for development and support time. Thanks :)
6
- Version: 3.8
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=XML%20Sitemap%20Feed&item_number=3%2e8&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8
10
  */
11
 
12
  /* Copyright 2009 RavanH (http://4visions.nl/ email : ravanhagen@gmail.com)
@@ -37,7 +36,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
37
  -------------------- */
38
 
39
  // set version
40
- define('XMLSF_VERSION','3.8');
41
 
42
  // dir
43
  $xmlsf_dir = dirname(__FILE__);
@@ -66,8 +65,7 @@ function xml_sitemap_load_template() {
66
  // add sitemap rewrite rules
67
  function xml_sitemap_rewrite($wp_rewrite) {
68
  $feed_rules = array(
69
- 'sitemap.xml' => $wp_rewrite->index . '?feed=sitemap',
70
- 'feed/sitemap' => $wp_rewrite->index . '?feed=sitemap'
71
  );
72
  $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
73
  }
@@ -80,12 +78,13 @@ function xml_sitemap_flush_rewrite_rules() {
80
  // ROBOTSTXT //
81
  // add sitemap location in robots.txt generated by WP
82
  function xml_sitemap_robots() {
83
- echo "\nSitemap: ".trailingslashit(get_option('home'))."sitemap.xml";
84
  if (function_exists('qtrans_convertURL')) {
85
  global $q_config;
86
  foreach($q_config['enabled_languages'] as $language)
87
- if($language != $q_config['default_language'])
88
- echo "\nSitemap: ".qtrans_convertURL(trailingslashit(get_option('home'))."sitemap.xml",$language);
 
89
  }
90
  echo "\n\n";
91
  }
2
  /*
3
  Plugin Name: XML Sitemap Feed
4
  Plugin URI: http://4visions.nl/wordpress-plugins/xml-sitemap-feed/
5
+ Description: Creates a feed that complies with the XML Sitemap protocol ready for indexing by Google, Yahoo, Bing, Ask and others. Happy with it? Please leave me a <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=ravanhagen%40gmail%2ecom&amp;item_name=XML%20Sitemap%20Feed&amp;item_number=3%2e8&no_shipping=0&amp;tax=0&bn=PP%2dDonationsBF&amp;charset=UTF%2d8">Tip</a></strong> for development and support time. Thanks :)
6
+ Version: 3.8.3
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
 
9
  */
10
 
11
  /* Copyright 2009 RavanH (http://4visions.nl/ email : ravanhagen@gmail.com)
36
  -------------------- */
37
 
38
  // set version
39
+ define('XMLSF_VERSION','3.8.3');
40
 
41
  // dir
42
  $xmlsf_dir = dirname(__FILE__);
65
  // add sitemap rewrite rules
66
  function xml_sitemap_rewrite($wp_rewrite) {
67
  $feed_rules = array(
68
+ 'sitemap.xml$' => $wp_rewrite->index . '?feed=sitemap',
 
69
  );
70
  $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
71
  }
78
  // ROBOTSTXT //
79
  // add sitemap location in robots.txt generated by WP
80
  function xml_sitemap_robots() {
81
+
82
  if (function_exists('qtrans_convertURL')) {
83
  global $q_config;
84
  foreach($q_config['enabled_languages'] as $language)
85
+ echo "\nSitemap: ".qtrans_convertURL(trailingslashit(get_bloginfo('url'))."sitemap.xml",$language);
86
+ } else {
87
+ echo "\nSitemap: ".trailingslashit(get_bloginfo('url'))."sitemap.xml";
88
  }
89
  echo "\n\n";
90
  }