Override of theme('textarea') Drupal 7

Public

Override of theme('textarea') Drupal 7

Get raw version
php
  1. /**
  2.  * Override of theme('textarea').
  3.  * Deprecate misc/textarea.js in favor of using the 'resize' CSS3 property.
  4.  */
  5. function xxx_textarea($vars) {
  6. $element = $vars['element'];
  7. element_set_attributes($element, array('id', 'name', 'cols', 'rows'));
  8. _form_set_class($element, array('form-textarea'));
  9.  
  10. $wrapper_attributes = array(
  11. 'class' => array('form-textarea-wrapper'),
  12. );
  13.  
  14. // Add resizable behavior.
  15. if (!empty($element['#resizable'])) {
  16. $wrapper_attributes['class'][] = 'resizable';
  17. }
  18.  
  19. $output = '<div' . drupal_attributes($wrapper_attributes) . '>';
  20. $output .= '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';
  21. $output .= '</div>';
  22.  
  23. return $output;
  24. }