Top Tags

Backport Control Panel to work on 4.6.3

function controlpanel_settings() { // Clear the page cache, so that changed menus are reflected cache_clear_all(); // Also clear the menu cache. cache_clear_all('menu:', TRUE); $output = ''; $child_levels = drupal_map_assoc(array(2, 3, 4)); $icon_sizes = drupal_map_assoc(array('24x24', '36x36', '48x48')); $group = form_textfield(t("Menu Path"), 'controlpanel_menu_path', variable_get('controlpanel_menu_path', 'admin'), 20, 20, t('Enter the path of the menu structure you want displayed in the Control Panel.')); $group .= form_select(t("Icon Size"), 'controlpanel_icon_size', variable_get('controlpanel_icon_size', '36x36'), $icon_sizes, t('Select the size of the control panel icons.')); $output .= form_group(t("General"), $group); $group = form_checkbox(t("Build Child Menu Panels"), 'controlpanel_build_children', 1, variable_get('controlpanel_build_children', 0), t('Check this box to recursively build child panels.')); $group .= form_select(t("Build Number of Levels"), 'controlpanel_child_levels', variable_get('controlpanel_child_levels', 2), $child_levels, t('Select how many control panel levels to build.')); if (file_exists('misc/collapse.js')) { $group .= form_checkbox(t('Make child panels collapsable'), 'controlpanel_child_collapsable', 1, variable_get('controlpanel_child_collapsable', 1), t('Check this box to allow child panels to be collapsed.')); } $output .= form_group(t("Child Panels"), $group); return $output; }