You are here

function nodehierarchy_init in Node Hierarchy 5

Same name and namespace in other branches
  1. 6.3 nodehierarchy.module \nodehierarchy_init()
  2. 6 nodehierarchy.module \nodehierarchy_init()
  3. 6.2 nodehierarchy.module \nodehierarchy_init()
  4. 7.2 nodehierarchy.module \nodehierarchy_init()

Implementation of hook_init().

File

./nodehierarchy.module, line 12
A module to make nodes hierarchical.

Code

function nodehierarchy_init() {

  // Ensure we are not serving a cached page.
  if (function_exists('drupal_set_content')) {

    // According to http://drupal.org/node/60526, this should not go in hook_menu.
    if (module_exists('pathauto')) {
      include_once './' . drupal_get_path('module', 'nodehierarchy') . '/nodehierarchy_pathauto.inc';
    }
    if (module_exists('token')) {
      include_once './' . drupal_get_path('module', 'nodehierarchy') . '/nodehierarchy_token.inc';
    }

    // Workflow-ng module support.
    if (module_exists('workflow_ng')) {
      include_once drupal_get_path('module', 'nodehierarchy') . '/nodehierarchy_workflow_ng.inc';
    }
    include_once './' . drupal_get_path('module', 'nodehierarchy') . '/nodehierarchy_theme.inc';
  }
}