| 1 |
<?php |
| 2 |
global $current_user; |
| 3 |
|
| 4 |
echo '<div class="uwp-login-widget user-loggedin">'; |
| 5 |
|
| 6 |
echo '<p>'.esc_html__( 'Logged in as ', 'userswp' ); |
| 7 |
|
| 8 |
$content = get_avatar( $current_user->ID, 35 ). '<strong>'. apply_filters('uwp_profile_display_name', esc_attr( $current_user->display_name )).'</strong>'; |
| 9 |
|
| 10 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 11 |
'type' => 'a', |
| 12 |
'href' => esc_url( uwp_build_profile_tab_url($current_user->ID) ), |
| 13 |
'class' => '', |
| 14 |
'content' => $content, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 15 |
)); |
| 16 |
|
| 17 |
echo '<span>'; |
| 18 |
|
| 19 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 20 |
'type' => 'a', |
| 21 |
'href' => esc_url( wp_logout_url() ), |
| 22 |
'class' => 'btn btn-sm btn-outline-primary', |
| 23 |
'title' => esc_html__("Logout","userswp"), |
| 24 |
'content' => esc_html__("Logout","userswp"), |
| 25 |
)); |
| 26 |
|
| 27 |
echo '</span>'; |
| 28 |
|
| 29 |
echo '</p>'; |
| 30 |
|
| 31 |
echo '</div>'; |