function om_search_theme in OM Tools 6.2
Search Theme Form
1 call to om_search_theme()
- om_search_tools in tools/
search/ search.inc - Search Tools Form
File
- tools/
search/ search.inc, line 242 - Search Tools
Code
function om_search_theme($search_defaults = array()) {
// Search Theme
$out = array();
// reset, restores default values on initial install
if ($search_defaults['search_theme_reset'] || !isset($search_defaults['search_theme_label'])) {
$search_defaults['search_theme_label'] = 1;
$search_defaults['search_theme_label_text'] = 'Search this site';
$search_defaults['search_theme_size'] = 15;
$search_defaults['search_theme_hover'] = 'Enter the terms you wish to search for.';
$search_defaults['search_theme_button'] = 'Go';
$search_defaults['search_theme_reset'] = 0;
}
$out['search_theme_switch'] = array(
'#type' => 'checkbox',
'#title' => t('Change Search Theme Form'),
'#default_value' => $search_defaults['search_theme_switch'],
);
$out['search_theme_settings'] = array(
'#type' => 'fieldset',
'#attributes' => array(
'id' => 'om-group-search-theme-settings',
),
'#title' => t('Search Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$out['search_theme_settings']['search_theme_label'] = array(
'#type' => 'checkbox',
'#title' => t('Put label inside the search box.'),
'#default_value' => $search_defaults['search_theme_label'],
);
$out['search_theme_settings']['search_theme_label_text'] = array(
'#type' => 'textfield',
'#title' => t('Label Text'),
'#default_value' => $search_defaults['search_theme_label_text'],
);
$out['search_theme_settings']['search_theme_size'] = array(
'#type' => 'textfield',
'#title' => t('Search box size'),
'#default_value' => $search_defaults['search_theme_size'],
);
$out['search_theme_settings']['search_theme_hover'] = array(
'#type' => 'textfield',
'#title' => t('Rollover Text'),
'#default_value' => $search_defaults['search_theme_hover'],
);
$out['search_theme_settings']['search_theme_button'] = array(
'#type' => 'textfield',
'#title' => t('Button Text'),
'#default_value' => $search_defaults['search_theme_button'],
);
$out['search_theme_reset'] = array(
'#type' => 'checkbox',
'#title' => t('Reset to default values.'),
'#default_value' => $search_defaults['search_theme_reset'],
);
return $out;
}