function menu_links_features_export_options in Features 7
Same name and namespace in other branches
- 6 includes/features.menu.inc \menu_links_features_export_options()
- 7.2 includes/features.menu.inc \menu_links_features_export_options()
Implements hook_features_export_options().
File
- includes/
features.menu.inc, line 133
Code
function menu_links_features_export_options() {
global $menu_admin;
// Need to set this to TRUE in order to get menu links that the
// current user may not have access to (i.e. user/login)
$menu_admin = TRUE;
$menu_links = menu_parent_options(menu_get_menus(), array(
'mlid' => 0,
));
$options = array();
foreach ($menu_links as $key => $name) {
list($menu_name, $mlid) = explode(':', $key, 2);
if ($mlid != 0) {
$link = menu_link_load($mlid);
$identifier = menu_links_features_identifier($link);
$options[$identifier] = "{$menu_name}: {$name}";
}
}
$menu_admin = FALSE;
return $options;
}