admin_init

Versions
6
admin_init()

Implementation of hook_init().

Code

contrib-6/admin/admin.module, line 5

<?php
function admin_init() {
  $path = drupal_get_path('module', 'admin');
  drupal_add_js($path .'/toolbar/admin_toolbar.js');
  drupal_add_css($path .'/toolbar/admin_toolbar.css');

  // Initialize the "null" theme -- in effect, bypass the theme system
  // entirely so we can load our own theme into place.
  $item = menu_get_item();
  if (variable_get('node_admin_theme', 0) && in_array($item['page_callback'], array('node_add', 'node_add_page', 'node_page_edit'))) {
    module_load_include('inc', 'admin', 'admin.theme');
    _admin_init_theme();
  }
  else if (arg(0) == 'admin' && (arg(1) .'/'. arg(2) != 'build/block') && variable_get('admin_theme', 'admin') == 'admin') {
    module_load_include('inc', 'admin', 'admin.theme');
    _admin_init_theme();
  }
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options