PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / templates / single-course / meta / instructor.php

instructor.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.8, at templates/single-course/meta/instructor.php

45 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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>
45