shortcut_enable
- Versions
- 7
shortcut_enable()
Implements hook_enable().
Code
modules/shortcut/shortcut.install, line 11
<?php
function shortcut_enable() {
if (shortcut_set_load(SHORTCUT_DEFAULT_SET_NAME)) {
// Quit out; this module has already been installed before.
return;
}
$t = get_t();
// Create an initial default shortcut set.
$shortcut_set = new StdClass();
$shortcut_set->title = $t('Default');
$shortcut_set->links = array(
array(
'link_path' => 'node/add',
'link_title' => $t('Add content'),
'weight' => -20,
),
array(
'link_path' => 'admin/content',
'link_title' => $t('Find content'),
'weight' => -19,
),
array(
'link_path' => 'admin/dashboard',
'link_title' => $t('Dashboard'),
'weight' => -18,
),
);
shortcut_set_save($shortcut_set);
}
?>Login or register to post comments 