You are here

function system_init in Drupal 6

Same name and namespace in other branches
  1. 7 modules/system/system.module \system_init()

Implementation of hook_init().

File

modules/system/system.module, line 531
Configuration system that lets administrators modify the workings of the site.

Code

function system_init() {

  // Use the administrative theme if the user is looking at a page in the admin/* path.
  if (arg(0) == 'admin' || variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit')) {
    global $custom_theme;
    $custom_theme = variable_get('admin_theme', '0');
    drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', 'module');
  }

  // Add the CSS for this module.
  drupal_add_css(drupal_get_path('module', 'system') . '/defaults.css', 'module');
  drupal_add_css(drupal_get_path('module', 'system') . '/system.css', 'module');
  drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', 'module');
}