function menu_icons_admin_settings in Menu Icons 6.2
Same name and namespace in other branches
- 8 menu_icons.module \menu_icons_admin_settings()
- 6 menu_icons.module \menu_icons_admin_settings()
- 7.3 menu_icons.module \menu_icons_admin_settings()
Build the menu_icon's settings form
Return value
a form array
1 string reference to 'menu_icons_admin_settings'
- menu_icons_menu in ./
menu_icons.module - Implementation of hook_menu().
File
- ./
menu_icons.module, line 136 - Module to associate icons with menu items
Code
function menu_icons_admin_settings() {
$form['menu_icons_default_icon'] = array(
'#type' => 'textfield',
'#title' => t('Icon path'),
'#default_value' => variable_get('menu_icons_default_icon', drupal_get_path('module', 'menu_icons') . '/images/default_icon.png'),
'#description' => t('A Drupal path to the icon or image to use as a default.'),
'#required' => FALSE,
);
$form['menu_icons_file_validate_image_resolution'] = array(
'#type' => 'textfield',
'#title' => t('Max image resolution'),
'#default_value' => variable_get('menu_icons_file_validate_image_resolution', '45x45'),
'#description' => t('The maximum image resolution for the menu-icons. If an uploaded image exceeds this size, the image is resized automatically.'),
'#required' => FALSE,
);
$form['menu_icons_image_folder'] = array(
'#type' => 'textfield',
'#title' => t('Icon folder'),
'#default_value' => variable_get('menu_icons_image_folder', 'menu_icons'),
'#description' => t('The name of the files directory in which the new uploaded icons will be stored. This folder will be created in the files directory'),
'#required' => FALSE,
);
$form['menu_icons_position'] = array(
'#type' => 'select',
'#title' => t('Position'),
'#default_value' => variable_get('menu_icons_position', 'left'),
'#options' => array(
'right' => t('right'),
'left' => t('left'),
),
'#required' => FALSE,
);
// Clear the cached css
cache_clear_all('menu_icons', 'cache');
return system_settings_form($form);
}