PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.9.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.9.0
2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 All 51 releases
← All changes | includes/seo/class-site-identity-manager.php +14 -1 2.8.0 → 2.9.0 View file →
@@ -3703,9 +3703,22 @@
3703 3703 // business sitemap and the sitemaps other plugins register both land
3704 3704 // here for the same reason, so they go through one list (#104).
3705 3705 $extra = [];
3706 3706
3707 - if (file_exists(ABSPATH . 'local-sitemap.xml')) {
3707 + // Not a file test. Under dynamic delivery the local sitemap is
3708 + // served from PHP and no file is ever written, so file_exists()
3709 + // silently dropped a sitemap the site really does publish (#752).
3710 + // On static sites the file is still what proves it, so both count.
3711 + $local_sitemap_published = file_exists(ABSPATH . 'local-sitemap.xml');
3712 +
3713 + if (!$local_sitemap_published && class_exists('ThinkRank\\SEO\\Sitemap_Generator')) {
3714 + $generator = new \ThinkRank\SEO\Sitemap_Generator(false);
3715 +
3716 + $local_sitemap_published = 'dynamic' === $generator->resolve_delivery_mode()
3717 + && $generator->publishes_local_sitemap();
3718 + }
3719 +
3720 + if ($local_sitemap_published) {
3708 3721 $extra[] = '/local-sitemap.xml';
3709 3722 }
3710 3723
3711 3724 foreach (\ThinkRank\SEO\Sitemap_Generator::additional_sitemaps() as $path) {