| Versions | |
|---|---|
| 4.7 – 5 | menu_reset_item( |
| 6 | menu_reset_item( |
| 7 | menu_reset_item($link) |
Menu callback; reset a single modified item.
modules/
<?php
function menu_reset_item($mid) {
if (isset($mid) && $title = db_result(db_query('SELECT title FROM {menu} WHERE mid = %d', $mid))) {
$form['mid'] = array(
'#type' => 'value',
'#value' => $mid,
);
return confirm_form('menu_reset_item_form', $form, t('Are you sure you want to reset the item %item to its default values?', array('%item' => theme('placeholder', $title))), 'admin/menu', t('Any customizations will be lost. This action cannot be undone.'), t('Reset'));
}
else {
drupal_not_found();
}
}
?>