-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathwidget-front.php
More file actions
71 lines (62 loc) · 1.79 KB
/
widget-front.php
File metadata and controls
71 lines (62 loc) · 1.79 KB
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
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Statify: Widget Frontend View
*
* This file contains the viewmodel for the plugin's widget frontend.
*
* @package Statify
*/
// Quit if accessed outside WP context.
class_exists( 'Statify' ) || exit;
$limit = (int) Statify::$_options['limit'];
$show_totals = (int) Statify::$_options['show_totals'];
?>
<div id="statify_chart">
<span class="spinner is-active" title="<?php esc_html_e( 'loading', 'statify' ); ?>"></span>
</div>
<?php if ( $limit > 0 ) : ?>
<div class="table referrer">
<p class="sub"><?php esc_html_e( 'Top referers', 'statify' ); ?></p>
<table>
<tbody>
<?php for ( $i = 0; $i < $limit; $i++ ) { ?>
<tr class="placeholder">
<td colspan="2"> </td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="table target">
<p class="sub"><?php esc_html_e( 'Top targets', 'statify' ); ?></p>
<table>
<tbody>
<?php for ( $i = 0; $i < $limit; $i++ ) { ?>
<tr class="placeholder"><td colspan="2"> </td></tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="table searches">
<p class="sub"><?php esc_html_e( 'Top searches', 'statify' ); ?></p>
<table>
<tbody>
<?php for ( $i = 0; $i < $limit; $i++ ) { ?>
<tr class="placeholder"><td colspan="2"> </td></tr>
<?php } ?>
</tbody>
</table>
</div>
<?php endif; if ( $show_totals ) : ?>
<div class="table total">
<p class="sub"><?php esc_html_e( 'Totals', 'statify' ); ?></p>
<table>
<tbody>
<tr class="placeholder"><td colspan="2"> </td></tr>
<tr class="placeholder"><td colspan="2"> </td></tr>
</table>
</div>
<?php endif; ?>
<div class="statify-refresh-button-wrapper">
<button type="button" class="button button-primary" id="statify_refresh"><?php esc_html_e( 'Refresh', 'statify' ); ?></button>
</div>