function tb_megamenu_export_mlid_to_identifier in The Better Mega Menu 7
Convert a mlid to an identifier consisting of urlencoded link title and path.
Parameters
int $mlid: Menu item's mlid.
Return value
string Identifier.
See also
tb_megamenu_export_identifier_to_mlid()
1 call to tb_megamenu_export_mlid_to_identifier()
- tb_megamenu_export_convert_mlids in ./
tb_megamenu.features.inc - Converts the "mlid" fields to system-independent identifiers.
File
- ./
tb_megamenu.features.inc, line 206 - Features related functions.
Code
function tb_megamenu_export_mlid_to_identifier($mlid) {
// Set the language to the site's default, not 'en'. This is useful when using
// modules like taxonomy_menu that mess with the translation of the links
$default_language = language_default('language');
global $language;
$language->language = $default_language;
$link = menu_link_load($mlid);
// Urlencode title and path to make the separating colon the only one (title
// and/or path might contain colons, too).
return urlencode($link['link_title']) . ':' . urlencode($link['link_path']);
}