bulk-confirm-popup.php
4 years ago
common-confirm-popup.php
4 years ago
elements_style.php
4 years ago
filters.php
4 years ago
navbar.php
3 years ago
pagination.php
4 years ago
purchase-history-filter.php
4 years ago
search-filter.php
4 years ago
pagination.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Global Pagination Template for Backend Pages |
| 5 | * |
| 6 | * @package Pagination |
| 7 | * @since v2.0.0 |
| 8 | */ |
| 9 | |
| 10 | if (isset($data['total_items']) && $data['total_items']) : ?> |
| 11 | <nav class="tutor-pagination"> |
| 12 | <div class="tutor-pagination-hints"> |
| 13 | <div class="tutor-fs-7 tutor-color-secondary"> |
| 14 | <?php esc_html_e('Page', 'tutor'); ?> |
| 15 | <span class="tutor-fs-7 tutor-fw-medium tutor-color-black"> |
| 16 | <?php echo esc_html($data['paged']); ?> |
| 17 | </span> |
| 18 | <?php esc_html_e('of', 'tutor'); ?> |
| 19 | <span class="tutor-fs-7 tutor-fw-medium tutor-color-black"> |
| 20 | <?php echo esc_html(ceil(0 < $data['per_page']) ? ceil($data['total_items'] / $data['per_page']) : ''); ?> |
| 21 | </span> |
| 22 | </div> |
| 23 | </div> |
| 24 | <ul class="tutor-pagination-numbers"> |
| 25 | <?php |
| 26 | // Pagination. |
| 27 | $paged = $data['paged']; |
| 28 | $per_page = (int)$data['per_page']; |
| 29 | $big = 999999999; |
| 30 | $base = str_replace($big, '%#%', esc_url(admin_url($big) . 'admin.php?paged=%#%')); |
| 31 | |
| 32 | echo paginate_links( |
| 33 | array( |
| 34 | 'base' => !empty($data['base']) ? $data['base'] : $base, |
| 35 | 'format' => '?paged=%#%', |
| 36 | 'current' => $paged, |
| 37 | 'total' => $per_page ? ceil($data['total_items'] / $per_page) : 1, |
| 38 | 'prev_text' => '<span class="tutor-icon-angle-left"></span>', |
| 39 | 'next_text' => '<span class="tutor-icon-angle-right"></span>', |
| 40 | ) |
| 41 | ); |
| 42 | ?> |
| 43 | </ul> |
| 44 | </nav> |
| 45 | <?php endif; ?> |