function total_control_menus_content_type_edit_form in Total Control Admin Dashboard 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/menus.inc \total_control_menus_content_type_edit_form()
'Edit form' callback for the content type.
File
- plugins/
content_types/ menus.inc, line 96
Code
function total_control_menus_content_type_edit_form($form, &$form_state) {
if (!module_exists('menu')) {
return $form;
}
$conf = $form_state['conf'];
$menus = menu_get_menus();
foreach ($menus as $machine => $name) {
if (!in_array($machine, array(
'management',
'user-menu',
'devel',
))) {
$menu_defaults[$machine] = $machine;
}
}
$form['menus'] = array(
'#type' => 'checkboxes',
'#title' => t('Show links for the following menus on the dashboard'),
'#options' => $menus,
'#default_value' => $conf['menus'] ? $conf['menus'] : $menu_defaults,
);
return $form;
}