#65550 closed enhancement (reported-upstream)
Add hook to disable Font Library
| Reported by: | oglekler | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 7.0 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
For sites with custom themes where fonts are part of the brand identity, there is no need to have the ability to install fonts from the interface. This is only available for users with the ability to edit theme options, but in practice, managers have admin rights, and the developer's task is to unclutter the interface and remove things that are not in use or can potentially break something.
Change History (4)
This ticket was mentioned in PR #12342 on WordPress/wordpress-develop by @khokansardar.
2 months ago
#2
- Keywords has-patch has-unit-tests added
#3
@
2 months ago
- Milestone Awaiting Review
- Resolution → reported-upstream
- Status new → closed
I believe this issue has already been reported upstream. To avoid fragmenting the discussion, let's close this ticket.
@wildworks commented on PR #12342:
2 months ago
#4
Thanks for the PR. As a pull request for this has already been submitted to the Gutenberg repository, let me close this.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Adds a developer hook to disable the Font Library, allowing sites to remove the feature from the admin interface. Useful for sites where fonts are managed by the theme and the ability to install fonts from the UI is not needed.
What the problem was:
edit_theme_optionscapability, which is shared with many unrelated features and cannot be repurposed to switch the feature off.What the fix does:
wp_is_font_library_enabled()and thewp_is_font_library_enabledfilter (defaulttrue).false, the "Fonts" admin submenu item is not registered and the Font Library admin screen (font-library.php) returns a 403.Trac ticket: https://core.trac.wordpress.org/ticket/65550
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.8
Used for: Ticket analysis and tests cases. All changes were reviewed, validated against the codebase, and are taken responsibility for by me.