WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#50724 closed defect (bug) (fixed)

Sitemaps: rename 'sitemap' to 'provider' in registry class

Reported by: swissspidy Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Sitemaps Keywords: has-patch
Focuses: Cc:

Description

This would have helped prevent a bug like #50666.

This class is for registering sitemap providers, not individual sitemaps.

Attachments (4)

50724.diff (8.1 KB) - added by swissspidy 3 months ago.
50724.2.diff (6.5 KB) - added by pbiron 3 months ago.
50724.3.diff (7.2 KB) - added by swissspidy 3 months ago.
50724.4.diff (2.0 KB) - added by pbiron 3 months ago.
rename wp_register_sitemap() to wp_register_sitemap_provider()

Download all attachments as: .zip

Change History (14)

@swissspidy
3 months ago

#1 @swissspidy
3 months ago

  • Milestone changed from Awaiting Review to 5.5
  • Version set to trunk

#2 @SergeyBiryukov
3 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 48536:

Sitemaps: Rename 'sitemap' to 'provider' in WP_Sitemaps_Registry class.

This class is for registering sitemap providers, not individual sitemaps.

Props swissspidy.
Fixes #50724.

@pbiron
3 months ago

#3 @pbiron
3 months ago

50724.2.diff additionally changes:

  1. wp_get_sitemaps() to wp_get_sitemaps_providers()
  2. a couple of occurrences of $sitemaps = $registry->get_providers() to $providers = $registry->get_providers() in the unit tests

#4 @SergeyBiryukov
3 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@swissspidy
3 months ago

#5 @swissspidy
3 months ago

In 48540:

Sitemaps: Rename wp_get_sitemaps() to wp_get_sitemaps_providers()

Following [48536], rename the function to match the rest of the sitemaps logic.

Also eliminates some dead code after [48523].

Props pbiron.
See #50724. See #50643.

#6 @SergeyBiryukov
3 months ago

In 48541:

Sitemaps: Rename wp_get_sitemaps_providers() to wp_get_sitemap_providers().

Follow-up to [48536], [48540].

Props pbiron, swissspidy, SergeyBiryukov.
See #50724.

#7 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

@pbiron
3 months ago

rename wp_register_sitemap() to wp_register_sitemap_provider()

#8 @pbiron
3 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reviewing the draft sitemaps dev-note, I noticed one more function that needs to be renamed: wp_register_sitemap() to wp_register_sitemap_provider().

50724.4.diff does that.

This ticket was mentioned in Slack in #core-sitemaps by pbiron. View the logs.


3 months ago

#10 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 48553:

Sitemaps: Rename wp_register_sitemap() to wp_register_sitemap_provider().

Follow-up to [48536], [48540], [48541].

Props pbiron.
Fixes #50724.

Note: See TracTickets for help on using tickets.