PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7.1
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / templates / profile / tabs / courses / course-grid.php

course-grid.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7.1, at templates/profile/tabs/courses/course-grid.php

52 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for displaying own courses in courses tab of user profile page.
4 * Edit by Nhamdv
5 *
6 * @author ThimPress
7 * @package Learnpress/Templates
8 * @version 4.0.10
9 */
10
11 defined( 'ABSPATH' ) || exit();
12
13 if ( ! isset( $user ) || ! isset( $course_ids ) || ! isset( $current_page ) || ! isset( $num_pages ) ) {
14 return;
15 }
16 ?>
17
18 <?php if ( $current_page === 1 ) : ?>
19 <div class="lp-archive-courses">
20 <ul <?php lp_item_course_class( array( 'profile-courses-list' ) ); ?> data-layout="grid" data-size="3">
21 <?php endif; ?>
22
23 <?php
24 global $post;
25
26 foreach ( $course_ids as $id ) {
27 $course = learn_press_get_course( $id );
28 $post = get_post( $id );
29 setup_postdata( $post );
30
31 //$course_data = $user->get_course_data( $id );
32 //$course_results = $course_data->get_result();
33 learn_press_get_template( 'content-course.php' );
34 }
35
36 wp_reset_postdata();
37 ?>
38
39 <?php if ( $current_page === 1 ) : ?>
40 </ul>
41 </div>
42 <?php endif; ?>
43
44 <?php if ( $num_pages > 1 && $current_page < $num_pages && $current_page === 1 ) : ?>
45 <div class="lp_profile_course_progress__nav">
46 <button class="lp-button" data-paged="<?php echo absint( $current_page + 1 ); ?>"
47 data-number="<?php echo absint( $num_pages ); ?>">
48 <?php esc_html_e( 'View more', 'learnpress' ); ?>
49 </button>
50 </div>
51 <?php endif; ?>
52