PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 1.0.6
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v1.0.6
3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 All 122 releases
firebox / Inc / Core / Layouts / admin / analytics / overview / item.table.php

item.table.php in FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment 1.0.6, at Inc/Core/Layouts/admin/analytics/overview/item.table.php

82 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package FireBox
4 * @version 1.0.6 Free
5 *
6 * @author FirePlugins <info@fireplugins.com>
7 * @link https://www.fireplugins.com
8 * @copyright Copyright © 2021 FirePlugins All Rights Reserved
9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 */
11
12 if (!defined('ABSPATH'))
13 {
14 exit; // Exit if accessed directly.
15 }
16 $item = new \FPFramework\Libs\Registry($this->data);
17
18 $table_columns = (array) $item->get('table_columns', []);
19
20 $current_data = (array) $item->get('current_period.data', []);
21 $last_period_data = (array) $item->get('last_period.data', []);
22 ?>
23 <table class="table table-header-fixed cols-<?php echo esc_attr(count($table_columns)); ?>">
24 <thead>
25 <?php
26 foreach ($table_columns as $key => $value)
27 {
28 $title = isset($value['title']) ? $value['title'] : '';
29 ?>
30 <th<?php echo ($title) ? ' title="' . esc_attr($title) . '"' : ''; ?>><?php echo esc_html($value['label']); ?></th>
31 <?php
32 }
33 ?>
34 </thead>
35 <tbody>
36 <?php
37 if (count($current_data))
38 {
39 $allowed_tags = [
40 'a' => [
41 'href' => true
42 ],
43 'span' => [
44 'class' => true
45 ]
46 ];
47
48 foreach ($current_data as $key => $value)
49 {
50 $value = (array) $value;
51 ?>
52 <tr>
53 <?php
54 foreach ($value as $_key => $_value)
55 {
56 if (is_object($_value) || is_array($_value))
57 {
58 $_value = (array) $_value;
59 }
60
61 $col_label = isset($_value['label']) ? $_value['label'] : (!is_array($_value) ? $_value : '');
62 $col_link = isset($_value['link']) ? $_value['link'] : '';
63 $col_class = isset($_value['class']) ? $_value['class'] : '';
64
65 $link_start = $col_link ? '<a href="' . esc_url($col_link) . '">' : '';
66 $link_end = $col_link ? '</a>' : '';
67 ?>
68 <td<?php echo !empty($col_class) ? ' class="' . esc_attr($col_class) . '"' : ''; ?>><?php echo ($link_start ? wp_kses($link_start, $allowed_tags) : '') . ($col_label ? wp_kses($col_label, $allowed_tags) : '-') . ($link_end ? wp_kses($link_end, $allowed_tags) : ''); ?></td>
69 <?php
70 }
71 ?>
72 </tr>
73 <?php
74 }
75 }
76 else
77 {
78 ?><tr class="empty"><td colspan="<?php echo esc_attr(count($table_columns)); ?>"><?php echo esc_html(fpframework()->_('FPF_ANALYTICS_TABLE_NO_DATA_TO_DISPLAY')); ?></td></tr><?php
79 }
80 ?>
81 </tbody>
82 </table>