芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/socialdigivlms.com/wp-content/plugins/tutor/templates/dashboard.php
* @link https://themeum.com * @since 1.4.3 */ $is_by_short_code = isset( $is_shortcode ) && true === $is_shortcode; if ( ! $is_by_short_code && ! defined( 'OTLMS_VERSION' ) ) { tutor_utils()->tutor_custom_header(); } global $wp_query; $dashboard_page_slug = ''; $dashboard_page_name = ''; if ( isset( $wp_query->query_vars['tutor_dashboard_page'] ) && $wp_query->query_vars['tutor_dashboard_page'] ) { $dashboard_page_slug = $wp_query->query_vars['tutor_dashboard_page']; $dashboard_page_name = $wp_query->query_vars['tutor_dashboard_page']; } /** * Getting dashboard sub pages */ if ( isset( $wp_query->query_vars['tutor_dashboard_sub_page'] ) && $wp_query->query_vars['tutor_dashboard_sub_page'] ) { $dashboard_page_name = $wp_query->query_vars['tutor_dashboard_sub_page']; if ( $dashboard_page_slug ) { $dashboard_page_name = $dashboard_page_slug . '/' . $dashboard_page_name; } } $dashboard_page_name = apply_filters( 'tutor_dashboard_sub_page_template', $dashboard_page_name ); $user_id = get_current_user_id(); $user = get_user_by( 'ID', $user_id ); $enable_profile_completion = tutor_utils()->get_option( 'enable_profile_completion' ); $is_instructor = tutor_utils()->is_instructor(); // URLS. $current_url = tutor()->current_url; $footer_url_1 = trailingslashit( tutor_utils()->tutor_dashboard_url( $is_instructor ? 'my-courses' : '' ) ); $footer_url_2 = trailingslashit( tutor_utils()->tutor_dashboard_url( $is_instructor ? 'question-answer' : 'my-quiz-attempts' ) ); // Footer links. $footer_links = array( array( 'title' => $is_instructor ? __( 'My Courses', 'tutor' ) : __( 'Dashboard', 'tutor' ), 'url' => $footer_url_1, 'is_active' => $footer_url_1 == $current_url, 'icon_class' => 'ttr tutor-icon-dashboard', ), array( 'title' => $is_instructor ? __( 'Q&A', 'tutor' ) : __( 'Quiz Attempts', 'tutor' ), 'url' => $footer_url_2, 'is_active' => $footer_url_2 == $current_url, 'icon_class' => $is_instructor ? 'ttr tutor-icon-question' : 'ttr tutor-icon-quiz-attempt', ), array( 'title' => __( 'Menu', 'tutor' ), 'url' => '#', 'is_active' => false, 'icon_class' => 'ttr tutor-icon-hamburger-o tutor-dashboard-menu-toggler', ), ); do_action( 'tutor_dashboard/before/wrap' ); ?>
get_tutor_avatar( $user_id, 'xl', true ) ?>
get_instructor_ratings( $user->ID ); if ( current_user_can( tutor()->instructor_role ) ) { ?>
display_name ); ?>
star_rating_generator_v2( $instructor_rating->rating_avg, $instructor_rating->rating_count, true ); ?>
,
display_name ); ?>
instructor_status( 0, false ); $instructor_status = is_string( $instructor_status ) ? strtolower( $instructor_status ) : ''; $rejected_on = get_user_meta( $user->ID, '_is_tutor_instructor_rejected', true ); $info_style = 'vertical-align: middle; margin-right: 7px;'; $info_message_style = 'display:inline-block; color:#7A7A7A; font-size: 15px;'; ob_start(); if ( tutor_utils()->get_option( 'enable_become_instructor_btn' ) ) { ?>
instructor_role ) ) { $course_type = tutor()->course_post_type; ?>
ID, '_is_tutor_instructor', true ); $on = gmdate( 'd F, Y', $on ); echo '
', esc_html__( 'Your Application is pending as of', 'tutor' ), '
', esc_html( $on ), '
', '
'; } elseif ( $rejected_on || 'blocked' !== $instructor_status ) { echo $become_button; //phpcs:ignore --data escaped above } ?>
tutor_dashboard_nav_ui_items(); // get reviews settings value. $disable = ! get_tutor_option( 'enable_course_review' ); foreach ( $dashboard_pages as $dashboard_key => $dashboard_page ) { /** * If not enable from settings then quit * * @since v2.0.0 */ if ( $disable && 'reviews' === $dashboard_key ) { continue; } $menu_title = $dashboard_page; $menu_link = tutor_utils()->get_tutor_dashboard_page_permalink( $dashboard_key ); $separator = false; $menu_icon = ''; if ( is_array( $dashboard_page ) ) { $menu_title = tutor_utils()->array_get( 'title', $dashboard_page ); $menu_icon_name = tutor_utils()->array_get( 'icon', $dashboard_page, ( isset( $dashboard_page['icon'] ) ? $dashboard_page['icon'] : '' ) ); if ( $menu_icon_name ) { $menu_icon = "
"; } // Add new menu item property "url" for custom link. if ( isset( $dashboard_page['url'] ) ) { $menu_link = $dashboard_page['url']; } if ( isset( $dashboard_page['type'] ) && 'separator' === $dashboard_page['type'] ) { $separator = true; } } if ( $separator ) { echo '
'; if ( $menu_title ) { ?>
'>
href="" class='tutor-dashboard-menu-item-link tutor-fs-6 tutor-color-black'> allowed_icon_tags() ); ?>
tutor_custom_footer(); }