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 / admin / layouts / tag / icon.php
vikappointments / admin / layouts / tag Last commit date
badge.php 3 days ago icon.php 3 days ago index.html 3 days ago
icon.php
55 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 /**
15 * Layout variables
16 * -----------------
17 * @var object $tag The object holding the tag details.
18 * @var array $attrs A list of field attributes.
19 */
20 extract($displayData);
21
22 if (!isset($attrs['style']))
23 {
24 $attrs['style'] = '';
25 }
26
27 // check if the tag owns a color
28 if ($tag->color)
29 {
30 // overwrite default color of the tag
31 $attrs['style'] .= 'color: #' . $tag->color . ';';
32 }
33
34 $attrs['title'] = $tag->name;
35
36 // fetch attributes string
37 $attrs_str = '';
38
39 foreach ($attrs as $k => $v)
40 {
41 if ($k != 'class')
42 {
43 $attrs_str .= ' ' . $k;
44
45 if (!is_bool($v))
46 {
47 $attrs_str .= ' = "' . $this->escape($v) . '"';
48 }
49 }
50 }
51
52 ?>
53
54 <i class="<?php echo $tag->icon . (!empty($attrs['class']) ? ' ' . $attrs['class'] : ''); ?> hasTooltip"<?php echo $attrs_str; ?>></i>
55