| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template for displaying main user profile page. |
| 4 |
* |
| 5 |
* @author ThimPress |
| 6 |
* @package Learnpress/Templates |
| 7 |
* @version 4.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit(); |
| 11 |
|
| 12 |
if ( ! isset( $profile ) ) { |
| 13 |
return; |
| 14 |
} |
| 15 |
?> |
| 16 |
|
| 17 |
<div id="learn-press-profile" <?php $profile->main_class(); ?>> |
| 18 |
<?php if ( $profile->is_public() || $profile->get_user()->is_guest() ) : ?> |
| 19 |
|
| 20 |
<?php do_action( 'learn-press/before-user-profile', $profile ); ?> |
| 21 |
|
| 22 |
<div class="lp-content-area"> |
| 23 |
<?php |
| 24 |
if ( ! is_user_logged_in() ) { |
| 25 |
learn_press_print_messages( true ); |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* @since 3.0.0 |
| 30 |
*/ |
| 31 |
do_action( 'learn-press/user-profile', $profile ); |
| 32 |
?> |
| 33 |
</div> |
| 34 |
<?php else : ?> |
| 35 |
<div class="lp-content-area"> |
| 36 |
<?php esc_html_e( 'This user does not make their profile public.', 'learnpress' ); ?> |
| 37 |
</div> |
| 38 |
<?php endif; ?> |
| 39 |
|
| 40 |
</div> |
| 41 |
<?php |
| 42 |
|