PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / site / layouts / form / fields / textarea.php
vikappointments / site / layouts / form / fields Last commit date
checkbox.php 2 days ago color.php 2 days ago date.php 2 days ago editor.php 2 days ago file.php 2 days ago hidden.php 2 days ago html.php 2 days ago index.html 2 days ago number.php 2 days ago select.php 2 days ago separator.php 2 days ago tel.php 2 days ago text.php 2 days ago textarea.php 2 days ago
textarea.php
47 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 $name = !empty($displayData['name']) ? $displayData['name'] : 'name';
15 $id = !empty($displayData['id']) ? $displayData['id'] : $name;
16 $value = isset($displayData['value']) ? $displayData['value'] : '';
17 $class = isset($displayData['class']) ? $displayData['class'] : '';
18 $width = isset($displayData['width']) ? $displayData['width'] : '';
19 $height = isset($displayData['height']) ? $displayData['height'] : '80px';
20 $rows = isset($displayData['rows']) ? $displayData['rows'] : null;
21 $cols = isset($displayData['cols']) ? $displayData['cols'] : null;
22
23 $style = array();
24
25 if ($width)
26 {
27 $style[] = 'width: ' . $width . (is_numeric($width) ? 'px' : '') . ';';
28 }
29
30 if ($height)
31 {
32 $style[] = 'height: ' . $height . (is_numeric($height) ? 'px' : '') . ';';
33 }
34
35 ?>
36
37 <textarea
38 name="<?php echo $this->escape($name); ?>"
39 id="<?php echo $this->escape($id); ?>"
40 size="40"
41 class="<?php echo $this->escape($class); ?>"
42 style="<?php echo $this->escape(implode(' ', $style)); ?>"
43 <?php echo $rows ? 'rows="' . (int) $rows . '"' : ''; ?>
44 <?php echo $cols ? 'cols="' . (int) $cols . '"' : ''; ?>
45 aria-labelledby="<?php echo $id; ?>-label"
46 ><?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?></textarea>
47