You are here

function menu_reset_item in Drupal 4

Same name and namespace in other branches
  1. 5 modules/menu/menu.module \menu_reset_item()
  2. 6 modules/menu/menu.module \menu_reset_item()
  3. 7 modules/menu/menu.module \menu_reset_item()

Menu callback; reset a single modified item.

1 string reference to 'menu_reset_item'
menu_menu in modules/menu.module
Implementation of hook_menu().

File

modules/menu.module, line 462
Allows administrators to customize the site navigation menu.

Code

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();
  }
}