Display list of allowed mime types get_allowed_mime_types

Adding this snippet to your wordpress theme will display a list of available mime types allowed by wordpress.

 

 

     $mimes = get_allowed_mime_types();
$types = array();
foreach ($mimes as $ext => $mime) {
$types[] = '<li>' . str_replace('|', ', ', $ext) . '</li>';
}
echo '<ul>' . implode('', $types) . '</ul>';

Be Sociable, Share!

Leave a comment