function autosave_menu_get_item in Autosave 7.2
Retreives a menu item for a given path.
This is a wrapper around menu_get_item() that removes any language prefixes from the path if present.
Parameters
$path: A menu path such as es/node/add/article.
Return value
A menu item array as returned by menu_get_item().
4 calls to autosave_menu_get_item()
- autosave_popup_access in ./
autosave.theme.inc - Menu access callback.
- autosave_restore in ./
autosave.module - Menu callback; AHAH return the form, repopulated with autosaved data.
- autosave_restore_access in ./
autosave.module - Access callback for the form restore menu callback.
- autosave_save_access in ./
autosave.module - Access callback for the form save menu callback.
File
- ./
autosave.module, line 501 - Does background saves of node being edited.
Code
function autosave_menu_get_item($path) {
if (drupal_multilingual() && language_negotiation_get_any(LOCALE_LANGUAGE_NEGOTIATION_URL)) {
$url_part = variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX);
if ($url_part == LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX) {
list($lang, $path) = language_url_split_prefix($path, language_list());
}
}
return menu_get_item($path);
}