function theme_button in Drupal 5
Same name and namespace in other branches
- 4 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 1369
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'] . '" ') . 'id="' . $element['#id'] . '" value="' . check_plain($element['#value']) . '" ' . drupal_attributes($element['#attributes']) . " />\n";
}