function addanother_goto in Add Another 6
Same name and namespace in other branches
- 7.2 addanother.module \addanother_goto()
- 7 addanother.module \addanother_goto()
Takes the user to the node creation page for the type of a given node.
1 string reference to 'addanother_goto'
- addanother_menu in ./
addanother.module - Implementation of hook_menu().
File
- ./
addanother.module, line 82 - Presents users with an option to create another node of the same type after a node is added.
Code
function addanother_goto($nid) {
if ($node = node_load($nid)) {
drupal_goto('node/add/' . str_replace('_', '-', $node->type));
}
else {
drupal_goto('node/add');
}
}