You are here

function devel_enable in Devel 7

Implements hook_enable().

File

./devel.install, line 6

Code

function devel_enable() {
  $t = get_t();

  // New module weights in core: put devel as the very last in the chain.
  db_update('system')
    ->fields(array(
    'weight' => 88,
  ))
    ->condition('type', 'module')
    ->condition('name', 'devel')
    ->execute();

  // Create a custom menu, if Menu module is enabled.
  // @see devel_modules_installed()
  if (module_exists('menu')) {
    $menu = array(
      'menu_name' => 'devel',
      'title' => $t('Development'),
      'description' => $t('Development link'),
    );
    menu_save($menu);
  }
}