| @@ -1,44 +1,44 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying course instructor in primary-meta section. | |
| 4 | - * | |
| 5 | - * @version 4.0.2 | |
| 6 | - * @author ThimPress | |
| 7 | - * @package LearnPress/Templates | |
| 8 | - */ | |
| 9 | - | |
| 10 | -use LearnPress\Models\CourseModel; | |
| 11 | -use LearnPress\TemplateHooks\Instructor\SingleInstructorTemplate; | |
| 12 | - | |
| 13 | -defined( 'ABSPATH' ) || exit; | |
| 14 | - | |
| 15 | -$courseModel = CourseModel::find( get_the_ID(), true ); | |
| 16 | -if ( ! $courseModel ) { | |
| 17 | - return; | |
| 18 | -} | |
| 19 | - | |
| 20 | -$instructor = $courseModel->get_author_model(); | |
| 21 | -if ( ! $instructor ) { | |
| 22 | - return; | |
| 23 | -} | |
| 24 | -?> | |
| 25 | - | |
| 26 | -<div class="meta-item meta-item-instructor"> | |
| 27 | - <div class="meta-item__image"> | |
| 28 | - <?php echo wp_kses_post( SingleInstructorTemplate::instance()->html_avatar( $instructor ) ); ?> | |
| 29 | - </div> | |
| 30 | - <div class="meta-item__value"> | |
| 31 | - <label><?php esc_html_e( 'Instructor', 'learnpress' ); ?></label> | |
| 32 | - <div> | |
| 33 | - <?php | |
| 34 | - echo wp_kses_post( | |
| 35 | - sprintf( | |
| 36 | - '<a href="%s">%s</a>', | |
| 37 | - $instructor->get_url_instructor(), | |
| 38 | - SingleInstructorTemplate::instance()->html_display_name( $instructor ) | |
| 39 | - ) | |
| 40 | - ); | |
| 41 | - ?> | |
| 42 | - </div> | |
| 43 | - </div> | |
| 44 | -</div> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying course instructor in primary-meta section. | |
| 4 | + * | |
| 5 | + * @version 4.0.2 | |
| 6 | + * @author ThimPress | |
| 7 | + * @package LearnPress/Templates | |
| 8 | + */ | |
| 9 | + | |
| 10 | +use LearnPress\Models\CourseModel; | |
| 11 | +use LearnPress\TemplateHooks\Instructor\SingleInstructorTemplate; | |
| 12 | + | |
| 13 | +defined( 'ABSPATH' ) || exit; | |
| 14 | + | |
| 15 | +$courseModel = CourseModel::find( get_the_ID(), true ); | |
| 16 | +if ( ! $courseModel ) { | |
| 17 | + return; | |
| 18 | +} | |
| 19 | + | |
| 20 | +$instructor = $courseModel->get_author_model(); | |
| 21 | +if ( ! $instructor ) { | |
| 22 | + return; | |
| 23 | +} | |
| 24 | +?> | |
| 25 | + | |
| 26 | +<div class="meta-item meta-item-instructor"> | |
| 27 | + <div class="meta-item__image"> | |
| 28 | + <?php echo wp_kses_post( SingleInstructorTemplate::instance()->html_avatar( $instructor ) ); ?> | |
| 29 | + </div> | |
| 30 | + <div class="meta-item__value"> | |
| 31 | + <label><?php esc_html_e( 'Instructor', 'learnpress' ); ?></label> | |
| 32 | + <div> | |
| 33 | + <?php | |
| 34 | + echo wp_kses_post( | |
| 35 | + sprintf( | |
| 36 | + '<a href="%s">%s</a>', | |
| 37 | + $instructor->get_url_instructor(), | |
| 38 | + SingleInstructorTemplate::instance()->html_display_name( $instructor ) | |
| 39 | + ) | |
| 40 | + ); | |
| 41 | + ?> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 44 | +</div> | |