function media_file_type_media_claim in D7 Media 7
Implements hook_file_type_TYPE_claim().
Returns TRUE if the passed in file should be assigned the passed in type.
1 string reference to 'media_file_type_media_claim'
- media_file_type_info in includes/
media.types.inc - Implements hook_file_type_info().
File
- includes/
media.types.inc, line 32 - Helper functions related to media types. CRUD for saving their settings mainly.
Code
function media_file_type_media_claim($file, $type) {
if (($type_object = media_type_load($type)) && ($function = $type_object->type_callback) && function_exists($function) && $function($file, $type_object->type_callback_args)) {
return TRUE;
}
}