-
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
Theme.json Documentation - Added new FAQ on disabling caching of theme.json #42346
Conversation
One of the issues that many devs face when working with theme.json for the first time is waiting for the browser to show their changes. I posed this question to twitter and the community has provided a terrific answer that deserves to be included here for future developers to also utilize and hopefully avoid any initial frustrations in the developer experience. Original Tweet: https://twitter.com/schutzsmith/status/1544365317731880963?s=21&t=nCyZ2sva06NMv_8khBOgdw Answer 1: https://twitter.com/cometmarie/status/1544411492010835970 Answer 2: https://twitter.com/fklux/status/1545297824794959872
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @schutzsmith! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
This is super helpful information :) Thanks for adding this section!
For anyone interested here is the actual code where it determines whether to cache the results or not: https://github.com/WordPress/wordpress-develop/blob/9b105d92a4b769f396ba798db1f106abab75001f/src/wp-includes/global-styles-and-settings.php#L91-L97 |
Congratulations on your first merged pull request, @schutzsmith! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Thank you, I copied the information to the theme developer handbook in case someone uses that as their entry point. |
What?
One of the issues that many devs face when working with theme.json for the first time is waiting for the browser to show their changes. Unfortunately it takes 30+ seconds if you do not have WP_DEBUG or SCRIPT_DEBUG set to true to bypass caching theme.json.
Why?
This documentation is to help other developers learning for the first time. Will provide a better developer experience.
How?
Explains what they need to do to bypass caching of theme.json
Testing Instructions
Screenshots or screencast
I posed this question to twitter and the community has provided a terrific answer that deserves to be included here for future developers to also utilize and hopefully avoid any initial frustrations in the developer experience.
Original Tweet: https://twitter.com/schutzsmith/status/1544365317731880963?s=21&t=nCyZ2sva06NMv_8khBOgdw
Answer 1: https://twitter.com/cometmarie/status/1544411492010835970
Answer 2: https://twitter.com/fklux/status/1545297824794959872