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 / status / badge.php
vikappointments / admin / layouts / status Last commit date
badge.php 2 days ago default.php 2 days ago index.html 2 days ago
badge.php
38 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 * @param object status Holds the details of the status code.
18 */
19 extract($displayData);
20
21 // check if the status color is bright or dark
22 if (JHtml::fetch('vaphtml.color.light', $status->color))
23 {
24 // we have a light background, so we need to use a darker foreground
25 $fg_color = '333';
26 }
27 else
28 {
29 // we have a dark background, so we need to use a lighter foreground
30 $fg_color = 'fff';
31 }
32
33 ?>
34
35 <span class="badge" style="background-color: #<?php echo $status->color; ?>; color: #<?php echo $fg_color; ?>;">
36 <?php echo $status->name; ?>
37 </span>
38