| 1 |
<?php |
| 2 |
/** |
| 3 |
* Account template (default) |
| 4 |
* |
| 5 |
* @ver 1.0.0 |
| 6 |
*/ |
| 7 |
$css_class = ! empty( $args['css_class'] ) ? esc_attr( $args['css_class'] ) : 'border-0'; |
| 8 |
$user_id = get_current_user_id(); |
| 9 |
$user_info = get_userdata( $user_id ); |
| 10 |
$display_name = esc_attr($user_info->user_login); |
| 11 |
|
| 12 |
do_action( 'uwp_template_before', 'account' ); ?> |
| 13 |
<div class="container h-100"> |
| 14 |
<div class="row h-100 height-auto"> |
| 15 |
<div class="col-lg-3 h-100 height-auto px-0"> |
| 16 |
<div class="navbar-light h-100 height-auto"> |
| 17 |
<div class="bg-light pt-5 h-100"> |
| 18 |
<div class="d-flex justify-content-center flex-column align-items-center"> |
| 19 |
<?php |
| 20 |
echo do_shortcode( '[uwp_user_avatar size=150 allow_change=1]' ); |
| 21 |
|
| 22 |
do_action( 'uwp_template_form_title_before', 'account' ); |
| 23 |
|
| 24 |
echo aui()->button( array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 25 |
'type' => 'a', |
| 26 |
'href' => esc_url( uwp_build_profile_tab_url( $user_id ) ), |
| 27 |
'class' => 'mt-0 text-decoration-none font-weight-bold', |
| 28 |
'icon' => '', |
| 29 |
'title' => esc_html( $display_name ), |
| 30 |
'content' => '@' . esc_html( $display_name ), |
| 31 |
) ); |
| 32 |
|
| 33 |
do_action( 'uwp_template_form_title_after', 'account' ); |
| 34 |
?> |
| 35 |
</div> |
| 36 |
<div class="d-flex justify-content-center nav mt-0"> |
| 37 |
<?php do_action( 'uwp_account_menu_display' ); ?> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
<div class="col-lg-9"> |
| 43 |
<div class="pl-lg-4 pl-sm-0 h-100 pt-5 pb-lg-0 pb-3"> |
| 44 |
<?php |
| 45 |
$form_title = ! empty( $args['form_title'] ) || $args['form_title']=='0' ? esc_attr__( $args['form_title'], 'userswp' ) : __( 'Edit Account', 'userswp' ); |
| 46 |
|
| 47 |
if ( isset( $_GET['type'] ) ) { |
| 48 |
$type = strip_tags( esc_sql( $_GET['type'] ) ); |
| 49 |
} else { |
| 50 |
$type = 'account'; |
| 51 |
} |
| 52 |
|
| 53 |
$form_title = apply_filters( 'uwp_account_page_title', $form_title, $type ); |
| 54 |
if ( $form_title != '0' ) { |
| 55 |
echo '<h3 class="mb-lg-5 mb-4">'; |
| 56 |
echo esc_attr( $form_title ); |
| 57 |
echo '</h3>'; |
| 58 |
} |
| 59 |
|
| 60 |
do_action( 'uwp_template_display_notices', 'account' ); |
| 61 |
|
| 62 |
do_action( 'uwp_account_form_display', $type ); |
| 63 |
|
| 64 |
?> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
|
| 70 |
<?php do_action( 'uwp_template_after', 'account' ); ?> |