You are here

function _menu_target_retarget_link in Menu target 7

Given an mlid, determines whether this link should be altered

5 calls to _menu_target_retarget_link()
menu_target_edit_form_extra_elements in ./menu_target.admin.inc
Adds extra form elements to either node_form or menu_item_edit_form.
menu_target_menu_link_delete in ./menu_target.module
Implements hook_menu_link_delete(). Removes entry from menu_target_links when menu entry is deleted. This hook is not detected unless present in the .module file
menu_target_preprocess_menu_link in ./menu_target.module
Implements hook_menu_link().
menu_target_preprocess_page in ./menu_target.module
Implements hook_preprocess_page().
_menu_target_edit_form_extra_elements_submit in ./menu_target.module
Implements hook_form_submit(). This is only needed when the menu_target attribute is updated, since the mlid is not available to this function when the menu item is new.

File

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

Code

function _menu_target_retarget_link($mlid) {
  return db_select('menu_target_links', 'm')
    ->fields('m')
    ->condition('mlid', $mlid, '=')
    ->countQuery()
    ->execute()
    ->fetchField();
}