function theme_phone in Phone 7.2
Returns HTML for a phone element.
File
- includes/
phone.element.inc, line 235 - Provides FAPI implementation for a phone element.
Code
function theme_phone($variables) {
$element = $variables['element'];
$attributes = !empty($element['#attributes']) ? $element['#attributes'] : array(
'class' => array(),
);
$wrapper_attributes = array(
'class' => array(
'clearfix',
),
);
// 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>';
}