function _content_admin_field_remove_submit in Content Construction Kit (CCK) 5
Same name and namespace in other branches
- 6 includes/content.admin.inc \_content_admin_field_remove_submit()
Remove a field from a content type.
File
- ./
content_admin.inc, line 706 - Administrative interface for content type creation.
Code
function _content_admin_field_remove_submit($form_id, $form_values) {
$type = content_types($form_values['type_name']);
$field = $type['fields'][$form_values['field_name']];
if ($type && $field && $form_values['confirm']) {
include_once './' . drupal_get_path('module', 'content') . '/content_crud.inc';
content_field_instance_delete($form_values);
drupal_set_message(t('Removed field %field from %type.', array(
'%field' => $field['widget']['label'],
'%type' => $type['name'],
)));
content_clear_type_cache();
return 'admin/content/types/' . $type['url_str'] . '/fields';
}
}