Wrong image urls in sitemaps on relative multisite install
-
In relative multisite install sitemaps will have bad urls for images with relative paths.
So if home url is domain.com/us and the image src in post is /us/wp-content/image.png it will show up in sitemap as domain.com/us/us/wp-content/image.png
I’ve fixed it but if I were to use SVN I’d have to kill myself and Linus wouldn’t talk to me anymore so if anyone can be bothered they should add this code to inc/class-sitemap-image-parser.php line 387
$url = parse_url($this->home_url);
return $url[‘scheme’] . ‘://’ . $url[‘host’] . $src;instead of
return $this->home_url . $srcThank you for listening to my ted talk.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Wrong image urls in sitemaps on relative multisite install’ is closed to new replies.