1 file.admin.inc | file_type_delete($type) |
Deletes a file type from the configuration.
Parameters
object|string $type: Either a loaded file type object or the machine-name of the type.
File
- core/
modules/ file/ file.admin.inc, line 637 - Admin page callbacks for the File module.
Code
function file_type_delete($type) {
$info = file_type_get_type($type);
$config = config('file.type.' . $type);
$config->delete();
field_attach_delete_bundle('file', $type);
module_invoke_all('file_type_delete', $info);
// Clear the node type cache.
file_type_cache_reset();
}