From 1a3aa059bee9a9cdc13c7a434e6a54ff03af521e Mon Sep 17 00:00:00 2001 From: Madhu Dollu Date: Wed, 20 Sep 2023 15:35:32 +0530 Subject: [PATCH] remove upload_mimes filter after uploading fonts (#54647) --- lib/experimental/fonts/font-library/class-wp-font-family.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/experimental/fonts/font-library/class-wp-font-family.php b/lib/experimental/fonts/font-library/class-wp-font-family.php index 6beedea27dae02..ad7b0d207cd0dd 100644 --- a/lib/experimental/fonts/font-library/class-wp-font-family.php +++ b/lib/experimental/fonts/font-library/class-wp-font-family.php @@ -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(