function theme_button in Drupal 4
Same name and namespace in other branches
- 5 includes/form.inc \theme_button()
- 6 includes/form.inc \theme_button()
- 7 includes/form.inc \theme_button()
Related topics
1 theme call to theme_button()
- theme_submit in includes/
form.inc
File
- includes/
form.inc, line 994
Code
function theme_button($element) {
//Make sure not to overwrite classes
if (isset($element['#attributes']['class'])) {
$element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class'];
}
else {
$element['#attributes']['class'] = 'form-' . $element['#button_type'];
}
return '<input type="submit" ' . (empty($element['#name']) ? '' : 'name="' . $element['#name'] . '" ') . 'value="' . check_plain($element['#value']) . '" ' . drupal_attributes($element['#attributes']) . " />\n";
}