function nodesymlinks_pathauto_create_alias in NodeSymlinks 7
Same name and namespace in other branches
- 6 nodesymlinks.pathauto.inc \nodesymlinks_pathauto_create_alias()
Function for creating aliases using Pathauto API.
3 calls to nodesymlinks_pathauto_create_alias()
- nodesymlinks_item_alias_save in ./
nodesymlinks.inc - Create alias for duplicate menulink if original node.
- _nodesymlinks_form_field in ./
nodesymlinks.inc - Helper function to generate custom nodesymlinks form item.
- _nodesymlinks_pathauto_bulkupdate in ./
nodesymlinks.inc - Generate aliases for all nodesymlinks without aliases.
File
- ./
nodesymlinks.inc, line 656 - Main NodeSymlinks callbacks
Code
function nodesymlinks_pathauto_create_alias($item, $node, $op = 'return') {
module_load_include('inc', 'pathauto');
$language = isset($node->language) ? $node->language : LANGUAGE_NONE;
$uri = nodesymlinks_create_item_path($item, $node);
return pathauto_create_alias('nodesymlinks', $op, $uri, array(
'node' => $node,
'menu-link' => $item,
), $node->type, $language);
}