function i18n_nodeapi in Internationalization 6
Same name and namespace in other branches
- 5.3 i18n.module \i18n_nodeapi()
- 5 i18n.module \i18n_nodeapi()
- 5.2 i18n.module \i18n_nodeapi()
Implementation of hook_nodeapi().
File
- ./
i18n.module, line 180 - Internationalization (i18n) module.
Code
function i18n_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
global $language;
if (variable_get('language_content_type_' . $node->type, 0)) {
// Set current language for new nodes if option enabled
if ($op == 'prepare' && empty($node->nid) && empty($node->language) && variable_get('i18n_newnode_current_' . $node->type, 0)) {
$node->language = $language->language;
}
}
}