layout
3 years ago
learn
3 years ago
pdf
3 years ago
settings
3 years ago
table
3 years ago
campaign_builder.php
3 years ago
migration_running.php
3 years ago
newer_database.php
3 years ago
quick_stats.php
3 years ago
real_time.php
3 years ago
quick_stats.php
32 lines
| 1 | <?php $class = $is_filtered ? 'quick-stats filtered' : 'quick-stats' ?> |
| 2 | <?php $class .= ' total-of-' . count($stats) ?> |
| 3 | <div id="quick-stats" class="<?php esc_attr_e($class); ?>"> |
| 4 | <?php foreach ($stats as $stat): ?> |
| 5 | <div class="stat <?php esc_attr_e($stat['class']); ?>"> |
| 6 | <div class="metric"> |
| 7 | <?php esc_html_e($stat['title']); ?> |
| 8 | <span class="dashicons dashicons-filter"></span> |
| 9 | <svg class="circle" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> |
| 10 | <circle cx="50" cy="50" r="50"/> |
| 11 | </svg> |
| 12 | </div> |
| 13 | <div class="values"> |
| 14 | <span class="count" test-value="<?php esc_attr_e(strip_tags($stat['count'])); ?>"> |
| 15 | <?php echo wp_kses($stat['count'], ['span' => []]); ?> |
| 16 | <?php if ($is_filtered) : ?> |
| 17 | <span class="unfiltered"> / <?php esc_html_e($stat['unfiltered']) ?></span> |
| 18 | <?php endif; ?> |
| 19 | </span> |
| 20 | </div> |
| 21 | <span class="growth"> |
| 22 | <?php $direction = $stat['growth'] >= 0 ? 'up' : 'down' ?> |
| 23 | <span class="percentage <?php esc_attr_e($direction) ?>" |
| 24 | test-value="<?php esc_attr_e($stat['growth']); ?>"> |
| 25 | <span class="dashicons dashicons-arrow-up-alt growth-arrow"></span><?php echo absint(number_format($stat['growth'])); ?>% |
| 26 | </span> |
| 27 | <span class="period-label"><?php esc_html_e('vs. previous period', 'iawp') ?></span> |
| 28 | </span> |
| 29 | </div> |
| 30 | <?php endforeach; ?> |
| 31 | </div> |
| 32 |