function menu_update_7002 in Drupal 7
Rename the primary/secondary menu blocks to match previously renamed menus.
Related topics
File
- modules/
menu/ menu.install, line 168 - Install, update and uninstall functions for the menu module.
Code
function menu_update_7002(&$sandbox) {
// Check for the presence of old or new table names.
if (db_table_exists('blocks') || db_table_exists('block')) {
$renamed_deltas = array(
'menu' => array(
'primary-links' => 'main-menu',
'secondary-links' => 'secondary-menu',
),
);
$moved_deltas = array(
'menu' => array(
'main-menu' => 'system',
),
);
update_fix_d7_block_deltas($sandbox, $renamed_deltas, $moved_deltas);
}
}