Skip to content

Commit

Permalink
remove upload_mimes filter after uploading fonts (#54647)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhusudhand authored Sep 20, 2023
1 parent cd21e71 commit 1a3aa05
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ public function install( $files = null ) {
add_filter( 'upload_dir', array( 'WP_Font_Library', 'set_upload_dir' ) );
$were_assets_written = $this->download_or_move_font_faces( $files );
remove_filter( 'upload_dir', array( 'WP_Font_Library', 'set_upload_dir' ) );
remove_filter( 'upload_mimes', array( 'WP_Font_Library', 'set_allowed_mime_types' ) );

if ( ! $were_assets_written ) {
return new WP_Error(
Expand Down

0 comments on commit 1a3aa05

Please sign in to comment.