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

Font Library: remove "has_font_mime_type" function #57364

Conversation

HrithikDalal
Copy link
Contributor

What?

Remove the WP_Font_Family_Utils::has_font_mime_type() function and its tests. It's no longer necessary. The mime type check of the downloaded/uploaded files is done by the core function wp_handle_upload, and a custom check is no longer required.

Why?

Issue reference - #54875

How?

This PR removes WP_Font_Family_Utils::has_font_mime_type() references, definitions, and tests.

Testing Instructions

Verify that the Font Library works as before. ( Screencast )

  • Editor > Styles > Typography > Manage Fonts > Uploads

Screenshots or screencast

chrome-capture-2023-12-25

Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @HrithikDalal! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 25, 2023
@matiasbenedetto matiasbenedetto added [Type] Enhancement A suggestion for improvement. Needs PHP backport Needs PHP backport to Core labels Dec 28, 2023
Copy link
Contributor

@matiasbenedetto matiasbenedetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HrithikDalal, thanks for the PR.
This looks good to me 🚀
Let's merge after all the CI checks pass.

@matiasbenedetto matiasbenedetto merged commit 36396cc into WordPress:trunk Dec 28, 2023
55 of 59 checks passed
@github-actions github-actions bot added this to the Gutenberg 17.5 milestone Dec 28, 2023
@youknowriad youknowriad added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Needs PHP backport Needs PHP backport to Core labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants