Skip to content

Remove deprecated Gutenberg Fonts API workaround#1666

Open
dd32 wants to merge 1 commit into
productionfrom
fix/claude/1549-deprecated-fonts-api
Open

Remove deprecated Gutenberg Fonts API workaround#1666
dd32 wants to merge 1 commit into
productionfrom
fix/claude/1549-deprecated-fonts-api

Conversation

@dd32
Copy link
Copy Markdown
Member

@dd32 dd32 commented Mar 24, 2026

Summary

  • Remove the inject_fonts_theme_json method and its wp_theme_json_data_theme filter from the wc-fonts plugin
  • This was a temporary workaround (with a @todo to remove it when Gutenberg 17.6 was rolled out) for injecting custom fonts before the core Font Library was available
  • Gutenberg is now at 22.6, well past the 17.6 milestone, so this workaround is no longer needed
  • The hardcoded fonts (Krona One, Lora for WCEU 2024; Roboto, Roboto Slab, Sansita for WC Asia 2024) were for past events
  • Also removes usage of _wp_array_get and _wp_array_set which are deprecated since WP 6.7

Fixes #1549

Test plan

  • Verify no deprecated font notices are thrown on WordCamp sites
  • Verify the Appearance > Fonts settings page still works for Typekit, Google Web Fonts, Font Awesome, and Dashicons
  • Verify the Font Library is accessible and functional for adding custom fonts to WordCamp sites

Generated with Claude Code

Remove the inject_fonts_theme_json method and its wp_theme_json_data_theme
filter hook. This was a temporary workaround added when the core Font Library
was not yet available on WordCamp.org (marked with a @todo to remove when
Gutenberg 17.6 was rolled out). Gutenberg is now at 22.6, well past that
milestone. The hardcoded fonts for WC Europe 2024 and WC Asia 2024 are for
past events and no longer needed. This also removes usage of deprecated
_wp_array_get and _wp_array_set functions.

Fixes #1549

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dd32
Copy link
Copy Markdown
Member Author

dd32 commented Apr 29, 2026

Note: Verify #1075 and #1216 first, verify that the fonts are re-enabled/imported onto the sites in question after merge, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fonts: Gutenberg fonts implementation deprecated.

1 participant