| @@ -1,5 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | +use LearnPress\Helpers\Template; | |
| 3 | + | |
| 2 | 4 | /** |
| 3 | 5 | * Template for displaying profile header. |
| 4 | 6 | * |
| 5 | 7 | * @author ThimPress |
| @@ -18,15 +20,18 @@ | ||
| 18 | 20 | |
| 19 | 21 | $bio = $user->get_description(); |
| 20 | 22 | ?> |
| 21 | 23 | <div class="lp-profile-right"> |
| 24 | + <?php | |
| 25 | + $sections = apply_filters( | |
| 26 | + 'learn-press/profile/header/sections', | |
| 27 | + array( | |
| 28 | + 'profile/header/user-name.php', | |
| 29 | + 'profile/socials.php', | |
| 30 | + 'profile/header/user-bio.php', | |
| 31 | + ), | |
| 32 | + $user | |
| 33 | + ); | |
| 22 | 34 | |
| 23 | - <div class="lp-profile-username"> | |
| 24 | - <?php echo wp_kses_post( $user->get_display_name() ); ?> | |
| 25 | - </div> | |
| 26 | - <?php if ( $bio ) : ?> | |
| 27 | - <div class="lp-profile-user-bio"> | |
| 28 | - <?php echo wpautop( $bio ); ?> | |
| 29 | - </div> | |
| 30 | - | |
| 31 | - <?php endif; ?> | |
| 35 | + Template::instance()->get_frontend_templates( $sections ); | |
| 36 | + ?> | |
| 32 | 37 | </div> |