PluginProbe ʕ •ᴥ•ʔ
One User Avatar | User Profile Picture / 2.5.4
One User Avatar | User Profile Picture v2.5.4
trunk 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.5.0 2.5.2 2.5.3 2.5.4
one-user-avatar / README.md
one-user-avatar Last commit date
assets 1 year ago includes 5 months ago languages 1 year ago README.md 5 months ago index.php 5 years ago one-user-avatar.php 5 months ago readme.txt 4 weeks ago uninstall.php 1 year ago
README.md
957 lines
1 # One User Avatar | User Profile Picture
2
3 **Use any image from your WordPress Media Library as a custom user avatar or user profile picture. Add your own Default Avatar. Fork of WP User Avatar v2.2.16.**
4
5 ## Description
6
7 WordPress currently only allows you to use custom avatars that are uploaded through [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/). **One User Avatar** enables you to use any photo uploaded into your Media Library as an avatar. This means you use the same uploader and library as your posts. No extra folders or image editing functions are necessary. This plugin is a fork of WP User Avatar v2.2.16.
8
9 **One User Avatar** also lets you:
10
11 * Upload your own Default Avatar in your One User Avatar settings.
12 * Show the user's [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatar or Default Avatar if the user doesn't have a One User Avatar image.
13 * Disable [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatars and use only local avatars.
14 * Use the `[avatar_upload]` shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users.
15 * Use the `[avatar]` shortcode in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
16 * Allow Contributors and Subscribers to upload their own avatars.
17 * Limit upload file size and image dimensions for Contributors and Subscribers.
18
19 ## Copyright
20
21 One User Avatar
22 Copyright (c) 2023 [](https://onedesigns.com/One Designs](https://onedesigns.com/](https://onedesigns.com/)
23 License: GPLv2
24 Source: https://github.com/onedesigns/one-user-avatar
25
26 One User Avatar is based on WP User Avatar v2.2.16
27 Copyright (c) 2020-2021 [](https://profilepress.net/ProfilePress](https://profilepress.net/](https://profilepress.net/)
28 Copyright (c) 2014-2020 [](https://www.flippercode.com/Flippercode](https://www.flippercode.com/](https://www.flippercode.com/)
29 Copyright (c) 2013-2014 [](http://bangbay.com/Bangbay Siboliban](http://bangbay.com/](http://bangbay.com/)
30 License: GPLv2
31 Source: https://github.com/profilepress/wp-user-avatar
32
33 One User Avatar is distributed under the terms of the GNU GPL
34
35 This program is free software: you can redistribute it and/or modify
36 it under the terms of the GNU General Public License as published by
37 the Free Software Foundation, either version 2 of the License, or
38 (at your option) any later version.
39
40 This program is distributed in the hope that it will be useful,
41 but WITHOUT ANY WARRANTY; without even the implied warranty of
42 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 GNU General Public License for more details.
44
45 ## Installation
46
47 1. Download, install, and activate the One User Avatar plugin.
48 2. On your profile edit page, click "Edit Image".
49 3. Choose an image, then click "Select Image".
50 4. Click "Update Profile".
51 5. Upload your own Default Avatar in your One User Avatar settings (optional). You can also allow Contributors & Subscribers to upload avatars and disable Gravatar.
52 6. Choose a theme that has avatar support. In your theme, manually replace `get_avatar` with `get_wp_user_avatar` or leave `get_avatar` as-is. [](#frequently-asked-questionsRead about the differences here](#frequently-asked-questions](#frequently-asked-questions).
53 7. You can also use the `[avatar_upload]` and `[avatar]` shortcodes in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
54
55 **Warning**
56
57 If you are using One User Avatar to replace an existing installation of WP User Avatar, do not delete the old WP User Avatar plugin from the WordPress plugin administration screen, otherwise you will lose all your existing avatars. Instead, deactivate the WP User Avatar plugin and then manually delete it using FTP. If you can't access your files directly, contact your hosting provider and ask them to delete it for you or simply leave the old plugin deactivated.
58
59 ## Example Usage
60
61 ### Posts
62
63 Within [](http://codex.wordpress.org/The_LoopThe Loop](http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop), you may be using:
64
65 <?php echo get_avatar( get_the_author_meta( 'ID' ), 96 ); ?>
66
67 Replace this function with:
68
69 <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96 ); ?>
70
71 You can also use the values "original", "large", "medium", or "thumbnail" for your avatar size:
72
73 <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 'medium' ); ?>
74
75 You can also add an alignment of "left", "right", or "center":
76
77 <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96, 'left' ); ?>
78
79 ### Author Page
80
81 On an author page outside of [](http://codex.wordpress.org/The_LoopThe Loop](http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop), you may be using:
82
83 <?php
84 $user = get_user_by( 'slug', $author_name );
85 echo get_avatar( $user->ID, 96 );
86 ?>
87
88 Replace this function with:
89
90 <?php
91 $user = get_user_by( 'slug', $author_name );
92 echo get_wp_user_avatar( $user->ID, 96 );
93 ?>
94
95 If you leave the options blank, One User Avatar will detect whether you're inside [](http://codex.wordpress.org/The_LoopThe Loop](http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop) or on an author page and return the correct avatar in the default 96x96 size:
96
97 <?php echo get_wp_user_avatar(); ?>
98
99 The function `get_wp_user_avatar` can also fall back to `get_avatar` if there is no One User Avatar image. For this to work, "Show Avatars" must be checked in your One User Avatar settings. When this setting is enabled, you will see the user's [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatar or Default Avatar.
100
101 ### Comments
102
103 For comments, you might have in your template:
104
105 <?php echo get_avatar($comment, 32); ?>
106
107 Replace this function with:
108
109 <?php echo get_wp_user_avatar($comment, 32); ?>
110
111 For comments, you must specify the $comment variable.
112
113 ## Other Available Functions
114
115 ### `[avatar_upload]` shortcode
116
117 You can use the `[avatar_upload]` shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users.
118
119 You can specify a user with the shortcode, but you must have `edit_user` capability for that particular user.
120
121 [avatar_upload user="admin"]
122
123 ### `[avatar]` shortcode
124
125 You can use the `[avatar]` shortcode in your posts. It will detect the author of the post or you can specify an author by username. You can specify a size, alignment, and link, but they are optional. For links, you can link to the original image file, attachment page, or a custom URL.
126
127 [avatar user="admin" size="medium" align="left" link="file" /]
128
129 You can also add a caption to the shortcode:
130
131 [avatar user="admin" size="medium" align="left" link="file"]Photo Credit: Your Name[/avatar]
132
133 **Note:** If you are using one shortcode without a caption and another shortcode with a caption on the same page, you must close the caption-less shortcode with a forward slash before the closing bracket: `[avatar /]` instead of `[avatar]`
134
135 ### `get_wp_user_avatar_src`
136
137 Works just like `get_wp_user_avatar` but returns just the image src. This is useful if you would like to link a thumbnail-sized avatar to a larger version of the image:
138
139 <a href="<?php echo get_wp_user_avatar_src( $user_id, 'large' ); ?>">
140 <?php echo get_wp_user_avatar( $user_id, 'thumbnail' ); ?>
141 </a>
142
143 ### `has_wp_user_avatar`
144
145 Returns true if the user has a One User Avatar image. You must specify the user ID:
146
147 <?php
148 if ( has_wp_user_avatar( $user_id ) ) {
149 echo get_wp_user_avatar( $user_id, 96 );
150 } else {
151 echo '<img src="my-alternate-image.jpg" />';
152 }
153 ?>
154
155 ## Frequently Asked Questions
156
157 ### How do I use One User Avatar?
158
159 First, choose a theme that has avatar support. In your theme, you have a choice of manually replacing <code>get_avatar</code> with <code>get_wp_user_avatar</code>, or leaving <code>get_avatar</code> as-is. Here are the differences:
160
161 #### `get_wp_user_avatar`
162
163 1. Allows you to use the values "original", "large", "medium", or "thumbnail" for your avatar size.
164 2. Doesn't add a fixed width and height to the image if you use the aforementioned values. This will give you more flexibility to resize the image with CSS.
165 3. Allows you to use custom image sizes registered with [](http://codex.wordpress.org/Function_Reference/add_image_size<code>add_image_size</code>](http://codex.wordpress.org/Function_Reference/add_image_size](http://codex.wordpress.org/Function_Reference/add_image_size) (fixed width and height are added to the image).
166 4. Optionally adds CSS classes "alignleft", "alignright", or "aligncenter" to position your avatar.
167 5. Shows nothing if the user has no One User Avatar image.
168 6. Shows the user's [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatar or Default Avatar only if "Show Avatars" is enabled in your One User Avatar settings.
169
170 #### `get_avatar`
171
172 1. Requires you to enable "Show Avatars" in your One User Avatar settings to show any avatars.
173 2. Accepts only numeric values for your avatar size.
174 3. Always adds a fixed width and height to your image. This may cause problems if you use responsive CSS in your theme.
175 4. Shows the user's [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatar or Default Avatar if the user doesn't have a One User Avatar image. (Choosing "Blank" as your Default Avatar still generates a transparent image file.)
176 5. Requires no changes to your theme files if you are currently using <code>get_avatar</code>.
177
178 [](http://codex.wordpress.org/Function_Reference/get_avatarRead more about get_avatar in the WordPress Function Reference](http://codex.wordpress.org/Function_Reference/get_avatar](http://codex.wordpress.org/Function_Reference/get_avatar).
179
180 ### Can I create a custom Default Avatar?
181 In your One User Avatar settings, you can upload your own Default Avatar.
182
183 ### Can I disable all Gravatar avatars?
184
185 In your One User Avatar settings, you can select "Disable Gravatar — Use only local avatars" to disable all [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatars on your site and replace them with your Default Avatar. This will affect your registered users and non-registered comment authors.
186
187 ### Can Contributors or Subscribers choose their own One User Avatar image?
188 Yes, if you enable "Allow Contributors & Subscribers to upload avatars" in the One User Avatar settings. These users will see a slightly different interface because they are allowed only one image upload.
189
190 ### Will One User Avatar work with comment author avatars?
191
192 Yes, for registered users. Non-registered comment authors will show their [](http://gravatar.com/Gravatar](http://gravatar.com/](http://gravatar.com/) avatars or Default Avatar.
193
194 ### Will One User Avatar work with bbPress?
195
196 Yes!
197
198 ### Will One User Avatar work with BuddyPress?
199
200 No, BuddyPress has its own custom avatar functions and One User Avatar will override only some of them. It's best to use BuddyPress without One User Avatar.
201
202 ### How can I see which users have an avatar?
203
204 For Administrators, One User Avatar adds a column with avatar thumbnails to your Users list table. If "Show Avatars" is enabled in your One User Avatar settings, you will see avatars to the left of each username instead of in a new column.
205
206 ### Can I use the One User Avatar uploader in a front page or widget?
207
208 Yes, you can use the `[avatar_upload]` shortcode to put a standalone uploader in a front page or widget. This uploader is only visible to logged-in users..
209
210 You can specify a user with the shortcode, but you must have `'edit_user'` capability to change the user's avatar.
211
212 [avatar_upload user="admin"]
213
214 ### Can I insert One User Avatar directly into a post?
215
216 You can use the `[avatar]` shortcode in your posts. It will detect the author of the post or you can specify an author by username. You can specify a size, alignment, and link, but they are optional. For links, you can link to the original image file, attachment page, or a custom URL.
217
218 [avatar user="admin" size="96" align="left" link="file" /]`
219
220 Outputs:
221
222 <a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
223 <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
224 </a>
225
226 If you have a caption, the output will be similar to how WordPress adds captions to other images.
227
228 [avatar user="admin" size="96" align="left" link="file"]Photo Credit: Your Name[/avatar]`
229
230 Outputs:
231
232 <div style="width: 106px" class="wp-caption alignleft">
233 <a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
234 <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96" />
235 </a>
236 <p class="wp-caption-text">Photo Credit: Your Name</p>
237 </div>
238
239 **Note:** If you are using one shortcode without a caption and another shortcode with a caption on the same page, you must close the caption-less shortcode with a forward slash before the closing bracket: <code>[avatar /]</code> instead of <code>[avatar]</code>
240
241 ### What CSS can I use with One User Avatar?
242
243 One User Avatar will add the CSS classes "wp-user-avatar" and "wp-user-avatar-{size}" to your image. If you add an alignment, the corresponding alignment class will be added:
244
245 <?php echo get_wp_user_avatar($user_id, 96, 'left'); ?>
246
247 Outputs:
248
249 <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
250
251 **Note:** "alignleft", "alignright", and aligncenter" are common WordPress CSS classes, but not every theme supports them. Contact the theme author to add those CSS classes.
252
253 If you use the values "original", "large", "medium", or "thumbnail", no width or height will be added to the image. This will give you more flexibility to resize the image with CSS:
254
255 <?php echo get_wp_user_avatar($user_id, 'medium'); ?>
256
257 Outputs:
258
259 <img src="{imageURL}" class="wp-user-avatar wp-user-avatar-medium" />
260
261 **Note:** WordPress adds more CSS classes to the avatar not listed here.
262
263 If you use the `[avatar]` shortcode, One User Avatar will add the CSS class "wp-user-avatar-link" to the link. It will also add CSS classes based on link type.
264
265 * Image File: wp-user-avatar-file
266 * Attachment: wp-user-avatar-attachment
267 * Custom URL: wp-user-avatar-custom
268
269 [avatar user="admin" size="96" align="left" link="attachment" /]
270
271 Outputs:
272
273 <a href="{attachmentURL}" class="wp-user-avatar-link wp-user-avatar-attachment">
274 <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
275 </a>
276
277 ### What other functions are available for One User Avatar?
278 * `get_wp_user_avatar_src`: retrieves just the image URL
279 * `has_wp_user_avatar`: checks if the user has a One User Avatar image
280 * [](#example-usageSee example usage here](#example-usage](#example-usage)
281
282 ## Advanced Settings
283
284 ### Add One User Avatar to your own profile edit page
285
286 You can use the [avatar_upload] shortcode to add a standalone uploader to any page. It's best to use this uploader by itself and without other profile fields.
287
288 If you're building your own profile edit page with other fields, One User Avatar is automatically added to the [](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profileshow_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile) and [](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profileedit_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile) hooks. If you'd rather have One User Avatar in its own section, you could add another hook:
289
290 do_action( 'edit_user_avatar', $current_user );
291
292 Then, to add One User Avatar to that hook and remove it from the other hooks outside of the administration panel, you would add this code to the <code>functions.php</code> file of your theme:
293
294 function my_avatar_filter() {
295 // Remove from show_user_profile hook
296 remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
297 remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
298
299 // Remove from edit_user_profile hook
300 remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
301 remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
302
303 // Add to edit_user_avatar hook
304 add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
305 add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
306 }
307
308 // Loads only outside of administration panel
309 if ( ! is_admin() ) {
310 add_action( 'init','my_avatar_filter' );
311 }
312
313 ### HTML Wrapper
314
315 You can change the HTML wrapper of the One User Avatar section by using the functions <code>wpua_before_avatar</code> and <code>wpua_after_avatar</code>. By default, the avatar code is structured like this:
316
317 <div class="wpua-edit-container">
318 <h3>Avatar</h3>
319 <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
320 <p id="wpua-add-button">
321 <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
322 </p>
323 <p id="wpua-preview">
324 <img src="{imageURL}" alt="" />
325 Original Size
326 </p>
327 <p id="wpua-thumbnail">
328 <img src="{imageURL}" alt="" />
329 Thumbnail
330 </p>
331 <p id="wpua-remove-button">
332 <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
333 </p>
334 <p id="wpua-undo-button">
335 <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
336 </p>
337 </div>
338
339 To strip out the div container and h3 heading, you would add the following filters to the <code>functions.php</code> file in your theme:
340
341 remove_action( 'wpua_before_avatar', 'wpua_do_before_avatar' );
342 remove_action( 'wpua_after_avatar', 'wpua_do_after_avatar' );
343
344 To add your own wrapper, you could create something like this:
345
346 function my_before_avatar() {
347 echo '<div id="my-avatar">';
348 }
349 add_action( 'wpua_before_avatar', 'my_before_avatar' );
350
351 function my_after_avatar() {
352 echo '</div>';
353 }
354 add_action( 'wpua_after_avatar', 'my_after_avatar' );`
355
356 This would output:
357
358 <div id="my-avatar">
359 <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
360 <p id="wpua-add-button">
361 <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
362 </p>
363 <p id="wpua-preview">
364 <img src="{imageURL}" alt="" />
365 <span class="description">Original Size</span>
366 </p>
367 <p id="wpua-thumbnail">
368 <img src="{imageURL}" alt="" />
369 <span class="description">Thumbnail</span>
370 </p>
371 <p id="wpua-remove-button">
372 <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
373 </p>
374 <p id="wpua-undo-button">
375 <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
376 </p>
377 </div>
378
379 ## Changelog
380
381 ### 2.5.4
382 * Add compatibility for WordPress 6.9
383 * Limit plugin tags to 5
384 * Fix avatar class name
385
386 ### 2.5.1
387 * Add compatibility for WordPress 6.8.2
388
389 ### 2.5.0
390 * Add compatibility for WordPress 6.6
391 * Add support for retina avatars
392 * Add trashed avatars view to library
393 * Don't show confirmation dialog when moving avatar to the trash
394 * Fix deprecated notices in avatars library
395 * Fix avatar library counters
396 * Fix undefined reference error in TinyMCE
397 * Fix alert when uploading avatar using browser file uploader
398 * Fix default avatars in admin when Gravatar is disabled
399 * Fix PHP warnings in add user form
400 * Fix activation and deactivation hooks
401 * Fix unable to get user by slug or email in avatar shortcode
402 * Fix unattached avatars showing for users with empty avatar meta
403 * Fix avatar dimensions in BuddyPress
404
405 ### 2.4.0
406 * Add compatibility for WordPress 6.3
407 * Fix custom avatars not returning in REST API calls
408 * Fix mobile view of avatar library
409 * Fix unable to change the default avatar when the browser file uploader option is active
410 * Fix default avatar radio not showing as checked on the settings page
411 * Fix unit showing twice under maximum upload file size when using the browser uploader
412
413 ### 2.3.9
414 * Escape, sanintize & validate data
415
416 ### 2.3.8
417 * Pass $args parameter from get_avatar to custom avatar filter
418 * Replace png icon with svg icon in admin menu
419
420 ### 2.3.7
421 * Fix XSS vulnerability
422
423 ### 2.3.6
424 * Add option to replace custom avatar functionality in Ultimate Member plugin
425
426 ### 2.3.5
427 * Fix "Choose Image" button not triggering media uploader on admin discussion page
428 * Remove jQuery UI dependency
429 * Prettify avatar library table
430
431 ### 2.3.4
432 * Add option to force the file uploader in avatar upload shortcode
433
434 ### 2.3.3
435 * Fix parse error in PHP 7
436
437 ### 2.3.2
438 * Fix missing Portuguese translation
439
440 ### 2.3.1
441 * Add Portuguese translation
442 * Add One_User_Avatar::plugin_dir_path() function
443 * Improve Dutch translation
444 * Remove redundant plural translation for 'All %s'
445 * Make URLs translatable
446 * Remove obsolete translation strings
447 * Fix indentation
448 * Fix nested call to wp_nonce_url()
449
450 ### 2.3.0
451 * Rename to One User Avatar
452 * Rewrite to conform with WordPress Coding Standards
453 * Add translations for Dutch, English (UK), French, German, Italian, Portuguese, Romanian, Spanish
454 * Prevent conflict with old WP User Avatar plugin
455 * Fix indentation
456 * Fix unescaped attributes
457 * Fix missing translation strings
458 * Fix headers already sent error when performing bulk actions
459 * Fix headers already sent error on when updating avatar using shortcode
460 * Fix TinyMCE deprecation notice
461 * Fix previev image not reverting when removing from user profile
462 * Remove unused images
463 * Remove MailOptin recommendation
464
465 ### 2.2.16
466 * Fixed issue of low quality avatar.
467
468 ### 2.2.15
469 * Fixed broken avatar in some edge cases.
470
471 ### 2.2.14
472 * Added missing space before classes.
473
474 ### 2.2.13
475 * Fixed broken avatar image.
476
477 ### 2.2.12
478 * Fixed issue where contributors and subscribers could see posts in the backend.
479 * Fixed Persistent XSS via display name when avatar is displayed.
480
481 ### 2.2.11
482 * Added classes passed to get_avatar function to avatar display
483 * Added avatar_defaults filter.
484 * Fix wpua_get_avatar_url not passing args further down.
485
486 ### 2.2.10
487 * Fixed: Warning: Missing argument 2 for WP_User_Avatar.
488 * Re-added support for hook implementation eg on wp frontend.
489
490 ### 2.2.9
491 * Fixed PHP Notice: Trying to get property 'ID' of non-object.
492 * Fixed Fatal Error: Cannot use string offset as an array.
493 * Fixed: Deprecated: whitelist_options is deprecated since version 5.5.0
494 * Increased the priority of user_profile_picture_description filter usage
495
496 ### 2.2.8
497 * Fixed: Notice: Object of class WP_User could not be converted.
498 * Replace core Profile Picture in profile edit screen with One User Avatar.
499 * Replace 'Avatar' as a label with 'Profile Picture'.
500 * Removed dashboard access restriction feature.
501 * Fixed contextual button display showing undo button on page load.
502
503 ### 2.2.7
504 * Removed target blank from dismiss url of admin notice
505 * Code enhancements and improvements.
506
507 ### 2.2.6
508 * Improve compatibility with latest WordPress version.
509
510 ### 2.2.5
511 * Fix: Missing translation strings added.
512
513 ### 2.2.4
514 * Fix: Warning Resolved on Avatar images.
515
516 ### 2.2.3
517 * Fix: Broken Avatar in buddypress resolved.
518
519 ### 2.2.2
520 * Fix: Broken avatars on comments section.
521
522 ### 2.2.1
523 * Fix: get_avatar_url filter is defined.
524
525 ### 2.2.0
526 * Fix: Fatel Error "Cannot use string offset as an array" resolved in PHP7.2.
527
528 ### 2.1.9
529 * New: New filter 'wpua_default_alt_tag' added to modify default image alt tag And warning error resolved on stagging environment.
530
531 ### 2.1.8
532 * Fix: Language Files are updated and warning error resolved on stagging environment.
533
534 ### 2.1.7
535 * Fix: Default ALT tag added.
536
537 ### 2.1.6
538 * Fix: Removed ads from the setting page.
539
540 ### 2.1.5
541 * Fix: Translation bug resolved in class-wp-user-avatar-admin file in PHP 7.
542
543 ### 2.1.4
544 * Fix: Remove Ads from dashboard and all other pages.
545
546 ### 2.1.3
547 * Fix: Better Styling
548
549 ### 2.1.2
550 * Fix: Tested up to 4.9.7
551
552 ### 2.1.1
553 * Fix: Insecure content over https issue is fixed.
554
555 ### 2.0.9
556 * New Shortcode: Use [avatar user=current] shortcode to show current logged in user avatar.
557
558 ### 2.0.8
559 * Fix: Compatible with php 7.
560
561 ### 2.0.7
562 * Improvement Fix: Removed languages files to be used from core wordpress language packs.
563
564 ### 2.0.7
565 * Improvement Fix: Removed languages files to be used from core wordpress language packs.
566
567 ### 2.0.6
568 * Improvement Fix: Broken Jquery files from UI is resolved.
569
570 ### 2.0.5
571 * Improvement Fix: Broken JS files from UI is resolved.
572
573 ### 2.0.4
574 * Improvement Fix: Activation warning in some cases is resolved.
575
576 ### 2.0.3
577 * Improvement Fix: Added missing translation strings in English version of po file.
578
579
580 ### 2.0.0
581 * Improvement Fix: Added missing translation strings in English version of po file.
582 * Bug Fix: Missing $user = $current_user is added in class-wp-user-avatar.php on line 156.
583
584
585 ### 1.9.19
586 * Improvement Fix: Fixed add_query_arg() and remove_query_arg() usage to avoid XSS Vulnerability.
587
588
589 ### 1.9.18
590 * Bug Fix: Removed cron job dependency for excellent performance.
591 * Bug Fix: Resolved gravatar was not showing on some special cases.
592 * Bug Fix: Resolved speed problem in case of large number of users for multisite, bbpress and buddy press.
593 * Bug Fix: Resolved display custom avatar problem when default and customer avatar is same choosen.
594
595
596 ### 1.9.17
597 * Bug Fix: Removed the looping through all users on admin_init action.
598
599 ### 1.9.16
600 * Bug Fix: lots of entries in wp_options table resolved.
601
602 ### 1.9.15
603 * Bug Fix: Multiple Cron job added bug resolved.
604
605
606 ### 1.9.14
607 * Bug Fix: Speed Issues due to check many times if gravatar exist.
608 * Bug Fix: Default gravatar issue for mustache and gravatar logo at front end and at buddypress pages
609 * Bug Fix: Avatar while adding for existing user.
610 * Bug Fix: UI issue when Gravatar option is enable/disable.
611
612
613 ### 1.9.13
614 * Bug Fix: Load _load_wp_includes mostly only on front pages
615 * Bug Fix: Check for edit_posts capability before enabling filters for Subscribers
616
617 ### 1.9.12
618 * Add: wpua_edit_user_redirect_url filter
619 * Add: wpua_edit_user_safe_redirect filter
620 * Bug Fix: Clean output buffer
621 * Update: Description field for widget
622
623 ### 1.9.11
624 * Update: Disable resource manager until a better solution comes along
625
626 ### 1.9.10
627 * Bug Fix: Check for TinyMCE version
628
629 ### 1.9.9
630 * Bug Fix: TinyMCE not loaded
631
632 ### 1.9.8
633 * Bug Fix: Check user permissions for displaying widget
634 * Update: Load resource manager only if NextGEN Gallery isn't installed
635
636 ### 1.9.7
637 * Bug Fix: Remove resource manager
638 * Bug Fix: User ID in shortcode
639
640 ### 1.9.6
641 * Bug Fix: Load resource manager on front pages only
642 * Update: [avatar_upload] user variable
643 * Update: Documentation
644
645 ### 1.9.5
646 * Add: Start documentation of functions
647 * Bug Fix: [avatar_upload] permalink and redirect
648
649 ### 1.9.4
650 * Add: Widget for [avatar_upload]
651 * Add: wpua_before_avatar_admin and wpua_after_avatar_admin for admin pages
652 * Bug Fix: Load functions class on plugins_loaded
653 * Update: Allow non-numeric WPUA value
654
655 ### 1.9.3
656 * Bug Fix: Missing php
657
658 ### 1.9.2
659 * Add: Setup class
660 * Bug Fix: Give wpua_attachment_is_image filter two variables
661 * Bug Fix: Return [avatar_upload] instead of echo
662 * Remove: Unneccessary filters
663 * Update: Allow upload to overwrite avatar for Contributors & Subscribers
664 * Update: Move Edit Image link for Contributors & Subscribers
665 * Update: Move text from localize script to data attribute
666 * Update: Shorten variable names
667 * Update: Wrap all classes in init
668
669 ### 1.9.1
670 * Bug Fix: Double underscore for options page title
671 * Bug Fix: Remove TinyMCE language pack
672 * Bug Fix: Wrong variables in get_wp_user_avatar filter
673
674 ### 1.9
675 * Add: Filters throughout plugin
676 * Bug Fix: Die messages
677 * Update: Move public functions to class
678
679 ### 1.8.10
680 * Add: Search and screen option in Media Library view
681 * Bug Fix: Bulk delete in Media Library view
682 * Bug Fix: Hide captions if "Show Avatars" is off
683 * Bug Fix: Update avatar metadata on removal
684 * Update: Choose Image text
685 * Update: Show only images in Media Library modal
686 * Update: Show upload tab if no One User Avatar image has been selected yet
687
688 ### 1.8.9
689 * Bug Fix: Check for post object
690
691 ### 1.8.8
692 * Bug Fix: Media upload scripts
693
694 ### 1.8.7
695 * Bug Fix: Bad reference to wpua_is_author_or_above
696
697 ### 1.8.6
698 * Bug Fix: Check for media upload scripts before setting post parent
699
700 ### 1.8.5
701 * Add: Capability check in one function
702
703 ### 1.8.4
704 * Bug Fix: Set avatar post parent to 0
705
706 ### 1.8.3
707 * Bug Fix: Prevent attachment insert without image
708 * Update: Check for delete_posts capability instead of user role for Subscribers
709 * Update: Refactor and clean up
710
711 ### 1.8.2
712 * Bug Fix: Edit avatar setting
713
714 ### 1.8.1
715 * Bug Fix: Reattach scripts to profile action
716
717 ### 1.8
718 * Add: Front page uploader
719 * Add: Media Library view of all avatars
720 * Bug Fix: Identify public static functions
721 * Update: Refactor code into separate classes
722 * Update: Translations
723
724 ### 1.7.2
725 * Bug Fix: Files not committed properly in previous release
726
727 ### 1.7.1
728 * Update: Error message handling for front pages
729
730 ### 1.7
731 * Add: Caption for avatar
732 * Add: Polish translation
733 * Update: Error message handling
734
735 ### 1.6.8
736 * Bug Fix: Shortcode without user
737
738 ### 1.6.7
739 * Add: Undo button
740 * Bug Fix: Get original avatar
741
742 ### 1.6.6
743 * Add: Donation message
744 * Bug Fix: Die page when image is too large
745 * Bug Fix: Resize images uploaded through plugin only
746 * Remove: Unused function
747 * Update: Refactor JavaScript
748
749 ### 1.6.5
750 * Bug Fix: Use entire comment object instead of just e-mail address
751
752 ### 1.6.4
753 * Bug Fix: Correct avatar not showing in widget
754 * Update: Check compatibility to 3.7.1
755
756 ### 1.6.3
757 * Bug Fix: Checkbox value for "Crop avatars to exact dimensions"
758
759 ### 1.6.2
760 * Bug Fix: Show Default Avatar if attachment doesn't exist
761 * Bug Fix: manage_users_custom_column not returning values
762
763 ### 1.6.1
764 * Bug Fix: Profile not saving without an avatar for Contributors & Subscribers
765
766 ### 1.6.0
767 * Add: Filters to change profile HTML structure
768 * Add: Recognition of sizes registered with add_image_size
769 * Add: Resize image options for Contributors & Subscribers
770 * Bug Fix: Rerrange CSS class names
771
772 ### 1.5.8
773 * Bug Fix: Add function exists checks to prevent redeclare errors
774 * Bug Fix: Page die if file upload is too big
775 * Bug Fix: Upload file with submit
776
777 ### 1.5.7
778 * Bug Fix: Separate out JavaScript for Contributors & Subscribers
779 * Bug Fix: Subscriber uploader not finding error type
780
781 ### 1.5.6
782 * Update: Use cache for wpua_has_gravatar
783
784 ### 1.5.5
785 * Bug Fix: Hide "Edit Image" button if Contributors & Subscribers can't edit avatar
786 * Bug Fix: Remove edit_posts capability if Subscribers can't edit avatar
787
788 ### 1.5.4
789 * Add: Option to enable avatar editing privilege for Contributors & Subscribers
790 * Add: Swedish translation
791 * Update: Move inline JavaScript to wp-user-avatar.js and wp-user-avatar-admin.js
792 * Update: Load JavaScript in footer
793 * Update: Translations
794
795 ### 1.5.3
796 * Remove: Option to disable scripts in front pages
797 * Update: Load media upload scripts only on profile and avatar admin pages
798 * Update: Translations
799
800 ### 1.5.2
801 * Bug Fix: Ability to disable scripts in front pages
802
803 ### 1.5.1
804 * Add: Ability to disable scripts in front pages
805 * Update: Uninstall options
806 * Update: Translations
807
808 ### 1.5
809 * Add: Ability to disable Gravatar avatars
810 * Add: Upload size limiter for Contributors & Subscribers
811 * Add: French, German, and Spanish translations
812
813 ### 1.4.2
814 * Bug Fix: Include screen.php for get_current_screen function
815
816 ### 1.4.1
817 * Bug Fix: Allow multipart data in form
818 * Bug Fix: Use wp_die for errors
819
820 ### 1.4
821 * Add: Uploader for Contributors & Subscribers
822 * Add: Media states for avatar images
823 * Add: Plugin admin settings
824 * Update: Change support only to WP 3.4+
825
826 ### 1.3.6
827 * Add: Target for link in shortcode
828 * Update: Clean up code and add more comments
829
830 ### 1.3.5
831 * Bug Fix: Swap TinyMCE file locations
832
833 ### 1.3.4
834 * Update: Change support only to WP 3.3+ because of jQuery 1.7.1 support
835
836 ### 1.3.3
837 * Update: Shortcode checks for user ID, login, slug, or e-mail address
838 * Update: Move jquery to register_script for < WP 3.5
839
840 ### 1.3.2
841 * Bug Fix: Check for user before setting name in alt tag
842 * Update: readme.txt
843
844 ### 1.3.1
845 * Bug Fix: Rename usermeta only if found
846
847 ### 1.3
848 * Add: Multisite support
849 * Bug Fix: Warnings if no user found
850 * Update: Enable action_show_user_profile for any class using show_user_profile hook
851
852 ### 1.2.6
853 * Bug Fix: options-discussion.php page doesn't show default avatars
854
855 ### 1.2.5
856 * Bug Fix: Comment author showing wrong avatar
857 * Bug Fix: Avatar adds fixed dimensions when non-numeric size is used
858 * Update: Use local image for default avatar instead of calling image from Gravatar
859
860 ### 1.2.4
861 * Bug Fix: Show default avatar when user removes custom avatar
862 * Bug Fix: Default Avatar save setting
863
864 ### 1.2.3
865 * Bug Fix: Show default avatar when user removes custom avatar
866 * Bug Fix: Default Avatar save setting
867
868 ### 1.2.2
869 * Add: Ability for bbPress users to edit avatar on front profile page
870 * Add: Link options for shortcode
871 * Bug Fix: Show One User Avatar only to users with upload_files capability
872
873 ### 1.2.1
874 * Add: TinyMCE button
875 * Update: Clean up redundant code
876 * Update: Compatibility only back to WordPress 3.3
877
878 ### 1.2
879 * Add: Default Avatar setting
880
881 ### 1.1.8
882 * Bug Fix: Change update_usermeta to update_user_meta
883
884 ### 1.1.6
885 * Bug Fix: Image not showing in user profile edit
886
887 ### 1.1.5a
888 * Update: readme.txt
889
890 ### 1.1.5
891 * Bug Fix: Remove stray curly bracket
892
893 ### 1.1.4
894 * Bug Fix: Change get_usermeta to get_user_meta
895 * Bug Fix: Non-object warning when retrieving user ID
896
897 ### 1.1.3
898 * Bug Fix: Comment author with no e-mail address
899
900 ### 1.1.2
901 * Remove: Unused variables
902
903 ### 1.1.1
904 * Bug Fix: Capabilities error in comment avatar
905
906 ### 1.1
907 * Add: Add filter for get_avatar
908 * Add: CSS alignment classes
909 * Add: Replace comment author avatar
910 * Add: Shortcode
911 * Update: readme.txt
912
913 ### 1.0.2
914 * Update: FAQ
915 * Remove: CSS that hides "Insert into Post"
916
917 ### 1.0.1
918 * Add: CSS classes to image output
919
920 ### 1.0
921 * Initial release
922
923 == Upgrade Notice ==
924
925 ### 1.8
926 * New Feature: Front page uploader
927 * New Feature: Media Library view of all avatars
928
929 ### 1.5.3
930 * Notice: One User Avatar 1.5.3 only supports WordPress 3.5 and above. If you are using an older version of WordPress, please upgrade your version of WordPress first.
931
932 ### 1.5
933 * New Feature: Ability to disable Gravatar avatars
934 * New Feature: Upload size limiter for Contributors & Subscribers
935 * New Feature: French and German translations
936
937 ### 1.4
938 * New Feature: Setting to allow all users to upload avatars
939 * New Feature: Setting to add or remove Visual Editor button
940 * New Feature: Media states for avatar images
941 * Notice: One User Avatar 1.4 only supports WordPress 3.4 and above. If you are using an older version of WordPress, please upgrade your version of WordPress first.
942
943 ### 1.3
944 * New Feature: Multisite support
945
946 ### 1.2.2
947 * New Features: Link options for shortcode, bbPress integration
948
949 ### 1.2.1
950 * New Feature: Shortcode insertion button for Visual Editor
951
952 ### 1.2
953 * New Feature: Default Avatar customization
954
955 ### 1.1
956 * New Features: [avatar] shortcode, direct replacement of get_avatar() and comment author avatar, more CSS classes
957