file_mimetype_mapping

function file_mimetype_mapping

file_mimetype_mapping()

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()

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!file.mimetypes.inc/function/file_mimetype_mapping/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部