Skip to content

Commit

Permalink
VIP: Add images to schemaLocation to pass validation.
Browse files Browse the repository at this point in the history
See Automattic/msm-sitemap#113


git-svn-id: https://vip-svn.wordpress.com/plugins@283921 dd790b09-5c1c-0410-8744-875116bcd8a6
  • Loading branch information
stephboisvert committed Mar 3, 2017
1 parent 3df3927 commit fdb0366
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion msm-sitemap-1.2/msm-sitemap.php
Expand Up @@ -420,10 +420,11 @@ public static function generate_sitemap_for_date( $sitemap_date ) {
// SimpleXML doesn't allow us to define namespaces using addAttribute, so we need to specify them in the construction instead.
$namespaces = apply_filters( 'msm_sitemap_namespace', array(
'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 http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd',
'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9',
'xmlns:n' => 'http://www.google.com/schemas/sitemap-news/0.9',
'xmlns:image' => 'http://www.google.com/schemas/sitemap-image/1.1',
'xsi:schemaLocation' => 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd',

) );

$namespace_str = '<?xml version="1.0" encoding="utf-8"?><urlset';
Expand Down

0 comments on commit fdb0366

Please sign in to comment.