You are here

function menu_target_menu_link_insert in Menu target 7

Implements hook_menu_link_insert(). When a new menu item is created, check to see if they selected the target attribute. If so, save an entry in the menu_target_links table

See also

menu_target_edit_form_extra_elements()

menu_target_set_link()

File

./menu_target.module, line 105
Allows content editors to choose wether or not to open menu items in a new window

Code

function menu_target_menu_link_insert($link) {
  if (!empty($link['target'])) {
    _menu_target_set_link($link['mlid']);
  }
}