Elgg  Version 1.11
plaintext.php
Go to the documentation of this file.
1 <?php
15 $vars['class'] = (array) elgg_extract('class', $vars, []);
16 $vars['class'][] = 'elgg-input-plaintext';
17 
18 $defaults = array(
19  'value' => '',
20  'rows' => '10',
21  'cols' => '50',
22  'disabled' => false,
23 );
24 
25 $vars = array_merge($defaults, $vars);
26 
27 $value = htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
28 unset($vars['value']);
29 
30 echo elgg_format_element('textarea', $vars, $value);
$value
Definition: plaintext.php:27
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:215
$vars['class']
Definition: plaintext.php:15
elgg echo
Translates a string.
Definition: languages.js:43
$defaults
Definition: plaintext.php:18