[wp-trac] [WordPress Trac] #50660: Not all sitemaps providers can be filtered

WordPress Trac noreply at wordpress.org
Tue Jul 14 16:19:22 UTC 2020


#50660: Not all sitemaps providers can be filtered
-------------------------+-----------------------------
 Reporter:  Chouby       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Sitemaps     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 For the context: to allow multilingual sitemaps with Polylang, and after
 [https://core.trac.wordpress.org/ticket/50465#comment:3 this comment], I
 implemented a sitemaps provider decorator replacing the existing providers
 with the filter `wp_sitemaps_register_providers`. See
 https://github.com/polylang/polylang/blob/2.8-beta1/modules/sitemaps/sitemaps.php#L152-L163

 However I realized that if another provider is added directly, for example
 with `wp_register_sitemap()`, it is not seen by the filter
 `wp_sitemaps_register_providers` and it looks like there is no alternative
 to filter it.

 So I suggest to add a filter allowing to filter all registered sitemap
 providers.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50660>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list