theme_button

Versions
mediamosa-21
theme_button($variables)

Theme a button form element.

Parameters

$variables An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #attributes, #button_type, #name, #value.

Return value

A themed HTML string representing the form element.

Related topics

Code

includes/form.inc, line 2691

<?php
function theme_button($variables) {
  $element = $variables['element'];
  $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";
}
?>