-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 backend: can we use _wp_handle_upload() mime type validation ? #53576
Comments
I looked into the issue and the check fails because of the following. The function But the function
WordPress core should add support for |
Yes, that could work. I'm not aware of specific restrictions about that maybe @azaozz could add more input here. |
Related to: php/php-src#8805 Trac issue: https://core.trac.wordpress.org/ticket/59277#ticket |
What ?
Could we use
_wp_handle_upload()
mime type validation in the Font Library backend ?See:
gutenberg/lib/experimental/fonts-library/class-wp-font-family.php
Line 184 in 69d9ca3
gutenberg/lib/experimental/fonts-library/class-wp-font-family.php
Line 227 in 69d9ca3
gutenberg/lib/experimental/fonts-library/class-wp-font-family.php
Line 278 in 69d9ca3
_wp_handle_upload() documents a 'mimes' key for $overrides which gets passed to wp_check_filetype_and_ext(), so would something like this work?
Context
See this @costdev 's comment here:
#52704 (comment)
Tracking issue
Part of Fonts Library implementation effort:
#52698
The text was updated successfully, but these errors were encountered: