bio.php
6 years ago
courses_taken.php
6 years ago
enrolled_course.php
6 years ago
reviews_wrote.php
6 years ago
courses_taken.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package TutorLMS/Templates |
| 4 | * @version 1.4.3 |
| 5 | */ |
| 6 | |
| 7 | $user_name = sanitize_text_field(get_query_var('tutor_student_username')); |
| 8 | $get_user = tutor_utils()->get_user_by_login($user_name); |
| 9 | $user_id = $get_user->ID; |
| 10 | |
| 11 | |
| 12 | |
| 13 | $pageposts = tutor_utils()->get_courses_by_instructor($user_id); |
| 14 | ?> |
| 15 | |
| 16 | |
| 17 | <div class="tutor-courses"> |
| 18 | <?php if ($pageposts): |
| 19 | global $post; |
| 20 | foreach ($pageposts as $post): |
| 21 | setup_postdata($post); |
| 22 | |
| 23 | /** |
| 24 | * @hook tutor_course/archive/before_loop_course |
| 25 | * @type action |
| 26 | * Usage Idea, you may keep a loop within a wrap, such as bootstrap col |
| 27 | */ |
| 28 | do_action('tutor_course/archive/before_loop_course'); |
| 29 | |
| 30 | tutor_load_template('loop.course'); |
| 31 | |
| 32 | /** |
| 33 | * @hook tutor_course/archive/after_loop_course |
| 34 | * @type action |
| 35 | * Usage Idea, If you start any div before course loop, you can end it here, such as </div> |
| 36 | */ |
| 37 | do_action('tutor_course/archive/after_loop_course'); |
| 38 | |
| 39 | endforeach; |
| 40 | else : ?> |
| 41 | <div> |
| 42 | <h2><?php _e("Not Found" , 'tutor'); ?></h2> |
| 43 | <p><?php _e("Sorry, but you are looking for something that isn't here." , 'tutor'); ?></p> |
| 44 | </div> |
| 45 | <?php endif; ?> |
| 46 | </div> |