| @@ -5,11 +5,13 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/learnpress/single-course/instructor.php. |
| 6 | 6 | * |
| 7 | 7 | * @author ThimPress |
| 8 | 8 | * @package Learnpress/Templates |
| 9 | - * @version 3.3.0 | |
| 9 | + * @version 3.3.1 | |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | +use LearnPress\TemplateHooks\Instructor\SingleInstructorTemplate; | |
| 13 | + | |
| 12 | 14 | defined( 'ABSPATH' ) || exit(); |
| 13 | 15 | |
| 14 | 16 | $course = learn_press_get_course(); |
| 15 | 17 | if ( ! $course ) { |
| @@ -15,11 +17,12 @@ | ||
| 15 | 17 | if ( ! $course ) { |
| 16 | 18 | return; |
| 17 | 19 | } |
| 18 | 20 | /** |
| 19 | - * @var LP_User | |
| 21 | + * @var LP_User $instructor | |
| 20 | 22 | */ |
| 21 | -$instructor = $course->get_instructor(); | |
| 23 | +$instructor = $course->get_instructor(); | |
| 24 | +$singleInstructorTemplate = SingleInstructorTemplate::instance(); | |
| 22 | 25 | ?> |
| 23 | 26 | |
| 24 | 27 | <div class="course-author"> |
| 25 | 28 | |
| @@ -27,20 +30,16 @@ | ||
| 27 | 30 | |
| 28 | 31 | <div class="lp-course-author"> |
| 29 | 32 | <div class="course-author__pull-left"> |
| 30 | 33 | <?php echo wp_kses_post( $instructor->get_profile_picture() ); ?> |
| 31 | - | |
| 32 | - <?php $socials = $instructor->get_profile_socials( $instructor->get_id() ); ?> | |
| 33 | - <?php if ( $socials ) : ?> | |
| 34 | - <div class="author-socials"> | |
| 35 | - <?php echo wp_kses_post( implode( '', $socials ) ); ?> | |
| 36 | - </div> | |
| 37 | - <?php endif; ?> | |
| 38 | 34 | </div> |
| 39 | 35 | |
| 40 | 36 | <div class="course-author__pull-right"> |
| 41 | - <div class="author-title"><?php echo wp_kses_post( $course->get_instructor_html() ); ?></div> | |
| 42 | - <div class="author-description margin-bottom"> | |
| 37 | + <h4 class="author-title"><?php echo wp_kses_post( $course->get_instructor_html() ); ?></h4> | |
| 38 | + <?php | |
| 39 | + echo $singleInstructorTemplate->html_social( $instructor ); | |
| 40 | + ?> | |
| 41 | + <div class="author-description"> | |
| 43 | 42 | |
| 44 | 43 | <?php |
| 45 | 44 | /** |
| 46 | 45 | * LP Hook |