function file_mimetype_mapping in Drupal 7
Return an array of MIME extension mappings.
Returns the mapping after modules have altered the default mapping.
Return value
Array of mimetypes correlated to the extensions that relate to them.
See also
1 call to file_mimetype_mapping()
- DrupalLocalStreamWrapper::getMimeType in includes/
stream_wrappers.inc - Base implementation of getMimeType().
File
- includes/
file.mimetypes.inc, line 18 - Provides mimetype mappings.
Code
function file_mimetype_mapping() {
$mapping =& drupal_static(__FUNCTION__);
if (!isset($mapping)) {
$mapping = file_default_mimetype_mapping();
// Allow modules to alter the default mapping.
drupal_alter('file_mimetype_mapping', $mapping);
}
return $mapping;
}