-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Refactor theme previews #50338
Refactor theme previews #50338
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.
Nice one, works as intended, much cleaner now
864f271
to
ec6fb41
Compare
Flaky tests detected in 864f271ab346e8d24ed4cbbed8bd5d4f7ef2057b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4884313962
|
What?
Refactors the way we filter
stylesheet
andtemplate
to reduce code duplication.Why?
Makes the code easier to maintain.
How?
Uses
current_filter
to get the name of the current filter.Testing Instructions
Check that when you apply ?theme_preview=[theme_path] to your URL, you still see the correct theme being previewed.