Version Description
Download this release
Release Info
Developer | labnol |
Plugin | Google XML Sitemap for Images |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1.1
- image-sitemap.php +9 -3
- readme.txt +9 -4
image-sitemap.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google XML Sitemap for Images
|
|
4 |
Plugin URI: http://www.labnol.org/internet/google-image-sitemap-for-wordpress/14125/
|
5 |
Description: This plugin will generate a XML Image Sitemap for your WordPress blog. Open the <a href="tools.php?page=image-sitemap-generate-page">settings page</a> to create your image sitemap.
|
6 |
Author: Amit Agarwal
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.labnol.org/
|
9 |
*/
|
10 |
|
@@ -30,6 +30,11 @@ function IsImageSitemapWritable($filename) {
|
|
30 |
return true;
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
function image_sitemap_generate () {
|
34 |
if ($_POST ['submit']) {
|
35 |
$st = image_sitemap_loop ();
|
@@ -104,8 +109,9 @@ function image_sitemap_loop () {
|
|
104 |
|
105 |
foreach($images as $k => $v) {
|
106 |
$permalink = get_permalink($k);
|
107 |
-
|
108 |
-
$
|
|
|
109 |
}
|
110 |
$xml .= "\n</urlset>";
|
111 |
}
|
4 |
Plugin URI: http://www.labnol.org/internet/google-image-sitemap-for-wordpress/14125/
|
5 |
Description: This plugin will generate a XML Image Sitemap for your WordPress blog. Open the <a href="tools.php?page=image-sitemap-generate-page">settings page</a> to create your image sitemap.
|
6 |
Author: Amit Agarwal
|
7 |
+
Version: 2.1.1
|
8 |
Author URI: http://www.labnol.org/
|
9 |
*/
|
10 |
|
30 |
return true;
|
31 |
}
|
32 |
|
33 |
+
function EscapeXMLEntities($xml) {
|
34 |
+
return strtr($xml,
|
35 |
+
array("<" => "<", ">" => ">", "\"" => """, "'" => "'", "&" => "&"));
|
36 |
+
}
|
37 |
+
|
38 |
function image_sitemap_generate () {
|
39 |
if ($_POST ['submit']) {
|
40 |
$st = image_sitemap_loop ();
|
109 |
|
110 |
foreach($images as $k => $v) {
|
111 |
$permalink = get_permalink($k);
|
112 |
+
$url = EscapeXMLEntities($v);
|
113 |
+
$img = "<image:image><image:loc>".implode("</image:loc></image:image><image:image><image:loc>", $url)."</image:loc></image:image>";
|
114 |
+
$xml .= "<url><loc>" . EscapeXMLEntities($permalink) . "</loc>" . $img . "</url>";
|
115 |
}
|
116 |
$xml .= "\n</urlset>";
|
117 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: labnol
|
3 |
Tags: xml sitemaps, google sitemaps, bing, images, seo, search engines, sitemap, pictures
|
4 |
Requires at least: 2.9.2
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
The Image Sitemap plugin will generate an XML Sitemap for Images that exist in your WordPress blog.
|
9 |
|
@@ -13,8 +13,6 @@ XML Sitemaps are a way to tell Google, Bing and other search engines about web p
|
|
13 |
|
14 |
The Image Sitemap plugin will generate a sitemap for your WordPress blog with all the image URLs that are attached to your blog posts and WordPress pages.
|
15 |
|
16 |
-
[New in v2.0] The plugin has been significantly improved and now includes all images including photo galleries, direct embeds and media attachments.
|
17 |
-
|
18 |
**Related WordPress plugins:**
|
19 |
|
20 |
* [Google XML Sitemap for Mobile](http://wordpress.org/extend/plugins/google-mobile-sitemap/)
|
@@ -37,6 +35,13 @@ Here's how you can install the plugin:
|
|
37 |
1. Click the "Generate Sitemap" button to create your XML Sitemap for mobile.
|
38 |
1. Once you have created your Sitemap, you can submit it to Google using Webmaster Tools.
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
== Frequently Asked Questions ==
|
41 |
|
42 |
= How can I submit my image sitemap to Google? =
|
2 |
Contributors: labnol
|
3 |
Tags: xml sitemaps, google sitemaps, bing, images, seo, search engines, sitemap, pictures
|
4 |
Requires at least: 2.9.2
|
5 |
+
Tested up to: 3.5
|
6 |
+
Stable tag: 2.1.1
|
7 |
|
8 |
The Image Sitemap plugin will generate an XML Sitemap for Images that exist in your WordPress blog.
|
9 |
|
13 |
|
14 |
The Image Sitemap plugin will generate a sitemap for your WordPress blog with all the image URLs that are attached to your blog posts and WordPress pages.
|
15 |
|
|
|
|
|
16 |
**Related WordPress plugins:**
|
17 |
|
18 |
* [Google XML Sitemap for Mobile](http://wordpress.org/extend/plugins/google-mobile-sitemap/)
|
35 |
1. Click the "Generate Sitemap" button to create your XML Sitemap for mobile.
|
36 |
1. Once you have created your Sitemap, you can submit it to Google using Webmaster Tools.
|
37 |
|
38 |
+
== Changelog ==
|
39 |
+
[v2.1.1] Compatible with WordPress 3.5
|
40 |
+
|
41 |
+
[v2.1] Data values (including URLs) now use entity escape codes for certain characters.
|
42 |
+
|
43 |
+
[v2.0] The plugin has been significantly improved and now includes all images including photo galleries, direct embeds and media attachments.
|
44 |
+
|
45 |
== Frequently Asked Questions ==
|
46 |
|
47 |
= How can I submit my image sitemap to Google? =
|