Skip to content

#65593: remove sitemap stylesheets#12448

Open
masteradhoc wants to merge 1 commit into
WordPress:trunkfrom
masteradhoc:xsl-stylesheet
Open

#65593: remove sitemap stylesheets#12448
masteradhoc wants to merge 1 commit into
WordPress:trunkfrom
masteradhoc:xsl-stylesheet

Conversation

@masteradhoc

@masteradhoc masteradhoc commented Jul 8, 2026

Copy link
Copy Markdown

Removes the sitemap XSL stylesheet feature from core. Chrome and other browsers are deprecating and removing XSLT support (https://developer.chrome.com/docs/web-platform/deprecating-xslt), so the <?xml-stylesheet?> processing instruction pointing at /wp-sitemap.xsl / /wp-sitemap-index.xsl will stop working for site visitors and no longer serves its purpose.

After this change, /wp-sitemap.xsl and /wp-sitemap-index.xsl 404, and generated sitemap XML no longer includes a stylesheet processing instruction.

Trac ticket: https://core.trac.wordpress.org/ticket/65593

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5
Used for: Implementing the removal across WP_Sitemaps, WP_Sitemaps_Renderer, canonical.php, and wp-settings.php, deleting the obsolete WP_Sitemaps_Stylesheet class, and updating/removing the associated PHPUnit tests. All changes were reviewed and tested by me.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@masteradhoc masteradhoc changed the title remove sitemap stylesheets #65593: remove sitemap stylesheets Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@masteradhoc masteradhoc marked this pull request as ready for review July 8, 2026 08:36
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props masteradhoc, westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@masteradhoc

Copy link
Copy Markdown
Author

@westonruter

This PR removes the XSLT-based sitemap stylesheet entirely. That aligns with Chrome's XSLT deprecation (https://developer.chrome.com/docs/web-platform/deprecating-xslt).

But: per Chrome's own docs, type="text/css" continues to be supported (see "XML + CSS is not being removed"). So there's an open question for core: do we want to keep some human-readable sitemap styling via a CSS-based , or is dropping styling altogether the intended outcome here?

@westonruter

Copy link
Copy Markdown
Member

Good question. Is CSS able to style the XML sufficiently?

@masteradhoc

Copy link
Copy Markdown
Author

@westonruter worth a try IMO. I'd though suggest we'll split it so we can first get rid of the existing implementation and then see if and what we want to style it moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants