#65593: remove sitemap stylesheets#12448
Conversation
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
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? |
|
Good question. Is CSS able to style the XML sufficiently? |
|
@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. |
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.xslwill stop working for site visitors and no longer serves its purpose.After this change,
/wp-sitemap.xsland/wp-sitemap-index.xsl404, 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, andwp-settings.php, deleting the obsoleteWP_Sitemaps_Stylesheetclass, 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.