function file_type_load in D7 Media 7
Returns an object with file type information, so that %file_type can be used in hook_menu() paths.
In addition to the information returned by file_info_file_types(), the 'type' property is set for use by field_extract_bundle().
File
- file_entity/
file_entity.file_api.inc, line 47 - API extensions of Drupal core's file.inc.
Code
function file_type_load($type) {
$info = file_info_file_types($type);
if (isset($info)) {
$info = (object) $info;
$info->type = $type;
return $info;
}
else {
return FALSE;
}
}