You are here

function cdn_mimetype_mapping in CDN 6.2

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

file_get_mimetype()

1 call to cdn_mimetype_mapping()
_cdn_basic_farfuture_get_mimetype in ./cdn.basic.farfuture.inc
Determine an Internet Media Type, or MIME type from a filename. Borrowed from Drupal 7.

File

./cdn.mimetypes.inc, line 18
Provides mimetype mappings. Copied verbatim from Drupal 7 core.

Code

function cdn_mimetype_mapping($reset = FALSE) {
  static $mapping;
  if ($reset) {
    $mapping = NULL;
  }
  if (!isset($mapping)) {
    $mapping = cdn_default_mimetype_mapping();

    // Allow modules to alter the default mapping.
    drupal_alter('cdn_mimetype_mapping', $mapping);
  }
  return $mapping;
}