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

WordPress Trac noreply at wordpress.org
Wed Jul 15 08:27:01 UTC 2020


#50660: Not all sitemaps providers can be filtered
--------------------------+---------------------
 Reporter:  Chouby        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.5
Component:  Sitemaps      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------
Changes (by swissspidy):

 * keywords:   => needs-patch
 * type:  enhancement => defect (bug)
 * milestone:  Awaiting Review => 5.5


Comment:

 Thanks for your report! Very useful feedback as always.

 You're right that folks can (and should) use `wp_register_sitemap()` to
 register sitemaps, and that will not pass through the
 `wp_sitemaps_register_providers` filter.

 The filter doc block is a bit misleading: "Filters the list of registered
 sitemap providers."

 It  would be more accurate to say "Filters the list of built-in sitemap
 providers before they are registered.". Not to mention the doc block for
 the class method which could be improved...

 Anyway, I'd consider not being able to unregister/filter sitemaps added
 via `wp_register_sitemap` a **bug**, and we should fix it.

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


More information about the wp-trac mailing list