You are here

function content_init in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 content.module \content_init()
  2. 6 content.module \content_init()
  3. 6.2 content.module \content_init()

Implementation of hook_init().

File

./content.module, line 48
Allows administrators to associate custom fields to content types.

Code

function content_init() {

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

    // we don't do this in hook_menu to ensure the files are already included when
    // views_menu is executed
    if (module_exists('views')) {
      include_once './' . drupal_get_path('module', 'content') . '/content_views.inc';
    }
    if (module_exists('panels')) {
      include_once './' . drupal_get_path('module', 'content') . '/content_panels.inc';
    }

    // according to http://drupal.org/node/60526, this should not go in hook_menu
    if (module_exists('pathauto')) {
      include_once './' . drupal_get_path('module', 'content') . '/content_pathauto.inc';
    }
  }
}