Skip to content

Conversation

oandregal
Copy link
Member

We want to make sure that theme switching immediately clears the cache.

Props to @dd32

How to test

  • Use an environment where WP_DEBUG and SCRIPT_DEBUG is false.
  • Use a theme with the theme.json file. For example, the empty theme.
  • Load the front-end. Check the styles of the global-styles-inline-css embedded stylesheet.
  • Switch to a different theme. For example, tt1-blocks.
  • Load the front-end. Check the styles of the global-styles-inline-css embedded stylesheet.

The expected result is that switching the theme immediately loads the new styles. The global-styles-inline-css should be different for both themes.

@oandregal oandregal self-assigned this Sep 9, 2021
@oandregal oandregal added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Sep 9, 2021
@oandregal oandregal merged commit 4469d84 into trunk Sep 10, 2021
@oandregal oandregal deleted the fix/global-stylesheet-cache branch September 10, 2021 07:24
@github-actions github-actions bot added this to the Gutenberg 11.6 milestone Sep 10, 2021
bazza pushed a commit to WordPress/wordpress.org that referenced this pull request Sep 20, 2022
… longer needed.

This was rendered unused as the transients are now properly keyed by stylesheet upstream in Core and Gutenberg.

See WordPress/gutenberg#34704
See #5818.


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@12078 74240141-8908-4e6f-9713-ba540dce6ec7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants