Theme Switcher: Default to using the redesigned theme for pages #313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will reverse the logic for loading the redesign theme, so that pages are opted-out of the new theme, rather than opted in. It also makes the page check case-insensitive. This fixes some edge cases where technically-valid page URLs are used, but the theme switcher fails to load the correct template.
For example, the following URLs should now load the correct theme & content.
wordpress.org/About
(or Blocks, as the original issue found, but there's a workaround for that page in place now)wordpress.org/download/releases/6.3/
(IIRC this was reported in slack but not followed up on)wordpress.org/download/beta----nightly/
wordpress.org/download/beta....nightly/
Ideally these URLs should redirect to the real canonical URL, but since they are functional links, the theme should at least not be broken. There are core tickets for the arbitrary dashes and dots in permalinks (which also applies to the 6.3 issue despite seeming related to the post title).
See #245 (comment), https://meta.trac.wordpress.org/ticket/7204
How to test the changes in this Pull Request:
mu-plugins/main-network/theme-switcher.php
)/hosting/
or another "old theme" page