dashboard
7 years ago
email
7 years ago
global
7 years ago
loop
7 years ago
profile
7 years ago
single
7 years ago
archive-course.php
7 years ago
course-none.php
7 years ago
dashboard.php
7 years ago
login.php
7 years ago
single-course-enrolled-announcements.php
7 years ago
single-course-enrolled-overview.php
7 years ago
single-course-enrolled-questions.php
7 years ago
single-course-enrolled.php
7 years ago
single-course.php
7 years ago
single-lesson.php
7 years ago
single-preview-lesson.php
7 years ago
single-quiz.php
7 years ago
student-public-profile.php
7 years ago
dashboard.php
127 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying student Public Profile |
| 4 | * |
| 5 | * @since v.1.0.0 |
| 6 | * |
| 7 | * @author Themeum |
| 8 | * @url https://themeum.com |
| 9 | */ |
| 10 | |
| 11 | get_header(); |
| 12 | |
| 13 | |
| 14 | global $wp_query; |
| 15 | |
| 16 | $dashboard_page_slug = ''; |
| 17 | $dashboard_page_name = ''; |
| 18 | if (isset($wp_query->query_vars['tutor_dashboard_page']) && $wp_query->query_vars['tutor_dashboard_page']) { |
| 19 | $dashboard_page_slug = $wp_query->query_vars['tutor_dashboard_page']; |
| 20 | $dashboard_page_name = $wp_query->query_vars['tutor_dashboard_page']; |
| 21 | } |
| 22 | /** |
| 23 | * Getting dashboard sum pages |
| 24 | */ |
| 25 | if (isset($wp_query->query_vars['tutor_dashboard_sub_page']) && $wp_query->query_vars['tutor_dashboard_sub_page']) { |
| 26 | $dashboard_page_name = $wp_query->query_vars['tutor_dashboard_sub_page']; |
| 27 | if ($dashboard_page_slug){ |
| 28 | $dashboard_page_name = $dashboard_page_slug.'/'.$dashboard_page_name; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | $user_id = get_current_user_id(); |
| 33 | $user = get_user_by('ID', $user_id); |
| 34 | |
| 35 | do_action('tutor_dashboard/before/wrap'); ?> |
| 36 | |
| 37 | <div class="tutor-wrap tutor-dashboard tutor-dashboard-student"> |
| 38 | <div class="tutor-container"> |
| 39 | |
| 40 | |
| 41 | <div class="tutor-row"> |
| 42 | <div class="tutor-col-12"> |
| 43 | <div class="tutor-dashboard-header-wrap"> |
| 44 | <div class="tutor-wrap tutor-dashboard-header"> |
| 45 | |
| 46 | <div class="tutor-dashboard-header-avatar"> |
| 47 | <a href="<?php echo tutor_utils()->get_tutor_dashboard_page_permalink(); ?>"> |
| 48 | <img src="<?php echo get_avatar_url($user_id); ?>" /> |
| 49 | </a> |
| 50 | </div> |
| 51 | |
| 52 | <div class="tutor-dashboard-header-info"> |
| 53 | |
| 54 | <div class="tutor-dashboard-header-display-name"> |
| 55 | <h4><?php _e('Howdy,', 'tutor'); ?> <strong><?php echo $user->display_name; ?></strong> </h4> |
| 56 | </div> |
| 57 | |
| 58 | <!-- |
| 59 | <div class="tutor-dashboard-header-stats"> |
| 60 | <div class="tutor-dashboard-header-social-wrap"> |
| 61 | <a href=""><i class="tutor-icon-facebook"></i> </a> |
| 62 | <a href=""><i class="tutor-icon-twitter"></i> </a> |
| 63 | <a href=""><i class="tutor-icon-youtube"></i> </a> |
| 64 | </div> |
| 65 | <div class="tutor-dashboard-header-ratings"> |
| 66 | <?php |
| 67 | /* tutor_utils()->star_rating_generator('4.6'); |
| 68 | */?> |
| 69 | <span>4.6</span> |
| 70 | <span> (<?php /*_e(sprintf('%d Ratings', 172), 'tutor') */?>) </span> |
| 71 | </div> |
| 72 | <div class="tutor-dashboard-header-notifications"> |
| 73 | <p class="tutor-notification-text"><?php /*_e('Notification'); */?> <span>9</span> </p> |
| 74 | </div> |
| 75 | </div>--> |
| 76 | |
| 77 | </div> |
| 78 | |
| 79 | </div> |
| 80 | |
| 81 | </div> |
| 82 | |
| 83 | </div> |
| 84 | </div> |
| 85 | |
| 86 | |
| 87 | <div class="tutor-row"> |
| 88 | <div class="tutor-col-3 tutor-dashboard-left-menu"> |
| 89 | <ul class="tutor-dashboard-permalinks"> |
| 90 | <?php |
| 91 | $dashboard_pages = tutor_utils()->tutor_dashboard_pages(); |
| 92 | foreach ($dashboard_pages as $dashboard_key => $dashboard_page){ |
| 93 | $li_class = "tutor-dashboard-menu-{$dashboard_key}"; |
| 94 | if ($dashboard_key === 'index') |
| 95 | $dashboard_key = ''; |
| 96 | $active_class = $dashboard_key == $dashboard_page_slug ? 'active' : ''; |
| 97 | echo "<li class='{$li_class} {$active_class}'><a href='".tutor_utils()->get_tutor_dashboard_page_permalink($dashboard_key)."'> {$dashboard_page} </a> </li>"; |
| 98 | } |
| 99 | ?> |
| 100 | </ul> |
| 101 | </div> |
| 102 | |
| 103 | <div class="tutor-col-9"> |
| 104 | <div class="tutor-dashboard-content"> |
| 105 | <?php |
| 106 | if ($dashboard_page_name){ |
| 107 | tutor_load_template("dashboard.".$dashboard_page_name); |
| 108 | }else{ |
| 109 | tutor_load_template("dashboard.dashboard"); |
| 110 | } |
| 111 | ?> |
| 112 | </div> |
| 113 | </div> |
| 114 | </div> |
| 115 | </div> |
| 116 | |
| 117 | </div> |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | <?php do_action('tutor_dashboard/after/wrap'); ?> |
| 124 | |
| 125 | <?php |
| 126 | get_footer(); |
| 127 |