Font Library: remove has_font_mime_type function #54875
Labels
[Feature] Typography
Font and typography-related issues and PRs
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Enhancement
A suggestion for improvement.
What?
We could simplify the code by entirely removing the
WP_Font_Family_Utils::has_font_mime_type()
function and its tests.This was a workaround when we didn't have the
wp_handle_upload()
mime type checking in place.gutenberg/lib/experimental/fonts/font-library/class-wp-font-family-utils.php
Lines 87 to 92 in 937d51e
Why?
We can remove it now because 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.The text was updated successfully, but these errors were encountered: