-
Notifications
You must be signed in to change notification settings - Fork 135
/
widgets.php
61 lines (47 loc) · 1.42 KB
/
widgets.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Reporting Sales Tab
*
* @package LifterLMS/Templates/Admin
*
* @since Unknown
* @since 7.2.0 Add content tag param to widget options.
* @version 7.2.0
*/
defined( 'ABSPATH' ) || exit;
if ( ! is_admin() ) {
exit;
}
?>
<?php foreach ( $widget_data as $row => $widgets ) : ?>
<div class="llms-widget-row llms-widget-row-<?php $row; ?>">
<?php foreach ( $widgets as $id => $opts ) : ?>
<div class="llms-widget-<?php echo $opts['cols']; ?>">
<div class="llms-widget is-loading" data-method="<?php echo $id; ?>" id="llms-widget-<?php echo $id; ?>">
<p class="llms-label"><?php echo $opts['title']; ?></p>
<?php if ( ! empty( $opts['link'] ) ) { ?>
<a href="<?php echo esc_url( $opts['link'] ); ?>">
<?php } ?>
<?php
printf(
'<%s class="llms-widget-content">%s</%s>',
esc_html( $opts['content_tag'] ?? 'h3' ),
esc_html( $opts['content'] ?? '' ),
esc_html( $opts['content_tag'] ?? 'h3' )
);
?>
<?php if ( ! empty( $opts['link'] ) ) { ?>
</a>
<?php } ?>
<span class="spinner"></span>
<i class="fa fa-info-circle llms-widget-info-toggle"></i>
<div class="llms-widget-info">
<p><?php echo $opts['info']; ?></p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<div class="llms-charts-wrapper" id="llms-charts-wrapper"></div>
<div id="llms-analytics-json" style="display:none;"><?php echo $json; ?></div>