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
31 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" |
| 15 | test-value="<?php esc_attr_e($stat['count']); ?>"><?php esc_html_e($stat['count']) ?></span> |
| 16 | <span class="growth"> |
| 17 | <?php $direction = $stat['growth'] >= 0 ? 'up' : 'down' ?> |
| 18 | <span class="percentage <?php esc_attr_e($direction) ?>" |
| 19 | test-value="<?php esc_attr_e($stat['growth']); ?>"> |
| 20 | <span class="dashicons dashicons-arrow-<?php esc_attr_e($direction) ?>"></span> |
| 21 | <?php esc_html_e(number_format($stat['growth'])) ?>% |
| 22 | </span> |
| 23 | </span> |
| 24 | </div> |
| 25 | <div class="period-label"> |
| 26 | <?php esc_html_e('vs. previous period', 'iawp') ?> |
| 27 | </div> |
| 28 | </div> |
| 29 | <?php endforeach; ?> |
| 30 | </div> |
| 31 |