function theme_date_timezone in Date 7.3
Same name and namespace in other branches
- 8 date_api/theme/theme.inc \theme_date_timezone()
- 5.2 date_api_elements.inc \theme_date_timezone()
- 6.2 theme/theme.inc \theme_date_timezone()
- 6 date_api_elements.inc \theme_date_timezone()
- 7 date_api/theme/theme.inc \theme_date_timezone()
- 7.2 date_api/theme/theme.inc \theme_date_timezone()
Returns HTML for a date timezone element.
File
- date_api/
theme/ theme.inc, line 11 - Theme files for Date API.
Code
function theme_date_timezone($variables) {
$element = $variables['element'];
$attributes = $element['#attributes'];
$wrapper_attributes = array();
// Add an wrapper to mimic the way a single value field works, for ease in
// using #states.
if (isset($element['#children'])) {
$element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
}
return '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
}