You are here

function nodehierarchy_get_node_parent_primary in Node Hierarchy 7.4

Get the primary parent nid for the given node.

2 calls to nodehierarchy_get_node_parent_primary()
nodehierarchy_menu_overview_form_submit in nodehierarchy_menu/nodehierarchy_menu.module
Save the new weight for a nodehierarchy item after a reorder.
_nodehierarchy_menu_create_node_menu_link in nodehierarchy_menu/nodehierarchy_menu.module
Get the menu link for the given node.

File

./nodehierarchy.api.inc, line 31
API functions for Node Hierarchy

Code

function nodehierarchy_get_node_parent_primary($node) {
  $parents = nodehierarchy_get_node_parents($node, 1);
  return current($parents);
}