text.php 412 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Elgg text input
  4. * Displays a text input field
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. *
  9. * @uses $vars['class'] Additional CSS class
  10. */
  11. $vars['class'] = (array) elgg_extract('class', $vars, []);
  12. $vars['class'][] = 'elgg-input-text';
  13. $defaults = array(
  14. 'value' => '',
  15. 'disabled' => false,
  16. 'type' => 'text'
  17. );
  18. $vars = array_merge($defaults, $vars);
  19. echo elgg_format_element('input', $vars);