Skip to content

Instantly share code, notes, and snippets.

@bleeDev
Last active September 27, 2015 06:08
Show Gist options
  • Save bleeDev/1223366 to your computer and use it in GitHub Desktop.
Save bleeDev/1223366 to your computer and use it in GitHub Desktop.
Extending Facet API for Mime Type 2
<?php
function MYMODULE_map_mime(array $values) {
$map = $values;
$mimes = array(
'application/pdf'=>'PDF',
'application/msword'=>'Word Document',
'application/vnd.ms-excel'=>'Excel',
);
$map = array();
foreach ($mimes as $type => $name) {
$map[$type] = $name;
}
return $map;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment