PluginProbe
Statify / 1.4.1
Statify v1.4.1
2.0.2 2.0.1 trunk 0.7 0.8 0.9 1.0 1.2.8 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 All 32 releases
statify / views / widget_front.view.php

widget_front.view.php in Statify 1.4.1, at views/widget_front.view.php

79 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 /* Quit */
5 class_exists('Statify') OR exit;
6
7
8 /* Get stats */
9 $stats = Statify_Dashboard::get_stats(); ?>
10
11
12 <div id="statify_chart">
13 <?php if ( empty($stats['visits']) ) { ?>
14 <p>
15 <?php esc_html_e('No data available.', 'statify'); ?>
16 </p>
17 <?php } else { ?>
18 <table id="statify_chart_data">
19 <?php foreach( $stats['visits'] as $visit ) { ?>
20 <tr>
21 <th><?php echo date_i18n( get_option('date_format'), strtotime($visit['date']) ); ?></th>
22 <td><?php echo intval($visit['count']); ?></td>
23 </tr>
24 <?php } ?>
25 </table>
26 <?php } ?>
27 </div>
28
29
30 <?php if ( ! empty($stats['target']) ) { ?>
31 <div class="table target">
32 <p class="sub">
33 <?php esc_html_e('Top targets', 'statify'); ?>
34 </p>
35
36 <div>
37 <table>
38 <?php foreach( $stats['target'] as $target ) { ?>
39 <tr>
40 <td class="b">
41 <?php echo intval($target['count']); ?>
42 </td>
43 <td class="t">
44 <a href="<?php echo esc_url($target['url']); ?>" target="_blank">
45 <?php echo esc_html($target['url']); ?>
46 </a>
47 </td>
48 </tr>
49 <?php } ?>
50 </table>
51 </div>
52 </div>
53 <?php } ?>
54
55
56 <?php if ( ! empty ($stats['referrer']) ) { ?>
57 <div class="table referrer">
58 <p class="sub">
59 <?php esc_html_e('Top referers', 'statify'); ?>
60 </p>
61
62 <div>
63 <table>
64 <?php foreach( $stats['referrer'] as $referrer ) { ?>
65 <tr>
66 <td class="b">
67 <?php echo intval($referrer['count']); ?>
68 </td>
69 <td class="t">
70 <a href="<?php echo esc_url($referrer['url']); ?>" target="_blank">
71 <?php echo esc_html($referrer['host']); ?>
72 </a>
73 </td>
74 </tr>
75 <?php } ?>
76 </table>
77 </div>
78 </div>
79 <?php } ?>