function content_menu_install in Content Menu 7
Same name and namespace in other branches
- 8 content_menu.install \content_menu_install()
Implements hook_install().
File
- ./
content_menu.install, line 11 - Installation hooks for Content Menu module
Code
function content_menu_install() {
// Set weight to come after core menu.module.
// Make sure this module's hooks' weight is set to be executed after the core.
// Menu.module's hooks, so the node add/edit form is already altered by the.
// Menu.module befor content_menu does its form alterations.
$weight = db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('name', 'menu', '=')
->execute()
->fetchField();
db_update('system')
->fields(array(
'weight' => $weight + 1,
))
->condition('name', 'content_menu', '=')
->execute();
}