PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.16
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.16
1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.23 All 172 releases
userswp / templates / user-avatar.php

user-avatar.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.2.16, at templates/user-avatar.php

49 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Profile header template (default)
4 *
5 * @ver 0.0.1
6 */
7 global $uwp_in_user_loop;
8 $css_class = ! empty( $args['css_class'] ) ? esc_attr( $args['css_class'] ) : 'border-0';
9 $allow_change = $args['allow_change'];
10 $avatar_url = $args['avatar_url'];
11 $user_id = $args['user_id'];
12 $link = $args['link'];
13 $size = isset($args['size']) ? $args['size'] : 50;
14
15 if($user_id){
16 $user = get_userdata($user_id);
17 } else {
18 $user = uwp_get_displayed_user();
19 }
20
21 if ( ! $user ) {
22 return;
23 }
24 ?>
25 <div class="uwp-profile-avatar clearfix">
26 <?php
27 if ($uwp_in_user_loop || 1==$link) {
28 echo '<a href="' . esc_url( uwp_build_profile_tab_url($user->ID) ) . '" title="' . esc_attr( $user->display_name ) . '">';
29 }
30 ?>
31 <div class="uwp-profile-avatar">
32 <img class="avatar avatar-<?php echo absint( $size ); ?> photo" src="<?php echo esc_url( $avatar_url ); ?>" alt="<?php esc_attr_e("User avatar","userswp");?>" width="<?php echo absint( $size ); ?>" height="<?php echo absint( $size ); ?>">
33 <?php if (!$uwp_in_user_loop && is_user_logged_in() && (get_current_user_id() == $user->ID) && $allow_change) { ?>
34 <div class="uwp-profile-avatar-change">
35 <div class="uwp-profile-avatar-change-inner">
36 <i class="fas fa-camera" aria-hidden="true"></i>
37 <a id="uwp-profile-picture-change" data-type="avatar"
38 class="uwp-profile-modal-form-trigger"
39 href="#"><?php esc_attr_e('Update', 'userswp'); ?></a>
40 </div>
41 </div>
42 <?php } ?>
43 </div>
44 <?php
45 if ($uwp_in_user_loop || 1==$link) {
46 echo '</a>';
47 }
48 ?>
49 </div>