← All changes
|
inc/TemplateHooks/Profile/ProfileStudentEnrolledTemplate.php
+5
-4
4.4.0
→
4.4.9
View file →
| @@ -2,20 +2,21 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Class ProfileStudentEnrolledTemplate. |
| 4 | 4 | * |
| 5 | 5 | * @since 4.3.3 |
| 6 | - * @version 1.0.0 | |
| 6 | + * @version 1.0.1 | |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | namespace LearnPress\TemplateHooks\Profile; |
| 10 | 10 | |
| 11 | 11 | use LearnPress\Helpers\Singleton; |
| 12 | +use LearnPress\TemplateHooks\Admin\AdminListStudentsEnrolled; | |
| 12 | 13 | use LP_Profile; |
| 13 | 14 | |
| 14 | 15 | class ProfileStudentEnrolledTemplate { |
| 15 | 16 | use Singleton; |
| 16 | 17 | |
| 17 | - public function init() { | |
| 18 | + public function init(): void { | |
| 18 | 19 | add_filter( 'learn-press/get-profile-tabs', array( $this, 'display_profile_tab' ), 10, 3 ); |
| 19 | 20 | } |
| 20 | 21 | |
| 21 | 22 | /** |
| @@ -86,10 +87,10 @@ | ||
| 86 | 87 | return ''; |
| 87 | 88 | } |
| 88 | 89 | |
| 89 | 90 | ob_start(); |
| 90 | - echo '<div id="lp-enrolled-students">'; | |
| 91 | - do_action( 'learn-press/admin/enrolled-students/layout', (int) $user->get_id() ); | |
| 91 | + echo '<div class="lp-enrolled-students">'; | |
| 92 | + AdminListStudentsEnrolled::instance()->enrolled_students_layout( (int) $user->get_id() ); | |
| 92 | 93 | echo '</div>'; |
| 93 | 94 | |
| 94 | 95 | return ob_get_clean(); |
| 95 | 96 | } |