fix: use `wp_check_filetype` to get a mime type if module FINFO not present
This commit is contained in:
parent
daa0a67aed
commit
e842645b5c
|
@ -188,7 +188,8 @@ class Media {
|
||||||
finfo_close( $finfo );
|
finfo_close( $finfo );
|
||||||
return $mime_type;
|
return $mime_type;
|
||||||
}
|
}
|
||||||
return '';
|
$filetypes = \wp_check_filetype($filename);
|
||||||
|
return isset($filetypes['type']) && $filetypes['type'] != false ? $filetypes['type'] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue