@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | namespace Flynt\MimeTypes; |
8 | 8 | |
9 | -add_filter('upload_mimes', function ($mimes) { |
|
9 | +add_filter('upload_mimes', function($mimes) { |
|
10 | 10 | $mimes['svg'] = 'image/svg+xml'; |
11 | 11 | return $mimes; |
12 | 12 | }); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // If you use a SVG Optimizer like svgo the xml will be removed by default. |
15 | 15 | // The fix will add the type "image/svg+xml" to files without a xml tag. |
16 | 16 | // Details: https://wordpress.stackexchange.com/questions/340523/why-does-svg-upload-in-media-library-fail-if-the-file-does-not-have-an-xml-tag-a |
17 | -add_filter('wp_check_filetype_and_ext', function ($data, $file, $filename, $mimes, $real_mime) { |
|
17 | +add_filter('wp_check_filetype_and_ext', function($data, $file, $filename, $mimes, $real_mime) { |
|
18 | 18 | |
19 | 19 | if (!empty($data['ext']) && !empty($data['type'])) { |
20 | 20 | return $data; |