WP User Avatar - Version 2.2.14

Version Description

  • Added missing space before classes.
Download this release

Release Info

Developer Collizo4sky
Plugin Icon 128x128 WP User Avatar
Version 2.2.14
Comparing to
See all releases

Code changes from version 2.2.13 to 2.2.14

includes/class-wp-user-avatar-functions.php CHANGED
@@ -472,14 +472,18 @@ class WP_User_Avatar_Functions {
472
  $wpua_final_avatar_image_src = str_replace('d=wp_user_avatar', 'd='.urlencode($wpua_default_avatar_image_src), $wpua_avatar_image_src);
473
  }
474
 
475
- $avatar = '<img src="'.$wpua_final_avatar_image_src.'"'.$default_image_details['dimensions'].' alt="'.$alt.'" class="avatar avatar-'.$size.' wp-user-avatar wp-user-avatar-'.$size.' photo avatar-default'. esc_attr( implode( ' ', $class ) ) .'" />';
 
 
476
 
477
  // User doesn't have WPUA or Gravatar and Default Avatar is wp_user_avatar, show custom Default Avatar
478
  } elseif($avatar_default == 'wp_user_avatar') {
479
 
480
  $default_image_details = $this->wpua_default_image($size);
481
 
482
- $avatar = '<img src="'.$default_image_details['src'].'"'.$default_image_details['dimensions'].' alt="'.$alt.'" class="avatar avatar-'.$size.' wp-user-avatar wp-user-avatar-'.$size.' photo avatar-default'. esc_attr( implode( ' ', $class ) ) .'" />';
 
 
483
 
484
  return $avatar;
485
 
472
  $wpua_final_avatar_image_src = str_replace('d=wp_user_avatar', 'd='.urlencode($wpua_default_avatar_image_src), $wpua_avatar_image_src);
473
  }
474
 
475
+ $class_string = !empty($class) ? ' ' . esc_attr( implode( ' ', $class ) ) : '';
476
+
477
+ $avatar = '<img src="'.$wpua_final_avatar_image_src.'"'.$default_image_details['dimensions'].' alt="'.$alt.'" class="avatar avatar-'.$size.' wp-user-avatar wp-user-avatar-'.$size.' photo avatar-default'. $class_string .'" />';
478
 
479
  // User doesn't have WPUA or Gravatar and Default Avatar is wp_user_avatar, show custom Default Avatar
480
  } elseif($avatar_default == 'wp_user_avatar') {
481
 
482
  $default_image_details = $this->wpua_default_image($size);
483
 
484
+ $class_string = !empty($class) ? ' ' . esc_attr( implode( ' ', $class ) ) : '';
485
+
486
+ $avatar = '<img src="'.$default_image_details['src'].'"'.$default_image_details['dimensions'].' alt="'.$alt.'" class="avatar avatar-'.$size.' wp-user-avatar wp-user-avatar-'.$size.' photo avatar-default'. $class_string .'" />';
487
 
488
  return $avatar;
489
 
includes/class-wp-user-avatar.php CHANGED
@@ -72,15 +72,18 @@ class WP_User_Avatar {
72
  add_filter('media_view_settings', array($this, 'wpua_media_view_settings'), 10, 1);
73
  }
74
 
75
- /**
76
- * Avatars have no parent posts
77
- * @since 1.8.4
78
- * @param array $settings
79
- * @uses object $post
80
- * @uses bool $wpua_is_profile
81
- * @uses is_admin()
82
- * array $settings
83
- */
 
 
 
84
  public function wpua_media_view_settings($settings) {
85
  global $post, $wpua_is_profile;
86
  // Get post ID so not to interfere with media uploads
72
  add_filter('media_view_settings', array($this, 'wpua_media_view_settings'), 10, 1);
73
  }
74
 
75
+ /**
76
+ * Avatars have no parent posts
77
+ *
78
+ * @param array $settings
79
+ *
80
+ * @return array
81
+ * @uses object $post
82
+ * @uses bool $wpua_is_profile
83
+ * @uses is_admin()
84
+ * array $settings
85
+ * @since 1.8.4
86
+ */
87
  public function wpua_media_view_settings($settings) {
88
  global $post, $wpua_is_profile;
89
  // Get post ID so not to interfere with media uploads
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: properfraction, collizo4sky
4
  Tags: user profile, avatar, gravatar, author image, author photo, author avatar, bbPress, profile avatar, profile image, user avatar, user image, user photo, widget
5
  Requires at least: 4.0
6
  Tested up to: 5.7
7
- Stable tag: 2.2.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -370,6 +370,9 @@ This would output:
370
 
371
  == Changelog ==
372
 
 
 
 
373
  = 2.2.13 =
374
  * Fixed broken avatar image.
375
 
4
  Tags: user profile, avatar, gravatar, author image, author photo, author avatar, bbPress, profile avatar, profile image, user avatar, user image, user photo, widget
5
  Requires at least: 4.0
6
  Tested up to: 5.7
7
+ Stable tag: 2.2.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
370
 
371
  == Changelog ==
372
 
373
+ = 2.2.14 =
374
+ * Added missing space before classes.
375
+
376
  = 2.2.13 =
377
  * Fixed broken avatar image.
378
 
wp-user-avatar.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/plugins/wp-user-avatar/
5
  Description: Use any image from your WordPress Media Library as a custom user avatar. Add your own Default Avatar.
6
  Author: ProfilePress
7
  Author URI: https://profilepress.net/
8
- Version: 2.2.13
9
  Text Domain: wp-user-avatar
10
  Domain Path: /lang/
11
  */
@@ -33,7 +33,7 @@ class WP_User_Avatar_Setup {
33
  * @since 1.9.2
34
  */
35
  private function _define_constants() {
36
- define('WPUA_VERSION', '2.2.13');
37
  define('WPUA_FOLDER', basename(dirname(__FILE__)));
38
  define('WPUA_DIR', plugin_dir_path(__FILE__));
39
  define('WPUA_INC', WPUA_DIR.'includes'.'/');
5
  Description: Use any image from your WordPress Media Library as a custom user avatar. Add your own Default Avatar.
6
  Author: ProfilePress
7
  Author URI: https://profilepress.net/
8
+ Version: 2.2.14
9
  Text Domain: wp-user-avatar
10
  Domain Path: /lang/
11
  */
33
  * @since 1.9.2
34
  */
35
  private function _define_constants() {
36
+ define('WPUA_VERSION', '2.2.14');
37
  define('WPUA_FOLDER', basename(dirname(__FILE__)));
38
  define('WPUA_DIR', plugin_dir_path(__FILE__));
39
  define('WPUA_INC', WPUA_DIR.'includes'.'/');