function nodehierarchy_get_node_parent_primary_nid in Node Hierarchy 7.4
Get the primary parent nid for the given node.
2 calls to nodehierarchy_get_node_parent_primary_nid()
- nodehierarchy_get_node_parent_primary_node in ./
nodehierarchy.api.inc - Get the primary parent node for the given node.
- nodehierarchy_get_node_primary_ancestor_nids in ./
nodehierarchy.api.inc - Get the ancestor nodes for the given node.
File
- ./
nodehierarchy.api.inc, line 39 - API functions for Node Hierarchy
Code
function nodehierarchy_get_node_parent_primary_nid($node) {
$nodes = nodehierarchy_get_node_parent_nids($node, 1);
return current($nodes);
}