Version Description
- fixed - The sitemaps protocol allows only one category per video
- fixed - location of sitemap in the error messages - thanks @ashishmohta
- fixed - limit the number of tags to 32
Download this release
Release Info
Developer | labnol |
Plugin | Google XML Sitemap for Videos |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.2
- readme.txt +6 -1
- video-sitemap.php +5 -2
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: labnol
|
|
3 |
Tags: youtube, xml sitemaps, google sitemaps, videos, seo, sitemaps, video sitemap
|
4 |
Requires at least: 2.9.2
|
5 |
Tested up to: 3.0.1
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
This plugin will help you generate Google Video Sitemaps (XML) for your WordPress blog.
|
9 |
|
@@ -62,6 +62,11 @@ The Sitemaps protocol enables you to let search engines know what content you wo
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
65 |
= 2.1 =
|
66 |
* If the plugin is unable to create a sitemap file, it gives an option to manually create the file.
|
67 |
* More error handling included.
|
3 |
Tags: youtube, xml sitemaps, google sitemaps, videos, seo, sitemaps, video sitemap
|
4 |
Requires at least: 2.9.2
|
5 |
Tested up to: 3.0.1
|
6 |
+
Stable tag: 2.2
|
7 |
|
8 |
This plugin will help you generate Google Video Sitemaps (XML) for your WordPress blog.
|
9 |
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= 2.2 =
|
66 |
+
* fixed - The sitemaps protocol allows only one category per video
|
67 |
+
* fixed - location of sitemap in the error messages - thanks @ashishmohta
|
68 |
+
* fixed - limit the number of tags to 32
|
69 |
+
|
70 |
= 2.1 =
|
71 |
* If the plugin is unable to create a sitemap file, it gives an option to manually create the file.
|
72 |
* More error handling included.
|
video-sitemap.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google XML Sitemap for Videos
|
|
4 |
Plugin URI: http://www.labnol.org/software/xml-video-sitemaps-for-google/14085/
|
5 |
Description: This plugin will generate a XML Video Sitemap for your WordPress blog. Open the <a href="tools.php?page=video-sitemap-generate-page">settings page</a> to create your video sitemap.
|
6 |
Author: Amit Agarwal
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.labnol.org/
|
9 |
*/
|
10 |
|
@@ -62,7 +62,7 @@ exit();
|
|
62 |
<iframe src="http://www.facebook.com/plugins/likebox.php?id=5791561181&width=250&height=260&connections=8&stream=false&header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:260px"></iframe>
|
63 |
</div>
|
64 |
<h2>XML Sitemap for Videos</h2>
|
65 |
-
<?php $sitemapurl =
|
66 |
<p>The XML Sitemap was generated successfully. Please open the <a target="_blank" href="<?php echo $sitemapurl; ?>">Sitemap file</a> in your favorite web browser to confirm that there are no errors.</p>
|
67 |
<p>You can submit your Video XML Sitemap through <a href="http://www.google.com/webmasters/tools/" target="_blank">Webmaster Tools</a> or you can directly <a target="_blank" href="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php echo $sitemapurl; ?>">ping Google</a>.</p>
|
68 |
<h3>Suggestions?</h3>
|
@@ -137,7 +137,9 @@ function video_sitemap_loop () {
|
|
137 |
$xml .= " <video:publication_date>".date (DATE_W3C, strtotime ($post->post_date_gmt))."</video:publication_date>\n";
|
138 |
|
139 |
$posttags = get_the_tags($post->id); if ($posttags) {
|
|
|
140 |
foreach ($posttags as $tag) {
|
|
|
141 |
$xml .= " <video:tag>$tag->name</video:tag>\n";
|
142 |
}
|
143 |
}
|
@@ -145,6 +147,7 @@ function video_sitemap_loop () {
|
|
145 |
$postcats = get_the_category($post->id); if ($postcats) {
|
146 |
foreach ($postcats as $category) {
|
147 |
$xml .= " <video:category>$category->name</video:category>\n";
|
|
|
148 |
}
|
149 |
}
|
150 |
|
4 |
Plugin URI: http://www.labnol.org/software/xml-video-sitemaps-for-google/14085/
|
5 |
Description: This plugin will generate a XML Video Sitemap for your WordPress blog. Open the <a href="tools.php?page=video-sitemap-generate-page">settings page</a> to create your video sitemap.
|
6 |
Author: Amit Agarwal
|
7 |
+
Version: 2.2
|
8 |
Author URI: http://www.labnol.org/
|
9 |
*/
|
10 |
|
62 |
<iframe src="http://www.facebook.com/plugins/likebox.php?id=5791561181&width=250&height=260&connections=8&stream=false&header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:260px"></iframe>
|
63 |
</div>
|
64 |
<h2>XML Sitemap for Videos</h2>
|
65 |
+
<?php $sitemapurl = $_SERVER["DOCUMENT_ROOT"] . "/sitemap-video.xml"; ?>
|
66 |
<p>The XML Sitemap was generated successfully. Please open the <a target="_blank" href="<?php echo $sitemapurl; ?>">Sitemap file</a> in your favorite web browser to confirm that there are no errors.</p>
|
67 |
<p>You can submit your Video XML Sitemap through <a href="http://www.google.com/webmasters/tools/" target="_blank">Webmaster Tools</a> or you can directly <a target="_blank" href="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php echo $sitemapurl; ?>">ping Google</a>.</p>
|
68 |
<h3>Suggestions?</h3>
|
137 |
$xml .= " <video:publication_date>".date (DATE_W3C, strtotime ($post->post_date_gmt))."</video:publication_date>\n";
|
138 |
|
139 |
$posttags = get_the_tags($post->id); if ($posttags) {
|
140 |
+
$tagcount=0;
|
141 |
foreach ($posttags as $tag) {
|
142 |
+
if ($tagcount++ > 32) break;
|
143 |
$xml .= " <video:tag>$tag->name</video:tag>\n";
|
144 |
}
|
145 |
}
|
147 |
$postcats = get_the_category($post->id); if ($postcats) {
|
148 |
foreach ($postcats as $category) {
|
149 |
$xml .= " <video:category>$category->name</video:category>\n";
|
150 |
+
break;
|
151 |
}
|
152 |
}
|
153 |
|