Make WordPress Core

Opened 20 months ago

#56954 new enhancement

Add action or constant 'doing_sitemap'

Reported by: cybr's profile Cybr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Sitemaps Keywords:
Focuses: Cc:


At WP_Sitemaps_Renderer::render_sitemap() and WP_Sitemaps_Renderer::render_index(), all preliminary checks for proper sitemap display have been conducted.

To verify we're on an actual sitemap output page, it'd be helpful to have a constant or function asserting we reached this state. Such as define( 'DOING_SITEMAP', true );.

A use case I'm facing is filtering posts in archives from visitors but not necessarily search engines.

Change History (0)

Note: See TracTickets for help on using tickets.