You are here

function devel_install in Devel 6

Same name and namespace in other branches
  1. 5 devel.install \devel_install()

Implementation of hook_install()

File

./devel.install, line 36
Install file for devel module.

Code

function devel_install() {
  drupal_install_schema('devel');

  // New module weights in core: put devel as the very last in the chain.
  db_query("UPDATE {system} SET weight = 88 WHERE name = 'devel'");

  // Create our menu. See menu.install for an example.
  $t = get_t();
  db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'devel', $t('Development'), $t('Development links.'));
  $item = array(
    'link_title' => 'Run cron',
    'link_path' => 'admin/reports/status/run-cron',
    'menu_name' => 'devel',
    'module' => 'devel',
  );
  menu_link_save($item);
  $item = array(
    'link_title' => 'Devel settings',
    'link_path' => 'admin/settings/devel',
    'menu_name' => 'devel',
    'module' => 'devel',
  );
  menu_link_save($item);
}