Drupal delete field programmatically
In your custom module, this is very useful when using hook update.
// Removes field "field_title".
$field = 'field_title';
field_delete_field($field);
field_purge_batch(1);
watchdog('my_module_machine_name', 'Deleted :field_name.', array(':field_name' => $field));
Written by Luc Bézier
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Drupal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#