Skip to content
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: Update gutenberg_get_global_stylesheet to use WP_Object_Cache #45679

Merged
merged 27 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fad27ea
Global Styles: Update `gutenberg_get_global_stylesheet` to use `WP_Ob…
mmtr Nov 9, 2022
0a23b43
Add remaining hooks
mmtr Nov 9, 2022
714819b
Simplify test setup
mmtr Nov 9, 2022
4f36f72
Rename cache key and functions
mmtr Nov 9, 2022
0f80d71
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 16, 2022
a845e85
Add filter to shortcircuit the cache
mmtr Nov 16, 2022
6014519
Clean cache within `wp_theme_clean_theme_json_cached_data`
mmtr Nov 16, 2022
5acfd40
Fix test
mmtr Nov 16, 2022
4eaeb71
Add missing params in docstring
mmtr Nov 16, 2022
e8a32cb
Create separate function to clean the cache
mmtr Nov 16, 2022
6931aa8
Remove SCRIPT_DEBUG check since it is not usually part of the theme d…
mmtr Nov 16, 2022
a2b9d6f
Clear cache from WP_Theme_JSON_Resolver separately
mmtr Nov 16, 2022
2acbafd
Rename filter
mmtr Nov 16, 2022
30361b5
Fix linting issues
mmtr Nov 16, 2022
b38b5b8
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 17, 2022
0a371d4
Use WP version in since annotation
mmtr Nov 17, 2022
18cd94f
Check parent theme (props @felixarntz)
mmtr Nov 17, 2022
8e2ffb8
Invalidate WP_Theme_JSON_Resolver_Gutenberg cache after toggling a pl…
mmtr Nov 17, 2022
18f1443
Invalidate WP_Theme_JSON_Resolver_Gutenberg cache after an upgrade
mmtr Nov 17, 2022
4f1a1b8
Remove @since 6.2.0 annotations as we don't know which WP version wil…
mmtr Nov 17, 2022
795045a
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 17, 2022
c9df6b4
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 17, 2022
88c1e33
Update phpunit/wp-get-global-stylesheet-test.php
mmtr Nov 17, 2022
9dcdde7
Add missing params to actions
mmtr Nov 18, 2022
9321aca
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 21, 2022
8f642a4
Merge remote-tracking branch 'origin/trunk' into update/global-styles…
mmtr Nov 22, 2022
2b16326
Remove filter
mmtr Nov 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Check parent theme (props @felixarntz)
  • Loading branch information
mmtr committed Nov 17, 2022
commit 18cd94f3b13715196cc9c96f174c4af702818277
Original file line number Diff line number Diff line change
@@ -155,7 +155,8 @@ function _gutenberg_get_global_stylesheet_clean_cache_upon_upgrading( $upgrader,
if (
'core' === $options['type'] ||
'plugin' === $options['type'] ||
( 'theme' === $options['type'] && array_key_exists( get_stylesheet(), $options['themes'] ) )
// Clean cache only if the active theme was updated.
( 'theme' === $options['type'] && ( isset( $options['themes'][ get_stylesheet() ] ) || isset( $options['themes'][ get_template() ] ) ) )
) {
gutenberg_get_global_stylesheet_clean_cache();
}