You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WordCamp sites using the Font Library could get stuck in a loop where deactivating one theme font caused another to become active again, making it impossible to fully deactivate both. This change adds a server-side guard for wp_global_styles saves so stale theme-font payloads do not reintroduce fonts that were just turned off.
CopilotAI
changed the title
[WIP] Fix font deactivation issue on WordCamp site
Prevent stale Font Library saves from reactivating theme fonts
May 29, 2026
@copilot Is this a bug in Gutenberg font handling? Is this a bug in the wc-fonts plugin? Why is this needed other than fixing the bug.
This looks like a stale wp_global_styles payload coming from the Gutenberg Font Library save flow, not wc-fonts intentionally reactivating fonts. The reason it lives here is that wc-fonts is currently the WordCamp.org integration point for theme fonts (inject_fonts_theme_json() is still a temporary shim), so this is the safest place to add a server-side guard against that stale payload.
In other words: the underlying bug appears to be upstream/editor-side, but wc-fonts owns the WordCamp.org-side workaround until the native/core path is fully usable here. Once that upstream behavior is fixed and this shim is no longer needed, this guard should be removable too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordCamp sites using the Font Library could get stuck in a loop where deactivating one theme font caused another to become active again, making it impossible to fully deactivate both. This change adds a server-side guard for
wp_global_stylessaves so stale theme-font payloads do not reintroduce fonts that were just turned off.Props @copilot
Normalization on
wp_global_stylessaveswc-fonts.settings.typography.fontFamilies.themepayload with the currently saved theme-font set.Scope
wp_global_stylesupdates.Regression coverage
Screenshots
N/A — admin behavior fix in the Font Library save flow.
How to test the changes in this Pull Request:
Fira CodeandManropecase).