function pm_menu_save_links in Drupal PM (Project Management) 7.3
Save link specific settings for dashboard menu item.
1 call to pm_menu_save_links()
- pm_menu_admin_submit in includes/
pm.menu.inc - Submit callback for menu_admin form.
File
- includes/
pm.menu.inc, line 267 - Drupal Pm Menu Admin settings.
Code
function pm_menu_save_links($type, $items) {
$menu_items = variable_get('pm_dashboard_links_' . $type, array());
foreach ($items as $item) {
if (!empty($item['delete'])) {
unset($menu_items[$item['id']]);
continue;
}
if ($item['custom'] == FALSE) {
$item['id'] = $item['path'];
}
if (empty($item['id'])) {
$item['id'] = uniqid('pm_menu_custom_');
$menu_items[$item['id']] = $item;
}
else {
$menu_items[$item['id']] = $item;
}
}
variable_set('pm_dashboard_links_' . $type, $menu_items);
drupal_set_message(t('The configuration options have been saved.'), 'status');
}