function hook_node_type_insert
Respond to node type creation.
This hook is invoked from node_type_save() after the node type is added to the database.
Parameters
$info: The node type object that is being created.
Related topics
2 functions implement hook_node_type_insert()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- comment_node_type_insert in modules/
comment/ comment.module - Implements hook_node_type_insert().
- node_node_type_insert in modules/
node/ content_types.inc - Implements hook_node_type_insert().
1 invocation of hook_node_type_insert()
- node_type_save in modules/
node/ node.module - Saves a node type to the database.
File
-
modules/
node/ node.api.php, line 1003
Code
function hook_node_type_insert($info) {
drupal_set_message(t('You have just created a content type with a machine name %type.', array(
'%type' => $info->type,
)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.