I am having a module which declares a content type via hook_node_info(). The module also sets webform as dependency. How can I enable webform for this content type in codes so when my module is enabled, my content type is also webform-enabled.

Thanks!

Comments

In hook_enable() or hook_install():

$types = variable_get('webform_node_types', array('webform'));
$types[] = 'my_new_type';
variable_set('webform_node_types', $types);

Status:Active» Closed (fixed)

Issue summary:View changes

clarify