| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | * Will remove after LearnPress and Eduma and all guest update 4.0.0 |
| 7 | 7 | * |
| 8 | 8 | * @author ThimPress |
| 9 | 9 | * @package Learnpress/Templates |
| 10 | - * @version 3.0.0 | |
| 10 | + * @version 3.0.1 | |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Prevent loading this file directly |
| @@ -18,8 +18,15 @@ | ||
| 18 | 18 | $course = learn_press_get_course(); |
| 19 | 19 | if ( ! $course ) { |
| 20 | 20 | return; |
| 21 | 21 | } |
| 22 | + | |
| 23 | +$instructor = $course->get_instructor(); | |
| 24 | +if ( ! $instructor instanceof LP_User ) { | |
| 25 | + return; | |
| 26 | +} | |
| 27 | + | |
| 28 | +$img_profile = $instructor->get_profile_picture(); | |
| 22 | 29 | ?> |
| 23 | 30 | |
| 24 | 31 | <div class="course-author"> |
| 25 | 32 | |
| @@ -25,9 +32,9 @@ | ||
| 25 | 32 | |
| 26 | 33 | <h3><?php _e( 'About the Instructor', 'learnpress' ); ?></h3> |
| 27 | 34 | |
| 28 | 35 | <p class="author-name"> |
| 29 | - <?php echo wp_kses_post( $course->get_instructor()->get_profile_picture() ); ?> | |
| 36 | + <?php echo wp_kses_post( $img_profile ); ?> | |
| 30 | 37 | <?php echo wp_kses_post( $course->get_instructor_html() ); ?> |
| 31 | 38 | </p> |
| 32 | 39 | <div class="author-bio"> |
| 33 | 40 | <?php echo wp_kses_post( wpautop( $course->get_author()->get_description() ) ); ?> |