function hook_node_type_update
hook_node_type_update($info)
Respond to node type updates.
This hook is invoked from node_type_save() after the node type is updated in the database.
Parameters
$info: The node type object that is being updated.
Related topics
File
- modules/node/node.api.php, line 1016
- Hooks provided by the Node module.
Code
function hook_node_type_update($info) { if (!empty($info->old_type) && $info->old_type != $info->type) { $setting = variable_get('comment_' . $info->old_type, COMMENT_NODE_OPEN); variable_del('comment_' . $info->old_type); variable_set('comment_' . $info->type, $setting); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_type_update/7.x