-
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
Global Styles: Use low-level cache for get_user_data_from_wp_global_styles #45634
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.
Thanks for the PR!
This backports code that is in core, both in 6.1 and trunk
. I've done some testing and it works fine: using style variations in both new sites (no wp_global_styles CPT) and old sites; changing themes; using WordPress 6.1 and 6.0 as base.
I was unable to reproduce the bug with import content in Gutenberg trunk
(the issue that was raised in 6.1 RC3). This change is worth doing anyway.
Backports changes from WordPress/wordpress-develop#3517
See also #44946 and https://core.trac.wordpress.org/ticket/56901
Proposed changes
This change removes caching of global styles for logged in users, allowing "wp_global_styles" custom post type to be imported completely, regardless of any previously cached data. This change now relies on the lower-level native WP_Query cache invalidation methods for the global styles post type.
Testing Instructions