Add body field to a content type for which it was deleted previously

Public

</> CopyGet raw version
php
  1. node_types_rebuild();
  2. $types = node_type_get_types();
  3. node_add_body_field($types['NODE_TYPE_MACHINE_NAME']);
  4. drupal_set_message('Body field added to NODE_TYPE_MACHINE_NAME');

Comments

manu's picture

Great! Thanks, learned something new!