function webform_options_days in Webform 7.3
Same name and namespace in other branches
- 6.3 includes/webform.options.inc \webform_options_days()
- 7.4 includes/webform.options.inc \webform_options_days()
Option list containing the days of the week.
2 string references to 'webform_options_days'
- hook_webform_select_options_info in ./
webform.api.php - Define callbacks that can be used as select list options.
- _webform_options_info in includes/
webform.options.inc - Private implementation of hook_webform_select_options_info().
File
- includes/
webform.options.inc, line 40 - A collection of built-in select list options for Webform.
Code
function webform_options_days($component, $flat, $filter, $arguments) {
$days = array(
'sunday' => t('Sunday'),
'monday' => t('Monday'),
'tuesday' => t('Tuesday'),
'wednesday' => t('Wednesday'),
'thursday' => t('Thursday'),
'friday' => t('Friday'),
'saturday' => t('Saturday'),
);
// Order according to site settings for first day.
if ($first_day = variable_get('date_first_day', 0)) {
$week = array_splice($days, $first_day);
$days = array_merge($week, $days);
}
return $days;
}