load-more.php
24 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Load more ajax button template |
| 4 | * ?for usage checkout: tutor/templates/single/lesson/comment.php:30 |
| 5 | * |
| 6 | * @package Tutor\Templates |
| 7 | * @subpackage Dashboard\Elements |
| 8 | * @author Themeum <support@themeum.com> |
| 9 | * @link https://themeum.com |
| 10 | * @since 2.0.6 |
| 11 | */ |
| 12 | |
| 13 | $current_url = tutor()->current_url; |
| 14 | |
| 15 | $default_class = 'tutor-btn tutor-btn-outline-primary page-numbers tutor-mr-16'; |
| 16 | $merge_class = isset( $data['layout']['class'] ) ? $default_class . ' ' . $data['layout']['class'] : $default_class; |
| 17 | |
| 18 | ?> |
| 19 | <div data-tutor_pagination_ajax="<?php echo esc_attr( json_encode( $data['ajax'] ) ); ?>" data-tutor_pagination_layout="<?php echo esc_attr( json_encode( $data['layout'] ) ); ?>"> |
| 20 | <a href="<?php echo esc_url( add_query_arg( array( 'current_page' => $data['ajax']['current_page_num'] + 1 ), $current_url ) ); ?>" class="<?php echo esc_attr( $merge_class ); ?>"> |
| 21 | <?php echo esc_html( $data['layout']['load_more_text'] ); ?> |
| 22 | </a> |
| 23 | </div> |
| 24 |