-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid changing non-theme-preview requests #51221
Avoid changing non-theme-preview requests #51221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch, there should be no effect in trying to preview without permission.
Hello! Do you folks think theme previews will be part of WordPress 6.3? I'll add it to the backport issue to be sure. If not, we can remove it. Thanks! cc @scruffian |
@ramonjd if there is no major blocker appearing in the mean time I think so yes! |
Yes I agree, I hope it will be in 6.3. |
Thanks for the feedback! |
What?
This PR prevents Block Theme Previews from changing non-theme-preview requests.
Why?
The current implementation would empty the original stylesheet when "there is a URL query (
?theme_preview=
) but no theme preview permission" (this behavior was introduced in #50338).This unintentionally breaks functionality other than Block Theme Previews, so it has been modified not to change it except when Block Theme Previews should be applied.
How?
Testing Instructions