One User Avatar | User Profile Picture - Version 2.3.2

Version Description

  • Fix missing Portuguese translation
Download this release

Release Info

Developer onedesigns
Plugin Icon 128x128 One User Avatar | User Profile Picture
Version 2.3.2
Comparing to
See all releases

Version 2.3.2

Files changed (55) hide show
  1. README.md +907 -0
  2. assets/css/jquery-ui.css +587 -0
  3. assets/css/tinymce-window.css +73 -0
  4. assets/css/wp-user-avatar.css +89 -0
  5. assets/images/wpua-150x150.png +0 -0
  6. assets/images/wpua-20x20.png +0 -0
  7. assets/images/wpua-300x300.png +0 -0
  8. assets/images/wpua-32x32.png +0 -0
  9. assets/images/wpua-96x96.png +0 -0
  10. assets/images/wpua-icon.png +0 -0
  11. assets/images/wpua.png +0 -0
  12. assets/js/tinymce-editor_plugin.js +53 -0
  13. assets/js/tinymce-window.js +101 -0
  14. assets/js/wp-user-avatar-admin.js +56 -0
  15. assets/js/wp-user-avatar-user.js +79 -0
  16. assets/js/wp-user-avatar.js +163 -0
  17. includes/class-wp-user-avatar-admin.php +586 -0
  18. includes/class-wp-user-avatar-functions.php +883 -0
  19. includes/class-wp-user-avatar-list-table.php +567 -0
  20. includes/class-wp-user-avatar-resource-manager.php +248 -0
  21. includes/class-wp-user-avatar-setup.php +108 -0
  22. includes/class-wp-user-avatar-shortcode.php +295 -0
  23. includes/class-wp-user-avatar-subscriber.php +84 -0
  24. includes/class-wp-user-avatar-update.php +150 -0
  25. includes/class-wp-user-avatar-widget.php +142 -0
  26. includes/class-wp-user-avatar.php +670 -0
  27. includes/wpua-functions.php +214 -0
  28. includes/wpua-globals.php +126 -0
  29. includes/wpua-media-page.php +108 -0
  30. includes/wpua-options-page.php +325 -0
  31. includes/wpua-tinymce-window.php +198 -0
  32. includes/wpua-tinymce.php +87 -0
  33. index.php +2 -0
  34. languages/de_DE.mo +0 -0
  35. languages/de_DE.po +487 -0
  36. languages/en_GB.mo +0 -0
  37. languages/en_GB.po +481 -0
  38. languages/es_ES.mo +0 -0
  39. languages/es_ES.po +483 -0
  40. languages/fr_FR.mo +0 -0
  41. languages/fr_FR.po +485 -0
  42. languages/it_IT.mo +0 -0
  43. languages/it_IT.po +476 -0
  44. languages/nl_NL.mo +0 -0
  45. languages/nl_NL.po +479 -0
  46. languages/one-user-avatar.pot +473 -0
  47. languages/pt_BR.mo +0 -0
  48. languages/pt_BR.po +480 -0
  49. languages/pt_PT.mo +0 -0
  50. languages/pt_PT.po +480 -0
  51. languages/ro_RO.mo +0 -0
  52. languages/ro_RO.po +483 -0
  53. one-user-avatar.php +156 -0
  54. readme.txt +920 -0
  55. uninstall.php +97 -0
README.md ADDED
@@ -0,0 +1,907 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 [Gravatar](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 [Gravatar](http://gravatar.com/) avatar or Default Avatar if the user doesn't have a One User Avatar image.
13
+ * Disable [Gravatar](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) 2021 [One Designs](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 [ProfilePress](https://profilepress.net/)
28
+ Copyright (c) 2014-2020 [Flippercode](https://www.flippercode.com/)
29
+ Copyright (c) 2013-2014 [Bangbay Siboliban](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
+ One User Avatar bundles the following third-party resources:
46
+
47
+ jQuery UI Slider v1.12.1
48
+ Copyright (c) 2021 jQuery Foundation
49
+ License: MIT
50
+ Source: https://github.com/jquery/jquery-ui
51
+
52
+ ## Installation
53
+
54
+ 1. Download, install, and activate the One User Avatar plugin.
55
+ 2. On your profile edit page, click "Edit Image".
56
+ 3. Choose an image, then click "Select Image".
57
+ 4. Click "Update Profile".
58
+ 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.
59
+ 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. [Read about the differences here](#frequently-asked-questions).
60
+ 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.
61
+
62
+ **Warning**
63
+
64
+ 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.
65
+
66
+ ## Example Usage
67
+
68
+ ### Posts
69
+
70
+ Within [The Loop](http://codex.wordpress.org/The_Loop), you may be using:
71
+
72
+ <?php echo get_avatar( get_the_author_meta( 'ID' ), 96 ); ?>
73
+
74
+ Replace this function with:
75
+
76
+ <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96 ); ?>
77
+
78
+ You can also use the values "original", "large", "medium", or "thumbnail" for your avatar size:
79
+
80
+ <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 'medium' ); ?>
81
+
82
+ You can also add an alignment of "left", "right", or "center":
83
+
84
+ <?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96, 'left' ); ?>
85
+
86
+ ### Author Page
87
+
88
+ On an author page outside of [The Loop](http://codex.wordpress.org/The_Loop), you may be using:
89
+
90
+ <?php
91
+ $user = get_user_by( 'slug', $author_name );
92
+ echo get_avatar( $user->ID, 96 );
93
+ ?>
94
+
95
+ Replace this function with:
96
+
97
+ <?php
98
+ $user = get_user_by( 'slug', $author_name );
99
+ echo get_wp_user_avatar( $user->ID, 96 );
100
+ ?>
101
+
102
+ If you leave the options blank, One User Avatar will detect whether you're inside [The Loop](http://codex.wordpress.org/The_Loop) or on an author page and return the correct avatar in the default 96x96 size:
103
+
104
+ <?php echo get_wp_user_avatar(); ?>
105
+
106
+ 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 [Gravatar](http://gravatar.com/) avatar or Default Avatar.
107
+
108
+ ### Comments
109
+
110
+ For comments, you might have in your template:
111
+
112
+ <?php echo get_avatar($comment, 32); ?>
113
+
114
+ Replace this function with:
115
+
116
+ <?php echo get_wp_user_avatar($comment, 32); ?>
117
+
118
+ For comments, you must specify the $comment variable.
119
+
120
+ ## Other Available Functions
121
+
122
+ ### `[avatar_upload]` shortcode
123
+
124
+ 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.
125
+
126
+ You can specify a user with the shortcode, but you must have `edit_user` capability for that particular user.
127
+
128
+ [avatar_upload user="admin"]
129
+
130
+ ### `[avatar]` shortcode
131
+
132
+ 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.
133
+
134
+ [avatar user="admin" size="medium" align="left" link="file" /]
135
+
136
+ You can also add a caption to the shortcode:
137
+
138
+ [avatar user="admin" size="medium" align="left" link="file"]Photo Credit: Your Name[/avatar]
139
+
140
+ **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]`
141
+
142
+ ### `get_wp_user_avatar_src`
143
+
144
+ 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:
145
+
146
+ <a href="<?php echo get_wp_user_avatar_src( $user_id, 'large' ); ?>">
147
+ <?php echo get_wp_user_avatar( $user_id, 'thumbnail' ); ?>
148
+ </a>
149
+
150
+ ### `has_wp_user_avatar`
151
+
152
+ Returns true if the user has a One User Avatar image. You must specify the user ID:
153
+
154
+ <?php
155
+ if ( has_wp_user_avatar( $user_id ) ) {
156
+ echo get_wp_user_avatar( $user_id, 96 );
157
+ } else {
158
+ echo '<img src="my-alternate-image.jpg" />';
159
+ }
160
+ ?>
161
+
162
+ ## Frequently Asked Questions
163
+
164
+ ### How do I use One User Avatar?
165
+
166
+ 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:
167
+
168
+ #### `get_wp_user_avatar`
169
+
170
+ 1. Allows you to use the values "original", "large", "medium", or "thumbnail" for your avatar size.
171
+ 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.
172
+ 3. Allows you to use custom image sizes registered with [<code>add_image_size</code>](http://codex.wordpress.org/Function_Reference/add_image_size) (fixed width and height are added to the image).
173
+ 4. Optionally adds CSS classes "alignleft", "alignright", or "aligncenter" to position your avatar.
174
+ 5. Shows nothing if the user has no One User Avatar image.
175
+ 6. Shows the user's [Gravatar](http://gravatar.com/) avatar or Default Avatar only if "Show Avatars" is enabled in your One User Avatar settings.
176
+
177
+ #### `get_avatar`
178
+
179
+ 1. Requires you to enable "Show Avatars" in your One User Avatar settings to show any avatars.
180
+ 2. Accepts only numeric values for your avatar size.
181
+ 3. Always adds a fixed width and height to your image. This may cause problems if you use responsive CSS in your theme.
182
+ 4. Shows the user's [Gravatar](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.)
183
+ 5. Requires no changes to your theme files if you are currently using <code>get_avatar</code>.
184
+
185
+ [Read more about get_avatar in the WordPress Function Reference](http://codex.wordpress.org/Function_Reference/get_avatar).
186
+
187
+ ### Can I create a custom Default Avatar?
188
+ In your One User Avatar settings, you can upload your own Default Avatar.
189
+
190
+ ### Can I disable all Gravatar avatars?
191
+
192
+ In your One User Avatar settings, you can select "Disable Gravatar — Use only local avatars" to disable all [Gravatar](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.
193
+
194
+ ### Can Contributors or Subscribers choose their own One User Avatar image?
195
+ 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.
196
+
197
+ ### Will One User Avatar work with comment author avatars?
198
+
199
+ Yes, for registered users. Non-registered comment authors will show their [Gravatar](http://gravatar.com/) avatars or Default Avatar.
200
+
201
+ ### Will One User Avatar work with bbPress?
202
+
203
+ Yes!
204
+
205
+ ### Will One User Avatar work with BuddyPress?
206
+
207
+ 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.
208
+
209
+ ### How can I see which users have an avatar?
210
+
211
+ 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.
212
+
213
+ ### Can I use the One User Avatar uploader in a front page or widget?
214
+
215
+ 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..
216
+
217
+ You can specify a user with the shortcode, but you must have `'edit_user'` capability to change the user's avatar.
218
+
219
+ [avatar_upload user="admin"]
220
+
221
+ ### Can I insert One User Avatar directly into a post?
222
+
223
+ 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.
224
+
225
+ [avatar user="admin" size="96" align="left" link="file" /]`
226
+
227
+ Outputs:
228
+
229
+ <a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
230
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
231
+ </a>
232
+
233
+ If you have a caption, the output will be similar to how WordPress adds captions to other images.
234
+
235
+ [avatar user="admin" size="96" align="left" link="file"]Photo Credit: Your Name[/avatar]`
236
+
237
+ Outputs:
238
+
239
+ <div style="width: 106px" class="wp-caption alignleft">
240
+ <a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
241
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96" />
242
+ </a>
243
+ <p class="wp-caption-text">Photo Credit: Your Name</p>
244
+ </div>
245
+
246
+ **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>
247
+
248
+ ### What CSS can I use with One User Avatar?
249
+
250
+ 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:
251
+
252
+ <?php echo get_wp_user_avatar($user_id, 96, 'left'); ?>
253
+
254
+ Outputs:
255
+
256
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
257
+
258
+ **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.
259
+
260
+ 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:
261
+
262
+ <?php echo get_wp_user_avatar($user_id, 'medium'); ?>
263
+
264
+ Outputs:
265
+
266
+ <img src="{imageURL}" class="wp-user-avatar wp-user-avatar-medium" />
267
+
268
+ **Note:** WordPress adds more CSS classes to the avatar not listed here.
269
+
270
+ 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.
271
+
272
+ * Image File: wp-user-avatar-file
273
+ * Attachment: wp-user-avatar-attachment
274
+ * Custom URL: wp-user-avatar-custom
275
+
276
+ [avatar user="admin" size="96" align="left" link="attachment" /]
277
+
278
+ Outputs:
279
+
280
+ <a href="{attachmentURL}" class="wp-user-avatar-link wp-user-avatar-attachment">
281
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
282
+ </a>
283
+
284
+ ### What other functions are available for One User Avatar?
285
+ * `get_wp_user_avatar_src`: retrieves just the image URL
286
+ * `has_wp_user_avatar`: checks if the user has a One User Avatar image
287
+ * [See example usage here](#example-usage)
288
+
289
+ ## Advanced Settings
290
+
291
+ ### Add One User Avatar to your own profile edit page
292
+
293
+ 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.
294
+
295
+ If you're building your own profile edit page with other fields, One User Avatar is automatically added to the [show_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile) and [edit_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:
296
+
297
+ do_action( 'edit_user_avatar', $current_user );
298
+
299
+ 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:
300
+
301
+ function my_avatar_filter() {
302
+ // Remove from show_user_profile hook
303
+ remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
304
+ remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
305
+
306
+ // Remove from edit_user_profile hook
307
+ remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
308
+ remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
309
+
310
+ // Add to edit_user_avatar hook
311
+ add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
312
+ add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
313
+ }
314
+
315
+ // Loads only outside of administration panel
316
+ if ( ! is_admin() ) {
317
+ add_action( 'init','my_avatar_filter' );
318
+ }
319
+
320
+ ### HTML Wrapper
321
+
322
+ 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:
323
+
324
+ <div class="wpua-edit-container">
325
+ <h3>Avatar</h3>
326
+ <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
327
+ <p id="wpua-add-button">
328
+ <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
329
+ </p>
330
+ <p id="wpua-preview">
331
+ <img src="{imageURL}" alt="" />
332
+ Original Size
333
+ </p>
334
+ <p id="wpua-thumbnail">
335
+ <img src="{imageURL}" alt="" />
336
+ Thumbnail
337
+ </p>
338
+ <p id="wpua-remove-button">
339
+ <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
340
+ </p>
341
+ <p id="wpua-undo-button">
342
+ <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
343
+ </p>
344
+ </div>
345
+
346
+ 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:
347
+
348
+ remove_action( 'wpua_before_avatar', 'wpua_do_before_avatar' );
349
+ remove_action( 'wpua_after_avatar', 'wpua_do_after_avatar' );
350
+
351
+ To add your own wrapper, you could create something like this:
352
+
353
+ function my_before_avatar() {
354
+ echo '<div id="my-avatar">';
355
+ }
356
+ add_action( 'wpua_before_avatar', 'my_before_avatar' );
357
+
358
+ function my_after_avatar() {
359
+ echo '</div>';
360
+ }
361
+ add_action( 'wpua_after_avatar', 'my_after_avatar' );`
362
+
363
+ This would output:
364
+
365
+ <div id="my-avatar">
366
+ <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
367
+ <p id="wpua-add-button">
368
+ <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
369
+ </p>
370
+ <p id="wpua-preview">
371
+ <img src="{imageURL}" alt="" />
372
+ <span class="description">Original Size</span>
373
+ </p>
374
+ <p id="wpua-thumbnail">
375
+ <img src="{imageURL}" alt="" />
376
+ <span class="description">Thumbnail</span>
377
+ </p>
378
+ <p id="wpua-remove-button">
379
+ <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
380
+ </p>
381
+ <p id="wpua-undo-button">
382
+ <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
383
+ </p>
384
+ </div>
385
+
386
+ ## Changelog
387
+
388
+ ### 2.3.2
389
+ * Fix missing Portuguese translation
390
+
391
+ ### 2.3.1
392
+ * Add Portuguese translation
393
+ * Add One_User_Avatar::plugin_dir_path() function
394
+ * Improve Dutch translation
395
+ * Remove redundant plural translation for 'All %s'
396
+ * Make URLs translatable
397
+ * Remove obsolete translation strings
398
+ * Fix indentation
399
+ * Fix nested call to wp_nonce_url()
400
+
401
+ ### 2.3.0
402
+ * Rename to One User Avatar
403
+ * Rewrite to conform with WordPress Coding Standards
404
+ * Add translations for Dutch, English (UK), French, German, Italian, Portuguese, Romanian, Spanish
405
+ * Prevent conflict with old WP User Avatar plugin
406
+ * Fix indentation
407
+ * Fix unescaped attributes
408
+ * Fix missing translation strings
409
+ * Fix headers already sent error when performing bulk actions
410
+ * Fix headers already sent error on when updating avatar using shortcode
411
+ * Fix TinyMCE deprecation notice
412
+ * Fix previev image not reverting when removing from user profile
413
+ * Remove unused images
414
+ * Remove MailOptin recommendation
415
+
416
+ ### 2.2.16
417
+ * Fixed issue of low quality avatar.
418
+
419
+ ### 2.2.15
420
+ * Fixed broken avatar in some edge cases.
421
+
422
+ ### 2.2.14
423
+ * Added missing space before classes.
424
+
425
+ ### 2.2.13
426
+ * Fixed broken avatar image.
427
+
428
+ ### 2.2.12
429
+ * Fixed issue where contributors and subscribers could see posts in the backend.
430
+ * Fixed Persistent XSS via display name when avatar is displayed.
431
+
432
+ ### 2.2.11
433
+ * Added classes passed to get_avatar function to avatar display
434
+ * Added avatar_defaults filter.
435
+ * Fix wpua_get_avatar_url not passing args further down.
436
+
437
+ ### 2.2.10
438
+ * Fixed: Warning: Missing argument 2 for WP_User_Avatar.
439
+ * Re-added support for hook implementation eg on wp frontend.
440
+
441
+ ### 2.2.9
442
+ * Fixed PHP Notice: Trying to get property 'ID' of non-object.
443
+ * Fixed Fatal Error: Cannot use string offset as an array.
444
+ * Fixed: Deprecated: whitelist_options is deprecated since version 5.5.0
445
+ * Increased the priority of user_profile_picture_description filter usage
446
+
447
+ ### 2.2.8
448
+ * Fixed: Notice: Object of class WP_User could not be converted.
449
+ * Replace core Profile Picture in profile edit screen with One User Avatar.
450
+ * Replace 'Avatar' as a label with 'Profile Picture'.
451
+ * Removed dashboard access restriction feature.
452
+ * Fixed contextual button display showing undo button on page load.
453
+
454
+ ### 2.2.7
455
+ * Removed target blank from dismiss url of admin notice
456
+ * Code enhancements and improvements.
457
+
458
+ ### 2.2.6
459
+ * Improve compatibility with latest WordPress version.
460
+
461
+ ### 2.2.5
462
+ * Fix: Missing translation strings added.
463
+
464
+ ### 2.2.4
465
+ * Fix: Warning Resolved on Avatar images.
466
+
467
+ ### 2.2.3
468
+ * Fix: Broken Avatar in buddypress resolved.
469
+
470
+ ### 2.2.2
471
+ * Fix: Broken avatars on comments section.
472
+
473
+ ### 2.2.1
474
+ * Fix: get_avatar_url filter is defined.
475
+
476
+ ### 2.2.0
477
+ * Fix: Fatel Error "Cannot use string offset as an array" resolved in PHP7.2.
478
+
479
+ ### 2.1.9
480
+ * New: New filter 'wpua_default_alt_tag' added to modify default image alt tag And warning error resolved on stagging environment.
481
+
482
+ ### 2.1.8
483
+ * Fix: Language Files are updated and warning error resolved on stagging environment.
484
+
485
+ ### 2.1.7
486
+ * Fix: Default ALT tag added.
487
+
488
+ ### 2.1.6
489
+ * Fix: Removed ads from the setting page.
490
+
491
+ ### 2.1.5
492
+ * Fix: Translation bug resolved in class-wp-user-avatar-admin file in PHP 7.
493
+
494
+ ### 2.1.4
495
+ * Fix: Remove Ads from dashboard and all other pages.
496
+
497
+ ### 2.1.3
498
+ * Fix: Better Styling
499
+
500
+ ### 2.1.2
501
+ * Fix: Tested up to 4.9.7
502
+
503
+ ### 2.1.1
504
+ * Fix: Insecure content over https issue is fixed.
505
+
506
+ ### 2.0.9
507
+ * New Shortcode: Use [avatar user=current] shortcode to show current logged in user avatar.
508
+
509
+ ### 2.0.8
510
+ * Fix: Compatible with php 7.
511
+
512
+ ### 2.0.7
513
+ * Improvement Fix: Removed languages files to be used from core wordpress language packs.
514
+
515
+ ### 2.0.7
516
+ * Improvement Fix: Removed languages files to be used from core wordpress language packs.
517
+
518
+ ### 2.0.6
519
+ * Improvement Fix: Broken Jquery files from UI is resolved.
520
+
521
+ ### 2.0.5
522
+ * Improvement Fix: Broken JS files from UI is resolved.
523
+
524
+ ### 2.0.4
525
+ * Improvement Fix: Activation warning in some cases is resolved.
526
+
527
+ ### 2.0.3
528
+ * Improvement Fix: Added missing translation strings in English version of po file.
529
+
530
+
531
+ ### 2.0.0
532
+ * Improvement Fix: Added missing translation strings in English version of po file.
533
+ * Bug Fix: Missing $user = $current_user is added in class-wp-user-avatar.php on line 156.
534
+
535
+
536
+ ### 1.9.19
537
+ * Improvement Fix: Fixed add_query_arg() and remove_query_arg() usage to avoid XSS Vulnerability.
538
+
539
+
540
+ ### 1.9.18
541
+ * Bug Fix: Removed cron job dependency for excellent performance.
542
+ * Bug Fix: Resolved gravatar was not showing on some special cases.
543
+ * Bug Fix: Resolved speed problem in case of large number of users for multisite, bbpress and buddy press.
544
+ * Bug Fix: Resolved display custom avatar problem when default and customer avatar is same choosen.
545
+
546
+
547
+ ### 1.9.17
548
+ * Bug Fix: Removed the looping through all users on admin_init action.
549
+
550
+ ### 1.9.16
551
+ * Bug Fix: lots of entries in wp_options table resolved.
552
+
553
+ ### 1.9.15
554
+ * Bug Fix: Multiple Cron job added bug resolved.
555
+
556
+
557
+ ### 1.9.14
558
+ * Bug Fix: Speed Issues due to check many times if gravatar exist.
559
+ * Bug Fix: Default gravatar issue for mustache and gravatar logo at front end and at buddypress pages
560
+ * Bug Fix: Avatar while adding for existing user.
561
+ * Bug Fix: UI issue when Gravatar option is enable/disable.
562
+
563
+
564
+ ### 1.9.13
565
+ * Bug Fix: Load _load_wp_includes mostly only on front pages
566
+ * Bug Fix: Check for edit_posts capability before enabling filters for Subscribers
567
+
568
+ ### 1.9.12
569
+ * Add: wpua_edit_user_redirect_url filter
570
+ * Add: wpua_edit_user_safe_redirect filter
571
+ * Bug Fix: Clean output buffer
572
+ * Update: Description field for widget
573
+
574
+ ### 1.9.11
575
+ * Update: Disable resource manager until a better solution comes along
576
+
577
+ ### 1.9.10
578
+ * Bug Fix: Check for TinyMCE version
579
+
580
+ ### 1.9.9
581
+ * Bug Fix: TinyMCE not loaded
582
+
583
+ ### 1.9.8
584
+ * Bug Fix: Check user permissions for displaying widget
585
+ * Update: Load resource manager only if NextGEN Gallery isn't installed
586
+
587
+ ### 1.9.7
588
+ * Bug Fix: Remove resource manager
589
+ * Bug Fix: User ID in shortcode
590
+
591
+ ### 1.9.6
592
+ * Bug Fix: Load resource manager on front pages only
593
+ * Update: [avatar_upload] user variable
594
+ * Update: Documentation
595
+
596
+ ### 1.9.5
597
+ * Add: Start documentation of functions
598
+ * Bug Fix: [avatar_upload] permalink and redirect
599
+
600
+ ### 1.9.4
601
+ * Add: Widget for [avatar_upload]
602
+ * Add: wpua_before_avatar_admin and wpua_after_avatar_admin for admin pages
603
+ * Bug Fix: Load functions class on plugins_loaded
604
+ * Update: Allow non-numeric WPUA value
605
+
606
+ ### 1.9.3
607
+ * Bug Fix: Missing php
608
+
609
+ ### 1.9.2
610
+ * Add: Setup class
611
+ * Bug Fix: Give wpua_attachment_is_image filter two variables
612
+ * Bug Fix: Return [avatar_upload] instead of echo
613
+ * Remove: Unneccessary filters
614
+ * Update: Allow upload to overwrite avatar for Contributors & Subscribers
615
+ * Update: Move Edit Image link for Contributors & Subscribers
616
+ * Update: Move text from localize script to data attribute
617
+ * Update: Shorten variable names
618
+ * Update: Wrap all classes in init
619
+
620
+ ### 1.9.1
621
+ * Bug Fix: Double underscore for options page title
622
+ * Bug Fix: Remove TinyMCE language pack
623
+ * Bug Fix: Wrong variables in get_wp_user_avatar filter
624
+
625
+ ### 1.9
626
+ * Add: Filters throughout plugin
627
+ * Bug Fix: Die messages
628
+ * Update: Move public functions to class
629
+
630
+ ### 1.8.10
631
+ * Add: Search and screen option in Media Library view
632
+ * Bug Fix: Bulk delete in Media Library view
633
+ * Bug Fix: Hide captions if "Show Avatars" is off
634
+ * Bug Fix: Update avatar metadata on removal
635
+ * Update: Choose Image text
636
+ * Update: Show only images in Media Library modal
637
+ * Update: Show upload tab if no One User Avatar image has been selected yet
638
+
639
+ ### 1.8.9
640
+ * Bug Fix: Check for post object
641
+
642
+ ### 1.8.8
643
+ * Bug Fix: Media upload scripts
644
+
645
+ ### 1.8.7
646
+ * Bug Fix: Bad reference to wpua_is_author_or_above
647
+
648
+ ### 1.8.6
649
+ * Bug Fix: Check for media upload scripts before setting post parent
650
+
651
+ ### 1.8.5
652
+ * Add: Capability check in one function
653
+
654
+ ### 1.8.4
655
+ * Bug Fix: Set avatar post parent to 0
656
+
657
+ ### 1.8.3
658
+ * Bug Fix: Prevent attachment insert without image
659
+ * Update: Check for delete_posts capability instead of user role for Subscribers
660
+ * Update: Refactor and clean up
661
+
662
+ ### 1.8.2
663
+ * Bug Fix: Edit avatar setting
664
+
665
+ ### 1.8.1
666
+ * Bug Fix: Reattach scripts to profile action
667
+
668
+ ### 1.8
669
+ * Add: Front page uploader
670
+ * Add: Media Library view of all avatars
671
+ * Bug Fix: Identify public static functions
672
+ * Update: Refactor code into separate classes
673
+ * Update: Translations
674
+
675
+ ### 1.7.2
676
+ * Bug Fix: Files not committed properly in previous release
677
+
678
+ ### 1.7.1
679
+ * Update: Error message handling for front pages
680
+
681
+ ### 1.7
682
+ * Add: Caption for avatar
683
+ * Add: Polish translation
684
+ * Update: Error message handling
685
+
686
+ ### 1.6.8
687
+ * Bug Fix: Shortcode without user
688
+
689
+ ### 1.6.7
690
+ * Add: Undo button
691
+ * Bug Fix: Get original avatar
692
+
693
+ ### 1.6.6
694
+ * Add: Donation message
695
+ * Bug Fix: Die page when image is too large
696
+ * Bug Fix: Resize images uploaded through plugin only
697
+ * Remove: Unused function
698
+ * Update: Refactor JavaScript
699
+
700
+ ### 1.6.5
701
+ * Bug Fix: Use entire comment object instead of just e-mail address
702
+
703
+ ### 1.6.4
704
+ * Bug Fix: Correct avatar not showing in widget
705
+ * Update: Check compatibility to 3.7.1
706
+
707
+ ### 1.6.3
708
+ * Bug Fix: Checkbox value for "Crop avatars to exact dimensions"
709
+
710
+ ### 1.6.2
711
+ * Bug Fix: Show Default Avatar if attachment doesn't exist
712
+ * Bug Fix: manage_users_custom_column not returning values
713
+
714
+ ### 1.6.1
715
+ * Bug Fix: Profile not saving without an avatar for Contributors & Subscribers
716
+
717
+ ### 1.6.0
718
+ * Add: Filters to change profile HTML structure
719
+ * Add: Recognition of sizes registered with add_image_size
720
+ * Add: Resize image options for Contributors & Subscribers
721
+ * Bug Fix: Rerrange CSS class names
722
+
723
+ ### 1.5.8
724
+ * Bug Fix: Add function exists checks to prevent redeclare errors
725
+ * Bug Fix: Page die if file upload is too big
726
+ * Bug Fix: Upload file with submit
727
+
728
+ ### 1.5.7
729
+ * Bug Fix: Separate out JavaScript for Contributors & Subscribers
730
+ * Bug Fix: Subscriber uploader not finding error type
731
+
732
+ ### 1.5.6
733
+ * Update: Use cache for wpua_has_gravatar
734
+
735
+ ### 1.5.5
736
+ * Bug Fix: Hide "Edit Image" button if Contributors & Subscribers can't edit avatar
737
+ * Bug Fix: Remove edit_posts capability if Subscribers can't edit avatar
738
+
739
+ ### 1.5.4
740
+ * Add: Option to enable avatar editing privilege for Contributors & Subscribers
741
+ * Add: Swedish translation
742
+ * Update: Move inline JavaScript to wp-user-avatar.js and wp-user-avatar-admin.js
743
+ * Update: Load JavaScript in footer
744
+ * Update: Translations
745
+
746
+ ### 1.5.3
747
+ * Remove: Option to disable scripts in front pages
748
+ * Update: Load media upload scripts only on profile and avatar admin pages
749
+ * Update: Translations
750
+
751
+ ### 1.5.2
752
+ * Bug Fix: Ability to disable scripts in front pages
753
+
754
+ ### 1.5.1
755
+ * Add: Ability to disable scripts in front pages
756
+ * Update: Uninstall options
757
+ * Update: Translations
758
+
759
+ ### 1.5
760
+ * Add: Ability to disable Gravatar avatars
761
+ * Add: Upload size limiter for Contributors & Subscribers
762
+ * Add: French, German, and Spanish translations
763
+
764
+ ### 1.4.2
765
+ * Bug Fix: Include screen.php for get_current_screen function
766
+
767
+ ### 1.4.1
768
+ * Bug Fix: Allow multipart data in form
769
+ * Bug Fix: Use wp_die for errors
770
+
771
+ ### 1.4
772
+ * Add: Uploader for Contributors & Subscribers
773
+ * Add: Media states for avatar images
774
+ * Add: Plugin admin settings
775
+ * Update: Change support only to WP 3.4+
776
+
777
+ ### 1.3.6
778
+ * Add: Target for link in shortcode
779
+ * Update: Clean up code and add more comments
780
+
781
+ ### 1.3.5
782
+ * Bug Fix: Swap TinyMCE file locations
783
+
784
+ ### 1.3.4
785
+ * Update: Change support only to WP 3.3+ because of jQuery 1.7.1 support
786
+
787
+ ### 1.3.3
788
+ * Update: Shortcode checks for user ID, login, slug, or e-mail address
789
+ * Update: Move jquery to register_script for < WP 3.5
790
+
791
+ ### 1.3.2
792
+ * Bug Fix: Check for user before setting name in alt tag
793
+ * Update: readme.txt
794
+
795
+ ### 1.3.1
796
+ * Bug Fix: Rename usermeta only if found
797
+
798
+ ### 1.3
799
+ * Add: Multisite support
800
+ * Bug Fix: Warnings if no user found
801
+ * Update: Enable action_show_user_profile for any class using show_user_profile hook
802
+
803
+ ### 1.2.6
804
+ * Bug Fix: options-discussion.php page doesn't show default avatars
805
+
806
+ ### 1.2.5
807
+ * Bug Fix: Comment author showing wrong avatar
808
+ * Bug Fix: Avatar adds fixed dimensions when non-numeric size is used
809
+ * Update: Use local image for default avatar instead of calling image from Gravatar
810
+
811
+ ### 1.2.4
812
+ * Bug Fix: Show default avatar when user removes custom avatar
813
+ * Bug Fix: Default Avatar save setting
814
+
815
+ ### 1.2.3
816
+ * Bug Fix: Show default avatar when user removes custom avatar
817
+ * Bug Fix: Default Avatar save setting
818
+
819
+ ### 1.2.2
820
+ * Add: Ability for bbPress users to edit avatar on front profile page
821
+ * Add: Link options for shortcode
822
+ * Bug Fix: Show One User Avatar only to users with upload_files capability
823
+
824
+ ### 1.2.1
825
+ * Add: TinyMCE button
826
+ * Update: Clean up redundant code
827
+ * Update: Compatibility only back to WordPress 3.3
828
+
829
+ ### 1.2
830
+ * Add: Default Avatar setting
831
+
832
+ ### 1.1.8
833
+ * Bug Fix: Change update_usermeta to update_user_meta
834
+
835
+ ### 1.1.6
836
+ * Bug Fix: Image not showing in user profile edit
837
+
838
+ ### 1.1.5a
839
+ * Update: readme.txt
840
+
841
+ ### 1.1.5
842
+ * Bug Fix: Remove stray curly bracket
843
+
844
+ ### 1.1.4
845
+ * Bug Fix: Change get_usermeta to get_user_meta
846
+ * Bug Fix: Non-object warning when retrieving user ID
847
+
848
+ ### 1.1.3
849
+ * Bug Fix: Comment author with no e-mail address
850
+
851
+ ### 1.1.2
852
+ * Remove: Unused variables
853
+
854
+ ### 1.1.1
855
+ * Bug Fix: Capabilities error in comment avatar
856
+
857
+ ### 1.1
858
+ * Add: Add filter for get_avatar
859
+ * Add: CSS alignment classes
860
+ * Add: Replace comment author avatar
861
+ * Add: Shortcode
862
+ * Update: readme.txt
863
+
864
+ ### 1.0.2
865
+ * Update: FAQ
866
+ * Remove: CSS that hides "Insert into Post"
867
+
868
+ ### 1.0.1
869
+ * Add: CSS classes to image output
870
+
871
+ ### 1.0
872
+ * Initial release
873
+
874
+ == Upgrade Notice ==
875
+
876
+ ### 1.8
877
+ * New Feature: Front page uploader
878
+ * New Feature: Media Library view of all avatars
879
+
880
+ ### 1.5.3
881
+ * 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.
882
+
883
+ ### 1.5
884
+ * New Feature: Ability to disable Gravatar avatars
885
+ * New Feature: Upload size limiter for Contributors & Subscribers
886
+ * New Feature: French and German translations
887
+
888
+ ### 1.4
889
+ * New Feature: Setting to allow all users to upload avatars
890
+ * New Feature: Setting to add or remove Visual Editor button
891
+ * New Feature: Media states for avatar images
892
+ * 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.
893
+
894
+ ### 1.3
895
+ * New Feature: Multisite support
896
+
897
+ ### 1.2.2
898
+ * New Features: Link options for shortcode, bbPress integration
899
+
900
+ ### 1.2.1
901
+ * New Feature: Shortcode insertion button for Visual Editor
902
+
903
+ ### 1.2
904
+ * New Feature: Default Avatar customization
905
+
906
+ ### 1.1
907
+ * New Features: [avatar] shortcode, direct replacement of get_avatar() and comment author avatar, more CSS classes
assets/css/jquery-ui.css ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - 2.3.2
2
+ * http://jqueryui.com
3
+ * Includes: core.css, slider.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden {
10
+ display: none;
11
+ }
12
+ .ui-helper-hidden-accessible {
13
+ border: 0;
14
+ clip: rect(0 0 0 0);
15
+ height: 1px;
16
+ margin: -1px;
17
+ overflow: hidden;
18
+ padding: 0;
19
+ position: absolute;
20
+ width: 1px;
21
+ }
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none;
31
+ }
32
+ .ui-helper-clearfix:before,
33
+ .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse;
37
+ }
38
+ .ui-helper-clearfix:after {
39
+ clear: both;
40
+ }
41
+ .ui-helper-zfix {
42
+ width: 100%;
43
+ height: 100%;
44
+ top: 0;
45
+ left: 0;
46
+ position: absolute;
47
+ opacity: 0;
48
+ filter:Alpha(Opacity=0); /* support: IE8 */
49
+ }
50
+
51
+ .ui-front {
52
+ z-index: 100;
53
+ }
54
+
55
+
56
+ /* Interaction Cues
57
+ ----------------------------------*/
58
+ .ui-state-disabled {
59
+ cursor: default !important;
60
+ pointer-events: none;
61
+ }
62
+
63
+
64
+ /* Icons
65
+ ----------------------------------*/
66
+ .ui-icon {
67
+ display: inline-block;
68
+ vertical-align: middle;
69
+ margin-top: -.25em;
70
+ position: relative;
71
+ text-indent: -99999px;
72
+ overflow: hidden;
73
+ background-repeat: no-repeat;
74
+ }
75
+
76
+ .ui-widget-icon-block {
77
+ left: 50%;
78
+ margin-left: -8px;
79
+ display: block;
80
+ }
81
+
82
+ /* Misc visuals
83
+ ----------------------------------*/
84
+
85
+ /* Overlays */
86
+ .ui-widget-overlay {
87
+ position: fixed;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ height: 100%;
92
+ }
93
+ .ui-slider {
94
+ position: relative;
95
+ text-align: left;
96
+ }
97
+ .ui-slider .ui-slider-handle {
98
+ position: absolute;
99
+ z-index: 2;
100
+ width: 1.2em;
101
+ height: 1.2em;
102
+ cursor: default;
103
+ -ms-touch-action: none;
104
+ touch-action: none;
105
+ }
106
+ .ui-slider .ui-slider-range {
107
+ position: absolute;
108
+ z-index: 1;
109
+ font-size: .7em;
110
+ display: block;
111
+ border: 0;
112
+ background-position: 0 0;
113
+ }
114
+
115
+ /* support: IE8 - See #6727 */
116
+ .ui-slider.ui-state-disabled .ui-slider-handle,
117
+ .ui-slider.ui-state-disabled .ui-slider-range {
118
+ filter: inherit;
119
+ }
120
+
121
+ .ui-slider-horizontal {
122
+ height: .8em;
123
+ }
124
+ .ui-slider-horizontal .ui-slider-handle {
125
+ top: -.3em;
126
+ margin-left: -.6em;
127
+ }
128
+ .ui-slider-horizontal .ui-slider-range {
129
+ top: 0;
130
+ height: 100%;
131
+ }
132
+ .ui-slider-horizontal .ui-slider-range-min {
133
+ left: 0;
134
+ }
135
+ .ui-slider-horizontal .ui-slider-range-max {
136
+ right: 0;
137
+ }
138
+
139
+ .ui-slider-vertical {
140
+ width: .8em;
141
+ height: 100px;
142
+ }
143
+ .ui-slider-vertical .ui-slider-handle {
144
+ left: -.3em;
145
+ margin-left: 0;
146
+ margin-bottom: -.6em;
147
+ }
148
+ .ui-slider-vertical .ui-slider-range {
149
+ left: 0;
150
+ width: 100%;
151
+ }
152
+ .ui-slider-vertical .ui-slider-range-min {
153
+ bottom: 0;
154
+ }
155
+ .ui-slider-vertical .ui-slider-range-max {
156
+ top: 0;
157
+ }
158
+
159
+ /* Component containers
160
+ ----------------------------------*/
161
+ .ui-widget {
162
+ font-family: Verdana,Arial,sans-serif;
163
+ font-size: 1.1em;
164
+ }
165
+ .ui-widget .ui-widget {
166
+ font-size: 1em;
167
+ }
168
+ .ui-widget input,
169
+ .ui-widget select,
170
+ .ui-widget textarea,
171
+ .ui-widget button {
172
+ font-family: Verdana,Arial,sans-serif;
173
+ font-size: 1em;
174
+ }
175
+ .ui-widget.ui-widget-content {
176
+ border: 1px solid #d3d3d3;
177
+ }
178
+ .ui-widget-content {
179
+ border: 1px solid #aaaaaa;
180
+ background: #ffffff;
181
+ color: #222222;
182
+ }
183
+ .ui-widget-content a {
184
+ color: #222222;
185
+ }
186
+ .ui-widget-header {
187
+ border: 1px solid #aaaaaa;
188
+ background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
189
+ color: #222222;
190
+ font-weight: bold;
191
+ }
192
+ .ui-widget-header a {
193
+ color: #222222;
194
+ }
195
+
196
+ /* Interaction states
197
+ ----------------------------------*/
198
+ .ui-state-default,
199
+ .ui-widget-content .ui-state-default,
200
+ .ui-widget-header .ui-state-default,
201
+ .ui-button,
202
+
203
+ /* We use html here because we need a greater specificity to make sure disabled
204
+ works properly when clicked or hovered */
205
+ html .ui-button.ui-state-disabled:hover,
206
+ html .ui-button.ui-state-disabled:active {
207
+ border: 1px solid #d3d3d3;
208
+ background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
209
+ font-weight: normal;
210
+ color: #555555;
211
+ }
212
+ .ui-state-default a,
213
+ .ui-state-default a:link,
214
+ .ui-state-default a:visited,
215
+ a.ui-button,
216
+ a:link.ui-button,
217
+ a:visited.ui-button,
218
+ .ui-button {
219
+ color: #555555;
220
+ text-decoration: none;
221
+ }
222
+ .ui-state-hover,
223
+ .ui-widget-content .ui-state-hover,
224
+ .ui-widget-header .ui-state-hover,
225
+ .ui-state-focus,
226
+ .ui-widget-content .ui-state-focus,
227
+ .ui-widget-header .ui-state-focus,
228
+ .ui-button:hover,
229
+ .ui-button:focus {
230
+ border: 1px solid #999999;
231
+ background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
232
+ font-weight: normal;
233
+ color: #212121;
234
+ }
235
+ .ui-state-hover a,
236
+ .ui-state-hover a:hover,
237
+ .ui-state-hover a:link,
238
+ .ui-state-hover a:visited,
239
+ .ui-state-focus a,
240
+ .ui-state-focus a:hover,
241
+ .ui-state-focus a:link,
242
+ .ui-state-focus a:visited,
243
+ a.ui-button:hover,
244
+ a.ui-button:focus {
245
+ color: #212121;
246
+ text-decoration: none;
247
+ }
248
+
249
+ .ui-visual-focus {
250
+ box-shadow: 0 0 3px 1px rgb(94, 158, 214);
251
+ }
252
+ .ui-state-active,
253
+ .ui-widget-content .ui-state-active,
254
+ .ui-widget-header .ui-state-active,
255
+ a.ui-button:active,
256
+ .ui-button:active,
257
+ .ui-button.ui-state-active:hover {
258
+ border: 1px solid #aaaaaa;
259
+ background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
260
+ font-weight: normal;
261
+ color: #212121;
262
+ }
263
+ .ui-icon-background,
264
+ .ui-state-active .ui-icon-background {
265
+ border: #aaaaaa;
266
+ background-color: #212121;
267
+ }
268
+ .ui-state-active a,
269
+ .ui-state-active a:link,
270
+ .ui-state-active a:visited {
271
+ color: #212121;
272
+ text-decoration: none;
273
+ }
274
+
275
+ /* Interaction Cues
276
+ ----------------------------------*/
277
+ .ui-state-highlight,
278
+ .ui-widget-content .ui-state-highlight,
279
+ .ui-widget-header .ui-state-highlight {
280
+ border: 1px solid #fcefa1;
281
+ background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
282
+ color: #363636;
283
+ }
284
+ .ui-state-checked {
285
+ border: 1px solid #fcefa1;
286
+ background: #fbf9ee;
287
+ }
288
+ .ui-state-highlight a,
289
+ .ui-widget-content .ui-state-highlight a,
290
+ .ui-widget-header .ui-state-highlight a {
291
+ color: #363636;
292
+ }
293
+ .ui-state-error,
294
+ .ui-widget-content .ui-state-error,
295
+ .ui-widget-header .ui-state-error {
296
+ border: 1px solid #cd0a0a;
297
+ background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
298
+ color: #cd0a0a;
299
+ }
300
+ .ui-state-error a,
301
+ .ui-widget-content .ui-state-error a,
302
+ .ui-widget-header .ui-state-error a {
303
+ color: #cd0a0a;
304
+ }
305
+ .ui-state-error-text,
306
+ .ui-widget-content .ui-state-error-text,
307
+ .ui-widget-header .ui-state-error-text {
308
+ color: #cd0a0a;
309
+ }
310
+ .ui-priority-primary,
311
+ .ui-widget-content .ui-priority-primary,
312
+ .ui-widget-header .ui-priority-primary {
313
+ font-weight: bold;
314
+ }
315
+ .ui-priority-secondary,
316
+ .ui-widget-content .ui-priority-secondary,
317
+ .ui-widget-header .ui-priority-secondary {
318
+ opacity: .7;
319
+ filter:Alpha(Opacity=70); /* support: IE8 */
320
+ font-weight: normal;
321
+ }
322
+ .ui-state-disabled,
323
+ .ui-widget-content .ui-state-disabled,
324
+ .ui-widget-header .ui-state-disabled {
325
+ opacity: .35;
326
+ filter:Alpha(Opacity=35); /* support: IE8 */
327
+ background-image: none;
328
+ }
329
+ .ui-state-disabled .ui-icon {
330
+ filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
331
+ }
332
+
333
+ /* Icons
334
+ ----------------------------------*/
335
+
336
+ /* states and images */
337
+ .ui-icon {
338
+ width: 16px;
339
+ height: 16px;
340
+ }
341
+ .ui-icon,
342
+ .ui-widget-content .ui-icon {
343
+ background-image: url("images/ui-icons_222222_256x240.png");
344
+ }
345
+ .ui-widget-header .ui-icon {
346
+ background-image: url("images/ui-icons_222222_256x240.png");
347
+ }
348
+ .ui-state-hover .ui-icon,
349
+ .ui-state-focus .ui-icon,
350
+ .ui-button:hover .ui-icon,
351
+ .ui-button:focus .ui-icon {
352
+ background-image: url("images/ui-icons_454545_256x240.png");
353
+ }
354
+ .ui-state-active .ui-icon,
355
+ .ui-button:active .ui-icon {
356
+ background-image: url("images/ui-icons_454545_256x240.png");
357
+ }
358
+ .ui-state-highlight .ui-icon,
359
+ .ui-button .ui-state-highlight.ui-icon {
360
+ background-image: url("images/ui-icons_2e83ff_256x240.png");
361
+ }
362
+ .ui-state-error .ui-icon,
363
+ .ui-state-error-text .ui-icon {
364
+ background-image: url("images/ui-icons_cd0a0a_256x240.png");
365
+ }
366
+ .ui-button .ui-icon {
367
+ background-image: url("images/ui-icons_888888_256x240.png");
368
+ }
369
+
370
+ /* positioning */
371
+ .ui-icon-blank { background-position: 16px 16px; }
372
+ .ui-icon-caret-1-n { background-position: 0 0; }
373
+ .ui-icon-caret-1-ne { background-position: -16px 0; }
374
+ .ui-icon-caret-1-e { background-position: -32px 0; }
375
+ .ui-icon-caret-1-se { background-position: -48px 0; }
376
+ .ui-icon-caret-1-s { background-position: -65px 0; }
377
+ .ui-icon-caret-1-sw { background-position: -80px 0; }
378
+ .ui-icon-caret-1-w { background-position: -96px 0; }
379
+ .ui-icon-caret-1-nw { background-position: -112px 0; }
380
+ .ui-icon-caret-2-n-s { background-position: -128px 0; }
381
+ .ui-icon-caret-2-e-w { background-position: -144px 0; }
382
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
383
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
384
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
385
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
386
+ .ui-icon-triangle-1-s { background-position: -65px -16px; }
387
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
388
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
389
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
390
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
391
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
392
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
393
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
394
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
395
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
396
+ .ui-icon-arrow-1-s { background-position: -65px -32px; }
397
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
398
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
399
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
400
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
401
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
402
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
403
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
404
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
405
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
406
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
407
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
408
+ .ui-icon-arrowthick-1-n { background-position: 1px -48px; }
409
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
410
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
411
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
412
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
413
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
414
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
415
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
416
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
417
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
418
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
419
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
420
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
421
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
422
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
423
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
424
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
425
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
426
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
427
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
428
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
429
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
430
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
431
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
432
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
433
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
434
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
435
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
436
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
437
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
438
+ .ui-icon-extlink { background-position: -32px -80px; }
439
+ .ui-icon-newwin { background-position: -48px -80px; }
440
+ .ui-icon-refresh { background-position: -64px -80px; }
441
+ .ui-icon-shuffle { background-position: -80px -80px; }
442
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
443
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
444
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
445
+ .ui-icon-folder-open { background-position: -16px -96px; }
446
+ .ui-icon-document { background-position: -32px -96px; }
447
+ .ui-icon-document-b { background-position: -48px -96px; }
448
+ .ui-icon-note { background-position: -64px -96px; }
449
+ .ui-icon-mail-closed { background-position: -80px -96px; }
450
+ .ui-icon-mail-open { background-position: -96px -96px; }
451
+ .ui-icon-suitcase { background-position: -112px -96px; }
452
+ .ui-icon-comment { background-position: -128px -96px; }
453
+ .ui-icon-person { background-position: -144px -96px; }
454
+ .ui-icon-print { background-position: -160px -96px; }
455
+ .ui-icon-trash { background-position: -176px -96px; }
456
+ .ui-icon-locked { background-position: -192px -96px; }
457
+ .ui-icon-unlocked { background-position: -208px -96px; }
458
+ .ui-icon-bookmark { background-position: -224px -96px; }
459
+ .ui-icon-tag { background-position: -240px -96px; }
460
+ .ui-icon-home { background-position: 0 -112px; }
461
+ .ui-icon-flag { background-position: -16px -112px; }
462
+ .ui-icon-calendar { background-position: -32px -112px; }
463
+ .ui-icon-cart { background-position: -48px -112px; }
464
+ .ui-icon-pencil { background-position: -64px -112px; }
465
+ .ui-icon-clock { background-position: -80px -112px; }
466
+ .ui-icon-disk { background-position: -96px -112px; }
467
+ .ui-icon-calculator { background-position: -112px -112px; }
468
+ .ui-icon-zoomin { background-position: -128px -112px; }
469
+ .ui-icon-zoomout { background-position: -144px -112px; }
470
+ .ui-icon-search { background-position: -160px -112px; }
471
+ .ui-icon-wrench { background-position: -176px -112px; }
472
+ .ui-icon-gear { background-position: -192px -112px; }
473
+ .ui-icon-heart { background-position: -208px -112px; }
474
+ .ui-icon-star { background-position: -224px -112px; }
475
+ .ui-icon-link { background-position: -240px -112px; }
476
+ .ui-icon-cancel { background-position: 0 -128px; }
477
+ .ui-icon-plus { background-position: -16px -128px; }
478
+ .ui-icon-plusthick { background-position: -32px -128px; }
479
+ .ui-icon-minus { background-position: -48px -128px; }
480
+ .ui-icon-minusthick { background-position: -64px -128px; }
481
+ .ui-icon-close { background-position: -80px -128px; }
482
+ .ui-icon-closethick { background-position: -96px -128px; }
483
+ .ui-icon-key { background-position: -112px -128px; }
484
+ .ui-icon-lightbulb { background-position: -128px -128px; }
485
+ .ui-icon-scissors { background-position: -144px -128px; }
486
+ .ui-icon-clipboard { background-position: -160px -128px; }
487
+ .ui-icon-copy { background-position: -176px -128px; }
488
+ .ui-icon-contact { background-position: -192px -128px; }
489
+ .ui-icon-image { background-position: -208px -128px; }
490
+ .ui-icon-video { background-position: -224px -128px; }
491
+ .ui-icon-script { background-position: -240px -128px; }
492
+ .ui-icon-alert { background-position: 0 -144px; }
493
+ .ui-icon-info { background-position: -16px -144px; }
494
+ .ui-icon-notice { background-position: -32px -144px; }
495
+ .ui-icon-help { background-position: -48px -144px; }
496
+ .ui-icon-check { background-position: -64px -144px; }
497
+ .ui-icon-bullet { background-position: -80px -144px; }
498
+ .ui-icon-radio-on { background-position: -96px -144px; }
499
+ .ui-icon-radio-off { background-position: -112px -144px; }
500
+ .ui-icon-pin-w { background-position: -128px -144px; }
501
+ .ui-icon-pin-s { background-position: -144px -144px; }
502
+ .ui-icon-play { background-position: 0 -160px; }
503
+ .ui-icon-pause { background-position: -16px -160px; }
504
+ .ui-icon-seek-next { background-position: -32px -160px; }
505
+ .ui-icon-seek-prev { background-position: -48px -160px; }
506
+ .ui-icon-seek-end { background-position: -64px -160px; }
507
+ .ui-icon-seek-start { background-position: -80px -160px; }
508
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
509
+ .ui-icon-seek-first { background-position: -80px -160px; }
510
+ .ui-icon-stop { background-position: -96px -160px; }
511
+ .ui-icon-eject { background-position: -112px -160px; }
512
+ .ui-icon-volume-off { background-position: -128px -160px; }
513
+ .ui-icon-volume-on { background-position: -144px -160px; }
514
+ .ui-icon-power { background-position: 0 -176px; }
515
+ .ui-icon-signal-diag { background-position: -16px -176px; }
516
+ .ui-icon-signal { background-position: -32px -176px; }
517
+ .ui-icon-battery-0 { background-position: -48px -176px; }
518
+ .ui-icon-battery-1 { background-position: -64px -176px; }
519
+ .ui-icon-battery-2 { background-position: -80px -176px; }
520
+ .ui-icon-battery-3 { background-position: -96px -176px; }
521
+ .ui-icon-circle-plus { background-position: 0 -192px; }
522
+ .ui-icon-circle-minus { background-position: -16px -192px; }
523
+ .ui-icon-circle-close { background-position: -32px -192px; }
524
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
525
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
526
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
527
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
528
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
529
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
530
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
531
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
532
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
533
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
534
+ .ui-icon-circle-check { background-position: -208px -192px; }
535
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
536
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
537
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
538
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
539
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
540
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
541
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
542
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
543
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
544
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
545
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
546
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
547
+
548
+
549
+ /* Misc visuals
550
+ ----------------------------------*/
551
+
552
+ /* Corner radius */
553
+ .ui-corner-all,
554
+ .ui-corner-top,
555
+ .ui-corner-left,
556
+ .ui-corner-tl {
557
+ border-top-left-radius: 4px;
558
+ }
559
+ .ui-corner-all,
560
+ .ui-corner-top,
561
+ .ui-corner-right,
562
+ .ui-corner-tr {
563
+ border-top-right-radius: 4px;
564
+ }
565
+ .ui-corner-all,
566
+ .ui-corner-bottom,
567
+ .ui-corner-left,
568
+ .ui-corner-bl {
569
+ border-bottom-left-radius: 4px;
570
+ }
571
+ .ui-corner-all,
572
+ .ui-corner-bottom,
573
+ .ui-corner-right,
574
+ .ui-corner-br {
575
+ border-bottom-right-radius: 4px;
576
+ }
577
+
578
+ /* Overlays */
579
+ .ui-widget-overlay {
580
+ background: #aaaaaa;
581
+ opacity: .3;
582
+ filter: Alpha(Opacity=30); /* support: IE8 */
583
+ }
584
+ .ui-widget-shadow {
585
+ -webkit-box-shadow: -8px -8px 8px #aaaaaa;
586
+ box-shadow: -8px -8px 8px #aaaaaa;
587
+ }
assets/css/tinymce-window.css ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ #wpua-tabs ul {
10
+ margin: 0;
11
+ padding: 0;
12
+ list-style: none;
13
+ }
14
+
15
+ #wpua-tabs ul li {
16
+ float: left;
17
+ }
18
+
19
+ #wpua-tabs ul li a {
20
+ float: left;
21
+ padding: 2px 5px;
22
+ background: #ddd;
23
+ border: 1px solid #eee;
24
+ border-bottom: 0;
25
+ display: block;
26
+ font-weight: 700;
27
+ outline: none;
28
+ text-decoration: none;
29
+ }
30
+
31
+ #wpua-tabs ul li.ui-tabs-active a {
32
+ background: #fff;
33
+ }
34
+
35
+ #wpua-tabs form {
36
+ clear: both;
37
+ background: #fff;
38
+ border: 1px solid #eee;
39
+ }
40
+
41
+ #wpua-tabs p,
42
+ #wpua-tabs h4 {
43
+ margin: 0;
44
+ padding: 12px 0 0;
45
+ }
46
+
47
+ #wpua-tabs h4.center {
48
+ text-align: center;
49
+ }
50
+
51
+ #wpua-tabs label {
52
+ width: 150px;
53
+ margin-right: 3px;
54
+ display: inline-block;
55
+ text-align: right;
56
+ vertical-align: top;
57
+ }
58
+
59
+ #wpua-tabs .mceActionPanel {
60
+ padding: 7px 0 12px;
61
+ text-align: center;
62
+ }
63
+
64
+ #wpua-tabs .mceActionPanel #insert {
65
+ float: none;
66
+ width: 180px;
67
+ margin: 0 auto;
68
+ }
69
+
70
+ #wpua-tabs #wp_user_avatar_size_number_section,
71
+ #wpua-tabs #wp_user_avatar_link_external_section {
72
+ display: none;
73
+ }
assets/css/wp-user-avatar.css ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ #wpua-errors,
10
+ #wpua-readable-size-error,
11
+ .wpua-error {
12
+ color: #c00 !important;
13
+ font-weight: 700 !important;
14
+ }
15
+
16
+ #wpua-readable-size-error,
17
+ #wpua-undo-button {
18
+ display: none;
19
+ }
20
+
21
+ #wpua-preview,
22
+ #wpua-preview-existing {
23
+ margin-right: 10px;
24
+ }
25
+
26
+ #wpua-preview,
27
+ #wpua-preview-existing,
28
+ #wpua-thumbnail,
29
+ #wpua-thumbnail-existing {
30
+ display: inline-block;
31
+ text-align: center;
32
+ vertical-align: top;
33
+ }
34
+
35
+ #wpua-preview img,
36
+ #wpua-thumbnail img,
37
+ #wpua-preview-existing img,
38
+ #wpua-thumbnail-existing img {
39
+ max-height: 96px;
40
+ border: 1px solid #dfdfdf;
41
+ display: block;
42
+ }
43
+
44
+ .widget_wp_user_avatar #wpua-preview img,
45
+ .widget_wp_user_avatar #wpua-thumbnail img,
46
+ .widget_wp_user_avatar #wpua-preview-existing img,
47
+ .widget_wp_user_avatar #wpua-thumbnail-existing img {
48
+ max-height: 64px;
49
+ }
50
+
51
+ .defaultavatarpicker #wpua-preview,
52
+ .defaultavatarpicker #wpua-preview-existing {
53
+ width: 32px;
54
+ height: 32px;
55
+ margin-right: 0;
56
+ display: inline-block;
57
+ overflow: hidden;
58
+ vertical-align: middle;
59
+ }
60
+
61
+ .defaultavatarpicker #wpua-preview img,
62
+ .defaultavatarpicker #wpua-preview-existing img {
63
+ width: 32px;
64
+ height: auto;
65
+ border: 0;
66
+ }
67
+
68
+ #wpua-edit #wpua-remove,
69
+ #wpua-edit #wpua-undo,
70
+ #wpua-edit-attachment {
71
+ margin-left: 10px !important;
72
+ }
73
+
74
+ #wpua-slider {
75
+ width: 22.75em;
76
+ margin: 1em 0;
77
+ }
78
+
79
+ #wpua-upload-messages span {
80
+ display: block;
81
+ }
82
+
83
+ .wpua-hide {
84
+ display: none !important;
85
+ }
86
+
87
+ .wpua-no-avatars {
88
+ display: none;
89
+ }
assets/images/wpua-150x150.png ADDED
Binary file
assets/images/wpua-20x20.png ADDED
Binary file
assets/images/wpua-300x300.png ADDED
Binary file
assets/images/wpua-32x32.png ADDED
Binary file
assets/images/wpua-96x96.png ADDED
Binary file
assets/images/wpua-icon.png ADDED
Binary file
assets/images/wpua.png ADDED
Binary file
assets/js/tinymce-editor_plugin.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ (function () {
10
+ var args = one_user_avatar_tinymce_editor_args || {};
11
+
12
+ tinymce.create('tinymce.plugins.wpUserAvatar', {
13
+ init: function (ed, url) {
14
+ ed.addCommand('mceWpUserAvatar', function() {
15
+ ed.windowManager.open({
16
+ file: ajaxurl + '?action=wp_user_avatar_tinymce',
17
+ width: 500,
18
+ height: 360,
19
+ inline: 1
20
+ }, {
21
+ plugin_url: url,
22
+ });
23
+ });
24
+
25
+ ed.addButton('wpUserAvatar', {
26
+ title: ( typeof args.insert_avatar != 'undefined' ? args.insert_avatar : 'Insert Avatar' ),
27
+ cmd: 'mceWpUserAvatar',
28
+ image: url + '/../images/wpua-20x20.png',
29
+ onPostRender: function() {
30
+ var ctrl = this;
31
+
32
+ ed.on('NodeChange', function(e) {
33
+ ctrl.active(e.element.nodeName == 'IMG');
34
+ });
35
+ }
36
+ });
37
+ },
38
+ createControl: function(n, cm) {
39
+ return null;
40
+ },
41
+ getInfo: function () {
42
+ return {
43
+ longname: 'One User Avatar',
44
+ author: 'One Designs',
45
+ authorurl: 'https://onedesigns.com/',
46
+ infourl: 'https://onedesigns.com/plugins/one-user-avatar/',
47
+ version: '2.3.2',
48
+ };
49
+ },
50
+ });
51
+
52
+ tinymce.PluginManager.add('wpUserAvatar', tinymce.plugins.wpUserAvatar);
53
+ })();
assets/js/tinymce-window.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ function wpuaInsertAvatar() {
10
+ // Custom shortcode values
11
+ var shortcode,
12
+ closing_tag,
13
+ user = document.getElementById('wp_user_avatar_user').value,
14
+ size = document.getElementById('wp_user_avatar_size').value,
15
+ size_number = document.getElementById('wp_user_avatar_size_number').value,
16
+ align = document.getElementById('wp_user_avatar_align').value,
17
+ link = document.getElementById('wp_user_avatar_link').value,
18
+ link_external = document.getElementById('wp_user_avatar_link_external').value,
19
+ target = document.getElementById('wp_user_avatar_target').value,
20
+ caption = document.getElementById('wp_user_avatar_caption').value;
21
+
22
+ // Add tag to shortcode only if not blank
23
+ var user_tag = (user != '') ? ' user="' + user + '"' : '';
24
+ var size_tag = (size != '' && size_number == '') ? ' size="' + size + '"' : '';
25
+
26
+ size_tag = (size_number != '') ? ' size="' + size_number + '"' : size_tag;
27
+
28
+ var align_tag = (align != '') ? ' align="' + align + '"' : '';
29
+
30
+ var link_tag = (link != '' && link != 'custom-url' && link_external == '') ? ' link="' + link + '"' : '';
31
+
32
+ link_tag = (link_external != '') ? ' link="' + link_external + '"' : link_tag;
33
+
34
+ var target_tag = document.getElementById('wp_user_avatar_target').checked && (link_tag != '') ? ' target="' + target + '"' : '';
35
+
36
+ // Assemble the shortcode
37
+ closing_tag = (caption != '') ? "]" + caption + "[/avatar]" : " /]";
38
+ shortcode = "<p>[avatar" + user_tag + size_tag + align_tag + link_tag + target_tag + closing_tag + "</p>";
39
+
40
+ // Insert into Visual Editor
41
+ if ( window.tinyMCE ) {
42
+ var tmce_ver = window.tinyMCE.majorVersion;
43
+
44
+ if ( tmce_ver >= "4" ) {
45
+ window.tinyMCE.execCommand( 'mceInsertContent', false, shortcode );
46
+ } else {
47
+ window.tinyMCE.execInstanceCommand( window.tinyMCE.activeEditor.id, 'mceInsertContent', false, shortcode );
48
+ }
49
+
50
+ tinyMCEPopup.editor.execCommand( 'mceRepaint' );
51
+
52
+ tinyMCEPopup.close();
53
+ }
54
+
55
+ return;
56
+ }
57
+
58
+ function wpuaInsertAvatarUpload() {
59
+ // Upload shortcode
60
+ var shortcode = "<p>[avatar_upload /]</p>";
61
+
62
+ // Insert into Visual Editor
63
+ if ( window.tinyMCE ) {
64
+ var tmce_ver = window.tinyMCE.majorVersion;
65
+
66
+ if ( tmce_ver >= "4" ) {
67
+ window.tinyMCE.execCommand( 'mceInsertContent', false, shortcode );
68
+ } else {
69
+ window.tinyMCE.execInstanceCommand( window.tinyMCE.activeEditor.id, 'mceInsertContent', false, shortcode );
70
+ }
71
+
72
+ tinyMCEPopup.editor.execCommand( 'mceRepaint' );
73
+
74
+ tinyMCEPopup.close();
75
+ }
76
+ return;
77
+ }
78
+
79
+ jQuery(function($) {
80
+ // Show link input
81
+ $('#wp_user_avatar_link').change(function() {
82
+ $('#wp_user_avatar_link_external_section').toggle( $('#wp_user_avatar_link').val() == 'custom-url' );
83
+ });
84
+
85
+ // Show size input
86
+ $('#wp_user_avatar_size').change(function() {
87
+ $('#wp_user_avatar_size_number_section').toggle( $('#wp_user_avatar_size').val() == 'custom' );
88
+ });
89
+
90
+ $("#wpua-tabs li a").click(function(){
91
+ tab_id = $(this).attr('href');
92
+
93
+ if( tab_id == '#wpua') {
94
+ $("#wpua-upload").hide();
95
+ } else {
96
+ $('#wpua').hide();
97
+ }
98
+
99
+ $(tab_id).show();
100
+ });
101
+ });
assets/js/wp-user-avatar-admin.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ jQuery(function($) {
10
+ // Show size info only if allow uploads is checked
11
+ $('#wp_user_avatar_allow_upload').change(function() {
12
+ $('#wpua-contributors-subscribers').slideToggle($('#wp_user_avatar_allow_upload').is(':checked'));
13
+ });
14
+
15
+ // Show resize info only if resize uploads is checked
16
+ $('#wp_user_avatar_resize_upload').change(function() {
17
+ $('#wpua-resize-sizes').slideToggle($('#wp_user_avatar_resize_upload').is(':checked'));
18
+ });
19
+
20
+ // Hide Gravatars if disable Gravatars is checked
21
+ $('#wp_user_avatar_disable_gravatar').change(function() {
22
+ if( $('#wp-avatars').length ) {
23
+ $('#wp-avatars, #avatar-rating').slideToggle(!$('#wp_user_avatar_disable_gravatar').is(':checked'));
24
+ $('#wp_user_avatar_radio').trigger('click');
25
+ }
26
+ });
27
+
28
+ // Add size slider
29
+ $('#wpua-slider').slider({
30
+ value: parseInt(wpua_admin.upload_size_limit),
31
+ min: 0,
32
+ max: parseInt(wpua_admin.max_upload_size),
33
+ step: 1,
34
+ slide: function(event, ui) {
35
+ $('#wp_user_avatar_upload_size_limit').val(ui.value);
36
+ $('#wpua-readable-size').html(Math.floor(ui.value / 1024) + 'KB');
37
+ $('#wpua-readable-size-error').hide();
38
+ $('#wpua-readable-size').removeClass('wpua-error');
39
+ }
40
+ });
41
+
42
+ // Update readable size on keyup
43
+ $('#wp_user_avatar_upload_size_limit').keyup(function() {
44
+ var wpuaUploadSizeLimit = $(this).val();
45
+
46
+ wpuaUploadSizeLimit = wpuaUploadSizeLimit.replace(/\D/g, "");
47
+
48
+ $(this).val(wpuaUploadSizeLimit);
49
+
50
+ $('#wpua-readable-size').html( Math.floor( wpuaUploadSizeLimit / 1024 ) + 'KB' );
51
+ $('#wpua-readable-size-error').toggle( wpuaUploadSizeLimit > parseInt( wpua_admin.max_upload_size ) );
52
+ $('#wpua-readable-size').toggleClass( 'wpua-error', wpuaUploadSizeLimit > parseInt( wpua_admin.max_upload_size ) );
53
+ });
54
+
55
+ $('#wp_user_avatar_upload_size_limit').val( $('#wpua-slider').slider('value') );
56
+ });
assets/js/wp-user-avatar-user.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ jQuery(function($) {
10
+ // Add enctype to form with JavaScript as backup
11
+ $('#your-profile').attr('enctype', 'multipart/form-data');
12
+
13
+ // Store One User Avatar ID
14
+ var wpuaID = $('#wp-user-avatar').val();
15
+
16
+ // Store One User Avatar src
17
+ var wpuaSrc = $('#wpua-preview').find('img').attr('src');
18
+
19
+ $('#wpua-undo-button-existing').hide();
20
+
21
+ // Remove One User Avatar
22
+ $('body').on('click', '#wpua-remove', function(e) {
23
+ e.preventDefault();
24
+
25
+ $('#wpua-original').remove();
26
+ $('#wpua-remove-button, #wpua-thumbnail').hide();
27
+ $('#wpua-preview').find('img:first').hide();
28
+ $('#wpua-preview').prepend('<img id="wpua-original" />');
29
+ $('#wpua-original').attr('src', wpua_custom.avatar_thumb);
30
+ $('#wp-user-avatar').val("");
31
+ $('#wpua-original, #wpua-undo-button').show();
32
+ $('#wp_user_avatar_radio').trigger('click');
33
+ });
34
+
35
+ // Undo One User Avatar
36
+ $('body').on('click', '#wpua-undo', function(e) {
37
+ e.preventDefault();
38
+
39
+ $('#wpua-original').remove();
40
+ $('#wpua-images').removeAttr('style');
41
+ $('#wpua-undo-button').hide();
42
+ $('#wpua-remove-button, #wpua-thumbnail').show();
43
+ $('#wpua-preview').find('img:first').attr('src', wpuaSrc).show();
44
+ $('#wp-user-avatar').val(wpuaID);
45
+ $('#wp_user_avatar_radio').trigger('click');
46
+ });
47
+
48
+ // Store WP Existing User Avatar ID
49
+ var wpuaEID = $('#wp-user-avatar-existing').val();
50
+
51
+ // Store WP Existing User Avatar src
52
+ var wpuaESrc = $('#wpua-preview-existing').find('img').attr('src');
53
+
54
+ // Remove WP Existing User Avatar
55
+ $('body').on('click', '#wpua-remove-existing', function(e) {
56
+ e.preventDefault();
57
+
58
+ $('#wpua-original-existing').remove();
59
+ $('#wpua-remove-button-existing, #wpua-thumbnail-existing').hide();
60
+ $('#wpua-preview-existing').find('img:first').hide();
61
+ $('#wpua-preview-existing').prepend('<img id="wpua-original-existing" />');
62
+ $('#wpua-original-existing').attr('src', wpua_custom.avatar_thumb);
63
+ $('#wp-user-avatar-existing').val("");
64
+ $('#wpua-original-existing, #wpua-undo-button-existing').show();
65
+ $('#wp_user_avatar_radio-existing').trigger('click');
66
+ });
67
+ // Undo WP Existing User Avatar
68
+ $('body').on('click', '#wpua-undo-existing', function(e) {
69
+ e.preventDefault();
70
+
71
+ $('#wpua-original-existing').remove();
72
+ $('#wpua-images-existing').removeAttr('style');
73
+ $('#wpua-undo-button-existing').hide();
74
+ $('#wpua-remove-button-existing, #wpua-thumbnail-existing').show();
75
+ $('#wpua-preview-existing').find('img:first').attr('src', wpuaSrc).show();
76
+ $('#wp-user-avatar-existing').val(wpuaID);
77
+ $('#wp_user_avatar_radio-existing').trigger('click');
78
+ });
79
+ });
assets/js/wp-user-avatar.js ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! One User Avatar - 2.3.2
2
+ * Copyright One Designs
3
+ * Copyright ProfilePress
4
+ * Copyright Flippercode
5
+ * Copyright Bangbay Siboliban
6
+ * Licensed GPLv2
7
+ */
8
+
9
+ (function($) {
10
+ var id;
11
+
12
+ wp.media.wpUserAvatar = {
13
+ get: function() {
14
+ return wp.media.view.settings.post.wpUserAvatarId;
15
+ },
16
+ set: function(a) {
17
+ var b = wp.media.view.settings;
18
+
19
+ b.post.wpUserAvatarId = a;
20
+ b.post.wpUserAvatarSrc = $('div.attachment-info').find('img').attr('src');
21
+
22
+ if ( b.post.wpUserAvatarId && b.post.wpUserAvatarSrc ) {
23
+ $('#wp-user-avatar' + id).val( b.post.wpUserAvatarId );
24
+ $('#wpua-images' + id + ', #wpua-undo-button' + id).show();
25
+ $('#wpua-preview' + id).find('img').attr('src', b.post.wpUserAvatarSrc).removeAttr('height', '');
26
+ $('#wpua-remove-button' + id + ', #wpua-thumbnail' + id).hide();
27
+ $('#wp_user_avatar_radio').trigger('click')
28
+ }
29
+
30
+ wp.media.wpUserAvatar.frame().close();
31
+ },
32
+ frame: function() {
33
+ if ( this._frame ) {
34
+ return this._frame;
35
+ }
36
+
37
+ this._frame = wp.media({
38
+ library: {
39
+ type: 'image',
40
+ },
41
+ multiple: false,
42
+ title: $('#wpua-add' + id).data('title'),
43
+ });
44
+
45
+ this._frame.on('open', function() {
46
+ var a = $('#wp-user-avatar' + id).val();
47
+
48
+ if ( a == '' ) {
49
+ $('div.media-router').find('a:first').trigger('click');
50
+ } else {
51
+ var b = this.state().get('selection');
52
+
53
+ attachment = wp.media.attachment(a);
54
+
55
+ attachment.fetch();
56
+
57
+ b.add( attachment ? [attachment] : [] );
58
+ }
59
+ }, this._frame);
60
+
61
+ this._frame.state('library').on('select', this.select);
62
+
63
+ return this._frame;
64
+ },
65
+ select: function(a) {
66
+ selection = this.get('selection').single();
67
+
68
+ wp.media.wpUserAvatar.set( selection ? selection.id : -1 );
69
+ },
70
+ init: function() {
71
+ $('body').on('click', '#wpua-add', function(e) {
72
+ e.preventDefault();
73
+ e.stopPropagation();
74
+
75
+ id = '';
76
+
77
+ wp.media.wpUserAvatar.frame().open();
78
+ })
79
+ $('body').on('click', '#wpua-add-existing', function(e) {
80
+ e.preventDefault();
81
+ e.stopPropagation();
82
+
83
+ id = '-existing';
84
+
85
+ wp.media.wpUserAvatar.frame().open();
86
+ });
87
+ }
88
+ }
89
+ })(jQuery);
90
+
91
+ jQuery(function($) {
92
+ if ( typeof wp != 'undefined' ) {
93
+ wp.media.wpUserAvatar.init();
94
+ }
95
+
96
+ $('#your-profile').attr( 'enctype', 'multipart/form-data' );
97
+
98
+ var a = $('#wp-user-avatar').val();
99
+ var b = $('#wpua-preview').find('img').attr('src');
100
+
101
+ $('body').on('click', '#wpua-remove', function(e) {
102
+ e.preventDefault();
103
+
104
+ $('#wpua-original').remove();
105
+ $('#wpua-remove-button, #wpua-thumbnail').hide();
106
+ $('#wpua-preview').find('img:first').hide();
107
+ $('#wpua-preview').prepend('<img id="wpua-original" />');
108
+ $('#wpua-original').attr('src', wpua_custom.avatar_thumb);
109
+ $('#wp-user-avatar').val("");
110
+ $('#wpua-original, #wpua-undo-button').show();
111
+ $('#wp_user_avatar_radio').trigger('click');
112
+ });
113
+
114
+ $('body').on('click', '#wpua-undo', function(e) {
115
+ e.preventDefault();
116
+
117
+ $('#wpua-original').remove();
118
+ $('#wpua-images').removeAttr('style');
119
+ $('#wpua-undo-button').hide();
120
+ $('#wpua-remove-button, #wpua-thumbnail').show();
121
+ $('#wpua-preview').find('img:first').attr('src', b).show();
122
+ $('#wp-user-avatar').val(a);
123
+ $('#wp_user_avatar_radio').trigger('click');
124
+ });
125
+ });
126
+
127
+ jQuery(function($) {
128
+ if ( typeof wp != 'undefined' ) {
129
+ wp.media.wpUserAvatar.init();
130
+ }
131
+
132
+ $('#your-profile').attr('enctype', 'multipart/form-data');
133
+
134
+ var a = $('#wp-user-avatar-existing').val();
135
+ var b = $('#wpua-preview-existing').find('img').attr('src');
136
+
137
+ $('#wpua-undo-button-existing').hide();
138
+
139
+ $('body').on('click', '#wpua-remove-existing', function(e) {
140
+ e.preventDefault();
141
+
142
+ $('#wpua-original-existing').remove();
143
+ $('#wpua-remove-button-existing, #wpua-thumbnail-existing').hide();
144
+ $('#wpua-preview-existing').find('img:first').hide();
145
+ $('#wpua-preview-existing').prepend('<img id="wpua-original-existing" />');
146
+ $('#wpua-original-existing').attr('src', wpua_custom.avatar_thumb);
147
+ $('#wp-user-avatar-existing').val("");
148
+ $('#wpua-original-existing, #wpua-undo-button-existing').show();
149
+ $('#wp_user_avatar_radio').trigger('click');
150
+ });
151
+
152
+ $('body').on('click', '#wpua-undo-existing', function(e) {
153
+ e.preventDefault();
154
+
155
+ $('#wpua-original-existing').remove();
156
+ $('#wpua-images-existing').removeAttr('style');
157
+ $('#wpua-undo-button-existing').hide();
158
+ $('#wpua-remove-button-existing, #wpua-thumbnail-existing').show();
159
+ $('#wpua-preview-existing').find('img:first').attr('src', b).show();
160
+ $('#wp-user-avatar-existing').val(a);
161
+ $('#wp_user_avatar_radio').trigger('click');
162
+ });
163
+ });
includes/class-wp-user-avatar-admin.php ADDED
@@ -0,0 +1,586 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Defines all of administrative, activation, and deactivation settings.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Admin {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses bool $show_avatars
22
+ * @uses add_action()
23
+ * @uses add_filter()
24
+ * @uses load_plugin_textdomain()
25
+ * @uses register_activation_hook()
26
+ * @uses register_deactivation_hook()
27
+ */
28
+ public function __construct() {
29
+ global $show_avatars;
30
+
31
+ // Initialize default settings
32
+ register_activation_hook( WPUA_DIR . 'wp-user-avatar.php', array( $this, 'wpua_options' ) );
33
+
34
+ // Settings saved to wp_options
35
+ add_action( 'admin_init', array( $this, 'wpua_options' ) );
36
+
37
+ // Enqueue scripts
38
+ add_action( 'admin_enqueue_scripts', array( $this, 'wpua_enqueue_scripts' ) );
39
+
40
+ // Perform bulk actions
41
+ add_action( 'load-avatars_page_wp-user-avatar-library', array( $this, 'wpua_bulk_actions' ) );
42
+
43
+ // Translations
44
+ load_plugin_textdomain( 'one-user-avatar', '', WPUA_FOLDER . '/languages' );
45
+
46
+ // Admin menu settings
47
+ add_action( 'admin_init', array( $this, 'wpua_register_settings' ) );
48
+ add_action( 'admin_menu', array( $this, 'wpua_admin' ) );
49
+
50
+ // Default avatar
51
+ add_filter( 'default_avatar_select', array( $this, 'wpua_add_default_avatar' ) );
52
+
53
+ if ( function_exists('add_allowed_options' ) ) {
54
+ add_filter( 'allowed_options', array( $this, 'wpua_whitelist_options' ) );
55
+ } else {
56
+ add_filter( 'whitelist_options', array( $this, 'wpua_whitelist_options' ) );
57
+ }
58
+
59
+ // Additional plugin info
60
+ add_filter( 'plugin_action_links', array( $this, 'wpua_action_links'), 10, 2 );
61
+ add_filter( 'plugin_row_meta', array( $this, 'wpua_row_meta'), 10, 2 );
62
+
63
+ // Hide column in Users table if default avatars are enabled
64
+ if ( 0 == (bool) $show_avatars ) {
65
+ add_filter( 'manage_users_columns', array($this, 'wpua_add_column') );
66
+ add_filter( 'manage_users_custom_column', array($this, 'wpua_show_column'), 10, 3 );
67
+ }
68
+
69
+ // Media states
70
+ add_filter( 'display_media_states', array($this, 'wpua_add_media_state') );
71
+
72
+ }
73
+
74
+ /**
75
+ * Settings saved to wp_options
76
+ * @since 1.4
77
+ * @uses add_option()
78
+ */
79
+ public function wpua_options() {
80
+ add_option( 'avatar_default_wp_user_avatar', '' );
81
+ add_option( 'wp_user_avatar_allow_upload', '0' );
82
+ add_option( 'wp_user_avatar_disable_gravatar', '0' );
83
+ add_option( 'wp_user_avatar_edit_avatar', '1' );
84
+ add_option( 'wp_user_avatar_resize_crop', '0' );
85
+ add_option( 'wp_user_avatar_resize_h', '96' );
86
+ add_option( 'wp_user_avatar_resize_upload', '0' );
87
+ add_option( 'wp_user_avatar_resize_w', '96' );
88
+ add_option( 'wp_user_avatar_tinymce', '1' );
89
+ add_option( 'wp_user_avatar_upload_size_limit', '0' );
90
+
91
+ if ( wp_next_scheduled( 'wpua_has_gravatar_cron_hook' ) ) {
92
+ $cron = get_option( 'cron' );
93
+
94
+ $new_cron = '';
95
+
96
+ foreach ( $cron as $key => $value ) {
97
+ if ( is_array( $value ) ) {
98
+ if ( array_key_exists( 'wpua_has_gravatar_cron_hook', $value ) ) {
99
+ unset($cron[$key]);
100
+ }
101
+ }
102
+ }
103
+
104
+ update_option( 'cron', $cron );
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Perform avatars library bulk actions
110
+ * @since 2.3.0
111
+ * @uses wp_enqueue_script()
112
+ */
113
+ public function wpua_enqueue_scripts( $hook_suffix ) {
114
+ if ( 'avatars_page_wp-user-avatar-library' != $hook_suffix ) {
115
+ return;
116
+ }
117
+
118
+ wp_enqueue_script( 'wp-ajax-response' );
119
+ wp_enqueue_script( 'jquery-ui-draggable' );
120
+ wp_enqueue_script( 'media' );
121
+ }
122
+
123
+ /**
124
+ * Perform avatars library bulk actions
125
+ * @since 2.3.0
126
+ * @uses wp_delete_attachment()
127
+ */
128
+ public function wpua_bulk_actions() {
129
+ global $wpua_admin;
130
+
131
+ $wp_list_table = $wpua_admin->_wpua_get_list_table( 'WP_User_Avatar_List_Table' );
132
+
133
+ // Handle bulk actions
134
+ $doaction = $wp_list_table->current_action();
135
+
136
+ if ( $doaction ) {
137
+ check_admin_referer( 'bulk-media' );
138
+
139
+ $post_ids = array();
140
+ $ids = array();
141
+
142
+ if ( isset( $_REQUEST['media'] ) && is_array( $_REQUEST['media'] ) ) {
143
+ $ids = $_REQUEST['media'];
144
+ }
145
+
146
+ foreach ( $ids as $post_id ) {
147
+ $post = get_post( absint( $post_id ) );
148
+
149
+ if ( $post instanceof WP_Post ) {
150
+ $post_ids[] = $post->ID;
151
+ }
152
+ }
153
+
154
+ $location = esc_url( add_query_arg( array( 'page' => 'wp-user-avatar-library' ), 'admin.php' ) );
155
+
156
+ if ( $referer = wp_get_referer() ) {
157
+ if ( false !== strpos( $referer, 'admin.php' ) ) {
158
+ $location = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'message', 'posted' ), $referer );
159
+ }
160
+ }
161
+
162
+ switch( $doaction ) {
163
+ case 'delete':
164
+ if ( empty( $post_ids ) ) {
165
+ break;
166
+ }
167
+
168
+ foreach ( $post_ids as $post_id_del ) {
169
+ if ( ! current_user_can( 'delete_post', $post_id_del ) ) {
170
+ wp_die( __('You are not allowed to delete this post.', 'one-user-avatar' ) );
171
+ }
172
+
173
+ if ( ! wp_delete_attachment( $post_id_del ) ) {
174
+ wp_die( __( 'Error in deleting.','one-user-avatar' ) );
175
+ }
176
+ }
177
+
178
+ $location = esc_url_raw( add_query_arg( 'deleted', count( $post_ids ), $location ) );
179
+
180
+ break;
181
+ }
182
+
183
+ wp_redirect( $location );
184
+
185
+ exit;
186
+ } elseif( ! empty( $_GET['_wp_http_referer'] ) ) {
187
+ wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
188
+
189
+ exit;
190
+ }
191
+ }
192
+
193
+ /**
194
+ * On deactivation
195
+ * @since 1.4
196
+ * @uses int $blog_id
197
+ * @uses object $wpdb
198
+ * @uses get_blog_prefix()
199
+ * @uses get_option()
200
+ * @uses update_option()
201
+ */
202
+ public function wpua_deactivate() {
203
+ global $blog_id, $wpdb;
204
+
205
+ $wp_user_roles = $wpdb->get_blog_prefix( $blog_id ) . 'user_roles';
206
+
207
+ // Get user roles and capabilities
208
+ $user_roles = get_option( $wp_user_roles );
209
+
210
+ // Remove subscribers edit_posts capability
211
+ unset( $user_roles['subscriber']['capabilities']['edit_posts'] );
212
+
213
+ update_option( $wp_user_roles, $user_roles );
214
+
215
+ // Reset all default avatars to Mystery Man
216
+ update_option( 'avatar_default', 'mystery' );
217
+ }
218
+
219
+ /**
220
+ * Add options page and settings
221
+ * @since 1.4
222
+ * @uses add_menu_page()
223
+ * @uses add_submenu_page()
224
+ */
225
+ public function wpua_admin() {
226
+ add_menu_page(
227
+ __( 'One User Avatar', 'one-user-avatar' ),
228
+ __( 'Avatars', 'one-user-avatar' ),
229
+ 'manage_options',
230
+ 'one-user-avatar',
231
+ array( $this, 'wpua_options_page' ),
232
+ WPUA_IMG_URL . 'wpua-icon.png'
233
+ );
234
+
235
+ add_submenu_page(
236
+ 'one-user-avatar',
237
+ __( 'Settings', 'one-user-avatar' ),
238
+ __( 'Settings' , 'one-user-avatar' ),
239
+ 'manage_options',
240
+ 'one-user-avatar',
241
+ array( $this, 'wpua_options_page' )
242
+ );
243
+
244
+ $hook = add_submenu_page(
245
+ 'one-user-avatar',
246
+ __( 'Library','one-user-avatar' ),
247
+ __( 'Library', 'one-user-avatar' ),
248
+ 'manage_options',
249
+ 'wp-user-avatar-library',
250
+ array( $this, 'wpua_media_page' )
251
+ );
252
+
253
+ add_action( "load-$hook", array( $this, 'wpua_media_screen_option' ) );
254
+ add_filter( 'set-screen-option', array( $this, 'wpua_set_media_screen_option' ), 10, 3 );
255
+ }
256
+
257
+ /**
258
+ * Checks if current page is settings page
259
+ * @since 1.8.3
260
+ * @uses string $pagenow
261
+ * @return bool
262
+ */
263
+ public function wpua_is_menu_page() {
264
+ global $pagenow;
265
+
266
+ $is_menu_page = ( 'admin.php' == $pagenow && isset( $_GET['page'] ) && 'one-user-avatar' == $_GET['page'] ) ? true : false;
267
+
268
+ return (bool) $is_menu_page;
269
+ }
270
+
271
+ /**
272
+ * Media page
273
+ * @since 1.8
274
+ */
275
+ public function wpua_media_page() {
276
+ require_once( WPUA_INC . 'wpua-media-page.php' );
277
+ }
278
+
279
+ /**
280
+ * Avatars per page
281
+ * @since 1.8.10
282
+ * @uses add_screen_option()
283
+ */
284
+ public function wpua_media_screen_option() {
285
+ add_screen_option( 'per_page', array(
286
+ 'label' => __( 'Avatars', 'one-user-avatar' ),
287
+ 'default' => 10,
288
+ 'option' => 'upload_per_page'
289
+ ) );
290
+ }
291
+
292
+ /**
293
+ * Save per page setting
294
+ * @since 1.8.10
295
+ * @param int $status
296
+ * @param string $option
297
+ * @param int $value
298
+ * @return int $status
299
+ */
300
+ public function wpua_set_media_screen_option( $status, $option, $value ) {
301
+ $status = ( 'upload_per_page' == $option ) ? $value : $status;
302
+
303
+ return $status;
304
+ }
305
+
306
+ /**
307
+ * Options page
308
+ * @since 1.4
309
+ */
310
+ public function wpua_options_page() {
311
+ require_once( WPUA_INC . 'wpua-options-page.php' );
312
+ }
313
+
314
+ /**
315
+ * Whitelist settings
316
+ * @since 1.9
317
+ * @uses apply_filters()
318
+ * @uses register_setting()
319
+ * @return array
320
+ */
321
+ public function wpua_register_settings() {
322
+ $settings = array();
323
+
324
+ $settings[] = register_setting( 'wpua-settings-group', 'avatar_rating');
325
+ $settings[] = register_setting( 'wpua-settings-group', 'avatar_default');
326
+ $settings[] = register_setting( 'wpua-settings-group', 'avatar_default_wp_user_avatar');
327
+ $settings[] = register_setting( 'wpua-settings-group', 'show_avatars', 'intval');
328
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_tinymce', 'intval');
329
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_allow_upload', 'intval');
330
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_disable_gravatar', 'intval');
331
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_edit_avatar', 'intval');
332
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_resize_crop', 'intval');
333
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_resize_h', 'intval');
334
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_resize_upload', 'intval');
335
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_resize_w', 'intval');
336
+ $settings[] = register_setting( 'wpua-settings-group', 'wp_user_avatar_upload_size_limit', 'intval');
337
+
338
+ /**
339
+ * Filter admin whitelist settings
340
+ * @since 1.9
341
+ * @param array $settings
342
+ */
343
+ return apply_filters( 'wpua_register_settings', $settings );
344
+ }
345
+
346
+ /**
347
+ * Add default avatar
348
+ * @since 1.4
349
+ * @uses string $avatar_default
350
+ * @uses string $mustache_admin
351
+ * @uses string $mustache_medium
352
+ * @uses int $wpua_avatar_default
353
+ * @uses bool $wpua_disable_gravatar
354
+ * @uses object $wpua_functions
355
+ * @uses get_avatar()
356
+ * @uses remove_filter()
357
+ * @uses wpua_attachment_is_image()
358
+ * @uses wpua_get_attachment_image_src()
359
+ * @return string
360
+ */
361
+ public function wpua_add_default_avatar() {
362
+ global $avatar_default, $mustache_admin, $mustache_medium, $wpua_avatar_default, $wpua_disable_gravatar, $wpua_functions;
363
+
364
+ // Remove get_avatar filter
365
+ remove_filter( 'get_avatar', array( $wpua_functions, 'wpua_get_avatar_filter' ) );
366
+
367
+ // Set avatar_list variable
368
+ $avatar_list = '';
369
+
370
+ // Set avatar defaults
371
+ $avatar_defaults = array(
372
+ 'mystery' => __( 'Mystery Man', 'one-user-avatar'),
373
+ 'blank' => __( 'Blank', 'one-user-avatar'),
374
+ 'gravatar_default' => __( 'Gravatar Logo', 'one-user-avatar'),
375
+ 'identicon' => __( 'Identicon (Generated)', 'one-user-avatar'),
376
+ 'wavatar' => __( 'Wavatar (Generated)', 'one-user-avatar'),
377
+ 'monsterid' => __( 'MonsterID (Generated)', 'one-user-avatar'),
378
+ 'retro' => __( 'Retro (Generated)', 'one-user-avatar')
379
+ );
380
+
381
+ $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults );
382
+
383
+ // No Default Avatar, set to Mystery Man
384
+ if ( empty( $avatar_default ) ) {
385
+ $avatar_default = 'mystery';
386
+ }
387
+
388
+ // Take avatar_defaults and get examples for unknown@gravatar.com
389
+ foreach ( $avatar_defaults as $default_key => $default_name ) {
390
+ $avatar = get_avatar( 'unknown@gravatar.com', 32, $default_key );
391
+ $selected = ( $avatar_default == $default_key ) ? ' checked="checked" ' : '';
392
+
393
+ $avatar_list .= sprintf(
394
+ '<label><input type="radio" name="avatar_default" id="avatar_%1$s" value="%1$s" %2$s/> ',
395
+ esc_attr( $default_key ),
396
+ $selected
397
+ );
398
+ $avatar_list .= preg_replace( "/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar );
399
+ $avatar_list .= ' ' . $default_name . '</label>';
400
+ $avatar_list .= '<br />';
401
+ }
402
+
403
+ // Show remove link if custom Default Avatar is set
404
+ if ( ! empty( $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua_avatar_default ) ) {
405
+ $avatar_thumb_src = $wpua_functions->wpua_get_attachment_image_src( $wpua_avatar_default, array( 32, 32 ) );
406
+ $avatar_thumb = $avatar_thumb_src[0];
407
+ $hide_remove = '';
408
+ } else {
409
+ $avatar_thumb = $mustache_admin;
410
+ $hide_remove = ' class="wpua-hide"';
411
+ }
412
+
413
+ // Default Avatar is wp_user_avatar, check the radio button next to it
414
+ $selected_avatar = ( 1 == (bool) $wpua_disable_gravatar || 'wp_user_avatar' == $avatar_default ) ? ' checked="checked" ' : '';
415
+
416
+ // Wrap WPUA in div
417
+ $avatar_thumb_img = sprintf( '<div id="wpua-preview"><img src="%s" width="32" /></div>', esc_url( $avatar_thumb ) );
418
+
419
+ // Add WPUA to list
420
+ $wpua_list = sprintf(
421
+ '<label><input type="radio" name="avatar_default" id="wp_user_avatar_radio" value="wp_user_avatar" %s /> ',
422
+ $selected_avatar
423
+ );
424
+
425
+ $wpua_list .= preg_replace( "/src='(.+?)'/", "src='\$1'", $avatar_thumb_img );
426
+ $wpua_list .= ' ' . __( 'One User Avatar', 'one-user-avatar' ) . '</label>';
427
+ $wpua_list .= '<p id="wpua-edit"><button type="button" class="button" id="wpua-add" name="wpua-add" data-avatar_default="true" data-title="' . __('Choose Image') . ': ' . __('Default Avatar') . '">' . __( 'Choose Image','one-user-avatar' ) . '</button>';
428
+ $wpua_list .= '<span id="wpua-remove-button"' . $hide_remove . '><a href="#" id="wpua-remove">' . __('Remove','one-user-avatar') . '</a></span><span id="wpua-undo-button"><a href="#" id="wpua-undo">' . __('Undo','one-user-avatar') . '</a></span></p>';
429
+ $wpua_list .= '<input type="hidden" id="wp-user-avatar" name="avatar_default_wp_user_avatar" value="' . $wpua_avatar_default . '">';
430
+ $wpua_list .= '<div id="wpua-modal"></div>';
431
+ if ( 1 != (bool) $wpua_disable_gravatar ) {
432
+ return $wpua_list . '<div id="wp-avatars">' . $avatar_list . '</div>';
433
+ } else {
434
+ return $wpua_list . '<div id="wp-avatars" style="display:none;">' . $avatar_list . '</div>';
435
+ }
436
+ }
437
+
438
+ /**
439
+ * Add default avatar_default to whitelist
440
+ * @since 1.4
441
+ * @param array $options
442
+ * @return array $options
443
+ */
444
+ public function wpua_whitelist_options( $options ) {
445
+ $options['discussion'][] = 'avatar_default_wp_user_avatar';
446
+
447
+ return $options;
448
+ }
449
+
450
+ /**
451
+ * Add actions links on plugin page
452
+ * @since 1.6.6
453
+ * @param array $links
454
+ * @param string $file
455
+ * @return array $links
456
+ */
457
+ public function wpua_action_links( $links, $file ) {
458
+ if( basename( dirname( $file ) ) == 'one-user-avatar' ) {
459
+ $links[] = sprintf(
460
+ '<a href="%s">%s</a>',
461
+ esc_url( add_query_arg( array( 'page' => 'one-user-avatar' ), admin_url( 'admin.php' ) ) ),
462
+ __( 'Settings', 'one-user-avatar' )
463
+ );
464
+ }
465
+
466
+ return $links;
467
+ }
468
+
469
+ /**
470
+ * Add row meta on plugin page
471
+ * @since 1.6.6
472
+ * @param array $links
473
+ * @param string $file
474
+ * @return array $links
475
+ */
476
+ public function wpua_row_meta( $links, $file ) {
477
+ if ( 'one-user-avatar' == basename( dirname( $file ) ) ) {
478
+ $links[] = sprintf(
479
+ '<a href="%s" target="_blank">%s</a>',
480
+ esc_url( __( 'https://onedesigns.com/support/forum/plugins/one-user-avatar/', 'one-user-avatar' ) ),
481
+ __( 'Support Forums', 'one-user-avatar' )
482
+ );
483
+ }
484
+
485
+ return $links;
486
+ }
487
+
488
+ /**
489
+ * Add column to Users table
490
+ * @since 1.4
491
+ * @param array $columns
492
+ * @return array
493
+ */
494
+ public function wpua_add_column($columns) {
495
+ return $columns + array( 'one-user-avatar' => __( 'Profile Picture', 'one-user-avatar' ) );
496
+ }
497
+
498
+ /**
499
+ * Show thumbnail in Users table
500
+ * @since 1.4
501
+ * @param string $value
502
+ * @param string $column_name
503
+ * @param int $user_id
504
+ * @uses int $blog_id
505
+ * @uses object $wpdb
506
+ * @uses object $wpua_functions
507
+ * @uses get_blog_prefix()
508
+ * @uses get_user_meta()
509
+ * @uses wpua_get_attachment_image()
510
+ * @return string $value
511
+ */
512
+ public function wpua_show_column( $value, $column_name, $user_id ) {
513
+ global $blog_id, $wpdb, $wpua_functions;
514
+
515
+ $wpua = get_user_meta( $user_id, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', true );
516
+ $wpua_image = $wpua_functions->wpua_get_attachment_image( $wpua, array( 32, 32 ) );
517
+
518
+ if ( 'one-user-avatar' == $column_name ) {
519
+ $value = $wpua_image;
520
+ }
521
+
522
+ return $value;
523
+ }
524
+
525
+ /**
526
+ * Get list table
527
+ * @since 1.8
528
+ * @param string $class
529
+ * @param array $args
530
+ * @return object
531
+ */
532
+ public function _wpua_get_list_table( $class, $args = array() ) {
533
+ require_once( WPUA_INC . 'class-wp-user-avatar-list-table.php' );
534
+
535
+ $args['screen'] = 'one-user-avatar';
536
+
537
+ return new $class( $args );
538
+ }
539
+
540
+ /**
541
+ * Add media states
542
+ * @since 1.4
543
+ * @param array $states
544
+ * @uses object $post
545
+ * @uses int $wpua_avatar_default
546
+ * @uses apply_filters()
547
+ * @uses get_post_custom_values()
548
+ * @return array
549
+ */
550
+ public function wpua_add_media_state($states) {
551
+ global $post, $wpua_avatar_default;
552
+
553
+ $is_wpua = isset( $post->ID ) ? get_post_custom_values( '_wp_attachment_wp_user_avatar', $post->ID ) : '';
554
+
555
+ if ( ! empty( $is_wpua ) ) {
556
+ $states[] = __( 'Profile Picture','one-user-avatar' );
557
+ }
558
+
559
+ if ( ! empty ( $wpua_avatar_default ) && isset( $post->ID ) && ( $wpua_avatar_default == $post->ID ) ) {
560
+ $states[] = __( 'Default Avatar', 'one-user-avatar' );
561
+ }
562
+
563
+ /**
564
+ * Filter media states
565
+ * @since 1.4
566
+ * @param array $states
567
+ */
568
+ return apply_filters( 'wpua_add_media_state', $states );
569
+ }
570
+
571
+ }
572
+
573
+ /**
574
+ * Initialize
575
+ * @since 1.9.2
576
+ */
577
+ function wpua_admin_init() {
578
+ global $wpua_admin;
579
+
580
+ if ( ! isset( $wpua_admin ) ) {
581
+ $wpua_admin = new WP_User_Avatar_Admin();
582
+ }
583
+
584
+ return $wpua_admin;
585
+ }
586
+ add_action( 'init', 'wpua_admin_init' );
includes/class-wp-user-avatar-functions.php ADDED
@@ -0,0 +1,883 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Core user functions.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Functions {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses add_filter()
22
+ * @uses register_activation_hook()
23
+ * @uses register_deactivation_hook()
24
+ */
25
+ public function __construct() {
26
+ add_filter( 'get_avatar', array( $this, 'wpua_get_avatar_filter' ), 10, 6 );
27
+
28
+ add_filter( 'get_avatar_url', array( $this, 'wpua_get_avatar_url' ), 10, 3 );
29
+
30
+ // Filter to display One User Avatar at Buddypress
31
+ add_filter( 'bp_core_fetch_avatar', array( $this, 'wpua_bp_core_fetch_avatar_filter' ), 10, 5 );
32
+
33
+ // Filter to display One User Avatar by URL at Buddypress
34
+ add_filter( 'bp_core_fetch_avatar_url', array( $this, 'wpua_bp_core_fetch_avatar_url_filter' ), 10, 5 );
35
+
36
+ }
37
+
38
+
39
+
40
+ function wpua_get_avatar_url( $url, $id_or_email, $args ){
41
+ global $wpua_disable_gravatar;
42
+
43
+ $user_id = null;
44
+
45
+ if ( is_object( $id_or_email ) ) {
46
+ if ( ! empty( $id_or_email->comment_author_email ) ) {
47
+ $user_id = $id_or_email->user_id;
48
+ }
49
+ } else {
50
+ if ( is_email( $id_or_email ) ) {
51
+ $user = get_user_by( 'email', $id_or_email );
52
+
53
+ if ( $user ) {
54
+ $user_id = $user->ID;
55
+ }
56
+ } else {
57
+ $user_id = $id_or_email;
58
+ }
59
+ }
60
+
61
+ // First checking custom avatar.
62
+ if ( has_wp_user_avatar( $user_id ) ) {
63
+ $url = $this->get_wp_user_avatar_src( $user_id );
64
+ } else if( $wpua_disable_gravatar ) {
65
+ $url = $this->wpua_get_default_avatar_url( $url, $id_or_email, $args );
66
+ } else {
67
+ $has_valid_url = $this->wpua_has_gravatar( $id_or_email );
68
+
69
+ if ( ! $has_valid_url ) {
70
+ $url = $this->wpua_get_default_avatar_url( $url, $id_or_email, $args );
71
+ }
72
+
73
+ }
74
+ /**
75
+ * Filter get_avatar_url filter
76
+ * @since 4.1.9
77
+ * @param string $url
78
+ * @param int|string $id_or_email
79
+ * @param array $args
80
+ */
81
+ return apply_filters( 'wpua_get_avatar_filter_url', $url, $id_or_email );
82
+ }
83
+
84
+
85
+ function wpua_get_default_avatar_url( $url, $id_or_email, $args ){
86
+ global $avatar_default,
87
+ $mustache_admin,
88
+ $mustache_avatar,
89
+ $mustache_medium,
90
+ $mustache_original,
91
+ $mustache_thumbnail,
92
+ $post,
93
+ $wpua_avatar_default,
94
+ $wpua_disable_gravatar,
95
+ $wpua_functions;
96
+
97
+ $default_image_details = array();
98
+
99
+ $size = ! empty( $args['size'] ) ? $args['size'] : 96;
100
+
101
+ // Show custom Default Avatar
102
+ if ( ! empty( $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua_avatar_default ) ) {
103
+ // Get image
104
+ $wpua_avatar_default_image = $wpua_functions->wpua_get_attachment_image_src(
105
+ $wpua_avatar_default,
106
+ array( $size, $size )
107
+ );
108
+
109
+ // Image src
110
+ $url = $wpua_avatar_default_image[0];
111
+ } else {
112
+ // Get mustache image based on numeric size comparison
113
+ if ( $size > get_option( 'medium_size_w ') ) {
114
+ $url = $mustache_original;
115
+ } elseif ( $size <= get_option( 'medium_size_w' ) && $size > get_option( 'thumbnail_size_w' ) ) {
116
+ $url = $mustache_medium;
117
+ } elseif ( $size <= get_option( 'thumbnail_size_w' ) && 96 < $size ) {
118
+ $url = $mustache_thumbnail;
119
+ } elseif ( 96 >= $size && 32 < $size ) {
120
+ $url = $mustache_avatar;
121
+ } elseif ( 32 >= $size ) {
122
+ $url = $mustache_admin;
123
+ }
124
+ }
125
+
126
+ return $url;
127
+ }
128
+
129
+ /**
130
+ * Returns One User Avatar or Gravatar-hosted image if user doesn't have Buddypress-uploaded image
131
+ * @param string $avatar
132
+ * @param array $params
133
+ * @param int $item_id
134
+ * @param string $avatar_dir
135
+ * @param string $css_id
136
+ * @param int $html_width
137
+ * @param int $html_height
138
+ * @param string $avatar_folder_url
139
+ * @param string $avatar_folder_dir
140
+ * @uses object $wpua_functions
141
+ * @uses wpua_get_avatar_filter()
142
+ */
143
+ public function wpua_bp_core_fetch_avatar_filter( $gravatar, $params, $item_id = '', $avatar_dir = '', $css_id = '', $html_width = '', $html_height =' ', $avatar_folder_url = '', $avatar_folder_dir = '') {
144
+ global $wpua_functions;
145
+
146
+ if ( -1 < strpos( $gravatar, 'gravatar.com' , 0 ) ) {
147
+ $avatar = $wpua_functions->wpua_get_avatar_filter(
148
+ $gravatar,
149
+ ( 'user' == $params['object'] ) ? $params['item_id'] : '',
150
+ ( 'user' == $params['object'] ) ? ( ( 'thumb' == $params['type'] ) ? 50 :150 ) : 50,
151
+ '',
152
+ ''
153
+ );
154
+
155
+ return $avatar;
156
+ }
157
+
158
+ return $gravatar;
159
+ }
160
+
161
+ /**
162
+ * Returns WP user default local avatar URL or Gravatar-hosted image URL if user doesn't have Buddypress-uploaded image
163
+ * @param string $avatar
164
+ * @param array $params
165
+ * @uses object $wpua_functions
166
+ * @uses wpua_get_avatar_filter()
167
+ */
168
+ public function wpua_bp_core_fetch_avatar_url_filter( $gravatar, $params ) {
169
+ global $wpua_functions;
170
+
171
+ if ( -1 < strpos( $gravatar, 'gravatar.com', 0 ) ) {
172
+ $avatar = $this->wpua_get_avatar_url( $gravatar, $params['email'], $params );
173
+
174
+ return $avatar;
175
+ }
176
+
177
+ return $gravatar;
178
+ }
179
+
180
+ /**
181
+ * Returns true if user has Gravatar-hosted image
182
+ * @since 1.4
183
+ * @param int|string $id_or_email
184
+ * @param bool $has_gravatar
185
+ * @param int|string $user
186
+ * @param string $email
187
+ * @uses get_user_by()
188
+ * @uses is_wp_error()
189
+ * @uses wp_cache_get()
190
+ * @uses wp_cache_set()
191
+ * @uses wp_remote_head()
192
+ * @return bool $has_gravatar
193
+ */
194
+ public function wpua_has_gravatar( $id_or_email = '', $has_gravatar = 0, $user = '', $email = '') {
195
+ global $wpua_hash_gravatar,
196
+ $avatar_default,
197
+ $mustache_admin,
198
+ $mustache_avatar,
199
+ $mustache_medium,
200
+ $mustache_original,
201
+ $mustache_thumbnail,
202
+ $post,
203
+ $wpua_avatar_default,
204
+ $wpua_disable_gravatar,
205
+ $wpua_functions;
206
+
207
+ // User has WPUA
208
+ // Decide if check gravatar required or not.
209
+ if ( 'wp_user_avatar' != trim( $avatar_default ) ) {
210
+ return true;
211
+ }
212
+
213
+ if ( ! is_object( $id_or_email ) && ! empty( $id_or_email ) ) {
214
+ // Find user by ID or e-mail address
215
+ $user = is_numeric( $id_or_email ) ? get_user_by( 'id', $id_or_email ) : get_user_by( 'email', $id_or_email );
216
+
217
+ // Get registered user e-mail address
218
+ $email = ! empty( $user ) ? $user->user_email : '';
219
+ }
220
+
221
+ if ( '' == $email ) {
222
+ if ( ! is_numeric( $id_or_email ) && ! is_object( $id_or_email ) ) {
223
+ $email = $id_or_email;
224
+ } elseif ( ! is_numeric( $id_or_email ) && is_object( $id_or_email ) ) {
225
+ $email = $id_or_email->comment_author_email;
226
+ }
227
+ }
228
+
229
+ if ( '' != $email ) {
230
+ $hash = md5( strtolower( trim( $email ) ) );
231
+
232
+ //check if gravatar exists for hashtag using options
233
+ if ( is_array( $wpua_hash_gravatar ) ) {
234
+ $date = date( 'm-d-Y' );
235
+
236
+ if (
237
+ array_key_exists( $hash, $wpua_hash_gravatar ) &&
238
+ is_array( $wpua_hash_gravatar[$hash] ) &&
239
+ array_key_exists( $date, $wpua_hash_gravatar[ $hash ] )
240
+ ) {
241
+ return (bool) $wpua_hash_gravatar[ $hash ][ $date ];
242
+ }
243
+ }
244
+
245
+ if (
246
+ isset( $_SERVER['HTTPS'] ) &&
247
+ ( 'on' == $_SERVER['HTTPS'] || 1 == $_SERVER['HTTPS'] ) ||
248
+ isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
249
+ 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO']
250
+ ) {
251
+ $http = 'https';
252
+ } else {
253
+ $http = 'http';
254
+ }
255
+
256
+ $gravatar = $http . '://www.gravatar.com/avatar/' . $hash . '?d=404';
257
+ $data = wp_cache_get( $hash );
258
+
259
+ if ( false === $data ) {
260
+ $response = wp_remote_head( $gravatar );
261
+ $data = is_wp_error( $response ) ? 'not200' : $response['response']['code'];
262
+
263
+ wp_cache_set( $hash, $data, $group = '', $expire = 60 * 5 );
264
+
265
+ $has_gravatar = ( '200' == $data ) ? true : false;
266
+
267
+ if ( false == $wpua_hash_gravatar ) {
268
+ $date = date( 'm-d-Y' );
269
+
270
+ $wpua_hash_gravatar = [];
271
+ $wpua_hash_gravatar[ $hash ][ $date ] = (bool) $has_gravatar;
272
+
273
+ add_option( 'wpua_hash_gravatar', serialize( $wpua_hash_gravatar ), '', false );
274
+ } else {
275
+ if ( is_array( $wpua_hash_gravatar ) && ! empty( $wpua_hash_gravatar ) ) {
276
+ $date = date( 'm-d-Y' );
277
+
278
+ if ( array_key_exists( $hash, $wpua_hash_gravatar ) ){
279
+ unset( $wpua_hash_gravatar[ $hash ] );
280
+
281
+ $wpua_hash_gravatar[ $hash ][ $date ] = (bool) $has_gravatar;
282
+
283
+ update_option( 'wpua_hash_gravatar', serialize( $wpua_hash_gravatar ), false );
284
+ }
285
+ else {
286
+ $wpua_hash_gravatar[ $hash ][ $date ] = (bool) $has_gravatar;
287
+
288
+ update_option( 'wpua_hash_gravatar', serialize( $wpua_hash_gravatar ), false );
289
+ }
290
+ }
291
+ }
292
+ }
293
+
294
+ $has_gravatar = ( '200' == $data ) ? true : false;
295
+ } else {
296
+ $has_gravatar = false;
297
+ }
298
+
299
+ // Check if Gravatar image returns 200 (OK) or 404 (Not Found)
300
+ return (bool) $has_gravatar;
301
+ }
302
+
303
+
304
+ /**
305
+ * Check if local image
306
+ * @since 1.9.2
307
+ * @param int $attachment_id
308
+ * @uses apply_filters()
309
+ * @uses wp_attachment_is_image()
310
+ * @return bool
311
+ */
312
+ public function wpua_attachment_is_image( $attachment_id ) {
313
+ $is_image = wp_attachment_is_image( $attachment_id );
314
+
315
+ /**
316
+ * Filter local image check
317
+ * @since 1.9.2
318
+ * @param bool $is_image
319
+ * @param int $attachment_id
320
+ */
321
+ $is_image = apply_filters( 'wpua_attachment_is_image', $is_image, $attachment_id );
322
+
323
+ return (bool) $is_image;
324
+ }
325
+
326
+ /**
327
+ * Get local image tag
328
+ * @since 1.9.2
329
+ * @param int $attachment_id
330
+ * @param int|string $size
331
+ * @param bool $icon
332
+ * @param string $attr
333
+ * @uses apply_filters()
334
+ * @uses wp_get_attachment_image()
335
+ * @return string
336
+ */
337
+ public function wpua_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = 0, $attr = '' ) {
338
+ $image = wp_get_attachment_image( $attachment_id, $size, $icon, $attr );
339
+
340
+ /**
341
+ * Filter local image tag
342
+ * @since 1.9.2
343
+ * @param string $image
344
+ * @param int $attachment_id
345
+ * @param int|string $size
346
+ * @param bool $icon
347
+ * @param string $attr
348
+ */
349
+ return apply_filters( 'wpua_get_attachment_image', $image, $attachment_id, $size, $icon, $attr );
350
+ }
351
+
352
+ /**
353
+ * Get local image src
354
+ * @since 1.9.2
355
+ * @param int $attachment_id
356
+ * @param int|string $size
357
+ * @param bool $icon
358
+ * @uses apply_filters()
359
+ * @uses wp_get_attachment_image_src()
360
+ * @return array
361
+ */
362
+ public function wpua_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = 0 ) {
363
+ $image_src_array = wp_get_attachment_image_src( $attachment_id, $size, $icon );
364
+
365
+ /**
366
+ * Filter local image src
367
+ * @since 1.9.2
368
+ * @param array $image_src_array
369
+ * @param int $attachment_id
370
+ * @param int|string $size
371
+ * @param bool $icon
372
+ */
373
+ return apply_filters( 'wpua_get_attachment_image_src', $image_src_array, $attachment_id, $size, $icon );
374
+ }
375
+
376
+ /**
377
+ * Returns true if user has wp_user_avatar
378
+ * @since 1.1
379
+ * @param int|string $id_or_email
380
+ * @param bool $has_wpua
381
+ * @param object $user
382
+ * @param int $user_id
383
+ * @uses int $blog_id
384
+ * @uses object $wpdb
385
+ * @uses int $wpua_avatar_default
386
+ * @uses object $wpua_functions
387
+ * @uses get_user_by()
388
+ * @uses get_user_meta()
389
+ * @uses get_blog_prefix()
390
+ * @uses wpua_attachment_is_image()
391
+ * @return bool
392
+ */
393
+ public function has_wp_user_avatar($id_or_email = '', $has_wpua = 0, $user = '', $user_id = '') {
394
+ global $blog_id, $wpdb, $wpua_avatar_default, $wpua_functions, $avatar_default;
395
+
396
+ if ( ! is_object ( $id_or_email ) && ! empty( $id_or_email ) ) {
397
+ // Find user by ID or e-mail address
398
+ $user = is_numeric( $id_or_email ) ? get_user_by( 'id', $id_or_email ) : get_user_by( 'email', $id_or_email );
399
+
400
+ // Get registered user ID
401
+ $user_id = ! empty( $user ) ? $user->ID : '';
402
+ }
403
+
404
+ $wpua = get_user_meta( $user_id, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', true );
405
+
406
+ // Check if avatar is same as default avatar or on excluded list
407
+ $has_wpua = ! empty( $wpua ) && ( 'wp_user_avatar' != $avatar_default || $wpua != $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua ) ? true : false;
408
+
409
+ return (bool) $has_wpua;
410
+ }
411
+ /**
412
+ * Retrive default image url set by admin.
413
+ */
414
+ public function wpua_default_image( $size ) {
415
+ global $avatar_default,
416
+ $mustache_admin,
417
+ $mustache_avatar,
418
+ $mustache_medium,
419
+ $mustache_original,
420
+ $mustache_thumbnail,
421
+ $post,
422
+ $wpua_avatar_default,
423
+ $wpua_disable_gravatar,
424
+ $wpua_functions;
425
+
426
+ $default_image_details = array();
427
+
428
+ // Show custom Default Avatar
429
+ if ( !empty( $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua_avatar_default ) ) {
430
+ // Get image
431
+ $wpua_avatar_default_image = $wpua_functions->wpua_get_attachment_image_src(
432
+ $wpua_avatar_default,
433
+ array( $size, $size )
434
+ );
435
+
436
+ // Image src
437
+ $default = $wpua_avatar_default_image[0];
438
+
439
+ // Add dimensions if numeric size
440
+ $default_image_details['dimensions'] = sprintf(
441
+ ' width="%s" height="%s"',
442
+ esc_attr( $wpua_avatar_default_image[1] ),
443
+ esc_attr( $wpua_avatar_default_image[2] )
444
+ );
445
+ } else {
446
+ // Get mustache image based on numeric size comparison
447
+ if ( $size > get_option( 'medium_size_w' ) ) {
448
+ $default = $mustache_original;
449
+ } elseif( $size <= get_option( 'medium_size_w' ) && $size > get_option( 'thumbnail_size_w' ) ) {
450
+ $default = $mustache_medium;
451
+ } elseif( $size <= get_option( 'thumbnail_size_w' ) && 96 < $size ) {
452
+ $default = $mustache_thumbnail;
453
+ } elseif( 96 >= $size && 32 < $size ) {
454
+ $default = $mustache_avatar;
455
+ } elseif( 32 >= $size ) {
456
+ $default = $mustache_admin;
457
+ }
458
+
459
+ // Add dimensions if numeric size
460
+ $default_image_details['dimensions'] = sprintf( ' width="%1$s" height="%1$s"', esc_attr( $size ) );
461
+ }
462
+
463
+ // Construct the img tag
464
+ $default_image_details['size'] = $size;
465
+ $default_image_details['src'] = $default;
466
+
467
+ return $default_image_details;
468
+
469
+ }
470
+ /**
471
+ * Replace get_avatar only in get_wp_user_avatar
472
+ *
473
+ * @param string $avatar
474
+ * @param int|string $id_or_email
475
+ * @param int|string $size
476
+ * @param string $default
477
+ * @param string $alt
478
+ * @param array $args
479
+ *
480
+ * @return string $avatar
481
+ * @since 1.4
482
+ * @uses string $avatar_default
483
+ * @uses string $mustache_admin
484
+ * @uses string $mustache_avatar
485
+ * @uses string $mustache_medium
486
+ * @uses string $mustache_original
487
+ * @uses string $mustache_thumbnail
488
+ * @uses object $post
489
+ * @uses int $wpua_avatar_default
490
+ * @uses bool $wpua_disable_gravatar
491
+ * @uses object $wpua_functions
492
+ * @uses apply_filters()
493
+ * @uses get_wp_user_avatar()
494
+ * @uses has_wp_user_avatar()
495
+ * @uses wpua_has_gravatar()
496
+ * @uses wpua_attachment_is_image()
497
+ * @uses wpua_get_attachment_image_src()
498
+ * @uses get_option()
499
+ * @return string $avatar
500
+ */
501
+ public function wpua_get_avatar_filter( $avatar, $id_or_email = '', $size = '', $default = '', $alt = '') {
502
+ global $avatar_default,
503
+ $mustache_admin,
504
+ $mustache_avatar,
505
+ $mustache_medium,
506
+ $mustache_original,
507
+ $mustache_thumbnail,
508
+ $post,
509
+ $wpua_avatar_default,
510
+ $wpua_disable_gravatar,
511
+ $wpua_functions;
512
+
513
+ // User has WPUA
514
+ if ( '' == $alt ) {
515
+ $alt = apply_filters( 'wpua_default_alt_tag', __( 'Avatar', 'one-user-avatar' ) );
516
+ }
517
+
518
+ $alt = esc_attr($alt);
519
+ $size = esc_attr($size);
520
+ $class = [];
521
+
522
+ if ( isset( $args['class'] ) ) {
523
+ if ( is_array( $args['class'] ) ) {
524
+ $class = array_merge( $class, $args['class'] );
525
+ } else {
526
+ $class[] = $args['class'];
527
+ }
528
+ }
529
+
530
+ $avatar = str_replace( 'gravatar_default', '', $avatar );
531
+
532
+ if ( is_object( $id_or_email ) ) {
533
+ if ( ! empty( $id_or_email->comment_author_email ) ) {
534
+ $avatar = get_wp_user_avatar( $id_or_email, $size, $default, $alt, $class );
535
+ } else {
536
+ $avatar = get_wp_user_avatar( 'unknown@gravatar.com', $size, $default, $alt, $class );
537
+ }
538
+ } else {
539
+ if ( has_wp_user_avatar( $id_or_email ) ) {
540
+ $avatar = get_wp_user_avatar( $id_or_email, $size, $default, $alt, $class );
541
+ // User has Gravatar and Gravatar is not disabled
542
+ } elseif( 1 != (bool) $wpua_disable_gravatar && $wpua_functions->wpua_has_gravatar( $id_or_email ) ) {
543
+ // find our src
544
+ if ( ! empty( $avatar ) ) {
545
+ preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $avatar, $matches, PREG_SET_ORDER );
546
+
547
+ $wpua_avatar_image_src = ! empty( $matches ) ? $matches[0][1] : '';
548
+ $default_image_details = $this->wpua_default_image( $size );
549
+ $wpua_default_avatar_image_src = $default_image_details['src'];
550
+ $wpua_final_avatar_image_src = str_replace(
551
+ 'd=wp_user_avatar',
552
+ 'd=' . urlencode( $wpua_default_avatar_image_src ),
553
+ $wpua_avatar_image_src
554
+ );
555
+ }
556
+
557
+ $class_string = ! empty( $class ) ? ' ' . esc_attr( implode( ' ', $class ) ) : '';
558
+ $avatar = sprintf(
559
+ '<img src="%1$s"%2$s alt="%3$s" class="avatar avatar-%4$s wp-user-avatar wp-user-avatar-%4$s photo avatar-default" />',
560
+ esc_url( $wpua_final_avatar_image_src ),
561
+ $default_image_details['dimensions'],
562
+ esc_attr( $alt ),
563
+ esc_attr( $size ),
564
+ );
565
+ // User doesn't have WPUA or Gravatar and Default Avatar is wp_user_avatar, show custom Default Avatar
566
+ } elseif ( 'wp_user_avatar' == $avatar_default ) {
567
+ $default_image_details = $this->wpua_default_image( $size );
568
+ $class_string = ! empty( $class ) ? ' ' . esc_attr( implode( ' ', $class ) ) : '';
569
+ $avatar = sprintf(
570
+ '<img src="%1$s"%2$s alt="%3$s" class="avatar avatar-%4$s wp-user-avatar wp-user-avatar-%4$s photo avatar-default" />',
571
+ esc_url( $default_image_details['src'] ),
572
+ $default_image_details['dimensions'],
573
+ esc_attr( $alt ),
574
+ esc_attr( $size )
575
+ );
576
+
577
+ return $avatar;
578
+ }
579
+ }
580
+
581
+ /**
582
+ * Filter get_avatar filter
583
+ * @since 1.9
584
+ * @param string $avatar
585
+ * @param int|string $id_or_email
586
+ * @param int|string $size
587
+ * @param string $default
588
+ * @param string $alt
589
+ */
590
+ return apply_filters( 'wpua_get_avatar_filter', $avatar, $id_or_email, $size, $default, $alt );
591
+ }
592
+
593
+ /**
594
+ * Get original avatar, for when user removes wp_user_avatar
595
+ * @since 1.4
596
+ * @param int|string $id_or_email
597
+ * @param int|string $size
598
+ * @param string $default
599
+ * @param string $alt
600
+ * @uses string $avatar_default
601
+ * @uses string $mustache_avatar
602
+ * @uses int $wpua_avatar_default
603
+ * @uses bool $wpua_disable_gravatar
604
+ * @uses object $wpua_functions
605
+ * @uses wpua_attachment_is_image()
606
+ * @uses wpua_get_attachment_image_src()
607
+ * @uses wpua_has_gravatar()
608
+ * @uses add_filter()
609
+ * @uses apply_filters()
610
+ * @uses get_avatar()
611
+ * @uses remove_filter()
612
+ * @return string $default
613
+ */
614
+ public function wpua_get_avatar_original( $id_or_email = '', $size = '', $default = '', $alt = '' ) {
615
+ global $avatar_default,
616
+ $mustache_avatar,
617
+ $wpua_avatar_default,
618
+ $wpua_disable_gravatar,
619
+ $wpua_functions;
620
+
621
+ // Remove get_avatar filter
622
+ remove_filter( 'get_avatar', array( $this, 'wpua_get_avatar_filter' ) );
623
+ remove_filter( 'get_avatar_url', array( $this, 'wpua_get_avatar_url' ) );
624
+
625
+ if ( 1 != (bool) $wpua_disable_gravatar ) {
626
+ // User doesn't have Gravatar and Default Avatar is wp_user_avatar, show custom Default Avatar
627
+ if ( ! $wpua_functions->wpua_has_gravatar( $id_or_email ) && 'wp_user_avatar' == $avatar_default) {
628
+ // Show custom Default Avatar
629
+ if( ! empty( $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua_avatar_default ) ) {
630
+ $size_numeric_w_x_h = array( get_option( $size . '_size_w' ), get_option( $size . '_size_h' ) );
631
+ $wpua_avatar_default_image = $wpua_functions->wpua_get_attachment_image_src(
632
+ $wpua_avatar_default,
633
+ $size_numeric_w_x_h
634
+ );
635
+
636
+ $default = $wpua_avatar_default_image[0];
637
+ } else {
638
+ $default = $mustache_avatar;
639
+ }
640
+ } else {
641
+ // Get image from Gravatar, whether it's the user's image or default image
642
+ $default = get_avatar_url( $id_or_email, array( 'size' => $size ) );
643
+ }
644
+ } else {
645
+ if ( ! empty( $wpua_avatar_default ) && $wpua_functions->wpua_attachment_is_image( $wpua_avatar_default ) ) {
646
+ $size_numeric_w_x_h = array( get_option( $size . '_size_w' ), get_option( $size . '_size_h' ) );
647
+ $wpua_avatar_default_image = $wpua_functions->wpua_get_attachment_image_src(
648
+ $wpua_avatar_default,
649
+ $size_numeric_w_x_h
650
+ );
651
+
652
+ $default = $wpua_avatar_default_image[0];
653
+ } else {
654
+ $default = $mustache_avatar;
655
+ }
656
+ }
657
+
658
+ // Enable get_avatar filter
659
+ add_filter( 'get_avatar', array( $this, 'wpua_get_avatar_filter' ), 10, 5 );
660
+ add_filter( 'get_avatar_url', array( $this, 'wpua_get_avatar_url' ), 10, 3 );
661
+
662
+ /**
663
+ * Filter original avatar src
664
+ * @since 1.9
665
+ * @param string $default
666
+ */
667
+ return apply_filters( 'wpua_get_avatar_original', $default );
668
+ }
669
+
670
+
671
+ /**
672
+ * Find WPUA, show get_avatar if empty
673
+ *
674
+ * @param int|string $id_or_email
675
+ * @param int|string $size
676
+ * @param string $align
677
+ * @param string $alt
678
+ * @param array $class
679
+ *
680
+ * @return string $avatar
681
+ * @since 1.0
682
+ * @uses array $_wp_additional_image_sizes
683
+ * @uses array $all_sizes
684
+ * @uses string $avatar_default
685
+ * @uses int $blog_id
686
+ * @uses object $post
687
+ * @uses object $wpdb
688
+ * @uses int $wpua_avatar_default
689
+ * @uses object $wpua_functions
690
+ * @uses apply_filters()
691
+ * @uses get_the_author_meta()
692
+ * @uses get_blog_prefix()
693
+ * @uses get_user_by()
694
+ * @uses get_query_var()
695
+ * @uses is_author()
696
+ * @uses wpua_attachment_is_image()
697
+ * @uses wpua_get_attachment_image_src()
698
+ * @uses get_option()
699
+ * @uses get_avatar()
700
+ * @return string $avatar
701
+ */
702
+ public function get_wp_user_avatar( $id_or_email = '', $size = '96', $align = '', $alt = '', $class = [] ) {
703
+ global $all_sizes,
704
+ $avatar_default,
705
+ $blog_id,
706
+ $post,
707
+ $wpdb,
708
+ $wpua_avatar_default,
709
+ $wpua_functions,
710
+ $_wp_additional_image_sizes;
711
+
712
+ $email = 'unknown@gravatar.com';
713
+
714
+ // Checks if comment
715
+ if ( '' == $alt ) {
716
+ $alt = apply_filters( 'wpua_default_alt_tag', __( 'Avatar', 'one-user-avatar' ) );
717
+ }
718
+
719
+ if ( is_object( $id_or_email ) ) {
720
+ // Checks if comment author is registered user by user ID
721
+ if ( 0 != $id_or_email->user_id ) {
722
+ $email = $id_or_email->user_id;
723
+ // Checks that comment author isn't anonymous
724
+ } elseif ( ! empty( $id_or_email->comment_author_email ) ) {
725
+ // Checks if comment author is registered user by e-mail address
726
+ $user = get_user_by( 'email', $id_or_email->comment_author_email );
727
+ // Get registered user info from profile, otherwise e-mail address should be value
728
+ $email = ! empty( $user ) ? $user->ID : $id_or_email->comment_author_email;
729
+ }
730
+
731
+ $alt = $id_or_email->comment_author;
732
+ } else {
733
+ if ( ! empty( $id_or_email ) ) {
734
+ // Find user by ID or e-mail address
735
+ $user = is_numeric( $id_or_email ) ? get_user_by( 'id', $id_or_email ) : get_user_by( 'email', $id_or_email );
736
+ } else {
737
+ // Find author's name if id_or_email is empty
738
+ $author_name = get_query_var( 'author_name' );
739
+
740
+ if ( is_author() ) {
741
+ // On author page, get user by page slug
742
+ $user = get_user_by( 'slug', $author_name );
743
+ } else {
744
+ // On post, get user by author meta
745
+ $user_id = get_the_author_meta( 'ID' );
746
+ $user = get_user_by( 'id', $user_id );
747
+ }
748
+ }
749
+
750
+ // Set user's ID and name
751
+ if ( ! empty ( $user ) ) {
752
+ $email = $user->ID;
753
+ $alt = $user->display_name;
754
+ }
755
+ }
756
+
757
+ $alt = esc_attr( $alt );
758
+ $size = esc_attr( $size );
759
+ $class = esc_attr( implode( ' ', $class ) );
760
+
761
+ // Checks if user has WPUA
762
+ $wpua_meta = get_the_author_meta( $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', $email );
763
+
764
+ // Add alignment class
765
+ $alignclass = ! empty( $align ) && ( 'left' == $align || 'right' == $align || 'center' == $align ) ? ' align' . $align : ' alignnone';
766
+
767
+ // User has WPUA, check if on excluded list and bypass get_avatar
768
+ if ( ! empty( $wpua_meta ) && $wpua_functions->wpua_attachment_is_image( $wpua_meta ) ) {
769
+ // Numeric size use size array
770
+ $get_size = is_numeric( $size ) ? array( $size, $size ) : $size;
771
+
772
+ // Get image src
773
+ $wpua_image = $wpua_functions->wpua_get_attachment_image_src( $wpua_meta, $get_size );
774
+
775
+ // Add dimensions to img only if numeric size was specified
776
+ $dimensions = is_numeric( $size ) ? sprintf(
777
+ ' width="%s" height="%s"',
778
+ esc_attr( $wpua_image[1] ),
779
+ esc_attr( $wpua_image[2] )
780
+ ) : '';
781
+
782
+ $class_string = ! empty( $class ) ? ' ' . $class : '';
783
+
784
+ // Construct the img tag
785
+ $avatar = sprintf(
786
+ '<img src="%1$s"%2$s alt="%3$s" class="avatar avatar-%4$s wp-user-avatar wp-user-avatar-%4$s%5$s photo" />',
787
+ esc_url( $wpua_image[0] ),
788
+ $dimensions,
789
+ esc_attr( $alt ),
790
+ esc_attr( $size ),
791
+ esc_attr( $alignclass )
792
+ );
793
+ } else {
794
+ // Check for custom image sizes
795
+ if ( in_array( $size, $all_sizes ) ) {
796
+ if ( in_array( $size, array( 'original', 'large', 'medium', 'thumbnail' ) ) ) {
797
+ $get_size = ( 'original' == $size ) ? get_option( 'large_size_w' ) : get_option( $size . '_size_w' );
798
+ } else {
799
+ $get_size = $_wp_additional_image_sizes[ $size ]['width'];
800
+ }
801
+ } else {
802
+ // Numeric sizes leave as-is
803
+ $get_size = $size;
804
+ }
805
+
806
+ // User with no WPUA uses get_avatar
807
+ $avatar = get_avatar( $email, $get_size, $default = '', $alt = '', [ 'class' => $class ] );
808
+
809
+ // Remove width and height for non-numeric sizes
810
+ if ( in_array( $size, array( 'original', 'large', 'medium', 'thumbnail' ) ) ) {
811
+ $avatar = preg_replace( '/(width|height)=\"\d*\"\s/', '', $avatar );
812
+ $avatar = preg_replace( "/(width|height)=\'\d*\'\s/", '', $avatar );
813
+ }
814
+
815
+ $replace = array(
816
+ 'wp-user-avatar ',
817
+ 'wp-user-avatar-' . $get_size . ' ',
818
+ 'wp-user-avatar-' . $size . ' ',
819
+ 'avatar-'.$get_size,
820
+ ' photo'
821
+ );
822
+
823
+ $replacements = array(
824
+ '',
825
+ '',
826
+ '',
827
+ 'avatar-' . $size,
828
+ 'wp-user-avatar wp-user-avatar-' . $size . $alignclass . ' photo'
829
+ );
830
+ $avatar = str_replace( $replace, $replacements, $avatar );
831
+ }
832
+ /**
833
+ * Filter get_wp_user_avatar
834
+ * @since 1.9
835
+ * @param string $avatar
836
+ * @param int|string $id_or_email
837
+ * @param int|string $size
838
+ * @param string $align
839
+ * @param string $alt
840
+ */
841
+ return apply_filters( 'get_wp_user_avatar', $avatar, $id_or_email, $size, $align, $alt );
842
+ }
843
+
844
+ /**
845
+ * Return just the image src
846
+ * @since 1.1
847
+ * @param int|string $id_or_email
848
+ * @param int|string $size
849
+ * @param string $align
850
+ * @uses get_wp_user_avatar()
851
+ * @return string
852
+ */
853
+ public function get_wp_user_avatar_src( $id_or_email = '', $size = '', $align = '' ) {
854
+ $wpua_image_src = '';
855
+
856
+ // Gets the avatar img tag
857
+ $wpua_image = get_wp_user_avatar( $id_or_email, $size, $align );
858
+
859
+ // Takes the img tag, extracts the src
860
+ if ( ! empty( $wpua_image ) ) {
861
+ preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $wpua_image, $matches, PREG_SET_ORDER );
862
+
863
+ $wpua_image_src = ! empty ( $matches ) ? $matches[0][1] : '';
864
+ }
865
+
866
+ return $wpua_image_src;
867
+ }
868
+ }
869
+
870
+ /**
871
+ * Initialize
872
+ * @since 1.9.2
873
+ */
874
+ function wpua_functions_init() {
875
+ global $wpua_functions;
876
+
877
+ if ( ! isset( $wpua_functions ) ) {
878
+ $wpua_functions = new WP_User_Avatar_Functions();
879
+ }
880
+
881
+ return $wpua_functions;
882
+ }
883
+ add_action( 'plugins_loaded', 'wpua_functions_init' );
includes/class-wp-user-avatar-list-table.php ADDED
@@ -0,0 +1,567 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Based on WP_Media_List_Table class.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_List_Table extends WP_List_Table {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @param array $args
22
+ * @uses array $avatars
23
+ * @uses object $post
24
+ * @uses int $wpua_avatar_default
25
+ * @uses get_query_var()
26
+ * @uses have_posts()
27
+ * @uses the_post()
28
+ * @uses wp_edit_attachments_query
29
+ * @uses WP_Query()
30
+ * @uses wp_reset_query()
31
+ */
32
+ public function __construct( $args = array() ) {
33
+ global $avatars, $post, $wpua_avatar_default;
34
+
35
+ $paged = ( get_query_var('page') ) ? get_query_var(' page' ) : 1;
36
+
37
+ $q = array(
38
+ 'paged' => $paged,
39
+ 'post_type' => 'attachment',
40
+ 'post_status' => 'inherit',
41
+ 'posts_per_page' => '-1',
42
+ 'meta_query' => array(
43
+ array(
44
+ 'key' => '_wp_attachment_wp_user_avatar',
45
+ 'value' => '',
46
+ 'compare' => '!='
47
+ ),
48
+ ),
49
+ );
50
+
51
+ $avatars_wp_query = new WP_Query( $q );
52
+
53
+ $avatars = array();
54
+
55
+ while ( $avatars_wp_query->have_posts() ) {
56
+ $avatars_wp_query->the_post();
57
+
58
+ $avatars[] = $post->ID;
59
+ }
60
+
61
+ wp_reset_query();
62
+
63
+ // Include default avatar
64
+ $avatars[] = $wpua_avatar_default;
65
+
66
+ parent::__construct( array(
67
+ 'plural' => 'media',
68
+ 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
69
+ ) );
70
+ }
71
+
72
+ /**
73
+ * Only users with edit_users capability can use this section
74
+ * @since 1.8
75
+ * @uses current_user_can()
76
+ */
77
+ public function ajax_user_can() {
78
+ return current_user_can( 'edit_users' );
79
+ }
80
+
81
+ /**
82
+ * Search form
83
+ * @since 1.8
84
+ * @param string $text
85
+ * @param int $input_id
86
+ * @uses _admin_search_query()
87
+ * @uses has_items()
88
+ * @uses submit_button()
89
+ */
90
+ public function search_box( $text, $input_id ) {
91
+ if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
92
+ return;
93
+ }
94
+
95
+ $input_id = $input_id . '-search-input';
96
+
97
+ if ( ! empty( $_REQUEST['orderby'] ) ) {
98
+ printf( '<input type="hidden" name="orderby" value="%s" />', esc_attr( $_REQUEST['orderby'] ) );
99
+ }
100
+
101
+ if ( ! empty( $_REQUEST['order'] ) ) {
102
+ printf( '<input type="hidden" name="order" value="%s" />', esc_attr( $_REQUEST['order'] ) );
103
+ }
104
+ if ( ! empty( $_REQUEST['post_mime_type'] ) ) {
105
+ printf( '<input type="hidden" name="post_mime_type" value="%s" />', esc_attr( $_REQUEST['post_mime_type'] ) );
106
+ }
107
+ if ( ! empty( $_REQUEST['detached'] ) ) {
108
+ printf( '<input type="hidden" name="detached" value="%s" />', esc_attr( $_REQUEST['detached'] ) );
109
+ }
110
+ ?>
111
+
112
+ <p class="search-box">
113
+ <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
114
+
115
+ <input type="hidden" id="page" name="page" value="wp-user-avatar-library" />
116
+
117
+ <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
118
+
119
+ <?php submit_button( $text, 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
120
+ </p>
121
+
122
+ <?php
123
+ }
124
+
125
+ /**
126
+ * Return only avatars and paginate results
127
+ * @since 1.8
128
+ * @uses array $avatars
129
+ * @uses wp_edit_attachments_query()
130
+ */
131
+ public function prepare_items() {
132
+ global $avail_post_mime_types, $avatars, $lost, $post, $post_mime_types, $wp_query, $wpdb;
133
+
134
+ $q = $_REQUEST;
135
+
136
+ if ( ! is_array( $q ) ) {
137
+ $q = array();
138
+ }
139
+
140
+ $q['post__in'] = $avatars;
141
+
142
+ list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $q );
143
+
144
+ $this->is_trash = isset( $_REQUEST['status'] ) && 'trash' == $_REQUEST['status'];
145
+
146
+ $this->set_pagination_args( array(
147
+ 'total_items' => $wp_query->found_posts,
148
+ 'total_pages' => $wp_query->max_num_pages,
149
+ 'per_page' => $wp_query->query_vars['posts_per_page'],
150
+ ) );
151
+ }
152
+
153
+ /**
154
+ * Links to available table views
155
+ * @since 1.8
156
+ * @uses array $avatars
157
+ * @uses add_query_arg()
158
+ * @uses number_format_i18n()
159
+ * @return array
160
+ */
161
+ public function get_views() {
162
+ global $avatars;
163
+
164
+ $type_links = array();
165
+ $_total_posts = count( array_filter( $avatars ) );
166
+ $class = ( empty( $_GET['post_mime_type'] ) && ! isset( $_GET['status'] ) ) ? ' class="current"' : '';
167
+
168
+ $type_links['all'] = sprintf(
169
+ ' <a href="%s">',
170
+ esc_url( add_query_arg( array(
171
+ 'page' => 'wp-user-avatar-library',
172
+ ), 'admin.php') )
173
+ );
174
+ $type_links['all'] .= sprintf(
175
+ /* translators: uploaded files */
176
+ _x( 'All %s', 'uploaded files', 'one-user-avatar' ),
177
+ sprintf( '<span class="count">(%s)</span>', number_format_i18n( $_total_posts ) )
178
+ );
179
+ $type_links['all'] .= '</a>';
180
+
181
+ return $type_links;
182
+ }
183
+
184
+ /**
185
+ * Bulk action available with this table
186
+ * @since 1.8
187
+ * @return array
188
+ */
189
+ public function get_bulk_actions() {
190
+ $actions = array();
191
+
192
+ $actions['delete'] = __( 'Delete Permanently','one-user-avatar' );
193
+
194
+ return $actions;
195
+ }
196
+
197
+ /**
198
+ * Current action from bulk actions list
199
+ * @since 1.8
200
+ * @uses current_action()
201
+ * @return string|bool
202
+ */
203
+ public function current_action() {
204
+ return parent::current_action();
205
+ }
206
+
207
+ /**
208
+ * Checks whether table has items
209
+ * @since 1.8
210
+ * @uses have_posts()
211
+ * @return bool
212
+ */
213
+ public function has_items() {
214
+ return have_posts();
215
+ }
216
+
217
+ /**
218
+ * Message displayed when no items
219
+ * @since 1.8
220
+ */
221
+ public function no_items() {
222
+ _e( 'No media attachments found.', 'one-user-avatar' );
223
+ }
224
+
225
+ /**
226
+ * Columns in this table
227
+ * @since 1.8
228
+ * @return array
229
+ */
230
+ public function get_columns() {
231
+ $columns = array();
232
+
233
+ $columns['cb'] = '<input type="checkbox" />';
234
+ $columns['icon'] = '';
235
+ $columns['title'] = _x( 'File', 'column name', 'one-user-avatar' );
236
+ $columns['author'] = __( 'Author','one-user-avatar', 'one-user-avatar' );
237
+ $columns['parent'] = _x( 'Uploaded to', 'column name', 'one-user-avatar' );
238
+ $columns['date'] = _x( 'Date', 'column name', 'one-user-avatar' );
239
+
240
+ return $columns;
241
+ }
242
+
243
+ /**
244
+ * Sortable columns in this table
245
+ * @since 1.8
246
+ * @return array
247
+ */
248
+ public function get_sortable_columns() {
249
+ return array(
250
+ 'title' => 'title',
251
+ 'author' => 'author',
252
+ 'date' => array( 'date', true ),
253
+ );
254
+ }
255
+
256
+ /**
257
+ * Display for rows in table
258
+ * @since 1.8
259
+ * @uses object $post
260
+ * @uses object $wpdb
261
+ * @uses object $wpua_functions
262
+ * @uses add_filter()
263
+ * @uses _draft_or_post_title()
264
+ * @uses _media_states()
265
+ * @uses current_user_can()
266
+ * @uses get_attached_file()
267
+ * @uses get_current_user_id()
268
+ * @uses get_edit_post_link()
269
+ * @uses get_edit_user_link()
270
+ * @uses get_post_mime_type()
271
+ * @uses get_the_author()
272
+ * @uses get_the_author_meta()
273
+ * @uses get_userdata()
274
+ * @uses have_posts()
275
+ * @uses the_post()
276
+ * @uses wpua_get_attachment_image()
277
+ */
278
+ public function display_rows() {
279
+ global $post, $wpdb, $wpua_functions;
280
+
281
+ add_filter( 'the_title','esc_html' );
282
+
283
+ $alt = '';
284
+
285
+ while ( have_posts() ) :
286
+ the_post();
287
+
288
+ $user_can_edit = current_user_can( 'edit_post', $post->ID );
289
+
290
+ if ( $this->is_trash && 'trash' != $post->post_status || ! $this->is_trash && 'trash' == $post->post_status ) {
291
+ continue;
292
+ }
293
+
294
+ $alt = ( 'alternate' == $alt ) ? '' : 'alternate';
295
+ $post_owner = (get_current_user_id() == $post->post_author) ? 'self' : 'other';
296
+ $tr_class = trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status );
297
+ $att_title = _draft_or_post_title();
298
+ ?>
299
+
300
+ <tr id="post-<?php echo esc_attr( $post->ID ); ?>" class="<?php echo esc_attr( $tr_class ); ?>" valign="top">
301
+ <?php
302
+ list( $columns, $hidden ) = $this->get_column_info();
303
+
304
+ foreach ( $columns as $column_name => $column_display_name ) {
305
+ $class = sprintf( 'class="%1$s column-%1$s"', esc_attr( $column_name ) );
306
+ $style = '';
307
+
308
+ if ( in_array( $column_name, $hidden ) ) {
309
+ $style = ' style="display:none;"';
310
+ }
311
+
312
+ $attributes = $class . $style;
313
+
314
+ switch ( $column_name ) {
315
+ case 'cb':
316
+ ?>
317
+
318
+ <th scope="row" class="check-column">
319
+ <?php if ( $user_can_edit ) : ?>
320
+ <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
321
+ <?php
322
+ /* translators: post title */
323
+ printf( __( 'Select %s','one-user-avatar' ), $att_title );
324
+ ?>
325
+ </label>
326
+
327
+ <input type="checkbox" name="media[]" id="cb-select-<?php the_ID(); ?>" value="<?php the_ID(); ?>" />
328
+ <?php endif; ?>
329
+ </th>
330
+
331
+ <?php
332
+ break;
333
+
334
+ case 'icon':
335
+ $attributes = 'class="column-icon media-icon"' . $style;
336
+ ?>
337
+
338
+ <td <?php echo $attributes ?>>
339
+ <?php
340
+ if ( $thumb = $wpua_functions->wpua_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) {
341
+ if ( $this->is_trash || ! $user_can_edit ) {
342
+ echo $thumb;
343
+ } else {
344
+ ?>
345
+ <a href="<?php echo get_edit_post_link( $post->ID, true ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit %s' ), sprintf( '&#8220;%s&#8221;', $att_title ) ) ); ?>">
346
+ <?php echo $thumb; ?>
347
+ </a>
348
+ <?php
349
+ }
350
+ }
351
+ ?>
352
+ </td>
353
+
354
+ <?php
355
+ break;
356
+
357
+ case 'title':
358
+ ?>
359
+
360
+ <td <?php echo $attributes ?>>
361
+ <strong>
362
+ <?php
363
+ if ( $this->is_trash || ! $user_can_edit ) {
364
+ echo $att_title;
365
+ } else {
366
+ ?>
367
+ <a
368
+ href="<?php echo get_edit_post_link( $post->ID, true ); ?>"
369
+ title="<?php echo esc_attr( sprintf( __( 'Edit %s' ), sprintf( '&#8220;%s&#8221;', $att_title ) ) ); ?>"
370
+ >
371
+ <?php echo $att_title; ?>
372
+ </a>
373
+ <?php
374
+ }
375
+
376
+ _media_states( $post );
377
+ ?>
378
+ </strong>
379
+
380
+ <p>
381
+ <?php
382
+ if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) ) {
383
+ echo esc_html( strtoupper( $matches[1] ) );
384
+ } else {
385
+ echo strtoupper( str_replace('image/', '', get_post_mime_type() ) );
386
+ }
387
+ ?>
388
+ </p>
389
+
390
+ <?php echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) ); ?>
391
+ </td>
392
+
393
+ <?php
394
+ break;
395
+
396
+ case 'author':
397
+ ?>
398
+
399
+ <td <?php echo $attributes ?>>
400
+ <?php
401
+ printf(
402
+ '<a href="%s">%s</a>',
403
+ esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ),
404
+ get_the_author()
405
+ );
406
+ ?>
407
+ </td>
408
+
409
+ <?php
410
+ break;
411
+
412
+ case 'date':
413
+ if( '0000-00-00 00:00:00' == $post->post_date ) {
414
+ $h_time = __( 'Unpublished','one-user-avatar' );
415
+ } else {
416
+ $m_time = $post->post_date;
417
+ $time = get_post_time( 'G', true, $post, false );
418
+ if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) {
419
+ if ( 0 > $t_diff ) {
420
+ $h_time = sprintf(
421
+ /* translators: time from now */
422
+ _x( '%s from now', 'time from now', 'one-user-avatar' ),
423
+ human_time_diff( $time)
424
+ );
425
+ } else {
426
+ $h_time = sprintf(
427
+ /* translators: time ago */
428
+ _x( '%s ago', 'time ago', 'one-user-avatar' ),
429
+ human_time_diff( $time )
430
+ );
431
+ }
432
+ } else {
433
+ $h_time = mysql2date( __( 'Y/m/d', 'one-user-avatar' ), $m_time );
434
+ }
435
+ }
436
+ ?>
437
+
438
+ <td <?php echo $attributes ?>><?php echo $h_time ?></td>
439
+
440
+ <?php
441
+ break;
442
+
443
+ case 'parent':
444
+ global $blog_id, $wpdb;
445
+
446
+ // Find all users with this WPUA
447
+ $wpua_metakey = $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar';
448
+ $wpuas = $wpdb->get_results( $wpdb->prepare(
449
+ "SELECT wpum.user_id FROM $wpdb->usermeta AS wpum, $wpdb->users AS wpu WHERE wpum.meta_key = %s AND wpum.meta_value = %d AND wpum.user_id = wpu.ID ORDER BY wpu.user_login",
450
+ $wpua_metakey,
451
+ $post->ID
452
+ ) );
453
+
454
+ // Find users without WPUA
455
+ $nowpuas = $wpdb->get_results( $wpdb->prepare(
456
+ "SELECT wpu.ID FROM $wpdb->users AS wpu, $wpdb->usermeta AS wpum WHERE wpum.meta_key = %s AND wpum.meta_value = %d AND wpum.user_id = wpu.ID ORDER BY wpu.user_login",
457
+ $wpua_metakey,
458
+ ''
459
+ ) );
460
+
461
+ $user_array = array();
462
+ ?>
463
+
464
+ <td <?php echo $attributes ?>>
465
+ <strong>
466
+ <?php
467
+ if ( ! empty( $wpuas ) ) {
468
+ foreach ( $wpuas as $usermeta ) {
469
+ $user = get_userdata( $usermeta->user_id );
470
+ $user_array[] = sprintf(
471
+ '<a href="%s">%s</a>',
472
+ get_edit_user_link( $user->ID ),
473
+ $user->user_login
474
+ );
475
+ }
476
+ } else {
477
+ foreach ( $nowpuas as $usermeta ) {
478
+ $user = get_userdata($usermeta->ID);
479
+ $user_array[] = sprintf(
480
+ '<a href="%s">%s</a>',
481
+ get_edit_user_link($user->ID),
482
+ $user->user_login
483
+ );
484
+ }
485
+ }
486
+
487
+ echo implode( ', ', array_filter( $user_array ) );
488
+ ?>
489
+ </strong>
490
+ </td>
491
+
492
+ <?php
493
+ break;
494
+ }
495
+ }
496
+ ?>
497
+
498
+ </tr>
499
+
500
+ <?php
501
+ endwhile;
502
+ }
503
+
504
+ /**
505
+ * Actions for rows in table
506
+ * @since 1.8
507
+ * @uses object $post
508
+ * @uses string $att_title
509
+ * @uses _draft_or_post_title()
510
+ * @uses current_user_can()
511
+ * @uses get_edit_post_link()
512
+ * @uses get_permalink()
513
+ * @uses wp_nonce_url()
514
+ * @return array
515
+ */
516
+ public function _get_row_actions( $post, $att_title ) {
517
+ $actions = array();
518
+
519
+ if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) {
520
+ $actions['edit'] = sprintf(
521
+ '<a href="%s">%s</a>',
522
+ get_edit_post_link( $post->ID, true ),
523
+ __( 'Edit', 'one-user-avatar' )
524
+ );
525
+ }
526
+
527
+ if ( current_user_can( 'delete_post', $post->ID ) ) {
528
+ if ( $this->is_trash ) {
529
+ $actions['untrash'] = sprintf(
530
+ '<a class="submitdelete" href="%s">%s</a>',
531
+ wp_nonce_url( sprintf( 'post.php?action=untrash&amp;post=%s', $post->ID ), 'untrash-post_' . $post->ID ),
532
+ __( 'Restore', 'one-user-avatar' )
533
+ );
534
+ } elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
535
+ $actions['trash'] = sprintf(
536
+ '<a class="submitdelete" href="%s">%s</a>',
537
+ wp_nonce_url( sprintf( 'post.php?action=trash&amp;post=%s', $post->ID ), 'trash-post_' . $post->ID),
538
+ __( 'Trash', 'one-user-avatar' )
539
+ );
540
+ }
541
+
542
+ if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
543
+ $delete_ays = ( ! $this->is_trash && ! MEDIA_TRASH ) ? ' onclick="return showNotice.warn();"' : '';
544
+
545
+ $actions['delete'] = sprintf(
546
+ '<a class="submitdelete"%s href="%s">%s</a>',
547
+ $delete_ays,
548
+ wp_nonce_url( sprintf( 'post.php?action=delete&amp;post=%s', $post->ID ), 'delete-post_'.$post->ID ),
549
+ __( 'Delete Permanently', 'one-user-avatar' )
550
+ );
551
+ }
552
+ }
553
+
554
+ if ( ! $this->is_trash ) {
555
+ $title = _draft_or_post_title( $post->post_parent );
556
+
557
+ $actions['view'] = sprintf(
558
+ '<a href="%s" title="%s" rel="permalink">%s</a>',
559
+ get_permalink( $post->ID ),
560
+ esc_attr( sprintf( __( 'View %s' ), sprintf( '&#8220;%s&#8221;', $title ) ) ),
561
+ __( 'View', 'one-user-avatar' )
562
+ );
563
+ }
564
+
565
+ return $actions;
566
+ }
567
+ }
includes/class-wp-user-avatar-resource-manager.php ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Move body CSS to head and JS to footer.
4
+ * Borrowed from NextGEN Gallery C_Photocrati_Resource_Manager class.
5
+ *
6
+ * @package One User Avatar
7
+ * @author Bangbay Siboliban
8
+ * @author Flippercode
9
+ * @author ProfilePress
10
+ * @author One Designs
11
+ * @copyright 2013-2014 Bangbay Siboliban
12
+ * @copyright 2014-2020 Flippercode
13
+ * @copyright 2020-2021 ProfilePress
14
+ * @copyright 2021 One Designs
15
+ * @version 2.3.2
16
+ */
17
+
18
+ class WP_User_Avatar_Resource_Manager {
19
+ static $instance = null;
20
+
21
+ public $marker = '<!-- wp_user_avatar_resource_manager_marker -->';
22
+
23
+ var $buffer = '';
24
+ var $styles = '';
25
+ var $other_output = '';
26
+ var $wrote_footer = false;
27
+ var $run_shutdown = false;
28
+ var $valid_request = true;
29
+
30
+ /**
31
+ * Start buffering all generated output. We'll then do two things with the buffer
32
+ * 1) Find stylesheets lately enqueued and move them to the header
33
+ * 2) Ensure that wp_print_footer_scripts() is called
34
+ * @since 1.9.5
35
+ */
36
+ function __construct() {
37
+ // Validate the request
38
+ $this->validate_request();
39
+
40
+ add_action( 'init', array( &$this, 'start_buffer' ), 1 );
41
+ add_action( 'wp_footer', array( &$this, 'print_marker' ), -1 );
42
+ }
43
+
44
+ /**
45
+ * Created early as possible in the wp_footer action this is the string to which we
46
+ * will move JS resources after
47
+ * @since 1.9.8
48
+ */
49
+ function print_marker() {
50
+ print $this->marker;
51
+ }
52
+
53
+ /**
54
+ * Determines if the resource manager should perform its routines for this request
55
+ * @since 1.9.5
56
+ * @return bool
57
+ */
58
+ function validate_request() {
59
+ $retval = true;
60
+
61
+ if ( is_admin() ) {
62
+ if ( isset($_REQUEST['page'] ) && ! preg_match( "#^(wp_user_avatar)#", $_REQUEST['page'] ) ) {
63
+ $retval = false;
64
+ }
65
+ }
66
+
67
+ if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp-admin/update') ) {
68
+ $retval = false;
69
+ } elseif ( isset( $_GET['display_gallery_iframe'] ) ) {
70
+ $retval = false;
71
+ } elseif ( defined( 'WP_ADMIN' ) && WP_ADMIN && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
72
+ $retval = false;
73
+ } elseif ( preg_match( "/(js|css|xsl|xml|kml)$/", $_SERVER['REQUEST_URI'] ) ) {
74
+ $retval = false;
75
+ } elseif ( preg_match( "/\\.(\\w{3,4})$/", $_SERVER['REQUEST_URI'], $match ) ) {
76
+ if ( ! in_array( $match[1], array( 'htm', 'html', 'php' ) ) ) {
77
+ $retval = false;
78
+ }
79
+ }
80
+
81
+ $this->valid_request = $retval;
82
+ }
83
+
84
+ /**
85
+ * Start the output buffers
86
+ * @since 1.9.5
87
+ */
88
+ function start_buffer() {
89
+ if( defined( 'WPUA_DISABLE_RESOURCE_MANAGER' ) && WPUA_DISABLE_RESOURCE_MANAGER ) {
90
+ return;
91
+ }
92
+
93
+ if ( apply_filters('run_wpua_resource_manager', $this->valid_request ) ) {
94
+ ob_start( array( &$this, 'output_buffer_handler' ) );
95
+ ob_start( array( &$this, 'get_buffer' ) );
96
+
97
+ add_action( 'wp_print_footer_scripts', array( &$this, 'get_resources'), 1 );
98
+ add_action( 'admin_print_footer_scripts', array( &$this, 'get_resources'), 1 );
99
+
100
+ add_action( 'shutdown', array( &$this, 'shutdown' ) );
101
+ }
102
+ }
103
+
104
+ /**
105
+ * @since 1.9.5
106
+ */
107
+ function get_resources() {
108
+ ob_start();
109
+
110
+ wp_print_styles();
111
+
112
+ print_admin_styles();
113
+
114
+ $this->styles = ob_get_clean();
115
+
116
+ if ( ! is_admin() ) {
117
+ ob_start();
118
+
119
+ wp_print_scripts();
120
+
121
+ $this->scripts = ob_get_clean();
122
+ }
123
+
124
+ $this->wrote_footer = true;
125
+ }
126
+
127
+ /**
128
+ * Output the buffer after PHP execution has ended (but before shutdown)
129
+ * @since 1.9.5
130
+ * @param string $content
131
+ * @return string
132
+ */
133
+ function output_buffer_handler($content) {
134
+ return $this->output_buffer();
135
+ }
136
+
137
+ /**
138
+ * Removes the closing </html> tag from the output buffer. We'll then write our own closing tag
139
+ * in the shutdown function after running wp_print_footer_scripts()
140
+ * @since 1.9.5
141
+ * @param string $content
142
+ * @return mixed
143
+ */
144
+ function get_buffer($content) {
145
+ $this->buffer = $content;
146
+
147
+ return '';
148
+ }
149
+
150
+
151
+ /**
152
+ * Moves resources to their appropriate place
153
+ * @since 1.9.5
154
+ */
155
+ function move_resources() {
156
+ if ( $this->valid_request ) {
157
+ // Move stylesheets to head
158
+ if ( $this->styles ) {
159
+ $this->buffer = str_ireplace( '</head>', $this->styles . '</head>', $this->buffer );
160
+ }
161
+
162
+ // Move the scripts to the bottom of the page
163
+ if ( $this->scripts ) {
164
+ $this->buffer = str_ireplace( $this->marker, $this->marker.$this->scripts, $this->buffer );
165
+ }
166
+
167
+ if( $this->other_output ) {
168
+ $this->buffer = str_replace( $this->marker, $this->marker.$this->other_output, $this->buffer );
169
+ }
170
+ }
171
+ }
172
+
173
+ /**
174
+ * When PHP has finished, we output the footer scripts and closing tags
175
+ * @since 1.9.5
176
+ */
177
+ function output_buffer( $in_shutdown = false ) {
178
+ // If the footer scripts haven't been outputted, then
179
+ // we need to take action - as they're required
180
+ if ( ! $this->wrote_footer ) {
181
+ // If W3TC is installed and activated, we can't output the
182
+ // scripts and manipulate the buffer, so we can only provide a warning
183
+ if ( defined( 'W3TC' ) && defined( 'WP_DEBUG' ) && WP_DEBUG && ! is_admin() ) {
184
+ if ( ! defined( 'DONOTCACHEPAGE' ) ) {
185
+ define( 'DONOTCACHEPAGE', true );
186
+ }
187
+
188
+ error_log( sprintf(
189
+ /* translators: either wp_footer() or wp_print_footer_scripts() hook. */
190
+ __( "We're sorry, but your theme's page template didn't make a call to %s, which is required by One User Avatar. Please add this call to your page templates.", 'one-user-avatar' ),
191
+ ( did_action( 'wp_footer' ) ? 'wp_print_footer_scripts()' : 'wp_footer()' )
192
+ ) );
193
+ // We don't want to manipulate the buffer if it doesn't contain HTML
194
+ } elseif ( false === strpos( $this->buffer, '</body>' ) ) {
195
+ $this->valid_request = false;
196
+ }
197
+
198
+ // The output_buffer() function has been called in the PHP shutdown callback
199
+ // This will allow us to print the scripts ourselves and manipulate the buffer
200
+ if ( true === $in_shutdown ) {
201
+ ob_start();
202
+
203
+ if ( ! did_action( 'wp_footer' ) ) {
204
+ wp_footer();
205
+ } else {
206
+ wp_print_footer_scripts();
207
+ }
208
+
209
+ $this->other_output = ob_get_clean();
210
+ }
211
+
212
+ // W3TC isn't activated and we're not in the shutdown callback.
213
+ // We'll therefore add a shutdown callback to print the scripts
214
+ else {
215
+ $this->run_shutdown = true;
216
+
217
+ return '';
218
+ }
219
+ }
220
+
221
+ // Once we have the footer scripts, we can modify the buffer and
222
+ // move the resources around
223
+ if ( $this->wrote_footer ) {
224
+ $this->move_resources();
225
+ }
226
+
227
+ return $this->buffer;
228
+ }
229
+
230
+ /**
231
+ * PHP shutdown callback. Manipulate and output the buffer
232
+ * @since 1.9.5
233
+ */
234
+ function shutdown() {
235
+ if ( $this->run_shutdown ) {
236
+ echo $this->output_buffer( true );
237
+ }
238
+ }
239
+
240
+ /**
241
+ * @since 1.9.5
242
+ */
243
+ static function init() {
244
+ $klass = get_class();
245
+
246
+ return self::$instance = new $klass;
247
+ }
248
+ }
includes/class-wp-user-avatar-setup.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Let's get started!
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Setup {
18
+ /**
19
+ * Constructor
20
+ * @since 1.9.2
21
+ */
22
+ public function __construct() {
23
+ $this->_define_constants();
24
+ $this->_load_wp_includes();
25
+ $this->_load_wpua();
26
+ }
27
+
28
+ /**
29
+ * Define paths
30
+ * @since 1.9.2
31
+ */
32
+ private function _define_constants() {
33
+ define( 'WPUA_VERSION', '2.3.2' );
34
+ define( 'WPUA_FOLDER', basename( dirname( One_User_Avatar::plugin_file_path() ) ) );
35
+ define( 'WPUA_DIR', One_User_Avatar::plugin_dir_path() );
36
+ define( 'WPUA_INC', WPUA_DIR . 'includes' . '/' );
37
+ define( 'WPUA_URL', plugin_dir_url( WPUA_FOLDER ) . WPUA_FOLDER . '/' );
38
+ define( 'WPUA_ASSETS_URL', WPUA_URL . 'assets'.'/' );
39
+ define( 'WPUA_CSS_URL', WPUA_ASSETS_URL . 'css'.'/' );
40
+ define( 'WPUA_JS_URL', WPUA_ASSETS_URL . 'js'.'/' );
41
+ define( 'WPUA_IMG_URL', WPUA_ASSETS_URL . 'images'.'/' );
42
+ define( 'WPUA_INC_URL', WPUA_URL . 'includes'.'/' );
43
+ }
44
+
45
+ /**
46
+ * WordPress includes used in plugin
47
+ * @since 1.9.2
48
+ * @uses is_admin()
49
+ */
50
+ private function _load_wp_includes() {
51
+ if ( ! is_admin() ) {
52
+ // wp_handle_upload
53
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
54
+
55
+ // wp_generate_attachment_metadata
56
+ require_once( ABSPATH . 'wp-admin/includes/image.php' );
57
+
58
+ // image_add_caption
59
+ require_once( ABSPATH . 'wp-admin/includes/media.php' );
60
+
61
+ // submit_button
62
+ require_once( ABSPATH . 'wp-admin/includes/template.php' );
63
+ }
64
+
65
+ // add_screen_option
66
+ require_once( ABSPATH . 'wp-admin/includes/screen.php' );
67
+ }
68
+
69
+ /**
70
+ * Load One User Avatar
71
+ * @since 1.9.2
72
+ * @uses bool $wpua_tinymce
73
+ * @uses is_admin()
74
+ */
75
+ private function _load_wpua() {
76
+ global $wpua_tinymce;
77
+
78
+ require_once( WPUA_INC . 'wpua-globals.php' );
79
+ require_once( WPUA_INC . 'wpua-functions.php' );
80
+ require_once( WPUA_INC . 'class-wp-user-avatar-admin.php' );
81
+ require_once( WPUA_INC . 'class-wp-user-avatar.php' );
82
+ require_once( WPUA_INC . 'class-wp-user-avatar-functions.php' );
83
+ require_once( WPUA_INC . 'class-wp-user-avatar-shortcode.php' );
84
+ require_once( WPUA_INC . 'class-wp-user-avatar-subscriber.php' );
85
+ require_once( WPUA_INC . 'class-wp-user-avatar-update.php' );
86
+ require_once( WPUA_INC . 'class-wp-user-avatar-widget.php' );
87
+
88
+ // Load TinyMCE only if enabled
89
+ if ( 1 == (bool) $wpua_tinymce ) {
90
+ require_once( WPUA_INC.'wpua-tinymce.php' );
91
+ }
92
+ }
93
+ }
94
+
95
+ function wp_user_avatar_setup() {
96
+ global $wp_user_avatar_setup;
97
+
98
+ if ( ! isset( $wp_user_avatar_setup ) ) {
99
+ $wp_user_avatar_setup = new WP_User_Avatar_Setup();
100
+ }
101
+
102
+ return $wp_user_avatar_setup;
103
+ }
104
+
105
+ /**
106
+ * Initialize
107
+ */
108
+ wp_user_avatar_setup();
includes/class-wp-user-avatar-shortcode.php ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Defines shortcodes.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Shortcode {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses object $wp_user_avatar
22
+ * @uses add_action()
23
+ * @uses add_shortcode()
24
+ */
25
+ public function __construct() {
26
+ global $wp_user_avatar;
27
+
28
+ add_shortcode( 'avatar', array( $this, 'wpua_shortcode' ) );
29
+ add_shortcode( 'avatar_upload', array( $this, 'wpua_edit_shortcode' ) );
30
+
31
+ // Add avatar and scripts to avatar_upload
32
+ add_action( 'wpua_show_profile', array( $wp_user_avatar, 'wpua_action_show_user_profile' ) );
33
+ add_action( 'wpua_show_profile', array( $wp_user_avatar, 'wpua_media_upload_scripts' ) );
34
+ add_action( 'wpua_update', array( $wp_user_avatar, 'wpua_action_process_option_update' ) );
35
+
36
+ // Add error messages to avatar_upload
37
+ add_action( 'wpua_update_errors', array( $wp_user_avatar, 'wpua_upload_errors' ), 10, 3 );
38
+ }
39
+
40
+ /**
41
+ * Display shortcode
42
+ * @since 1.4
43
+ * @param array $atts
44
+ * @param string $content
45
+ * @uses array $_wp_additional_image_sizes
46
+ * @uses array $all_sizes
47
+ * @uses int $blog_id
48
+ * @uses object $post
49
+ * @uses object $wpdb
50
+ * @uses do_shortcode()
51
+ * @uses get_attachment_link()
52
+ * @uses get_blog_prefix()
53
+ * @uses get_option()
54
+ * @uses get_user_by()
55
+ * @uses get_query_var()
56
+ * @uses get_the_author_meta()
57
+ * @uses get_user_meta()
58
+ * @uses get_wp_user_avatar_src()
59
+ * @uses get_wp_user_avatar()
60
+ * @uses image_add_caption()
61
+ * @uses is_author()
62
+ * @uses shortcode_atts()
63
+ * @return string
64
+ */
65
+ public function wpua_shortcode( $atts, $content = null ) {
66
+ global $all_sizes, $blog_id, $post, $wpdb;
67
+
68
+ // Set shortcode attributes
69
+ extract( shortcode_atts( array(
70
+ 'user' => '',
71
+ 'size' => '96',
72
+ 'align' => '',
73
+ 'link' => '',
74
+ 'target' => '',
75
+ ), $atts ) );
76
+
77
+ // Find user by ID, login, slug, or e-mail address
78
+ if ( ! empty( $user ) ) {
79
+ if ( 'current' == $user ) {
80
+ $user = wp_get_current_user();
81
+ } else {
82
+ $user = is_numeric( $user ) ? get_user_by( 'id', $user ) : get_user_by('login', $user);
83
+ $user = empty( $user ) ? get_user_by( 'slug', $user ) : $user;
84
+ $user = empty( $user ) ? get_user_by( 'email', $user ) : $user;
85
+ }
86
+ } else {
87
+ // Find author's name if id_or_email is empty
88
+ $author_name = get_query_var( 'author_name' );
89
+
90
+ if( is_author() ) {
91
+ // On author page, get user by page slug
92
+ $user = get_user_by( 'slug', $author_name );
93
+ } else {
94
+ // On post, get user by author meta
95
+ $user_id = get_the_author_meta( 'ID' );
96
+ $user = get_user_by( 'id', $user_id );
97
+ }
98
+ }
99
+
100
+ // Numeric sizes leave as-is
101
+ $get_size = $size;
102
+
103
+ // Check for custom image sizes if there are captions
104
+ if ( ! empty( $content ) ) {
105
+ if ( in_array( $size, $all_sizes ) ) {
106
+ if ( in_array( $size, array( 'original', 'large', 'medium', 'thumbnail' ) ) ) {
107
+ $get_size = ( $size == 'original' ) ? get_option( 'large_size_w' ) : get_option( $size.'_size_w' );
108
+ } else {
109
+ $get_size = $_wp_additional_image_sizes[$size]['width'];
110
+ }
111
+ }
112
+ }
113
+
114
+ // Get user ID
115
+ $id_or_email = ! empty( $user ) ? $user->ID : 'unknown@gravatar.com';
116
+
117
+ // Check if link is set
118
+ if ( ! empty( $link ) ) {
119
+ // CSS class is same as link type, except for URL
120
+ $link_class = $link;
121
+
122
+ if( 'file' == $link ) {
123
+ // Get image src
124
+ $link = get_wp_user_avatar_src( $id_or_email, 'original' );
125
+ } elseif($link == 'attachment') {
126
+ // Get attachment URL
127
+ $link = get_attachment_link( get_the_author_meta( $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', $id_or_email ) );
128
+ } else {
129
+ // URL
130
+ $link_class = 'custom';
131
+ }
132
+
133
+ // Open in new window
134
+ $target_link = ! empty( $target ) ? sprintf( ' target="%s"', $target ) : '';
135
+
136
+ // Wrap the avatar inside the link
137
+ $html = sprintf(
138
+ '<a href="%s" class="wp-user-avatar-link wp-user-avatar-%s"%s>%s</a>',
139
+ esc_attr( $link ),
140
+ esc_attr( $link_class ),
141
+ $target_link,
142
+ get_wp_user_avatar( $id_or_email, $get_size, $align )
143
+ );
144
+ } else {
145
+ $html = get_wp_user_avatar( $id_or_email, $get_size, $align );
146
+ }
147
+
148
+ // Check if caption is set
149
+ if(!empty($content)) {
150
+ // Get attachment ID
151
+ $wpua = get_user_meta( $id_or_email, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', true );
152
+
153
+ // Clean up caption
154
+ $content = trim($content);
155
+ $content = preg_replace( '/\r|\n/', '', $content );
156
+ $content = preg_replace( '/<\/p><p>/', '', $content, 1 );
157
+ $content = preg_replace( '/<\/p><p>$/', '', $content );
158
+ $content = str_replace( '</p><p>', '<br /><br />', $content );
159
+
160
+ $avatar = do_shortcode(image_add_caption($html, $wpua, $content, $title="", $align, $link, $get_size, $alt=""));
161
+ } else {
162
+ $avatar = $html;
163
+ }
164
+
165
+ return $avatar;
166
+ }
167
+
168
+ /**
169
+ * Update user
170
+ * @since 1.8
171
+ * @param bool $user_id
172
+ * @uses add_query_arg()
173
+ * @uses apply_filters()
174
+ * @uses do_action_ref_array()
175
+ * @uses wp_get_referer()
176
+ * @uses wp_redirect()
177
+ * @uses wp_safe_redirect()
178
+ */
179
+ private function wpua_edit_user( $user_id = 0 ) {
180
+ $update = $user_id ? true : false;
181
+ $user = new stdClass;
182
+ $errors = new WP_Error();
183
+
184
+ do_action_ref_array( 'wpua_update_errors', array( &$errors, $update, &$user ) );
185
+
186
+ if ( $errors->get_error_codes() ) {
187
+ // Return with errors
188
+ return $errors;
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Edit shortcode
194
+ * @since 1.8
195
+ * @param array $atts
196
+ * @uses $wp_user_avatar
197
+ * @uses $wpua_allow_upload
198
+ * @uses current_user_can()
199
+ * @uses do_action()
200
+ * @uses get_error_messages()
201
+ * @uses get_user_by()
202
+ * @uses is_user_logged_in()
203
+ * @uses is_wp_error()
204
+ * @uses shortcode_atts()
205
+ * @uses wpua_edit_form()
206
+ * @uses wpua_edit_user()
207
+ * @uses wpua_is_author_or_above()
208
+ * @return string
209
+ */
210
+ public function wpua_edit_shortcode( $atts ) {
211
+ global $current_user, $errors, $wp_user_avatar, $wpua_allow_upload;
212
+
213
+ // Shortcode only works for users with permission
214
+ if ( $wp_user_avatar->wpua_is_author_or_above() || ( 1 == (bool) $wpua_allow_upload && is_user_logged_in() ) ) {
215
+ extract( shortcode_atts( array( 'user' => '' ), $atts ) );
216
+
217
+ // Default user is current user
218
+ $valid_user = $current_user;
219
+
220
+ // Find user by ID, login, slug, or e-mail address
221
+ if ( ! empty( $user ) ) {
222
+ $get_user = is_numeric( $user ) ? get_user_by( 'id', $user ) : get_user_by( 'login', $user );
223
+ $get_user = empty( $get_user ) ? get_user_by( 'slug', $user ) : $get_user;
224
+ $get_user = empty( $get_user ) ? get_user_by( 'email', $user ) : $get_user;
225
+
226
+ // Check if current user can edit this user
227
+ $valid_user = current_user_can( 'edit_user', $get_user->ID ) ? $get_user : null;
228
+ }
229
+
230
+ // Show form only for valid user
231
+ if ( $valid_user ) {
232
+ // Save
233
+ if ( isset( $_POST['submit'] ) && $_POST['submit'] && 'update' == $_POST['wpua_action'] ) {
234
+ do_action( 'wpua_update', $valid_user->ID );
235
+
236
+ // Check for errors
237
+ $errors = $this->wpua_edit_user( $valid_user->ID );
238
+
239
+ // Errors
240
+ if ( isset( $errors ) && is_wp_error( $errors ) ) {
241
+ printf( '<div class="error"><p>%s</p></div>', implode( "</p>\n<p>", $errors->get_error_messages() ) );
242
+ } else {
243
+ printf( '<div class="success"><p><strong>%s</strong></p></div>', __( 'Profile updated.', 'one-user-avatar' ) );
244
+ }
245
+ }
246
+
247
+ // Edit form
248
+ return $this->wpua_edit_form( $valid_user );
249
+ }
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Edit form
255
+ * @since 1.8
256
+ * @param object $user
257
+ * @uses do_action()
258
+ * @uses submit_button()
259
+ * @uses wp_nonce_field()
260
+ */
261
+ private function wpua_edit_form($user) {
262
+ ob_start();
263
+ ?>
264
+
265
+ <form id="wpua-edit-<?php echo esc_attr( $user->ID ); ?>" class="wpua-edit" action="" method="post" enctype="multipart/form-data">
266
+ <?php do_action('wpua_show_profile', $user); ?>
267
+
268
+ <input type="hidden" name="wpua_action" value="update" />
269
+ <input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( $user->ID ); ?>" />
270
+
271
+ <?php wp_nonce_field( 'update-user_' . $user->ID ); ?>
272
+
273
+ <?php submit_button( __( 'Update Profile', 'one-user-avatar' ) ); ?>
274
+ </form>
275
+
276
+ <?php
277
+
278
+ return ob_get_clean();
279
+ }
280
+ }
281
+
282
+ /**
283
+ * Initialize
284
+ * @since 1.9.2
285
+ */
286
+ function wpua_shortcode_init() {
287
+ global $wpua_shortcode;
288
+
289
+ if ( ! isset( $wpua_shortcode ) ) {
290
+ $wpua_shortcode = new WP_User_Avatar_Shortcode();
291
+ }
292
+
293
+ return $wpua_shortcode;
294
+ }
295
+ add_action( 'init', 'wpua_shortcode_init' );
includes/class-wp-user-avatar-subscriber.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings only for subscribers and contributors.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Subscriber {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses object $wp_user_avatar
22
+ * @uses bool $wpua_allow_upload
23
+ * @uses add_action()
24
+ * @uses current_user_can()
25
+ * @uses wpua_is_author_or_above()
26
+ */
27
+ public function __construct() {
28
+ global $wpua_allow_upload;
29
+
30
+ if( 1 == (bool) $wpua_allow_upload ) {
31
+ add_action( 'user_edit_form_tag', array( $this, 'wpua_add_edit_form_multipart_encoding' ) );
32
+ }
33
+
34
+ add_action( 'admin_init', array( $this, 'wpua_subscriber_capability' ) );
35
+ }
36
+
37
+ /**
38
+ * Allow multipart data in form
39
+ * @since 1.4.1
40
+ */
41
+ public function wpua_add_edit_form_multipart_encoding() {
42
+ echo ' enctype="multipart/form-data"';
43
+ }
44
+
45
+ /**
46
+ * Give subscribers edit_posts capability
47
+ * @since 1.8.3
48
+ * @uses int $blog_id
49
+ * @uses object $wpdb
50
+ * @uses bool $wpua_allow_upload
51
+ * @uses bool $wpua_edit_avatar
52
+ * @uses get_blog_prefix()
53
+ * @uses get_option()
54
+ * @uses update_option()
55
+ */
56
+ public function wpua_subscriber_capability() {
57
+ global $blog_id, $wpdb, $wpua_allow_upload, $wpua_edit_avatar;
58
+
59
+ $wp_user_roles = $wpdb->get_blog_prefix( $blog_id ) . 'user_roles';
60
+
61
+ $user_roles = get_option( $wp_user_roles );
62
+
63
+ if ( isset( $user_roles['subscriber']['capabilities']['edit_posts'] ) ) {
64
+ unset( $user_roles['subscriber']['capabilities']['edit_posts'] );
65
+ }
66
+
67
+ update_option( $wp_user_roles, $user_roles );
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Initialize
73
+ * @since 1.9.5
74
+ */
75
+ function wpua_subscriber_init() {
76
+ global $wpua_subscriber;
77
+
78
+ if ( ! isset( $wpua_subscriber ) ) {
79
+ $wpua_subscriber = new WP_User_Avatar_Subscriber();
80
+ }
81
+
82
+ return $wpua_subscriber;
83
+ }
84
+ add_action( 'init', 'wpua_subscriber_init' );
includes/class-wp-user-avatar-update.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Updates for legacy settings.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Update {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses bool $wpua_default_avatar_updated
22
+ * @uses bool $wpua_media_updated
23
+ * @uses bool $wpua_users_updated
24
+ * @uses add_action()
25
+ */
26
+ public function __construct() {
27
+ global $wpua_default_avatar_updated, $wpua_media_updated, $wpua_users_updated;
28
+
29
+ if ( empty( $wpua_default_avatar_updated ) ) {
30
+ add_action( 'admin_init', array( $this, 'wpua_default_avatar' ) );
31
+ }
32
+
33
+ if( empty( $wpua_users_updated ) ) {
34
+ add_action( 'admin_init', array( $this, 'wpua_user_meta' ) );
35
+ }
36
+
37
+ if ( empty( $wpua_media_updated ) ) {
38
+ add_action( 'admin_init', array( $this, 'wpua_media_state' ) );
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Update default avatar to new format
44
+ * @since 1.4
45
+ * @uses string $avatar_default
46
+ * @uses string $mustache_original
47
+ * @uses int $wpua_avatar_default
48
+ * @uses update_option()
49
+ * @uses wp_get_attachment_image_src()
50
+ */
51
+ public function wpua_default_avatar() {
52
+ global $avatar_default, $mustache_original, $wpua_avatar_default;
53
+
54
+ // If default avatar is the old mustache URL, update it
55
+ if ( $avatar_default == $mustache_original ) {
56
+ update_option( 'avatar_default', 'wp_user_avatar' );
57
+ }
58
+
59
+ // If user had an image URL as the default avatar, replace with ID instead
60
+ if ( ! empty( $wpua_avatar_default ) ) {
61
+ $wpua_avatar_default_image = wp_get_attachment_image_src( $wpua_avatar_default, 'medium' );
62
+
63
+ if ( $avatar_default == $wpua_avatar_default_image[0] ) {
64
+ update_option( 'avatar_default', 'wp_user_avatar' );
65
+ }
66
+ }
67
+
68
+ update_option( 'wp_user_avatar_default_avatar_updated', '1' );
69
+ }
70
+
71
+ /**
72
+ * Rename user meta to match database settings
73
+ * @since 1.4
74
+ * @uses int $blog_id
75
+ * @uses object $wpdb
76
+ * @uses delete_user_meta()
77
+ * @uses get_blog_prefix()
78
+ * @uses get_user_meta()
79
+ * @uses get_users()
80
+ * @uses update_option()
81
+ * @uses update_user_meta()
82
+ */
83
+ public function wpua_user_meta() {
84
+ global $blog_id, $wpdb;
85
+
86
+ $wpua_metakey = $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar';
87
+
88
+ // If database tables start with something other than wp_
89
+ if ( 'wp_user_avatar' != $wpua_metakey ) {
90
+ $users = get_users();
91
+
92
+ // Move current user metakeys to new metakeys
93
+ foreach ( $users as $user ) {
94
+ $wpua = get_user_meta( $user->ID, 'wp_user_avatar', true );
95
+
96
+ if ( ! empty( $wpua ) ) {
97
+ update_user_meta( $user->ID, $wpua_metakey, $wpua );
98
+ delete_user_meta( $user->ID, 'wp_user_avatar' );
99
+ }
100
+ }
101
+ }
102
+
103
+ update_option( 'wp_user_avatar_users_updated', '1' );
104
+ }
105
+
106
+ /**
107
+ * Add media state to existing avatars
108
+ * @since 1.4
109
+ * @uses int $blog_id
110
+ * @uses object $wpdb
111
+ * @uses add_post_meta()
112
+ * @uses get_blog_prefix()
113
+ * @uses get_results()
114
+ * @uses update_option()
115
+ */
116
+ public function wpua_media_state() {
117
+ global $blog_id, $wpdb;
118
+
119
+ // Find all users with WPUA
120
+ $wpua_metakey = $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar';
121
+
122
+ $wpuas = $wpdb->get_results( $wpdb->prepare(
123
+ "SELECT * FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != %d AND meta_value != %d",
124
+ $wpua_metakey,
125
+ 0,
126
+ ''
127
+ ) );
128
+
129
+ foreach( $wpuas as $usermeta ) {
130
+ add_post_meta( $usermeta->meta_value, '_wp_attachment_wp_user_avatar', $usermeta->user_id );
131
+ }
132
+
133
+ update_option( 'wp_user_avatar_media_updated', '1' );
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Initialize
139
+ * @since 1.9.2
140
+ */
141
+ function wpua_update_init() {
142
+ global $wpua_update;
143
+
144
+ if ( ! isset( $wpua_update ) ) {
145
+ $wpua_update = new WP_User_Avatar_Update();
146
+ }
147
+
148
+ return $wpua_update;
149
+ }
150
+ add_action('init', 'wpua_update_init');
includes/class-wp-user-avatar-widget.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Defines widgets.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar_Profile_Widget extends WP_Widget {
18
+ /**
19
+ * Constructor
20
+ * @since 1.9.4
21
+ */
22
+ public function __construct() {
23
+ $widget_ops = array(
24
+ 'classname' => 'widget_wp_user_avatar',
25
+ 'description' => sprintf(
26
+ /* translators: [avatar_upload] shortcode */
27
+ __( 'Insert %s', 'one-user-avatar' ),
28
+ '[avatar_upload]'
29
+ ),
30
+ );
31
+
32
+ parent::__construct( 'wp_user_avatar_profile', __( 'One User Avatar', 'one-user-avatar' ), $widget_ops );
33
+ }
34
+
35
+ /**
36
+ * Add [avatar_upload] to widget
37
+ * @since 1.9.4
38
+ * @param array $args
39
+ * @param array $instance
40
+ * @uses object $wp_user_avatar
41
+ * @uses bool $wpua_allow_upload
42
+ * @uses object $wpua_shortcode
43
+ * @uses add_filter()
44
+ * @uses apply_filters()
45
+ * @uses is_user_logged_in()
46
+ * @uses remove_filter()
47
+ * @uses wpua_edit_shortcode()
48
+ * @uses wpua_is_author_or_above()
49
+ */
50
+ public function widget($args, $instance) {
51
+ global $wp_user_avatar, $wpua_allow_upload, $wpua_shortcode;
52
+
53
+ extract( $args );
54
+
55
+ $instance = apply_filters( 'wpua_widget_instance', $instance );
56
+ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
57
+ $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance );
58
+
59
+ // Show widget only for users with permission
60
+ if ( $wp_user_avatar->wpua_is_author_or_above() || ( 1 == (bool) $wpua_allow_upload && is_user_logged_in() ) ) {
61
+ echo $before_widget;
62
+
63
+ if ( ! empty( $title ) ) {
64
+ echo $before_title . $title . $after_title;
65
+ }
66
+
67
+ if ( ! empty( $text ) ) {
68
+ echo '<div class="textwidget">';
69
+ echo ! empty( $instance['filter'] ) ? wpautop($text) : $text;
70
+ echo '</div>';
71
+ }
72
+
73
+ // Remove profile title
74
+ add_filter( 'wpua_profile_title', '__return_null' );
75
+
76
+ // Get [avatar_upload] shortcode
77
+ echo $wpua_shortcode->wpua_edit_shortcode( '' );
78
+
79
+ // Add back profile title
80
+ remove_filter('wpua_profile_title', '__return_null');
81
+ }
82
+ }
83
+
84
+ /**
85
+ * Set title
86
+ * @since 1.9.4
87
+ * @param array $instance
88
+ * @uses wp_parse_args()
89
+ */
90
+ public function form( $instance ) {
91
+ $instance = wp_parse_args( (array) $instance, array(
92
+ 'title' => '',
93
+ 'text' => '',
94
+ ) );
95
+ ?>
96
+
97
+ <p>
98
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
99
+ <?php _e( 'Title:', 'one-user-avatar' ); ?>
100
+ </label>
101
+
102
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr( wp_kses( $instance['title'], 'data' ) ); ?>" />
103
+ </p>
104
+
105
+ <label for="<?php echo esc_attr( $this->get_field_id( 'filter' ) ); ?>"><?php _e( 'Description:', 'one-user-avatar' ); ?></label>
106
+
107
+ <textarea class="widefat" rows="3" cols="20" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
108
+
109
+ <p>
110
+ <input id="<?php echo esc_attr( $this->get_field_id( 'filter' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'filter' ) ); ?>" type="checkbox" <?php checked( isset( $instance['filter'] ) ? $instance['filter'] : 0 ); ?> />
111
+
112
+ <label for="<?php echo esc_attr( $this->get_field_id( 'filter' ) ); ?>">
113
+ <?php _e( 'Automatically add paragraphs', 'one-user-avatar' ); ?>
114
+ </label>
115
+ </p>
116
+ <?php
117
+ }
118
+
119
+ /**
120
+ * Update widget
121
+ * @since 1.9.4
122
+ * @param array $new_instance
123
+ * @param array $old_instance
124
+ * @uses current_user_can()
125
+ * @return array
126
+ */
127
+ public function update( $new_instance, $old_instance ) {
128
+ $instance = $old_instance;
129
+
130
+ $instance['title'] = wp_kses( $new_instance['title'], 'data' );
131
+
132
+ if ( current_user_can( 'unfiltered_html' ) ) {
133
+ $instance['text'] = $new_instance['text'];
134
+ } else {
135
+ $instance['text'] = stripslashes( wp_filter_post_kses( addslashes( $new_instance['text'] ) ) );
136
+ }
137
+
138
+ $instance['filter'] = isset( $new_instance['filter'] );
139
+
140
+ return $instance;
141
+ }
142
+ }
includes/class-wp-user-avatar.php ADDED
@@ -0,0 +1,670 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Defines all profile and upload settings.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ class WP_User_Avatar {
18
+ /**
19
+ * Constructor
20
+ * @since 1.8
21
+ * @uses string $pagenow
22
+ * @uses bool $show_avatars
23
+ * @uses object $wpua_admin
24
+ * @uses bool $wpua_allow_upload
25
+ * @uses add_action()
26
+ * @uses add_filterI]()
27
+ * @uses is_admin()
28
+ * @uses is_user_logged_in()
29
+ * @uses wpua_is_author_or_above()
30
+ * @uses wpua_is_menu_page()
31
+ */
32
+ public function __construct() {
33
+ global $pagenow, $show_avatars, $wpua_admin, $wpua_allow_upload;
34
+
35
+ // Add WPUA to profile for users with permission
36
+ if ( $this->wpua_is_author_or_above() || ( 1 == (bool) $wpua_allow_upload && is_user_logged_in() ) ) {
37
+ // Profile functions and scripts
38
+ add_action('show_user_profile', array( $this, 'wpua_maybe_show_user_profile' ) );
39
+ add_action('edit_user_profile', array( $this, 'wpua_maybe_show_user_profile' ) );
40
+
41
+ add_action( 'personal_options_update', array( $this, 'wpua_action_process_option_update' ) );
42
+ add_action( 'edit_user_profile_update', array( $this, 'wpua_action_process_option_update' ) );
43
+
44
+ add_action( 'user_new_form', array( $this, 'wpua_action_show_user_profile' ) );
45
+ add_action( 'user_register', array( $this, 'wpua_action_process_option_update' ) );
46
+
47
+ add_filter( 'user_profile_picture_description', array( $this, 'wpua_description_show_user_profile' ), PHP_INT_MAX, 2 );
48
+
49
+ // Admin scripts
50
+ $pages = array( 'profile.php', 'options-discussion.php', 'user-edit.php', 'user-new.php' );
51
+
52
+ if ( in_array( $pagenow, $pages ) || $wpua_admin->wpua_is_menu_page() ) {
53
+ add_action('admin_enqueue_scripts', array( $this, 'wpua_media_upload_scripts' ) );
54
+ }
55
+
56
+ // Front pages
57
+ if ( ! is_admin() ) {
58
+ add_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
59
+ add_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
60
+ }
61
+
62
+ if ( ! $this->wpua_is_author_or_above() ) {
63
+ // Upload errors
64
+ add_action( 'user_profile_update_errors', array( $this, 'wpua_upload_errors' ), 10, 3 );
65
+
66
+ // Prefilter upload size
67
+ add_filter( 'wp_handle_upload_prefilter', array( $this, 'wpua_handle_upload_prefilter' ) );
68
+ }
69
+ }
70
+ add_filter( 'media_view_settings', array( $this, 'wpua_media_view_settings' ), 10, 1 );
71
+ }
72
+
73
+ /**
74
+ * Avatars have no parent posts
75
+ *
76
+ * @param array $settings
77
+ *
78
+ * @return array
79
+ * @uses object $post
80
+ * @uses bool $wpua_is_profile
81
+ * @uses is_admin()
82
+ * array $settings
83
+ * @since 1.8.4
84
+ */
85
+ public function wpua_media_view_settings( $settings ) {
86
+ global $post, $wpua_is_profile;
87
+
88
+ // Get post ID so not to interfere with media uploads
89
+ $post_id = is_object( $post ) ? $post->ID : 0;
90
+
91
+ // Don't use post ID on front pages if there's a WPUA uploader
92
+ $settings['post']['id'] = ( ! is_admin() && 1 == $wpua_is_profile ) ? 0 : $post_id;
93
+
94
+ return $settings;
95
+ }
96
+
97
+ /**
98
+ * Media Uploader
99
+ * @since 1.4
100
+ * @param object $user
101
+ * @uses object $current_user
102
+ * @uses string $mustache_admin
103
+ * @uses string $pagenow
104
+ * @uses object $post
105
+ * @uses bool $show_avatars
106
+ * @uses object $wp_user_avatar
107
+ * @uses object $wpua_admin
108
+ * @uses object $wpua_functions
109
+ * @uses bool $wpua_is_profile
110
+ * @uses int $wpua_upload_size_limit
111
+ * @uses get_user_by()
112
+ * @uses wp_enqueue_script()
113
+ * @uses wp_enqueue_media()
114
+ * @uses wp_enqueue_style()
115
+ * @uses wp_localize_script()
116
+ * @uses wp_max_upload_size()
117
+ * @uses wpua_get_avatar_original()
118
+ * @uses wpua_is_author_or_above()
119
+ * @uses wpua_is_menu_page()
120
+ */
121
+ public static function wpua_media_upload_scripts( $user = '' ) {
122
+ global $current_user,
123
+ $mustache_admin,
124
+ $pagenow,
125
+ $post,
126
+ $show_avatars,
127
+ $wp_user_avatar,
128
+ $wpua_admin,
129
+ $wpua_functions,
130
+ $wpua_is_profile,
131
+ $wpua_upload_size_limit;
132
+
133
+ // This is a profile page
134
+ $wpua_is_profile = 1;
135
+
136
+ $user = ( $pagenow == 'user-edit.php' && isset( $_GET['user_id'] ) ) ? get_user_by( 'id', absint( $_GET['user_id'] ) ) : $current_user;
137
+
138
+ wp_enqueue_style( 'wp-user-avatar', WPUA_CSS_URL . 'wp-user-avatar.css', '', WPUA_VERSION );
139
+
140
+ wp_enqueue_script( 'jquery' );
141
+
142
+ if ( $wp_user_avatar->wpua_is_author_or_above() ) {
143
+ wp_enqueue_script( 'admin-bar' );
144
+ wp_enqueue_media( array( 'post' => $post ) );
145
+ wp_enqueue_script( 'wp-user-avatar', WPUA_JS_URL . 'wp-user-avatar.js', array( 'jquery', 'media-editor' ), WPUA_VERSION, true );
146
+ } else {
147
+ wp_enqueue_script( 'wp-user-avatar', WPUA_JS_URL . 'wp-user-avatar-user.js', array( 'jquery' ), WPUA_VERSION, true );
148
+ }
149
+
150
+ // Admin scripts
151
+ if ( $pagenow == 'options-discussion.php' || $wpua_admin->wpua_is_menu_page() ) {
152
+ // Size limit slider
153
+ wp_enqueue_script( 'jquery-ui-slider' );
154
+ wp_enqueue_style( 'wp-user-avatar-jqueryui', WPUA_CSS_URL . 'jquery-ui.css', '', null );
155
+
156
+ // Default avatar
157
+ wp_localize_script( 'wp-user-avatar', 'wpua_custom', array(
158
+ 'avatar_thumb' => $mustache_admin,
159
+ ) );
160
+
161
+ // Settings control
162
+ wp_enqueue_script( 'wp-user-avatar-admin', WPUA_JS_URL . 'wp-user-avatar-admin.js', array( 'wp-user-avatar' ), WPUA_VERSION, true );
163
+ wp_localize_script( 'wp-user-avatar-admin', 'wpua_admin', array(
164
+ 'upload_size_limit' => $wpua_upload_size_limit,
165
+ 'max_upload_size' => wp_max_upload_size(),
166
+ ) );
167
+ } else {
168
+ // Original user avatar
169
+ $avatar_medium_src = 1 == (bool) $show_avatars ? $wpua_functions->wpua_get_avatar_original( $user->user_email, 'medium' ) : includes_url() . 'images/blank.gif';
170
+
171
+ wp_localize_script( 'wp-user-avatar', 'wpua_custom', array(
172
+ 'avatar_thumb' => $avatar_medium_src,
173
+ ) );
174
+ }
175
+ }
176
+
177
+ public static function wpua_core_show_user_profile( $user ) {
178
+ global $blog_id,
179
+ $current_user,
180
+ $show_avatars,
181
+ $wpdb,
182
+ $wp_user_avatar,
183
+ $wpua_edit_avatar,
184
+ $wpua_functions,
185
+ $wpua_upload_size_limit_with_units;
186
+
187
+ $has_wp_user_avatar = has_wp_user_avatar( @$user->ID );
188
+
189
+ // Get WPUA attachment ID
190
+ $wpua = get_user_meta( @$user->ID, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', true );
191
+
192
+ // Show remove button if WPUA is set
193
+ $hide_remove = ! $has_wp_user_avatar ? 'wpua-hide' : '';
194
+
195
+ // Hide image tags if show avatars is off
196
+ $hide_images = ! $has_wp_user_avatar && 0 == (bool) $show_avatars ? 'wpua-no-avatars' : '';
197
+
198
+ // If avatars are enabled, get original avatar image or show blank
199
+ $avatar_medium_src = 1 == (bool) $show_avatars ? $wpua_functions->wpua_get_avatar_original( @$user->user_email, 'medium' ) : includes_url() . 'images/blank.gif';
200
+
201
+ // Check if user has wp_user_avatar, if not show image from above
202
+ $avatar_medium = $has_wp_user_avatar ? get_wp_user_avatar_src( $user->ID, 'medium' ) : $avatar_medium_src;
203
+
204
+ // Check if user has wp_user_avatar, if not show image from above
205
+ $avatar_thumbnail = $has_wp_user_avatar ? get_wp_user_avatar_src( $user->ID, 96 ) : $avatar_medium_src;
206
+ $edit_attachment_link = esc_url( add_query_arg( array(
207
+ 'post' => $wpua,
208
+ 'action' => 'edit',
209
+ ), admin_url( 'post.php' ) ) );
210
+ ?>
211
+
212
+ <input type="hidden" name="wp-user-avatar" id="<?php echo ( 'add-new-user' == $user ) ? 'wp-user-avatar' : 'wp-user-avatar-existing' ?>" value="<?php echo $wpua; ?>" />
213
+
214
+ <?php
215
+ if ( $wp_user_avatar->wpua_is_author_or_above() ) :
216
+ // Button to launch Media Uploader
217
+ ?>
218
+
219
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-add-button' : 'wpua-add-button-existing' ?>">
220
+ <button
221
+ type="button"
222
+ class="button"
223
+ id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-add' : 'wpua-add-existing' ?>"
224
+ name="<?php echo ( 'add-new-user' == $user ) ? 'wpua-add' : 'wpua-add-existing' ?>"
225
+ data-title="<?php printf(
226
+ /* translators: user display name */
227
+ __( 'Choose Image: %s', 'one-user-avatar' ),
228
+ ( ! empty( $user->display_name ) ? esc_attr( $user->display_name ) : '' )
229
+ ); ?>"
230
+ >
231
+ <?php _e( 'Choose Image', 'one-user-avatar' ); ?>
232
+ </button>
233
+ </p>
234
+
235
+ <?php
236
+ elseif ( ! $wp_user_avatar->wpua_is_author_or_above()) :
237
+ // Upload button
238
+ ?>
239
+
240
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-upload-button' : 'wpua-upload-button-existing'; ?>">
241
+ <input name="wpua-file" id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-file' : 'wpua-file-existing'; ?>" type="file" />
242
+
243
+ <button type="submit" class="button" id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-upload' : 'wpua-upload-existing'; ?>" name="submit" value="<?php _e( 'Upload', 'one-user-avatar' ); ?>">
244
+ <?php _e( 'Upload', 'one-user-avatar' ); ?>
245
+ </button>
246
+ </p>
247
+
248
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-upload-messages' : 'wpua-upload-messages-existing'; ?>">
249
+ <span id="<?php echo ($user == 'add-new-user') ? 'wpua-max-upload' : 'wpua-max-upload-existing'; ?>" class="description">
250
+ <?php
251
+ printf(
252
+ /* translators: file size in KB */
253
+ __( 'Maximum upload file size: %s.', 'one-user-avatar' ),
254
+ esc_html($wpua_upload_size_limit_with_units) . esc_html('KB')
255
+ );
256
+ ?>
257
+ </span>
258
+
259
+ <span id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-allowed-files' : 'wpua-allowed-files-existing'; ?>" class="description">
260
+ <?php
261
+ printf(
262
+ /* translators: allowed file extensions */
263
+ __( 'Allowed Files: %s', 'one-user-avatar' ),
264
+ '<code>jpg jpeg png gif</code>'
265
+ );
266
+ ?>
267
+ </span>
268
+ </p>
269
+
270
+ <?php
271
+ endif;
272
+ ?>
273
+
274
+ <div id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-images' : 'wpua-images-existing'; ?>" class="<?php echo $hide_images; ?>">
275
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-preview' : 'wpua-preview-existing'; ?>">
276
+ <img src="<?php echo esc_url( $avatar_medium ); ?>" alt="<?php echo esc_attr( __( 'Original Size', 'one-user-avatar' ) ); ?>" />
277
+
278
+ <span class="description"><?php _e( 'Original Size', 'one-user-avatar' ); ?></span>
279
+ </p>
280
+
281
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-thumbnail' : 'wpua-thumbnail-existing'; ?>">
282
+ <img src="<?php echo esc_url( $avatar_thumbnail ); ?>" alt="<?php echo esc_attr( __( 'Thumbnail', 'one-user-avatar' ) ); ?>"/>
283
+
284
+ <span class="description"><?php _e( 'Thumbnail', 'one-user-avatar' ); ?></span>
285
+ </p>
286
+
287
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-remove-button' : 'wpua-remove-button-existing' ?>" class="<?php echo $hide_remove; ?>">
288
+ <button type="button" class="button" id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-remove' : 'wpua-remove-existing' ?>" name="wpua-remove"><?php _e( 'Remove Image', 'one-user-avatar' ); ?></button>
289
+ </p>
290
+
291
+ <p id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-undo-button' : 'wpua-undo-button-existing' ?>">
292
+ <button type="button" class="button" id="<?php echo ( 'add-new-user' == $user ) ? 'wpua-undo' : 'wpua-undo-existing' ?>" name="wpua-undo"><?php _e( 'Undo', 'one-user-avatar' ); ?></button>
293
+ </p>
294
+ </div>
295
+
296
+ <?php
297
+ }
298
+
299
+ /**
300
+ * Add to edit user profile
301
+ *
302
+ * @param object $user
303
+ *
304
+ * @since 1.4
305
+ * @uses int $blog_id
306
+ * @uses object $current_user
307
+ * @uses bool $show_avatars
308
+ * @uses object $wpdb
309
+ * @uses object $wp_user_avatar
310
+ * @uses bool $wpua_edit_avatar
311
+ * @uses object $wpua_functions
312
+ * @uses string $wpua_upload_size_limit_with_units
313
+ * @uses add_query_arg()
314
+ * @uses admin_url()
315
+ * @uses do_action()
316
+ * @uses get_blog_prefix()
317
+ * @uses get_user_meta()
318
+ * @uses get_wp_user_avatar_src()
319
+ * @uses has_wp_user_avatar()
320
+ * @uses is_admin()
321
+ * @uses wpua_author()
322
+ * @uses wpua_get_avatar_original()
323
+ * @uses wpua_is_author_or_above()
324
+ */
325
+ public static function wpua_action_show_user_profile( $user ) {
326
+ $is_admin = is_admin() ? '_admin' : '';
327
+
328
+ do_action( 'wpua_before_avatar' . $is_admin );
329
+
330
+ self::wpua_core_show_user_profile( $user );
331
+
332
+ do_action( 'wpua_after_avatar' . $is_admin );
333
+ }
334
+
335
+ public function wpua_maybe_show_user_profile( $user ) {
336
+ if ( is_admin() ) {
337
+ return;
338
+ }
339
+
340
+ $this->wpua_action_show_user_profile( $user );
341
+ }
342
+
343
+ // setting defaults for the filter callback fixes an error like https://wordpress.org/support/topic/error-missing-argument-2-for-wp_user_avatarclosure
344
+ // see https://stackoverflow.com/questions/37779680/missing-argument-2-for-a-custom-function
345
+ public function wpua_description_show_user_profile( $description = '', $profileuser = null ) {
346
+ ob_start();
347
+
348
+ echo '<style>.user-profile-picture > td > .avatar { display: none; }</style>';
349
+
350
+ self::wpua_core_show_user_profile( $profileuser );
351
+
352
+ return ob_get_clean();
353
+ }
354
+
355
+ /**
356
+ * Add upload error messages
357
+ * @since 1.7.1
358
+ * @param array $errors
359
+ * @param bool $update
360
+ * @param object $user
361
+ * @uses int $wpua_upload_size_limit
362
+ * @uses add()
363
+ * @uses wp_upload_dir()
364
+ */
365
+ public static function wpua_upload_errors( $errors, $update, $user ) {
366
+ global $wpua_upload_size_limit;
367
+
368
+ if ( $update && ! empty( $_FILES['wpua-file'] ) ) {
369
+ $file = $_FILES['wpua-file'];
370
+ $size = isset( $file['size'] ) ? absint( $file['size'] ) : 0;
371
+ $type = isset( $file['type'] ) ? sanitize_mime_type( $file['type'] ) : '';
372
+
373
+ $upload_dir = wp_upload_dir();
374
+
375
+ // Allow only JPG, GIF, PNG
376
+ if ( ! empty( $type ) && ! preg_match( '/(jpe?g|gif|png)$/i', $type ) ) {
377
+ $errors->add( 'wpua_file_type', __( 'This file is not an image. Please try another.', 'one-user-avatar' ) );
378
+ }
379
+
380
+ // Upload size limit
381
+ if ( ! empty( $size ) && $size > $wpua_upload_size_limit ) {
382
+ $errors->add( 'wpua_file_size', __( 'Memory exceeded. Please try another smaller file.', 'one-user-avatar' ) );
383
+ }
384
+
385
+ // Check if directory is writeable
386
+ if ( ! is_writeable( $upload_dir['path'] ) ) {
387
+ $errors->add( 'wpua_file_directory', sprintf(
388
+ /* translators: directory path */
389
+ __( 'Unable to create directory %s. Is its parent directory writable by the server?', 'one-user-avatar' ), $upload_dir['path']
390
+ ) );
391
+ }
392
+ }
393
+ }
394
+
395
+ /**
396
+ * Set upload size limit
397
+ * @since 1.5
398
+ * @param object $file
399
+ * @uses int $wpua_upload_size_limit
400
+ * @uses add_action()
401
+ * @return object $file
402
+ */
403
+ public function wpua_handle_upload_prefilter( $file ) {
404
+ global $wpua_upload_size_limit;
405
+
406
+ $size = absint( $file['size'] );
407
+
408
+ if ( ! empty( $size ) && $size > $wpua_upload_size_limit ) {
409
+ /**
410
+ * Error handling that only appears on front pages
411
+ * @since 1.7
412
+ */
413
+ function wpua_file_size_error( $errors, $update, $user ) {
414
+ $errors->add( 'wpua_file_size', __( 'Memory exceeded. Please try another smaller file.', 'one-user-avatar' ) );
415
+ }
416
+
417
+ add_action( 'user_profile_update_errors', 'wpua_file_size_error', 10, 3 );
418
+
419
+ return;
420
+ }
421
+
422
+ return $file;
423
+ }
424
+
425
+ /**
426
+ * Update user meta
427
+ * @since 1.4
428
+ * @param int $user_id
429
+ * @uses int $blog_id
430
+ * @uses object $post
431
+ * @uses object $wpdb
432
+ * @uses object $wp_user_avatar
433
+ * @uses bool $wpua_resize_crop
434
+ * @uses int $wpua_resize_h
435
+ * @uses bool $wpua_resize_upload
436
+ * @uses int $wpua_resize_w
437
+ * @uses add_post_meta()
438
+ * @uses delete_metadata()
439
+ * @uses get_blog_prefix()
440
+ * @uses is_wp_error()
441
+ * @uses update_post_meta()
442
+ * @uses update_user_meta()
443
+ * @uses wp_delete_attachment()
444
+ * @uses wp_generate_attachment_metadata()
445
+ * @uses wp_get_image_editor()
446
+ * @uses wp_handle_upload()
447
+ * @uses wp_insert_attachment()
448
+ * @uses WP_Query()
449
+ * @uses wp_read_image_metadata()
450
+ * @uses wp_reset_query()
451
+ * @uses wp_update_attachment_metadata()
452
+ * @uses wp_upload_dir()
453
+ * @uses wpua_is_author_or_above()
454
+ * @uses object $wpua_admin
455
+ * @uses wpua_has_gravatar()
456
+ */
457
+ public static function wpua_action_process_option_update( $user_id ) {
458
+ global $blog_id,
459
+ $post,
460
+ $wpdb,
461
+ $wp_user_avatar,
462
+ $wpua_resize_crop,
463
+ $wpua_resize_h,
464
+ $wpua_resize_upload,
465
+ $wpua_resize_w,
466
+ $wpua_admin;
467
+
468
+ // Check if user has publish_posts capability
469
+ if ( $wp_user_avatar->wpua_is_author_or_above() ) {
470
+ $wpua_id = isset( $_POST['wp-user-avatar'] ) ? absint( $_POST['wp-user-avatar'] ) : 0;
471
+
472
+ // Remove old attachment postmeta
473
+ delete_metadata( 'post', null, '_wp_attachment_wp_user_avatar', $user_id, true );
474
+
475
+ // Create new attachment postmeta
476
+ add_post_meta( $wpua_id, '_wp_attachment_wp_user_avatar', $user_id );
477
+
478
+ // Update usermeta
479
+ update_user_meta( $user_id, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', $wpua_id );
480
+ } else {
481
+ // Remove attachment info if avatar is blank
482
+ if ( isset( $_POST['wp-user-avatar'] ) && empty( $_POST['wp-user-avatar'] ) ) {
483
+ // Delete other uploads by user
484
+ $q = array(
485
+ 'author' => $user_id,
486
+ 'post_type' => 'attachment',
487
+ 'post_status' => 'inherit',
488
+ 'posts_per_page' => '-1',
489
+ 'meta_query' => array(
490
+ array(
491
+ 'key' => '_wp_attachment_wp_user_avatar',
492
+ 'value' => "",
493
+ 'compare' => '!='
494
+ ),
495
+ ),
496
+ );
497
+
498
+ $avatars_wp_query = new WP_Query( $q );
499
+
500
+ while( $avatars_wp_query->have_posts() ) {
501
+ $avatars_wp_query->the_post();
502
+
503
+ wp_delete_attachment( $post->ID );
504
+ }
505
+
506
+ wp_reset_query();
507
+
508
+ // Remove attachment postmeta
509
+ delete_metadata( 'post', null, '_wp_attachment_wp_user_avatar', $user_id, true );
510
+
511
+ // Remove usermeta
512
+ update_user_meta( $user_id, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', '' );
513
+ }
514
+
515
+ // Create attachment from upload
516
+ if ( isset( $_POST['submit'] ) && $_POST['submit'] && ! empty( $_FILES['wpua-file'] ) ) {
517
+ $file = $_FILES['wpua-file'];
518
+ $name = isset( $file['name'] ) ? sanitize_file_name( $file['name'] ) : '';
519
+ $type = isset( $file['type'] ) ? sanitize_mime_type( $file['type'] ) : '';
520
+ $file = wp_handle_upload( $file, array(
521
+ 'test_form' => false,
522
+ ) );
523
+
524
+ if ( isset( $file['url'] ) ) {
525
+ if ( ! empty( $type ) && preg_match( '/(jpe?g|gif|png)$/i' , $type ) ) {
526
+ // Resize uploaded image
527
+ if ( 1 == (bool) $wpua_resize_upload ) {
528
+ // Original image
529
+ $uploaded_image = wp_get_image_editor( $file['file'] );
530
+
531
+ // Check for errors
532
+ if ( ! is_wp_error( $uploaded_image ) ) {
533
+ // Resize image
534
+ $uploaded_image->resize( $wpua_resize_w, $wpua_resize_h, $wpua_resize_crop );
535
+
536
+ // Save image
537
+ $uploaded_image->save( $file['file'] );
538
+ }
539
+ }
540
+
541
+ // Break out file info
542
+ $name_parts = pathinfo( $name );
543
+ $name = trim( substr( $name, 0, -( 1 + strlen( $name_parts['extension'] ) ) ) );
544
+ $url = $file['url'];
545
+ $file = $file['file'];
546
+ $title = $name;
547
+
548
+ // Use image exif/iptc data for title if possible
549
+ if ( $image_meta = @wp_read_image_metadata( $file ) ) {
550
+ if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
551
+ $title = $image_meta['title'];
552
+ }
553
+ }
554
+
555
+ // Construct the attachment array
556
+ $attachment = array(
557
+ 'guid' => $url,
558
+ 'post_mime_type' => $type,
559
+ 'post_title' => $title,
560
+ 'post_content' => '',
561
+ );
562
+
563
+ // This should never be set as it would then overwrite an existing attachment
564
+ if ( isset( $attachment['ID'] ) ) {
565
+ unset( $attachment['ID'] );
566
+ }
567
+
568
+ // Save the attachment metadata
569
+ $attachment_id = wp_insert_attachment( $attachment, $file );
570
+
571
+ if ( ! is_wp_error( $attachment_id ) ) {
572
+ // Delete other uploads by user
573
+ $q = array(
574
+ 'author' => $user_id,
575
+ 'post_type' => 'attachment',
576
+ 'post_status' => 'inherit',
577
+ 'posts_per_page' => '-1',
578
+ 'meta_query' => array(
579
+ array(
580
+ 'key' => '_wp_attachment_wp_user_avatar',
581
+ 'value' => '',
582
+ 'compare' => '!=',
583
+ ),
584
+ ),
585
+ );
586
+
587
+ $avatars_wp_query = new WP_Query( $q );
588
+
589
+ while ( $avatars_wp_query->have_posts() ){
590
+ $avatars_wp_query->the_post();
591
+
592
+ wp_delete_attachment($post->ID);
593
+ }
594
+
595
+ wp_reset_query();
596
+
597
+ wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
598
+
599
+ // Remove old attachment postmeta
600
+ delete_metadata( 'post', null, '_wp_attachment_wp_user_avatar', $user_id, true );
601
+
602
+ // Create new attachment postmeta
603
+ update_post_meta( $attachment_id, '_wp_attachment_wp_user_avatar', $user_id );
604
+
605
+ // Update usermeta
606
+ update_user_meta( $user_id, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar', $attachment_id );
607
+ }
608
+ }
609
+ }
610
+ }
611
+ }
612
+ }
613
+
614
+ /**
615
+ * Check attachment is owned by user
616
+ * @since 1.4
617
+ * @param int $attachment_id
618
+ * @param int $user_id
619
+ * @param bool $wpua_author
620
+ * @uses get_post()
621
+ * @return bool
622
+ */
623
+ private function wpua_author( $attachment_id, $user_id, $wpua_author = 0 ) {
624
+ $attachment = get_post( $attachment_id );
625
+
626
+ if ( ! empty( $attachment ) && $attachment->post_author == $user_id ) {
627
+ $wpua_author = true;
628
+ }
629
+
630
+ return (bool) $wpua_author;
631
+ }
632
+
633
+ /**
634
+ * Check if current user has at least Author privileges
635
+ * @since 1.8.5
636
+ * @uses current_user_can()
637
+ * @uses apply_filters()
638
+ * @return bool
639
+ */
640
+ public function wpua_is_author_or_above() {
641
+ $is_author_or_above = (
642
+ current_user_can( 'edit_published_posts' ) &&
643
+ current_user_can( 'upload_files' ) &&
644
+ current_user_can( 'publish_posts') &&
645
+ current_user_can( 'delete_published_posts')
646
+ ) ? true : false;
647
+
648
+ /**
649
+ * Filter Author privilege check
650
+ * @since 1.9.2
651
+ * @param bool $is_author_or_above
652
+ */
653
+ return (bool) apply_filters( 'wpua_is_author_or_above', $is_author_or_above );
654
+ }
655
+ }
656
+
657
+ /**
658
+ * Initialize WP_User_Avatar
659
+ * @since 1.8
660
+ */
661
+ function wpua_init() {
662
+ global $wp_user_avatar;
663
+
664
+ if ( ! isset( $wp_user_avatar ) ) {
665
+ $wp_user_avatar = new WP_User_Avatar();
666
+ }
667
+
668
+ return $wp_user_avatar;
669
+ }
670
+ add_action( 'init', 'wpua_init' );
includes/wpua-functions.php ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Public user functions.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * Returns true if user has wp_user_avatar
19
+ * @since 1.8
20
+ * @param int|string $id_or_email
21
+ * @param bool $has_wpua
22
+ * @param object $user
23
+ * @param int $user_id
24
+ * @uses object $wpua_functions
25
+ * @return object has_wp_user_avatar()
26
+ */
27
+ function has_wp_user_avatar( $id_or_email = '', $has_wpua = '', $user = '', $user_id = '' ) {
28
+ global $wpua_functions;
29
+
30
+ return $wpua_functions->has_wp_user_avatar( $id_or_email, $has_wpua, $user, $user_id );
31
+ }
32
+
33
+ /**
34
+ * Find WPUA, show get_avatar if empty
35
+ *
36
+ * @param int|string $id_or_email
37
+ * @param int|string $size
38
+ * @param string $align
39
+ * @param string $alt
40
+ * @param array $class
41
+ *
42
+ * @return object get_wp_user_avatar()
43
+ * @since 1.8
44
+ * @uses object $wpua_functions
45
+ */
46
+ function get_wp_user_avatar( $id_or_email = '', $size = '', $align = '', $alt = '', $class = [] ) {
47
+ global $wpua_functions;
48
+
49
+ return $wpua_functions->get_wp_user_avatar( $id_or_email, $size, $align, $alt, $class );
50
+ }
51
+
52
+ /**
53
+ * Return just the image src
54
+ * @since 1.8
55
+ * @param int|string $id_or_email
56
+ * @param int|string $size
57
+ * @param string $align
58
+ * @uses object $wpua_functions
59
+ * @return object get_wp_user_avatar_src()
60
+ */
61
+ function get_wp_user_avatar_src( $id_or_email = '', $size = '', $align = '') {
62
+ global $wpua_functions;
63
+
64
+ return $wpua_functions->get_wp_user_avatar_src( $id_or_email, $size, $align );
65
+ }
66
+
67
+ /**
68
+ * Before wrapper for profile
69
+ * @since 1.6
70
+ * @uses do_action()
71
+ */
72
+ function wpua_before_avatar() {
73
+ do_action( 'wpua_before_avatar' );
74
+ }
75
+
76
+ /**
77
+ * After wrapper for profile
78
+ * @since 1.6
79
+ * @uses do_action()
80
+ */
81
+ function wpua_after_avatar() {
82
+ do_action( 'wpua_after_avatar' );
83
+ }
84
+
85
+ /**
86
+ * Before avatar container
87
+ * @since 1.6
88
+ * @uses apply_filters()
89
+ * @uses bbp_is_edit()
90
+ * @uses wpuf_has_shortcode()
91
+ */
92
+ function wpua_do_before_avatar() {
93
+ $wpua_profile_title = sprintf( '<h3>%s</h3>', __( 'Profile Picture', 'one-user-avatar' ) );
94
+
95
+ /**
96
+ * Filter profile title
97
+ * @since 1.9.4
98
+ * @param string $wpua_profile_title
99
+ */
100
+ $wpua_profile_title = apply_filters( 'wpua_profile_title', $wpua_profile_title );
101
+ ?>
102
+
103
+ <?php if ( class_exists( 'bbPress' ) && bbp_is_edit() ) :
104
+ // Add to bbPress profile with same style
105
+ ?>
106
+ <h2 class="entry-title"><?php _e( 'Profile Picture', 'one-user-avatar' ); ?></h2>
107
+
108
+ <fieldset class="bbp-form">
109
+ <legend><?php _e( 'Image', 'one-user-avatar' ); ?></legend>
110
+ <?php elseif( class_exists( 'WPUF_Main' ) && wpuf_has_shortcode( 'wpuf_editprofile' ) ) :
111
+ // Add to WP User Frontend profile with same style
112
+ ?>
113
+ <fieldset>
114
+ <legend><?php _e( 'Profile Picture', 'one-user-avatar' ); ?></legend>
115
+
116
+ <table class="wpuf-table">
117
+ <tr>
118
+ <th><label for="wp_user_avatar"><?php _e( 'Image', 'one-user-avatar' ); ?></label></th>
119
+
120
+ <td>
121
+ <?php else :
122
+ // Add to profile without table
123
+ ?>
124
+ <div class="wpua-edit-container">
125
+ <?php echo $wpua_profile_title; ?>
126
+ <?php endif; ?>
127
+
128
+ <?php
129
+ }
130
+ add_action( 'wpua_before_avatar', 'wpua_do_before_avatar' );
131
+
132
+ /**
133
+ * After avatar container
134
+ * @since 1.6
135
+ * @uses bbp_is_edit()
136
+ * @uses wpuf_has_shortcode()
137
+ */
138
+ function wpua_do_after_avatar() {
139
+ ?>
140
+ <?php if ( class_exists( 'bbPress' ) && bbp_is_edit() ) :
141
+ // Add to bbPress profile with same style
142
+ ?>
143
+ </fieldset>
144
+ <?php elseif ( class_exists( 'WPUF_Main' ) && wpuf_has_shortcode( 'wpuf_editprofile' ) ) :
145
+ // Add to WP User Frontend profile with same style
146
+ ?>
147
+ </td>
148
+ </tr>
149
+ </table>
150
+ </fieldset>
151
+ <?php else :
152
+ // Add to profile without table
153
+ ?>
154
+ </div>
155
+ <?php endif; ?>
156
+ <?php
157
+ }
158
+ add_action( 'wpua_after_avatar', 'wpua_do_after_avatar' );
159
+
160
+ /**
161
+ * Before wrapper for profile in admin section
162
+ * @since 1.9.4
163
+ * @uses do_action()
164
+ */
165
+ function wpua_before_avatar_admin() {
166
+ do_action( 'wpua_before_avatar_admin' );
167
+ }
168
+
169
+ /**
170
+ * After wrapper for profile in admin section
171
+ * @since 1.9.4
172
+ * @uses do_action()
173
+ */
174
+ function wpua_after_avatar_admin() {
175
+ do_action( 'wpua_after_avatar_admin' );
176
+ }
177
+
178
+ /**
179
+ * Before avatar container in admin section
180
+ * @since 1.9.4
181
+ */
182
+ function wpua_do_before_avatar_admin() {
183
+ ?>
184
+ <table class="form-table">
185
+ <tr>
186
+ <th><label for="wp_user_avatar"><?php _e( 'Profile Picture', 'one-user-avatar' ); ?></label></th>
187
+
188
+ <td>
189
+ <?php
190
+ }
191
+ add_action( 'wpua_before_avatar_admin', 'wpua_do_before_avatar_admin' );
192
+
193
+ /**
194
+ * After avatar container in admin section
195
+ * @since 1.9.4
196
+ */
197
+ function wpua_do_after_avatar_admin() {
198
+ ?>
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ <?php
203
+ }
204
+ add_action( 'wpua_after_avatar_admin', 'wpua_do_after_avatar_admin' );
205
+
206
+ /**
207
+ * Register widget
208
+ * @since 1.9.4
209
+ * @uses register_widget()
210
+ */
211
+ function wpua_widgets_init() {
212
+ register_widget( 'WP_User_Avatar_Profile_Widget' );
213
+ }
214
+ add_action('widgets_init', 'wpua_widgets_init');
includes/wpua-globals.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Global variables used in plugin.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * @since 1.8
19
+ * @uses get_intermediate_image_sizes()
20
+ * @uses get_option()
21
+ * @uses wp_max_upload_size()
22
+ */
23
+
24
+ // Define global variables
25
+ global $avatar_default,
26
+ $show_avatars,
27
+ $wpua_allow_upload,
28
+ $wpua_avatar_default,
29
+ $wpua_disable_gravatar,
30
+ $wpua_edit_avatar,
31
+ $wpua_resize_crop,
32
+ $wpua_resize_h,
33
+ $wpua_resize_upload,
34
+ $wpua_resize_w,
35
+ $wpua_tinymce,
36
+ $mustache_original,
37
+ $mustache_medium,
38
+ $mustache_thumbnail,
39
+ $mustache_avatar,
40
+ $mustache_admin,
41
+ $wpua_default_avatar_updated,
42
+ $wpua_users_updated,
43
+ $wpua_media_updated,
44
+ $upload_size_limit,
45
+ $upload_size_limit_with_units,
46
+ $wpua_user_upload_size_limit,
47
+ $wpua_upload_size_limit,
48
+ $wpua_upload_size_limit_with_units,
49
+ $all_sizes,
50
+ $wpua_hash_gravatar;
51
+
52
+ // Store if hash has gravatar
53
+ $wpua_hash_gravatar = get_option( 'wpua_hash_gravatar' );
54
+
55
+ if ( false != $wpua_hash_gravatar ) {
56
+ $wpua_hash_gravatar = maybe_unserialize( $wpua_hash_gravatar );
57
+ }
58
+
59
+ // Default avatar name
60
+ $avatar_default = get_option( 'avatar_default' );
61
+
62
+ // Attachment ID of default avatar
63
+ $wpua_avatar_default = get_option( 'avatar_default_wp_user_avatar' );
64
+
65
+ // Booleans
66
+ $show_avatars = get_option( 'show_avatars' );
67
+ $wpua_allow_upload = get_option( 'wp_user_avatar_allow_upload' );
68
+ $wpua_disable_gravatar = get_option( 'wp_user_avatar_disable_gravatar' );
69
+ $wpua_edit_avatar = get_option( 'wp_user_avatar_edit_avatar' );
70
+ $wpua_resize_crop = get_option( 'wp_user_avatar_resize_crop' );
71
+ $wpua_resize_upload = get_option( 'wp_user_avatar_resize_upload' );
72
+ $wpua_tinymce = get_option( 'wp_user_avatar_tinymce' );
73
+
74
+ // Resize dimensions
75
+ $wpua_resize_h = get_option( 'wp_user_avatar_resize_h' );
76
+ $wpua_resize_w = get_option( 'wp_user_avatar_resize_w' );
77
+
78
+ // Default avatar 512x512
79
+ $mustache_original = WPUA_IMG_URL . 'wpua.png';
80
+
81
+ // Default avatar 300x300
82
+ $mustache_medium = WPUA_IMG_URL . 'wpua-300x300.png';
83
+
84
+ // Default avatar 150x150
85
+ $mustache_thumbnail = WPUA_IMG_URL . 'wpua-150x150.png';
86
+
87
+ // Default avatar 96x96
88
+ $mustache_avatar = WPUA_IMG_URL . 'wpua-96x96.png';
89
+
90
+ // Default avatar 32x32
91
+ $mustache_admin = WPUA_IMG_URL . 'wpua-32x32.png';
92
+
93
+ // Check for updates
94
+ $wpua_default_avatar_updated = get_option( 'wp_user_avatar_default_avatar_updated' );
95
+ $wpua_users_updated = get_option( 'wp_user_avatar_users_updated' );
96
+ $wpua_media_updated = get_option( 'wp_user_avatar_media_updated' );
97
+
98
+ // Server upload size limit
99
+ $upload_size_limit = wp_max_upload_size();
100
+
101
+ // Convert to KB
102
+ if ( 1024 < $upload_size_limit ) {
103
+ $upload_size_limit /= 1024;
104
+ }
105
+
106
+ $upload_size_limit_with_units = (int) $upload_size_limit . 'KB';
107
+
108
+ // User upload size limit
109
+ $wpua_user_upload_size_limit = get_option( 'wp_user_avatar_upload_size_limit' );
110
+
111
+ if( 0 == $wpua_user_upload_size_limit || $wpua_user_upload_size_limit > wp_max_upload_size() ) {
112
+ $wpua_user_upload_size_limit = wp_max_upload_size();
113
+ }
114
+
115
+ // Value in bytes
116
+ $wpua_upload_size_limit = $wpua_user_upload_size_limit;
117
+
118
+ // Convert to KB
119
+ if ( 1024 < $wpua_user_upload_size_limit ) {
120
+ $wpua_user_upload_size_limit /= 1024;
121
+ }
122
+
123
+ $wpua_upload_size_limit_with_units = (int) $wpua_user_upload_size_limit . 'KB';
124
+
125
+ // Check for custom image sizes
126
+ $all_sizes = array_merge( get_intermediate_image_sizes(), array( 'original' ) );
includes/wpua-media-page.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library view of all avatars in use.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * @since 1.8
19
+ * @uses object $wpua_admin
20
+ * @uses _wpua_get_list_table()
21
+ * @uses add_query_arg()
22
+ * @uses check_admin_referer()
23
+ * @uses current_action()
24
+ * @uses current_user_can()
25
+ * @uses display()
26
+ * @uses esc_url()
27
+ * @uses find_posts_div()
28
+ * @uses get_pagenum()
29
+ * @uses get_search_query
30
+ * @uses number_format_i18n()
31
+ * @uses prepare_items()
32
+ * @uses remove_query_arg()
33
+ * @uses search_box()
34
+ * @uses views()
35
+ * @uses wp_delete_attachment()
36
+ * @uses wp_die()
37
+ * @uses wp_get_referer()
38
+ * @uses wp_redirect()
39
+ * @uses wp_unslash()
40
+ */
41
+
42
+ /** WordPress Administration Bootstrap */
43
+ require_once( ABSPATH . 'wp-admin/admin.php' );
44
+
45
+ if ( ! current_user_can( 'upload_files' ) ) {
46
+ wp_die( __( 'You do not have permission to upload files.', 'one-user-avatar' ) );
47
+ }
48
+
49
+ global $wpua_admin;
50
+
51
+ $wp_list_table = $wpua_admin->_wpua_get_list_table( 'WP_User_Avatar_List_Table' );
52
+
53
+ $wp_list_table->prepare_items();
54
+
55
+ ?>
56
+
57
+ <div class="wrap">
58
+ <h2>
59
+ <?php _e('Avatars','one-user-avatar'); ?>
60
+
61
+ <?php if ( ! empty( $_REQUEST['s'] ) ) : ?>
62
+ <span class="subtitle">
63
+ <?php
64
+ printf(
65
+ /* translators: search query */
66
+ __( 'Search results for %s','one-user-avatar' ),
67
+ sprintf( '&#8220;%s&#8221;', get_search_query() )
68
+ );
69
+ ?>
70
+ </span>
71
+ <?php endif; ?>
72
+ </h2>
73
+
74
+ <?php
75
+ $message = '';
76
+
77
+ if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) {
78
+ $message = sprintf(
79
+ _n(
80
+ 'Media attachment permanently deleted.',
81
+ '%d media attachments permanently deleted.',
82
+ $deleted
83
+ ),
84
+ number_format_i18n( $_GET['deleted'] )
85
+ );
86
+
87
+ $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] );
88
+ }
89
+ ?>
90
+
91
+ <?php if ( ! empty( $message ) ) : ?>
92
+ <div id="message" class="updated"><p><?php echo $message; ?></p></div>
93
+ <?php endif; ?>
94
+
95
+ <?php $wp_list_table->views(); ?>
96
+
97
+ <form id="posts-filter" action="" method="get">
98
+ <?php $wp_list_table->search_box( __('Search','one-user-avatar'), 'media' ); ?>
99
+
100
+ <?php $wp_list_table->display(); ?>
101
+
102
+ <div id="ajax-response"></div>
103
+
104
+ <?php find_posts_div(); ?>
105
+
106
+ <br class="clear" />
107
+ </form>
108
+ </div>
includes/wpua-options-page.php ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin page to change plugin options.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * @since 1.4
19
+ * @uses bool $show_avatars
20
+ * @uses string $upload_size_limit_with_units
21
+ * @uses object $wpua_admin
22
+ * @uses bool $wpua_allow_upload
23
+ * @uses bool $wpua_disable_gravatar
24
+ * @uses bool $wpua_edit_avatar
25
+ * @uses bool $wpua_resize_crop
26
+ * @uses int int $wpua_resize_h
27
+ * @uses bool $wpua_resize_upload
28
+ * @uses int $wpua_resize_w
29
+ * @uses object $wpua_subscriber
30
+ * @uses bool $wpua_tinymce
31
+ * @uses int $wpua_upload_size_limit
32
+ * @uses string $wpua_upload_size_limit_with_units
33
+ * @uses admin_url()
34
+ * @uses apply_filters()
35
+ * @uses checked()
36
+ * @uses do_action()
37
+ * @uses do_settings_fields()
38
+ * @uses get_option()
39
+ * @uses settings_fields()
40
+ * @uses submit_button()
41
+ * @uses wpua_add_default_avatar()
42
+ */
43
+
44
+ global $show_avatars, $upload_size_limit_with_units, $wpua_admin, $wpua_allow_upload, $wpua_disable_gravatar, $wpua_edit_avatar, $wpua_resize_crop, $wpua_resize_h, $wpua_resize_upload, $wpua_resize_w, $wpua_subscriber, $wpua_tinymce, $wpua_upload_size_limit, $wpua_upload_size_limit_with_units;
45
+
46
+ $updated = false;
47
+
48
+ if ( isset( $_GET['settings-updated'] ) && 'true' == $_GET['settings-updated'] ) {
49
+ $updated = true;
50
+ }
51
+
52
+ $hide_size = true !== (bool) $wpua_allow_upload ? ' style="display:none;"' : '';
53
+ $hide_resize = true !== (bool) $wpua_resize_upload ? ' style="display:none;"' : '';
54
+
55
+ $wpua_options_page_title = __( 'One User Avatar', 'one-user-avatar' );
56
+
57
+ /**
58
+ * Filter admin page title
59
+ * @since 1.9
60
+ * @param string $wpua_options_page_title
61
+ */
62
+ $wpua_options_page_title = apply_filters( 'wpua_options_page_title', $wpua_options_page_title );
63
+ ?>
64
+
65
+ <div class="wrap">
66
+ <h2><?php echo $wpua_options_page_title; ?></h2>
67
+
68
+ <table>
69
+ <tr valign="top">
70
+ <td align="top">
71
+ <form method="post" action="<?php echo admin_url('options.php'); ?>">
72
+
73
+ <?php settings_fields('wpua-settings-group'); ?>
74
+
75
+ <?php do_settings_fields('wpua-settings-group', ""); ?>
76
+
77
+ <table class="form-table">
78
+ <?php
79
+ // Format settings in table rows
80
+ $wpua_before_settings = array();
81
+
82
+ /**
83
+ * Filter settings at beginning of table
84
+ * @since 1.9
85
+ * @param array $wpua_before_settings
86
+ */
87
+ $wpua_before_settings = apply_filters( 'wpua_before_settings', $wpua_before_settings );
88
+
89
+ echo implode( '', $wpua_before_settings );
90
+ ?>
91
+
92
+ <tr valign="top">
93
+ <th scope="row"><?php _e( 'Settings', 'one-user-avatar' ); ?></th>
94
+
95
+ <td>
96
+ <?php
97
+ // Format settings in fieldsets
98
+ $wpua_settings = array();
99
+
100
+ $wpua_settings['tinymce'] = sprintf(
101
+ '<fieldset>
102
+ <label for="wp_user_avatar_tinymce">
103
+ <input name="wp_user_avatar_tinymce" type="checkbox" id="wp_user_avatar_tinymce" value="1" %s />
104
+ %s
105
+ </label>
106
+ </fieldset>',
107
+ checked( $wpua_tinymce, true, false ),
108
+ __( 'Add avatar button to Visual Editor', 'one-user-avatar' )
109
+ );
110
+
111
+ $wpua_settings['upload'] = sprintf(
112
+ '<fieldset>
113
+ <label for="wp_user_avatar_allow_upload">
114
+ <input name="wp_user_avatar_allow_upload" type="checkbox" id="wp_user_avatar_allow_upload" value="1" %s />
115
+ %s
116
+ </label>
117
+ </fieldset>',
118
+ checked( $wpua_allow_upload, true, false ),
119
+ __( 'Allow Contributors & Subscribers to upload avatars', 'one-user-avatar' )
120
+ );
121
+
122
+ $wpua_settings['gravatar'] = sprintf(
123
+ '<fieldset>
124
+ <label for="wp_user_avatar_disable_gravatar">
125
+ <input name="wp_user_avatar_disable_gravatar" type="checkbox" id="wp_user_avatar_disable_gravatar" value="1" %s />
126
+ %s
127
+ </label>
128
+ </fieldset>',
129
+ checked( $wpua_disable_gravatar, true, false ),
130
+ __( 'Disable Gravatar and use only local avatars', 'one-user-avatar' )
131
+ );
132
+
133
+ /**
134
+ * Filter main settings
135
+ * @since 1.9
136
+ * @param array $wpua_settings
137
+ */
138
+ $wpua_settings = apply_filters( 'wpua_settings', $wpua_settings );
139
+
140
+ echo implode( '', $wpua_settings );
141
+ ?>
142
+ </td>
143
+ </tr>
144
+ </table>
145
+
146
+ <?php
147
+ // Format settings in table
148
+ $wpua_subscriber_settings = array();
149
+
150
+ ob_start();
151
+ ?>
152
+
153
+ <div id="wpua-contributors-subscribers"<?php echo $hide_size; ?>>
154
+ <table class="form-table">
155
+ <tr valign="top">
156
+ <th scope="row">
157
+ <label for="wp_user_avatar_upload_size_limit">'
158
+ <?php _e( 'Upload Size Limit', 'one-user-avatar' ); ?>
159
+ <?php _e( '(only for Contributors & Subscribers)', 'one-user-avatar' ); ?>
160
+ </label>
161
+ </th>
162
+
163
+ <td>
164
+ <fieldset>
165
+ <legend class="screen-reader-text">
166
+ <span>
167
+ <?php _e( 'Upload Size Limit', 'one-user-avatar' ); ?>
168
+ <?php _e( '(only for Contributors & Subscribers)', 'one-user-avatar' ); ?>
169
+ </span>
170
+ </legend>
171
+
172
+ <input name="wp_user_avatar_upload_size_limit" type="text" id="wp_user_avatar_upload_size_limit" value="<?php echo esc_attr( $wpua_upload_size_limit ); ?>" class="regular-text" />
173
+
174
+ <span id="wpua-readable-size"><?php echo $wpua_upload_size_limit_with_units; ?></span>
175
+
176
+ <span id="wpua-readable-size-error"><?php printf(
177
+ /* translators: file name */
178
+ __( '%s exceeds the maximum upload size for this site.', 'one-user-avatar' ),
179
+ ''
180
+ ); ?></span>
181
+
182
+ <div id="wpua-slider"></div>
183
+
184
+ <span class="description">
185
+ <?php
186
+ printf(
187
+ /* translators: file size in KB */
188
+ __( 'Maximum upload file size: %s.', 'one-user-avatar' ),
189
+ esc_html( wp_max_upload_size() ) . esc_html( sprintf( ' bytes (%s)', $upload_size_limit_with_units ) )
190
+ );
191
+ ?>
192
+ </span>
193
+ </fieldset>
194
+
195
+ <fieldset>
196
+ <label for="wp_user_avatar_edit_avatar">
197
+ <input name="wp_user_avatar_edit_avatar" type="checkbox" id="wp_user_avatar_edit_avatar" value="1" <?php checked( $wpua_edit_avatar ); ?> />
198
+
199
+ <?php _e( 'Allow users to edit avatars', 'one-user-avatar' ); ?>
200
+ </label>
201
+ </fieldset>
202
+
203
+ <fieldset>
204
+ <label for="wp_user_avatar_resize_upload">
205
+ <input name="wp_user_avatar_resize_upload" type="checkbox" id="wp_user_avatar_resize_upload" value="1" <?php checked( $wpua_resize_upload ); ?> />
206
+
207
+ <?php _e( 'Resize avatars on upload', 'one-user-avatar' ); ?>
208
+ </label>
209
+ </fieldset>
210
+
211
+ <fieldset id="wpua-resize-sizes"'.$hide_resize.'>
212
+ <label for="wp_user_avatar_resize_w"><?php _e( 'Width', 'one-user-avatar' ); ?></label>
213
+
214
+ <input name="wp_user_avatar_resize_w" type="number" step="1" min="0" id="wp_user_avatar_resize_w" value="<?php echo esc_attr( get_option( 'wp_user_avatar_resize_w' ) ); ?>" class="small-text" />
215
+
216
+ <label for="wp_user_avatar_resize_h"><?php _e( 'Height', 'one-user-avatar' ); ?></label>
217
+
218
+ <input name="wp_user_avatar_resize_h" type="number" step="1" min="0" id="wp_user_avatar_resize_h" value="<?php echo esc_attr( get_option( 'wp_user_avatar_resize_h' ) ); ?>" class="small-text" />
219
+
220
+ <br />
221
+
222
+ <input name="wp_user_avatar_resize_crop" type="checkbox" id="wp_user_avatar_resize_crop" value="1" <?php checked( '1', $wpua_resize_crop ); ?> />
223
+
224
+ <label for="wp_user_avatar_resize_crop"><?php _e( 'Crop avatars to exact dimensions', 'one-user-avatar' ); ?></label>
225
+ </fieldset>
226
+ </td>
227
+ </tr>
228
+ </table>
229
+ </div>
230
+
231
+ <?php
232
+ $wpua_subscriber_settings['subscriber-settings'] = ob_get_clean();
233
+
234
+ /**
235
+ * Filter Subscriber settings
236
+ * @since 1.9
237
+ * @param array $wpua_subscriber_settings
238
+ */
239
+ $wpua_subscriber_settings = apply_filters( 'wpua_subscriber_settings', $wpua_subscriber_settings );
240
+
241
+ echo implode( '', $wpua_subscriber_settings );
242
+ ?>
243
+
244
+ <table class="form-table">
245
+ <tr valign="top">
246
+ <th scope="row"><?php _e( 'Avatar Display', 'one-user-avatar' ); ?></th>
247
+
248
+ <td>
249
+ <fieldset>
250
+ <legend class="screen-reader-text">
251
+ <span>
252
+ <?php _e( 'Avatar Display', 'one-user-avatar' ); ?>
253
+ </span>
254
+ </legend>
255
+
256
+ <label for="show_avatars">
257
+ <input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( $show_avatars ); ?> />
258
+
259
+ <?php _e( 'Show Avatars', 'one-user-avatar' ); ?>
260
+ </label>
261
+ </fieldset>
262
+ </td>
263
+ </tr>
264
+
265
+ <tr valign="top" id="avatar-rating"<?php echo ( 1 === (bool) $wpua_disable_gravatar ) ? ' style="display:none"' : '' ?>>
266
+ <th scope="row"><?php _e( 'Maximum Rating', 'one-user-avatar' ); ?></th>
267
+
268
+ <td>
269
+ <fieldset>
270
+ <legend class="screen-reader-text">
271
+ <span>
272
+ <?php _e( 'Maximum Rating', 'one-user-avatar' ); ?>
273
+ </span>
274
+ </legend>
275
+
276
+ <?php
277
+ $ratings = array(
278
+ 'G' => __( 'G &#8212; Suitable for all audiences', 'one-user-avatar' ),
279
+ 'PG' => __( 'PG &#8212; Possibly offensive, usually for audiences 13 and above', 'one-user-avatar' ),
280
+ 'R' => __( 'R &#8212; Intended for adult audiences above 17', 'one-user-avatar' ),
281
+ 'X' => __( 'X &#8212; Even more mature than above', 'one-user-avatar' ),
282
+ );
283
+
284
+ foreach ( $ratings as $key => $rating ) :
285
+ ?>
286
+ <label>
287
+ <input type="radio" name="avatar_rating" value="<?php echo esc_attr( $key ); ?>" <?php checked( $key, get_option( 'avatar_rating' ) ); ?> />
288
+ <?php echo $rating; ?>
289
+ </label>
290
+
291
+ <br />
292
+ <?php
293
+ endforeach;
294
+ ?>
295
+ </fieldset>
296
+ </td>
297
+ </tr>
298
+
299
+ <tr valign="top">
300
+ <th scope="row"><?php _e( 'Default Avatar', 'one-user-avatar' ); ?></th>
301
+
302
+ <td class="defaultavatarpicker">
303
+ <fieldset>
304
+ <legend class="screen-reader-text">
305
+ <span>
306
+ <?php _e( 'Default Avatar', 'one-user-avatar' ); ?>
307
+ </span>
308
+ </legend>
309
+
310
+ <?php _e( 'For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.', 'one-user-avatar' ); ?>
311
+
312
+ <br />
313
+
314
+ <?php echo $wpua_admin->wpua_add_default_avatar(); ?>
315
+ </fieldset>
316
+ </td>
317
+ </tr>
318
+ </table>
319
+
320
+ <?php submit_button(); ?>
321
+ </form>
322
+ </td>
323
+ </tr>
324
+ </table>
325
+ </div>
includes/wpua-tinymce-window.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * TinyMCE modal window.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * @since 1.2.1
19
+ * @uses get_users()
20
+ */
21
+
22
+ if ( ! defined('ABSPATH' ) ) {
23
+ die( 'You are not allowed to call this page directly.' );
24
+ }
25
+
26
+ $hook_suffix = 'one-user-avatar_tinymce-window';
27
+
28
+ ?><!DOCTYPE html>
29
+ <html>
30
+ <head>
31
+ <title><?php _e( 'One User Avatar', 'one-user-avatar' ); ?></title>
32
+ <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
33
+ <base target="_self" />
34
+ <?php
35
+ /**
36
+ * Enqueue scripts.
37
+ *
38
+ * @since 2.3.0
39
+ *
40
+ * @param string $hook_suffix The current admin page.
41
+ */
42
+ do_action( 'admin_enqueue_scripts', $hook_suffix );
43
+
44
+ /**
45
+ * Fires when styles are printed for this specific page based on $hook_suffix.
46
+ *
47
+ * @since 2.3.0
48
+ */
49
+ do_action( "admin_print_styles-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
50
+
51
+ /**
52
+ * Fires when styles are printed for all admin pages.
53
+ *
54
+ * @since 2.3.0
55
+ */
56
+ do_action( 'admin_print_styles' );
57
+
58
+ /**
59
+ * Fires when scripts are printed for this specific page based on $hook_suffix.
60
+ *
61
+ * @since 2.3.0
62
+ */
63
+ do_action( "admin_print_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
64
+
65
+ /**
66
+ * Fires when scripts are printed for all admin pages.
67
+ *
68
+ * @since 2.3.0
69
+ */
70
+ do_action( 'admin_print_scripts' );
71
+
72
+ /**
73
+ * Fires in head section for this specific admin page.
74
+ *
75
+ * The dynamic portion of the hook, `$hook_suffix`, refers to the hook suffix
76
+ * for the admin page.
77
+ *
78
+ * @since 2.3.0
79
+ */
80
+ do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
81
+
82
+ /**
83
+ * Fires in head section for all admin pages.
84
+ *
85
+ * @since 2.3.0
86
+ */
87
+ do_action( 'admin_head' );
88
+ ?>
89
+ </head>
90
+
91
+ <body id="link" class="wp-core-ui" onload="document.body.style.display='';" style="display:none;">
92
+ <div id="wpua-tabs">
93
+ <ul>
94
+ <li><a href="#wpua"><?php _e( 'Profile Picture', 'one-user-avatar' ); ?></a></li>
95
+ <li><a href="#wpua-upload"><?php _e( 'Upload', 'one-user-avatar' ); ?></a></li>
96
+ </ul>
97
+
98
+ <form name="wpUserAvatar" action="#">
99
+ <div id="wpua">
100
+ <p>
101
+ <label for="<?php echo esc_attr( 'wp_user_avatar_user' ); ?>"><strong><?php _e( 'User Name', 'one-user-avatar' ); ?>:</strong></label>
102
+
103
+ <select id="<?php echo esc_attr( 'wp_user_avatar_user' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_user' ); ?>">
104
+ <option value=""></option>
105
+
106
+ <?php
107
+ $users = get_users();
108
+
109
+ foreach($users as $user) :
110
+ ?>
111
+
112
+ <option value="<?php echo esc_attr( $user->user_login ); ?>"><?php echo esc_html( $user->display_name ); ?></option>
113
+
114
+ <?php
115
+ endforeach;
116
+ ?>
117
+ </select>
118
+ </p>
119
+
120
+ <p>
121
+ <label for="<?php echo esc_attr( 'wp_user_avatar_size' ); ?>"><strong><?php _e( 'Size:', 'one-user-avatar' ); ?></strong></label>
122
+
123
+ <select id="<?php echo esc_attr( 'wp_user_avatar_size' ); ?>" name="<?php echo esc_attr('wp_user_avatar_size'); ?>">
124
+ <option value=""></option>
125
+ <option value="original"><?php _e( 'Original Size', 'one-user-avatar' ); ?></option>
126
+ <option value="large"><?php _e( 'Large', 'one-user-avatar' ); ?></option>
127
+ <option value="medium"><?php _e( 'Medium', 'one-user-avatar' ); ?></option>
128
+ <option value="thumbnail"><?php _e( 'Thumbnail', 'one-user-avatar' ); ?></option>
129
+ <option value="custom"><?php _e( 'Custom', 'one-user-avatar' ); ?></option>
130
+ </select>
131
+ </p>
132
+
133
+ <p id="<?php echo esc_attr( 'wp_user_avatar_size_number_section' ); ?>">
134
+ <label for="<?php echo esc_attr( 'wp_user_avatar_size_number' ); ?>"><?php _e( 'Size:', 'one-user-avatar' ); ?></label>
135
+
136
+ <input type="text" size="8" id="<?php echo esc_attr( 'wp_user_avatar_size_number' ); ?>" name="<?php echo esc_attr ( 'wp_user_avatar_size' ); ?>" value="" />
137
+ </p>
138
+
139
+ <p>
140
+ <label for="<?php echo esc_attr( 'wp_user_avatar_align' ); ?>"><strong><?php _e( 'Alignment:', 'one-user-avatar' ); ?></strong></label>
141
+
142
+ <select id="<?php echo esc_attr( 'wp_user_avatar_align' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_align' ); ?>">
143
+ <option value=""></option>
144
+ <option value="center"><?php _e( 'Center','one-user-avatar' ); ?></option>
145
+ <option value="left"><?php _e( 'Left', 'one-user-avatar' ); ?></option>
146
+ <option value="right"><?php _e( 'Right', 'one-user-avatar' ); ?></option>
147
+ </select>
148
+ </p>
149
+
150
+ <p>
151
+ <label for="<?php echo esc_attr( 'wp_user_avatar_link' ); ?>"><strong><?php _e( 'Link To:', 'one-user-avatar' ); ?></strong></label>
152
+
153
+ <select id="<?php echo esc_attr( 'wp_user_avatar_link' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_link' ); ?>">
154
+ <option value=""></option>
155
+ <option value="file"><?php _e('Image File', 'one-user-avatar'); ?></option>
156
+ <option value="attachment"><?php _e('Attachment Page','one-user-avatar'); ?></option>
157
+ <option value="custom-url"><?php _e('Custom URL', 'one-user-avatar'); ?></option>
158
+ </select>
159
+ </p>
160
+
161
+ <p id="<?php echo esc_attr( 'wp_user_avatar_link_external_section' ); ?>">
162
+ <label for="<?php echo esc_attr( 'wp_user_avatar_link_external' ); ?>"><?php _e( 'URL:', 'one-user-avatar' ); ?></label>
163
+
164
+ <input type="text" size="36" id="<?php echo esc_attr( 'wp_user_avatar_link_external' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_link_external' ); ?>" value="" />
165
+ </p>
166
+
167
+ <p>
168
+ <label for="<?php echo esc_attr( 'wp_user_avatar_target' ); ?>"></label>
169
+
170
+ <input type="checkbox" id="<?php echo esc_attr( 'wp_user_avatar_target' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_target' ); ?>" value="_blank" /> <strong><?php _e( 'Open link in a new window', 'one-user-avatar' ); ?></strong>
171
+ </p>
172
+
173
+ <p>
174
+ <label for="<?php echo esc_attr( 'wp_user_avatar_caption' ); ?>"><strong><?php _e( 'Caption', 'one-user-avatar' ); ?>:</strong></label>
175
+
176
+ <textarea cols="36" rows="2" id="<?php echo esc_attr( 'wp_user_avatar_caption' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_size' ); ?>"></textarea>
177
+ </p>
178
+
179
+ <div class="mceActionPanel">
180
+ <input type="submit" id="insert" class="button-primary" name="insert" value="<?php _e( 'Insert into Post', 'one-user-avatar' ); ?>" onclick="wpuaInsertAvatar();" />
181
+ </div>
182
+ </div>
183
+
184
+ <div id="wpua-upload" style="display:none;">
185
+ <p id="<?php echo esc_attr( 'wp_user_avatar_upload' ); ?>">
186
+ <label for="<?php echo esc_attr( 'wp_user_avatar_upload' ); ?>"><strong><?php _e( 'Upload', 'one-user-avatar' ); ?>:</strong></label>
187
+
188
+ <input type="text" size="36" id="<?php echo esc_attr( 'wp_user_avatar_upload' ); ?>" name="<?php echo esc_attr( 'wp_user_avatar_upload' ); ?>" value="<?php echo esc_attr( '[avatar_upload]' ); ?>" readonly="readonly" />
189
+ </p>
190
+
191
+ <div class="mceActionPanel">
192
+ <input type="submit" id="insert" class="button-primary" name="insert" value="<?php _e( 'Insert into Post', 'one-user-avatar' ); ?>" onclick="wpuaInsertAvatarUpload();" />
193
+ </div>
194
+ </div>
195
+ </form>
196
+ </div>
197
+ </body>
198
+ </html>
includes/wpua-tinymce.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * TinyMCE button for Visual Editor.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * Add TinyMCE button
19
+ * @since 1.9.5
20
+ * @uses add_filter()
21
+ * @uses get_user_option()
22
+ */
23
+ function wpua_add_buttons() {
24
+ // Add only in Rich Editor mode
25
+ if ( 'true' == get_user_option( 'rich_editing' ) ) {
26
+ add_filter( 'mce_external_plugins', 'wpua_add_tinymce_plugin' );
27
+ add_filter( 'mce_buttons', 'wpua_register_button' );
28
+ }
29
+ }
30
+ add_action( 'init', 'wpua_add_buttons' );
31
+
32
+ /**
33
+ * Register TinyMCE button
34
+ * @since 1.9.5
35
+ * @param array $buttons
36
+ * @return array
37
+ */
38
+ function wpua_register_button( $buttons ) {
39
+ array_push( $buttons, 'separator', 'wpUserAvatar' );
40
+
41
+ return $buttons;
42
+ }
43
+
44
+ /**
45
+ * Load TinyMCE plugin
46
+ * @since 1.9.5
47
+ * @param array $plugin_array
48
+ * @return array
49
+ */
50
+ function wpua_add_tinymce_plugin( $plugins ) {
51
+ $plugins['wpUserAvatar'] = WPUA_JS_URL . 'tinymce-editor_plugin.js';
52
+
53
+ return $plugins;
54
+ }
55
+
56
+ function wpua_tinymce_enqueue_scripts( $hook_suffix ) {
57
+ switch ( $hook_suffix ) {
58
+ case 'one-user-avatar_tinymce-window':
59
+ wp_enqueue_style( 'one-user-avatar-tinymce-window', WPUA_CSS_URL . 'tinymce-window.css' );
60
+
61
+ wp_enqueue_script( 'jquery' );
62
+ wp_enqueue_script( 'one-user-avatar-tinymce-popup', includes_url( 'js/tinymce/tiny_mce_popup.js' ) );
63
+ wp_enqueue_script( 'one-user-avatar-tinymce-form-utils', includes_url( 'js/tinymce/utils/form_utils.js' ) );
64
+ wp_enqueue_script( 'one-user-avatar-tinymce-window', WPUA_JS_URL . 'tinymce-window.js' );
65
+
66
+ break;
67
+
68
+ case 'post.php':
69
+ wp_localize_script( 'editor', 'one_user_avatar_tinymce_editor_args', array(
70
+ 'insert_avatar' => __( 'Insert Avatar', 'one-user-avatar' ),
71
+ ) );
72
+
73
+ break;
74
+ }
75
+ }
76
+ add_action( 'admin_enqueue_scripts', 'wpua_tinymce_enqueue_scripts' );
77
+
78
+ /**
79
+ * Call TinyMCE window content via admin-ajax
80
+ * @since 1.4
81
+ */
82
+ function wpua_ajax_tinymce() {
83
+ include_once( WPUA_INC . 'wpua-tinymce-window.php' );
84
+
85
+ die();
86
+ }
87
+ add_action( 'wp_ajax_wp_user_avatar_tinymce', 'wpua_ajax_tinymce' );
index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
languages/de_DE.mo ADDED
Binary file
languages/de_DE.po ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WP User Avatar | User Profile Picture - Stable (latest release) in German
2
+ # This file is distributed under the same license as the Plugins - WP User Avatar | User Profile Picture - Stable (latest release) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WP User Avatar | User Profile Picture - Stable "
6
+ "(latest release)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
8
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
9
+ "PO-Revision-Date: 2021-06-01 20:14+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: de\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.4.3\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Verwende beliebige Bilder aus deiner WordPress-Mediathek als individuellen "
37
+ "Benutzer-Avatar. Füge einen eigenen Standard-Avatar hinzu. Gabelung von WP "
38
+ "User Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Du bist nicht berechtigt, diesen Beitrag zu löschen."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Fehler beim Löschen."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatare"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Einstellungen"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Bibliothek"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Mystery Man"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Leer"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Gravatar-Logo"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (automatisch generiert)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (automatisch generiert)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (automatisch generiert)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (automatisch generiert)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Bild auswählen"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Entfernen"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Rückgängig"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Support-Foren"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Profilbild"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Standard-Avatar"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Alle %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Endgültig löschen"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Keine Medienanhänge gefunden."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Datei"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Autor"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Hochgeladen zu"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Datum"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "%s auswählen"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Unveröffentlicht"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s ab jetzt"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "vor %s"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "d.m.Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Bearbeiten"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Wiederherstellen"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Papierkorb"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Anzeigen"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Es tut uns leid, aber die Seitenvorlage Ihres Themas hat %s nicht "
222
+ "aufgerufen, was von One User Avatar benötigt wird. Bitte fügen Sie diesen "
223
+ "Aufruf Ihren Seitenvorlagen hinzu."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Profil aktualisiert."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Profil aktualisieren"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "Einfügen"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Titel:"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Beschreibung:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Absätze automatisch hinzufügen"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Bild auswählen: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Hochladen"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Maximale Dateigröße für Uploads: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Erlaubte Dateien: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Originalgröße"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Vorschaubild"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Bild entfernen"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Diese Datei ist kein Bild. Bitte versuche es mit einer anderen."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr ""
291
+ "Speicherkapazität überschritten. Bitte versuche es mit einer kleineren Datei."
292
+
293
+ #. translators: directory path
294
+ #: includes/class-wp-user-avatar.php:389
295
+ msgid ""
296
+ "Unable to create directory %s. Is its parent directory writable by the "
297
+ "server?"
298
+ msgstr ""
299
+ "Das Verzeichnis %s konnte nicht erstellt werden. Ist das übergeordnete "
300
+ "Verzeichnis auf dem Server beschreibbar?"
301
+
302
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
303
+ msgid "Image"
304
+ msgstr "Bild"
305
+
306
+ #: includes/wpua-media-page.php:46
307
+ msgid "You do not have permission to upload files."
308
+ msgstr "Du hast keine Berechtigung zum Dateiupload."
309
+
310
+ #. translators: search query
311
+ #: includes/wpua-media-page.php:66
312
+ msgid "Search results for %s"
313
+ msgstr "Suchergebnisse für %s"
314
+
315
+ #: includes/wpua-media-page.php:98
316
+ msgid "Search"
317
+ msgstr "Suchen"
318
+
319
+ #: includes/wpua-options-page.php:108
320
+ msgid "Add avatar button to Visual Editor"
321
+ msgstr "Avator-Button zum visuellen Editor hinzufügen"
322
+
323
+ #: includes/wpua-options-page.php:119
324
+ msgid "Allow Contributors & Subscribers to upload avatars"
325
+ msgstr "Mitwirkenden und Abonnenten erlauben, Avatare hochzuladen"
326
+
327
+ #: includes/wpua-options-page.php:130
328
+ msgid "Disable Gravatar and use only local avatars"
329
+ msgstr "Gravatar deaktivieren und nur lokale Avatare verwenden"
330
+
331
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
332
+ msgid "Upload Size Limit"
333
+ msgstr "Dateigrößenbeschränkung"
334
+
335
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
336
+ msgid "(only for Contributors & Subscribers)"
337
+ msgstr "(nur für Mitwirkende und Abonnenten)"
338
+
339
+ #. translators: file name
340
+ #: includes/wpua-options-page.php:178
341
+ msgid "%s exceeds the maximum upload size for this site."
342
+ msgstr "%s überschreitet das Upload-Limit für diese Website."
343
+
344
+ #: includes/wpua-options-page.php:199
345
+ msgid "Allow users to edit avatars"
346
+ msgstr "Benutzern erlauben, Avatare zu bearbeiten"
347
+
348
+ #: includes/wpua-options-page.php:207
349
+ msgid "Resize avatars on upload"
350
+ msgstr "Avatar-Größe beim Upload ändern"
351
+
352
+ #: includes/wpua-options-page.php:212
353
+ msgid "Width"
354
+ msgstr "Breite"
355
+
356
+ #: includes/wpua-options-page.php:216
357
+ msgid "Height"
358
+ msgstr "Höhe"
359
+
360
+ #: includes/wpua-options-page.php:224
361
+ msgid "Crop avatars to exact dimensions"
362
+ msgstr "Avatare auf exakte Größe zuschneiden"
363
+
364
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
365
+ msgid "Avatar Display"
366
+ msgstr "Avataranzeige"
367
+
368
+ #: includes/wpua-options-page.php:259
369
+ msgid "Show Avatars"
370
+ msgstr "Avatare anzeigen"
371
+
372
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
373
+ msgid "Maximum Rating"
374
+ msgstr "Avatare anzeigen mit der Einstufung bis einschließlich"
375
+
376
+ #: includes/wpua-options-page.php:278
377
+ msgid "G &#8212; Suitable for all audiences"
378
+ msgstr "G &#8212; Jugendfrei"
379
+
380
+ #: includes/wpua-options-page.php:279
381
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
382
+ msgstr "PG &#8212; Entspricht dem deutschen FSK12"
383
+
384
+ #: includes/wpua-options-page.php:280
385
+ msgid "R &#8212; Intended for adult audiences above 17"
386
+ msgstr "R &#8212; Entspricht in etwa dem deutschen FSK18"
387
+
388
+ #: includes/wpua-options-page.php:281
389
+ msgid "X &#8212; Even more mature than above"
390
+ msgstr "X &#8212; Keine Jugendfreigabe"
391
+
392
+ #: includes/wpua-options-page.php:310
393
+ msgid ""
394
+ "For users without a custom avatar of their own, you can either display a "
395
+ "generic logo or a generated one based on their e-mail address."
396
+ msgstr ""
397
+ "Für Benutzer ohne individuellen Avatar kann wahlweise ein Standardlogo oder "
398
+ "ein auf Basis deren E-Mail-Adressen erzeugter Avatar angezeigt werden."
399
+
400
+ #: includes/wpua-tinymce-window.php:101
401
+ msgid "User Name"
402
+ msgstr "Benutzername"
403
+
404
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
405
+ msgid "Size:"
406
+ msgstr "Größe:"
407
+
408
+ #: includes/wpua-tinymce-window.php:126
409
+ msgid "Large"
410
+ msgstr "Groß"
411
+
412
+ #: includes/wpua-tinymce-window.php:127
413
+ msgid "Medium"
414
+ msgstr "Mittel"
415
+
416
+ #: includes/wpua-tinymce-window.php:129
417
+ msgid "Custom"
418
+ msgstr "Individuell"
419
+
420
+ #: includes/wpua-tinymce-window.php:140
421
+ msgid "Alignment:"
422
+ msgstr "Ausrichtung:"
423
+
424
+ #: includes/wpua-tinymce-window.php:144
425
+ msgid "Center"
426
+ msgstr "Zentriert"
427
+
428
+ #: includes/wpua-tinymce-window.php:145
429
+ msgid "Left"
430
+ msgstr "Links"
431
+
432
+ #: includes/wpua-tinymce-window.php:146
433
+ msgid "Right"
434
+ msgstr "Rechts"
435
+
436
+ #: includes/wpua-tinymce-window.php:151
437
+ msgid "Link To:"
438
+ msgstr "Link zu:"
439
+
440
+ #: includes/wpua-tinymce-window.php:155
441
+ msgid "Image File"
442
+ msgstr "Bilddatei"
443
+
444
+ #: includes/wpua-tinymce-window.php:156
445
+ msgid "Attachment Page"
446
+ msgstr "Anhang-Seite"
447
+
448
+ #: includes/wpua-tinymce-window.php:157
449
+ msgid "Custom URL"
450
+ msgstr "Benutzerdefinierte URL"
451
+
452
+ #: includes/wpua-tinymce-window.php:162
453
+ msgid "URL:"
454
+ msgstr "URL:"
455
+
456
+ #: includes/wpua-tinymce-window.php:170
457
+ msgid "Open link in a new window"
458
+ msgstr "Link in neuem Fenster öffnen"
459
+
460
+ #: includes/wpua-tinymce-window.php:174
461
+ msgid "Caption"
462
+ msgstr "Beschriftung"
463
+
464
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
465
+ msgid "Insert into Post"
466
+ msgstr "In Beitrag einfügen"
467
+
468
+ #: includes/wpua-tinymce.php:70
469
+ msgid "Insert Avatar"
470
+ msgstr "Avatar einfügen"
471
+
472
+ #. translators: placeholder for <a> and </a> tags.
473
+ #: one-user-avatar.php:127
474
+ msgid ""
475
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
476
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
477
+ msgstr ""
478
+ "Das Plugin One User Avatar ist ein Ersatz für das alte WP User Avatar "
479
+ "Plugin. Bitte %1$deaktivieren Sie WP User Avatar%2$s, um es zu verwenden."
480
+
481
+ #~ msgid "Edit Image"
482
+ #~ msgstr "Bild bearbeiten"
483
+
484
+ #~ msgid "Media attachment permanently deleted."
485
+ #~ msgid_plural "%d media attachments permanently deleted."
486
+ #~ msgstr[0] "Der Medienanhang wurde endgültig gelöscht."
487
+ #~ msgstr[1] "%d Medienanhänge wurden endgültig gelöscht."
languages/en_GB.mo ADDED
Binary file
languages/en_GB.po ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WP User Avatar | User Profile Picture - Stable (latest release) in English (UK)
2
+ # This file is distributed under the same license as the Plugins - WP User Avatar | User Profile Picture - Stable (latest release) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WP User Avatar | User Profile Picture - Stable "
6
+ "(latest release)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
8
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
9
+ "PO-Revision-Date: 2021-06-01 20:15+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: en_GB\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.4.3\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
37
+ "your own Default Avatar."
38
+
39
+ #. Author of the plugin
40
+ msgid "One Designs"
41
+ msgstr "One Designs"
42
+
43
+ #. Author URI of the plugin
44
+ msgid "https://onedesigns.com/"
45
+ msgstr "https://onedesigns.com/"
46
+
47
+ #: includes/class-wp-user-avatar-admin.php:170
48
+ msgid "You are not allowed to delete this post."
49
+ msgstr "You are not allowed to delete this post."
50
+
51
+ #: includes/class-wp-user-avatar-admin.php:174
52
+ msgid "Error in deleting."
53
+ msgstr "Error in deleting."
54
+
55
+ #: includes/class-wp-user-avatar-admin.php:228
56
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
57
+ msgid "Avatars"
58
+ msgstr "Avatars"
59
+
60
+ #: includes/class-wp-user-avatar-admin.php:237
61
+ #: includes/class-wp-user-avatar-admin.php:238
62
+ #: includes/class-wp-user-avatar-admin.php:462
63
+ #: includes/wpua-options-page.php:93
64
+ msgid "Settings"
65
+ msgstr "Settings"
66
+
67
+ #: includes/class-wp-user-avatar-admin.php:246
68
+ #: includes/class-wp-user-avatar-admin.php:247
69
+ msgid "Library"
70
+ msgstr "Library"
71
+
72
+ #: includes/class-wp-user-avatar-admin.php:372
73
+ msgid "Mystery Man"
74
+ msgstr "Mystery Man"
75
+
76
+ #: includes/class-wp-user-avatar-admin.php:373
77
+ msgid "Blank"
78
+ msgstr "Blank"
79
+
80
+ #: includes/class-wp-user-avatar-admin.php:374
81
+ msgid "Gravatar Logo"
82
+ msgstr "Gravatar Logo"
83
+
84
+ #: includes/class-wp-user-avatar-admin.php:375
85
+ msgid "Identicon (Generated)"
86
+ msgstr "Identicon (Generated)"
87
+
88
+ #: includes/class-wp-user-avatar-admin.php:376
89
+ msgid "Wavatar (Generated)"
90
+ msgstr "Wavatar (Generated)"
91
+
92
+ #: includes/class-wp-user-avatar-admin.php:377
93
+ msgid "MonsterID (Generated)"
94
+ msgstr "MonsterID (Generated)"
95
+
96
+ #: includes/class-wp-user-avatar-admin.php:378
97
+ msgid "Retro (Generated)"
98
+ msgstr "Retro (Generated)"
99
+
100
+ #: includes/class-wp-user-avatar-admin.php:427
101
+ #: includes/class-wp-user-avatar.php:231
102
+ msgid "Choose Image"
103
+ msgstr "Choose Image"
104
+
105
+ #: includes/class-wp-user-avatar-admin.php:428
106
+ msgid "Remove"
107
+ msgstr "Remove"
108
+
109
+ #: includes/class-wp-user-avatar-admin.php:428
110
+ #: includes/class-wp-user-avatar.php:292
111
+ msgid "Undo"
112
+ msgstr "Undo"
113
+
114
+ #: includes/class-wp-user-avatar-admin.php:480
115
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
116
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+
118
+ #: includes/class-wp-user-avatar-admin.php:481
119
+ msgid "Support Forums"
120
+ msgstr "Support Forums"
121
+
122
+ #: includes/class-wp-user-avatar-admin.php:495
123
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
124
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
125
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
126
+ msgid "Profile Picture"
127
+ msgstr "Profile Picture"
128
+
129
+ #: includes/class-wp-user-avatar-admin.php:560
130
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
131
+ msgid "Default Avatar"
132
+ msgstr "Default Avatar"
133
+
134
+ #: includes/class-wp-user-avatar-functions.php:515
135
+ #: includes/class-wp-user-avatar-functions.php:716
136
+ msgid "Avatar"
137
+ msgstr "Avatar"
138
+
139
+ #. translators: uploaded files
140
+ #: includes/class-wp-user-avatar-list-table.php:176
141
+ msgctxt "uploaded files"
142
+ msgid "All %s"
143
+ msgstr "All %s"
144
+
145
+ #: includes/class-wp-user-avatar-list-table.php:192
146
+ #: includes/class-wp-user-avatar-list-table.php:549
147
+ msgid "Delete Permanently"
148
+ msgstr "Delete Permanently"
149
+
150
+ #: includes/class-wp-user-avatar-list-table.php:222
151
+ msgid "No media attachments found."
152
+ msgstr "No media attachments found."
153
+
154
+ #: includes/class-wp-user-avatar-list-table.php:235
155
+ msgctxt "column name"
156
+ msgid "File"
157
+ msgstr "File"
158
+
159
+ #: includes/class-wp-user-avatar-list-table.php:236
160
+ msgid "Author"
161
+ msgstr "Author"
162
+
163
+ #: includes/class-wp-user-avatar-list-table.php:237
164
+ msgctxt "column name"
165
+ msgid "Uploaded to"
166
+ msgstr "Uploaded to"
167
+
168
+ #: includes/class-wp-user-avatar-list-table.php:238
169
+ msgctxt "column name"
170
+ msgid "Date"
171
+ msgstr "Date"
172
+
173
+ #. translators: post title
174
+ #: includes/class-wp-user-avatar-list-table.php:323
175
+ msgid "Select %s"
176
+ msgstr "Select %s"
177
+
178
+ #: includes/class-wp-user-avatar-list-table.php:414
179
+ msgid "Unpublished"
180
+ msgstr "Unpublished"
181
+
182
+ #. translators: time from now
183
+ #: includes/class-wp-user-avatar-list-table.php:422
184
+ msgctxt "time from now"
185
+ msgid "%s from now"
186
+ msgstr "%s from now"
187
+
188
+ #. translators: time ago
189
+ #: includes/class-wp-user-avatar-list-table.php:428
190
+ msgctxt "time ago"
191
+ msgid "%s ago"
192
+ msgstr "%s ago"
193
+
194
+ #: includes/class-wp-user-avatar-list-table.php:433
195
+ msgid "Y/m/d"
196
+ msgstr "y/m/d"
197
+
198
+ #: includes/class-wp-user-avatar-list-table.php:523
199
+ msgid "Edit"
200
+ msgstr "Edit"
201
+
202
+ #: includes/class-wp-user-avatar-list-table.php:532
203
+ msgid "Restore"
204
+ msgstr "Restore"
205
+
206
+ #: includes/class-wp-user-avatar-list-table.php:538
207
+ msgid "Trash"
208
+ msgstr "Bin"
209
+
210
+ #: includes/class-wp-user-avatar-list-table.php:561
211
+ msgid "View"
212
+ msgstr "View"
213
+
214
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
215
+ #: includes/class-wp-user-avatar-resource-manager.php:190
216
+ msgid ""
217
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
218
+ "is required by One User Avatar. Please add this call to your page templates."
219
+ msgstr ""
220
+ "We’re sorry, but your theme’s page template didn’t make a call to %s, which "
221
+ "is required by One User Avatar. Please add this call to your page templates."
222
+
223
+ #: includes/class-wp-user-avatar-shortcode.php:243
224
+ msgid "Profile updated."
225
+ msgstr "Profile updated."
226
+
227
+ #: includes/class-wp-user-avatar-shortcode.php:273
228
+ msgid "Update Profile"
229
+ msgstr "Update Profile"
230
+
231
+ #. translators: [avatar_upload] shortcode
232
+ #: includes/class-wp-user-avatar-widget.php:27
233
+ msgid "Insert %s"
234
+ msgstr "Insert %s"
235
+
236
+ #: includes/class-wp-user-avatar-widget.php:99
237
+ msgid "Title:"
238
+ msgstr "Title:"
239
+
240
+ #: includes/class-wp-user-avatar-widget.php:105
241
+ msgid "Description:"
242
+ msgstr "Description:"
243
+
244
+ #: includes/class-wp-user-avatar-widget.php:113
245
+ msgid "Automatically add paragraphs"
246
+ msgstr "Automatically add paragraphs"
247
+
248
+ #. translators: user display name
249
+ #: includes/class-wp-user-avatar.php:227
250
+ msgid "Choose Image: %s"
251
+ msgstr "Choose Image: %s"
252
+
253
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
254
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
255
+ msgid "Upload"
256
+ msgstr "Upload"
257
+
258
+ #. translators: file size in KB
259
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
260
+ msgid "Maximum upload file size: %s."
261
+ msgstr "Maximum upload file size: %s."
262
+
263
+ #. translators: allowed file extensions
264
+ #: includes/class-wp-user-avatar.php:263
265
+ msgid "Allowed Files: %s"
266
+ msgstr "Allowed Files: %s"
267
+
268
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
269
+ #: includes/wpua-tinymce-window.php:125
270
+ msgid "Original Size"
271
+ msgstr "Original Size"
272
+
273
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
274
+ #: includes/wpua-tinymce-window.php:128
275
+ msgid "Thumbnail"
276
+ msgstr "Thumbnail"
277
+
278
+ #: includes/class-wp-user-avatar.php:288
279
+ msgid "Remove Image"
280
+ msgstr "Remove Image"
281
+
282
+ #: includes/class-wp-user-avatar.php:377
283
+ msgid "This file is not an image. Please try another."
284
+ msgstr "This file is not an image. Please try another."
285
+
286
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
287
+ msgid "Memory exceeded. Please try another smaller file."
288
+ msgstr "Memory exceeded. Please try another smaller file."
289
+
290
+ #. translators: directory path
291
+ #: includes/class-wp-user-avatar.php:389
292
+ msgid ""
293
+ "Unable to create directory %s. Is its parent directory writable by the "
294
+ "server?"
295
+ msgstr ""
296
+ "Unable to create directory %s. Is its parent directory writable by the "
297
+ "server?"
298
+
299
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
300
+ msgid "Image"
301
+ msgstr "Image"
302
+
303
+ #: includes/wpua-media-page.php:46
304
+ msgid "You do not have permission to upload files."
305
+ msgstr "You do not have permission to upload files."
306
+
307
+ #. translators: search query
308
+ #: includes/wpua-media-page.php:66
309
+ msgid "Search results for %s"
310
+ msgstr "Search results for %s"
311
+
312
+ #: includes/wpua-media-page.php:98
313
+ msgid "Search"
314
+ msgstr "Search"
315
+
316
+ #: includes/wpua-options-page.php:108
317
+ msgid "Add avatar button to Visual Editor"
318
+ msgstr "Add avatar button to Visual Editor"
319
+
320
+ #: includes/wpua-options-page.php:119
321
+ msgid "Allow Contributors & Subscribers to upload avatars"
322
+ msgstr "Allow Contributors & Subscribers to upload avatars"
323
+
324
+ #: includes/wpua-options-page.php:130
325
+ msgid "Disable Gravatar and use only local avatars"
326
+ msgstr "Disable Gravatar and use only local avatars"
327
+
328
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
329
+ msgid "Upload Size Limit"
330
+ msgstr "Upload Size Limit"
331
+
332
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
333
+ msgid "(only for Contributors & Subscribers)"
334
+ msgstr "(only for Contributors & Subscribers)"
335
+
336
+ #. translators: file name
337
+ #: includes/wpua-options-page.php:178
338
+ msgid "%s exceeds the maximum upload size for this site."
339
+ msgstr "%s exceeds the maximum upload size for this site."
340
+
341
+ #: includes/wpua-options-page.php:199
342
+ msgid "Allow users to edit avatars"
343
+ msgstr "Allow users to edit avatars"
344
+
345
+ #: includes/wpua-options-page.php:207
346
+ msgid "Resize avatars on upload"
347
+ msgstr "Resize avatars on upload"
348
+
349
+ #: includes/wpua-options-page.php:212
350
+ msgid "Width"
351
+ msgstr "Width"
352
+
353
+ #: includes/wpua-options-page.php:216
354
+ msgid "Height"
355
+ msgstr "Height"
356
+
357
+ #: includes/wpua-options-page.php:224
358
+ msgid "Crop avatars to exact dimensions"
359
+ msgstr "Crop avatars to exact dimensions"
360
+
361
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
362
+ msgid "Avatar Display"
363
+ msgstr "Avatar Display"
364
+
365
+ #: includes/wpua-options-page.php:259
366
+ msgid "Show Avatars"
367
+ msgstr "Show Avatars"
368
+
369
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
370
+ msgid "Maximum Rating"
371
+ msgstr "Maximum Rating"
372
+
373
+ #: includes/wpua-options-page.php:278
374
+ msgid "G &#8212; Suitable for all audiences"
375
+ msgstr "G &#8212; Suitable for all audiences"
376
+
377
+ #: includes/wpua-options-page.php:279
378
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
379
+ msgstr "PG &#8212; Possibly offensive, usually for audiences 13 and above"
380
+
381
+ #: includes/wpua-options-page.php:280
382
+ msgid "R &#8212; Intended for adult audiences above 17"
383
+ msgstr "R &#8212; Intended for adult audiences above 17"
384
+
385
+ #: includes/wpua-options-page.php:281
386
+ msgid "X &#8212; Even more mature than above"
387
+ msgstr "X &#8212; Even more mature than above"
388
+
389
+ #: includes/wpua-options-page.php:310
390
+ msgid ""
391
+ "For users without a custom avatar of their own, you can either display a "
392
+ "generic logo or a generated one based on their e-mail address."
393
+ msgstr ""
394
+ "For users without a custom avatar of their own, you can either display a "
395
+ "generic logo or a generated one based on their e-mail address."
396
+
397
+ #: includes/wpua-tinymce-window.php:101
398
+ msgid "User Name"
399
+ msgstr "User Name"
400
+
401
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
402
+ msgid "Size:"
403
+ msgstr "Size:"
404
+
405
+ #: includes/wpua-tinymce-window.php:126
406
+ msgid "Large"
407
+ msgstr "Large"
408
+
409
+ #: includes/wpua-tinymce-window.php:127
410
+ msgid "Medium"
411
+ msgstr "Medium"
412
+
413
+ #: includes/wpua-tinymce-window.php:129
414
+ msgid "Custom"
415
+ msgstr "Custom"
416
+
417
+ #: includes/wpua-tinymce-window.php:140
418
+ msgid "Alignment:"
419
+ msgstr "Alignment:"
420
+
421
+ #: includes/wpua-tinymce-window.php:144
422
+ msgid "Center"
423
+ msgstr "Centre"
424
+
425
+ #: includes/wpua-tinymce-window.php:145
426
+ msgid "Left"
427
+ msgstr "Left"
428
+
429
+ #: includes/wpua-tinymce-window.php:146
430
+ msgid "Right"
431
+ msgstr "Right"
432
+
433
+ #: includes/wpua-tinymce-window.php:151
434
+ msgid "Link To:"
435
+ msgstr "Link To:"
436
+
437
+ #: includes/wpua-tinymce-window.php:155
438
+ msgid "Image File"
439
+ msgstr "Image File"
440
+
441
+ #: includes/wpua-tinymce-window.php:156
442
+ msgid "Attachment Page"
443
+ msgstr "Attachment Page"
444
+
445
+ #: includes/wpua-tinymce-window.php:157
446
+ msgid "Custom URL"
447
+ msgstr "Custom URL"
448
+
449
+ #: includes/wpua-tinymce-window.php:162
450
+ msgid "URL:"
451
+ msgstr "URL:"
452
+
453
+ #: includes/wpua-tinymce-window.php:170
454
+ msgid "Open link in a new window"
455
+ msgstr "Open link in a new window"
456
+
457
+ #: includes/wpua-tinymce-window.php:174
458
+ msgid "Caption"
459
+ msgstr "Caption"
460
+
461
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
462
+ msgid "Insert into Post"
463
+ msgstr "Insert into Post"
464
+
465
+ #: includes/wpua-tinymce.php:70
466
+ msgid "Insert Avatar"
467
+ msgstr "Insert Avatar"
468
+
469
+ #. translators: placeholder for <a> and </a> tags.
470
+ #: one-user-avatar.php:127
471
+ msgid ""
472
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
473
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
474
+ msgstr ""
475
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
476
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
477
+
478
+ #~ msgid "Media attachment permanently deleted."
479
+ #~ msgid_plural "%d media attachments permanently deleted."
480
+ #~ msgstr[0] "Media attachment permanently deleted."
481
+ #~ msgstr[1] "%d media attachments permanently deleted."
languages/es_ES.mo ADDED
Binary file
languages/es_ES.po ADDED
@@ -0,0 +1,483 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WP User Avatar | User Profile Picture - Stable (latest release) in Spanish (Spain)
2
+ # This file is distributed under the same license as the Plugins - WP User Avatar | User Profile Picture - Stable (latest release) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WP User Avatar | User Profile Picture - Stable "
6
+ "(latest release)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
8
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
9
+ "PO-Revision-Date: 2021-06-01 20:17+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: es\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.4.3\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Utiliza cualquier imagen de tu biblioteca de medios de WordPress como un "
37
+ "avatar personalizado. Añade tu propio Avatar por defecto. Bifurcación de WP "
38
+ "User Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "No tienes permisos para eliminar esta entrada."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Error al eliminar."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatares"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Ajustes"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Biblioteca"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Hombre misterioso"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "En blanco"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Logo Gravatar"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (generado)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (generado)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (generado)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (generado)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Elegir imagen"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Eliminar"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Deshacer"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Foro de soporte"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Imagen del perfil"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Avatar por defecto"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Todos %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Borrar permanentemente"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "No se han encontrado adjuntos."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Archivo"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Autor"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Subido a"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Fecha"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Selecciona %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Despublicado"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s desde ahora"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "hace %s"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "d/m/Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Editar"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Restaurar"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Papelera"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Ver"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Lo sentimos, pero la plantilla de la página de su tema no hizo una llamada a "
222
+ "%s, lo cual es requerido por One User Avatar. Agregue esta llamada a las "
223
+ "plantillas de su página."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Perfil actualizado."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Actualizar el perfil"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "Insertar %s"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Título:"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Descripción:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Añadir párrafos automáticamente"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Elegir imagen: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Subir"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Tamaño máximo de subida: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Archivos permitidos: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Tamaño original"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Miniatura"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Eliminar imagen"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Este archivo no es una imagen. Por favor prueba con otro."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr "Memoria superada. Por favor prueba con un archivo más pequeño."
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid ""
295
+ "Unable to create directory %s. Is its parent directory writable by the "
296
+ "server?"
297
+ msgstr ""
298
+ "No fue posible crear el directorio %s. ¿Es el directorio superior editable "
299
+ "por el servidor?"
300
+
301
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
302
+ msgid "Image"
303
+ msgstr "Imagen"
304
+
305
+ #: includes/wpua-media-page.php:46
306
+ msgid "You do not have permission to upload files."
307
+ msgstr "No tienes permisos para subir archivos."
308
+
309
+ #. translators: search query
310
+ #: includes/wpua-media-page.php:66
311
+ msgid "Search results for %s"
312
+ msgstr "Resultados de búsqueda para %s"
313
+
314
+ #: includes/wpua-media-page.php:98
315
+ msgid "Search"
316
+ msgstr "Buscar"
317
+
318
+ #: includes/wpua-options-page.php:108
319
+ msgid "Add avatar button to Visual Editor"
320
+ msgstr "Añadir botón de avatar al editor visual"
321
+
322
+ #: includes/wpua-options-page.php:119
323
+ msgid "Allow Contributors & Subscribers to upload avatars"
324
+ msgstr "Permitir los colaboradores y los suscriptores subir avatares"
325
+
326
+ #: includes/wpua-options-page.php:130
327
+ msgid "Disable Gravatar and use only local avatars"
328
+ msgstr "Desactivar Gravatar y utilizar sólo los avatares locales"
329
+
330
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
331
+ msgid "Upload Size Limit"
332
+ msgstr "Tamaño máximo de subida"
333
+
334
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
335
+ msgid "(only for Contributors & Subscribers)"
336
+ msgstr "(para colaboradores y suscriptores)"
337
+
338
+ #. translators: file name
339
+ #: includes/wpua-options-page.php:178
340
+ msgid "%s exceeds the maximum upload size for this site."
341
+ msgstr "%s excede el limite de tamaño máximo para el archivo."
342
+
343
+ #: includes/wpua-options-page.php:199
344
+ msgid "Allow users to edit avatars"
345
+ msgstr "Permitir a los usuarios editar su avatar"
346
+
347
+ #: includes/wpua-options-page.php:207
348
+ msgid "Resize avatars on upload"
349
+ msgstr "Escalar los avatares al subirlos"
350
+
351
+ #: includes/wpua-options-page.php:212
352
+ msgid "Width"
353
+ msgstr "Ancho"
354
+
355
+ #: includes/wpua-options-page.php:216
356
+ msgid "Height"
357
+ msgstr "Altura"
358
+
359
+ #: includes/wpua-options-page.php:224
360
+ msgid "Crop avatars to exact dimensions"
361
+ msgstr "Recortar los avatares a sus dimensiones exactas"
362
+
363
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr "Mostrar avatar"
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr "Mostrar avatares"
370
+
371
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
372
+ msgid "Maximum Rating"
373
+ msgstr "Clasificación máxima"
374
+
375
+ #: includes/wpua-options-page.php:278
376
+ msgid "G &#8212; Suitable for all audiences"
377
+ msgstr "G &#8212; Apto para todo público"
378
+
379
+ #: includes/wpua-options-page.php:279
380
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
381
+ msgstr "PG &#8212; Posiblemente ofensivo, para audiencias menores a 13 años"
382
+
383
+ #: includes/wpua-options-page.php:280
384
+ msgid "R &#8212; Intended for adult audiences above 17"
385
+ msgstr "R &#8212; Para audiencias adultas mayores a 17"
386
+
387
+ #: includes/wpua-options-page.php:281
388
+ msgid "X &#8212; Even more mature than above"
389
+ msgstr "X &#8212; Todavía más adulto que el anterior"
390
+
391
+ #: includes/wpua-options-page.php:310
392
+ msgid ""
393
+ "For users without a custom avatar of their own, you can either display a "
394
+ "generic logo or a generated one based on their e-mail address."
395
+ msgstr ""
396
+ "Para usuarios sin un avatar personalizado, puedes mostrar un logo genérico o "
397
+ "uno generado en base a su dirección de correo electrónico."
398
+
399
+ #: includes/wpua-tinymce-window.php:101
400
+ msgid "User Name"
401
+ msgstr "Nombre de usuario"
402
+
403
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
404
+ msgid "Size:"
405
+ msgstr "Tamaño:"
406
+
407
+ #: includes/wpua-tinymce-window.php:126
408
+ msgid "Large"
409
+ msgstr "Grande"
410
+
411
+ #: includes/wpua-tinymce-window.php:127
412
+ msgid "Medium"
413
+ msgstr "Medio"
414
+
415
+ #: includes/wpua-tinymce-window.php:129
416
+ msgid "Custom"
417
+ msgstr "Costumbre"
418
+
419
+ #: includes/wpua-tinymce-window.php:140
420
+ msgid "Alignment:"
421
+ msgstr "Alineación:"
422
+
423
+ #: includes/wpua-tinymce-window.php:144
424
+ msgid "Center"
425
+ msgstr "Centro"
426
+
427
+ #: includes/wpua-tinymce-window.php:145
428
+ msgid "Left"
429
+ msgstr "Izquierda"
430
+
431
+ #: includes/wpua-tinymce-window.php:146
432
+ msgid "Right"
433
+ msgstr "Derecha"
434
+
435
+ #: includes/wpua-tinymce-window.php:151
436
+ msgid "Link To:"
437
+ msgstr "Enlace a:"
438
+
439
+ #: includes/wpua-tinymce-window.php:155
440
+ msgid "Image File"
441
+ msgstr "Archivo de imagen"
442
+
443
+ #: includes/wpua-tinymce-window.php:156
444
+ msgid "Attachment Page"
445
+ msgstr "Página de adjuntos"
446
+
447
+ #: includes/wpua-tinymce-window.php:157
448
+ msgid "Custom URL"
449
+ msgstr "URL personalizada"
450
+
451
+ #: includes/wpua-tinymce-window.php:162
452
+ msgid "URL:"
453
+ msgstr "URL:"
454
+
455
+ #: includes/wpua-tinymce-window.php:170
456
+ msgid "Open link in a new window"
457
+ msgstr "Abrir enlace en ventana nueva"
458
+
459
+ #: includes/wpua-tinymce-window.php:174
460
+ msgid "Caption"
461
+ msgstr "Leyenda"
462
+
463
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
464
+ msgid "Insert into Post"
465
+ msgstr "Insertar en la entrada"
466
+
467
+ #: includes/wpua-tinymce.php:70
468
+ msgid "Insert Avatar"
469
+ msgstr "Insertar avatar"
470
+
471
+ #. translators: placeholder for <a> and </a> tags.
472
+ #: one-user-avatar.php:127
473
+ msgid ""
474
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
475
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
476
+ msgstr ""
477
+ "El plugin One User Avatar es un reemplazo del antiguo plugin WP User Avatar. "
478
+ "%1$sDesactive WP User Avatar%2$s para comenzar a usarlo."
479
+
480
+ #~ msgid "Media attachment permanently deleted."
481
+ #~ msgid_plural "%d media attachments permanently deleted."
482
+ #~ msgstr[0] "Imagen adjunta eliminada permanentemente"
483
+ #~ msgstr[1] "%d imágenes adjuntas eliminadas permanentemente"
languages/fr_FR.mo ADDED
Binary file
languages/fr_FR.po ADDED
@@ -0,0 +1,485 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WP User Avatar | User Profile Picture - Stable (latest release) in French (France)
2
+ # This file is distributed under the same license as the Plugins - WP User Avatar | User Profile Picture - Stable (latest release) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WP User Avatar | User Profile Picture - Stable "
6
+ "(latest release)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
8
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
9
+ "PO-Revision-Date: 2021-06-01 20:16+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: fr\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n > 1;\n"
17
+ "X-Generator: Poedit 2.4.3\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Utiliser n'importe quelle image dans votre Bibliothèque de médias de "
37
+ "WordPress comme un avatar personnalisé. Ajouter votre propre avatar par "
38
+ "défaut. Basé sur WP User Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Vous n'êtes pas autorisé à supprimer cet article."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Error lors de la suppression."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatars"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Réglages"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Librairie"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Homme mystère"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Vide"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Logo Gravatar"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (généré)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (généré)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (généré)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (généré)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Choisir une image"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Retirer"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Annuler"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Forums de support"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Image de profil"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Avatar par défaut"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Tous %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Supprimer Définitivement"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Pas de fichier média attaché."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Fichier"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Auteur"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Téléversé sur"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Date"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Sélectionner %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Non publié"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s à partir de maintenant"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "il y a %s"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "d/m/Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Modifier"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Restaurer"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Supprimer"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Afficher"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Nous sommes désolés, mais le modèle de page de votre thème n’a pas appelé "
222
+ "%s, ce qui est requis par One User Avatar. Veuillez ajouter cet appel à vos "
223
+ "modèles de page."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Profil mis à jour."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Mettre à jour votre profil"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "Insérer %s"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Titre :"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Description&nbsp;:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Créer automatiquement les paragraphes"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Choisir une image: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Envoi"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Taille maximum de fichier autorisée: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Fichiers autorisés: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Taille d’origine"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Miniature"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Retirer l’image"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Ce fichier n’est pas une image. Veuillez en envoyer un autre."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr "Mémoire dépassée. Veuillez réessayer avec un fichier plus petit."
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid ""
295
+ "Unable to create directory %s. Is its parent directory writable by the "
296
+ "server?"
297
+ msgstr ""
298
+ "Impossible de créer le dossier %s. Son dossier parent est-il accessible en "
299
+ "écriture par le serveur ?"
300
+
301
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
302
+ msgid "Image"
303
+ msgstr "Image"
304
+
305
+ #: includes/wpua-media-page.php:46
306
+ msgid "You do not have permission to upload files."
307
+ msgstr "Vous n’avez pas les droits nécessaires pour charger des fichiers."
308
+
309
+ #. translators: search query
310
+ #: includes/wpua-media-page.php:66
311
+ msgid "Search results for %s"
312
+ msgstr "Résultats de la recherche pour %s"
313
+
314
+ #: includes/wpua-media-page.php:98
315
+ msgid "Search"
316
+ msgstr "Rechercher"
317
+
318
+ #: includes/wpua-options-page.php:108
319
+ msgid "Add avatar button to Visual Editor"
320
+ msgstr "Ajouter le bouton avatar sur l'éditeur visuel"
321
+
322
+ #: includes/wpua-options-page.php:119
323
+ msgid "Allow Contributors & Subscribers to upload avatars"
324
+ msgstr "Permettre aux contributeurs et aux abonnés d'envoyer des avatars"
325
+
326
+ #: includes/wpua-options-page.php:130
327
+ msgid "Disable Gravatar and use only local avatars"
328
+ msgstr "Désactiver Gravatar et utiliser les avatars fournis"
329
+
330
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
331
+ msgid "Upload Size Limit"
332
+ msgstr "Taille limite d'envoi de fichiers"
333
+
334
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
335
+ msgid "(only for Contributors & Subscribers)"
336
+ msgstr "(pour contributeurs et abonnés)"
337
+
338
+ #. translators: file name
339
+ #: includes/wpua-options-page.php:178
340
+ msgid "%s exceeds the maximum upload size for this site."
341
+ msgstr "%s dépasse la limite d’envoi de ce site."
342
+
343
+ #: includes/wpua-options-page.php:199
344
+ msgid "Allow users to edit avatars"
345
+ msgstr "Permettre aux utilisateurs de modifier avatar"
346
+
347
+ #: includes/wpua-options-page.php:207
348
+ msgid "Resize avatars on upload"
349
+ msgstr "Redimensionner avatars lors du téléchargement"
350
+
351
+ #: includes/wpua-options-page.php:212
352
+ msgid "Width"
353
+ msgstr "Largeur"
354
+
355
+ #: includes/wpua-options-page.php:216
356
+ msgid "Height"
357
+ msgstr "Hauteur"
358
+
359
+ #: includes/wpua-options-page.php:224
360
+ msgid "Crop avatars to exact dimensions"
361
+ msgstr "Recadrer les avatars pour parvenir aux dimensions exactes"
362
+
363
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr "Affichage de l’avatar"
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr "Afficher les avatars"
370
+
371
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
372
+ msgid "Maximum Rating"
373
+ msgstr "Classement maximal"
374
+
375
+ #: includes/wpua-options-page.php:278
376
+ msgid "G &#8212; Suitable for all audiences"
377
+ msgstr "G &#8212; Visibles par tous"
378
+
379
+ #: includes/wpua-options-page.php:279
380
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
381
+ msgstr ""
382
+ "PG &#8212; Possiblement offensants, réservés normalement aux personnes de 13 "
383
+ "ans et plus"
384
+
385
+ #: includes/wpua-options-page.php:280
386
+ msgid "R &#8212; Intended for adult audiences above 17"
387
+ msgstr "R &#8212; Réservés aux personnes de plus de 17 ans"
388
+
389
+ #: includes/wpua-options-page.php:281
390
+ msgid "X &#8212; Even more mature than above"
391
+ msgstr "X &#8212; Réservés aux adultes"
392
+
393
+ #: includes/wpua-options-page.php:310
394
+ msgid ""
395
+ "For users without a custom avatar of their own, you can either display a "
396
+ "generic logo or a generated one based on their e-mail address."
397
+ msgstr ""
398
+ "Les utilisateurs n’ayant pas d’avatar peuvent se voir attribuer un logo "
399
+ "générique, ou un avatar généré à partir de leur adresse de messagerie."
400
+
401
+ #: includes/wpua-tinymce-window.php:101
402
+ msgid "User Name"
403
+ msgstr "Nom d’utilisateur"
404
+
405
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
406
+ msgid "Size:"
407
+ msgstr "Taille:"
408
+
409
+ #: includes/wpua-tinymce-window.php:126
410
+ msgid "Large"
411
+ msgstr "Grand"
412
+
413
+ #: includes/wpua-tinymce-window.php:127
414
+ msgid "Medium"
415
+ msgstr "Moyen"
416
+
417
+ #: includes/wpua-tinymce-window.php:129
418
+ msgid "Custom"
419
+ msgstr "Personnalisé"
420
+
421
+ #: includes/wpua-tinymce-window.php:140
422
+ msgid "Alignment:"
423
+ msgstr "Alignement:"
424
+
425
+ #: includes/wpua-tinymce-window.php:144
426
+ msgid "Center"
427
+ msgstr "Centré"
428
+
429
+ #: includes/wpua-tinymce-window.php:145
430
+ msgid "Left"
431
+ msgstr "À gauche"
432
+
433
+ #: includes/wpua-tinymce-window.php:146
434
+ msgid "Right"
435
+ msgstr "À droite"
436
+
437
+ #: includes/wpua-tinymce-window.php:151
438
+ msgid "Link To:"
439
+ msgstr "Lier à:"
440
+
441
+ #: includes/wpua-tinymce-window.php:155
442
+ msgid "Image File"
443
+ msgstr "Fichier image"
444
+
445
+ #: includes/wpua-tinymce-window.php:156
446
+ msgid "Attachment Page"
447
+ msgstr "Page du fichier joint"
448
+
449
+ #: includes/wpua-tinymce-window.php:157
450
+ msgid "Custom URL"
451
+ msgstr "URL personnalisée"
452
+
453
+ #: includes/wpua-tinymce-window.php:162
454
+ msgid "URL:"
455
+ msgstr "URL:"
456
+
457
+ #: includes/wpua-tinymce-window.php:170
458
+ msgid "Open link in a new window"
459
+ msgstr "Ouvrir le lien dans une nouvelle fenêtre"
460
+
461
+ #: includes/wpua-tinymce-window.php:174
462
+ msgid "Caption"
463
+ msgstr "Légende"
464
+
465
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
466
+ msgid "Insert into Post"
467
+ msgstr "Insérer dans la publication"
468
+
469
+ #: includes/wpua-tinymce.php:70
470
+ msgid "Insert Avatar"
471
+ msgstr "Insérer un avatar"
472
+
473
+ #. translators: placeholder for <a> and </a> tags.
474
+ #: one-user-avatar.php:127
475
+ msgid ""
476
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
477
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
478
+ msgstr ""
479
+ "Le plugin One User Avatar remplace l’ancien plugin WP User Avatar. Veuillez "
480
+ "%1$sdésactiver WP User Avatar%2$s pour commencer à l’utiliser."
481
+
482
+ #~ msgid "Media attachment permanently deleted."
483
+ #~ msgid_plural "%d media attachments permanently deleted."
484
+ #~ msgstr[0] "Média attaché supprimé définitivement."
485
+ #~ msgstr[1] "%d médias attachés supprimés définitivement."
languages/it_IT.mo ADDED
Binary file
languages/it_IT.po ADDED
@@ -0,0 +1,476 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WP User Avatar | User Profile Picture - Stable (latest release) in Italian
2
+ # This file is distributed under the same license as the Plugins - WP User Avatar | User Profile Picture - Stable (latest release) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WP User Avatar | User Profile Picture - Stable "
6
+ "(latest release)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
8
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
9
+ "PO-Revision-Date: 2021-06-01 20:16+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: it\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.4.3\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Usa qualsiasi immagine dalla Libreria di WordPress come un avatar utente "
37
+ "personalizzato. Aggiungi il tuo avatar di default. Fork di WP User Avatar "
38
+ "v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Non hai i permessi per cancellare questo post."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Errore durante la cancellazione."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatar"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Impostazioni"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Libreria"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Utente Anonimo"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Vuoto"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Gravatar Logo"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (Generato)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (Generato)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (Generato)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (Generato)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Scegli immagine"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Rimuovi"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Annulla"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Forum di supporto"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Immagine del profilo"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Avatar Standard"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Tutti %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Elimina definitivamente"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Nessuna immagine trovata."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "File"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Autore"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Caricato in"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Data"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Seleziona %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Non pubblicato"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s da ora"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "%s fa"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "Y/m/d"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Modifica"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Ripristina"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Cestino"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Visualizza"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+
222
+ #: includes/class-wp-user-avatar-shortcode.php:243
223
+ msgid "Profile updated."
224
+ msgstr "Profilo aggiornato."
225
+
226
+ #: includes/class-wp-user-avatar-shortcode.php:273
227
+ msgid "Update Profile"
228
+ msgstr "Aggiorna il Profilo"
229
+
230
+ #. translators: [avatar_upload] shortcode
231
+ #: includes/class-wp-user-avatar-widget.php:27
232
+ msgid "Insert %s"
233
+ msgstr "Inserisci %s"
234
+
235
+ #: includes/class-wp-user-avatar-widget.php:99
236
+ msgid "Title:"
237
+ msgstr "Titolo:"
238
+
239
+ #: includes/class-wp-user-avatar-widget.php:105
240
+ msgid "Description:"
241
+ msgstr "Descrizione:"
242
+
243
+ #: includes/class-wp-user-avatar-widget.php:113
244
+ msgid "Automatically add paragraphs"
245
+ msgstr "Aggiungi i paragrafi automaticamente"
246
+
247
+ #. translators: user display name
248
+ #: includes/class-wp-user-avatar.php:227
249
+ msgid "Choose Image: %s"
250
+ msgstr "Scegli immagine: %s"
251
+
252
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
253
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
254
+ msgid "Upload"
255
+ msgstr "Carica"
256
+
257
+ #. translators: file size in KB
258
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
259
+ msgid "Maximum upload file size: %s."
260
+ msgstr "Dimensione massima del file da caricare: %s."
261
+
262
+ #. translators: allowed file extensions
263
+ #: includes/class-wp-user-avatar.php:263
264
+ msgid "Allowed Files: %s"
265
+ msgstr "Tipi di files consentiti: %s"
266
+
267
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
268
+ #: includes/wpua-tinymce-window.php:125
269
+ msgid "Original Size"
270
+ msgstr "Dimensioni Originali"
271
+
272
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
273
+ #: includes/wpua-tinymce-window.php:128
274
+ msgid "Thumbnail"
275
+ msgstr "Miniatura"
276
+
277
+ #: includes/class-wp-user-avatar.php:288
278
+ msgid "Remove Image"
279
+ msgstr "Rimuovi immagine"
280
+
281
+ #: includes/class-wp-user-avatar.php:377
282
+ msgid "This file is not an image. Please try another."
283
+ msgstr "Questo file non è un' immagine. Prova con un altro file."
284
+
285
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
286
+ msgid "Memory exceeded. Please try another smaller file."
287
+ msgstr "File troppo grande. Devi ridurre le dimensioni."
288
+
289
+ #. translators: directory path
290
+ #: includes/class-wp-user-avatar.php:389
291
+ msgid ""
292
+ "Unable to create directory %s. Is its parent directory writable by the "
293
+ "server?"
294
+ msgstr ""
295
+ "Impossibile creare la cartella %s. Controllare che la cartella superiore non "
296
+ "sia in sola lettura."
297
+
298
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
299
+ msgid "Image"
300
+ msgstr "Immagine"
301
+
302
+ #: includes/wpua-media-page.php:46
303
+ msgid "You do not have permission to upload files."
304
+ msgstr "Non hai il permesso di caricare file."
305
+
306
+ #. translators: search query
307
+ #: includes/wpua-media-page.php:66
308
+ msgid "Search results for %s"
309
+ msgstr "Risultati di ricerca per %s"
310
+
311
+ #: includes/wpua-media-page.php:98
312
+ msgid "Search"
313
+ msgstr "Cerca"
314
+
315
+ #: includes/wpua-options-page.php:108
316
+ msgid "Add avatar button to Visual Editor"
317
+ msgstr "Aggiungi un pulsante avatar all'editor visuale"
318
+
319
+ #: includes/wpua-options-page.php:119
320
+ msgid "Allow Contributors & Subscribers to upload avatars"
321
+ msgstr "Permetti ai Collaboratori e Sottoscrittori di caricare avatar"
322
+
323
+ #: includes/wpua-options-page.php:130
324
+ msgid "Disable Gravatar and use only local avatars"
325
+ msgstr "Disabilita Gravatar e usa solo avatar locali"
326
+
327
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
328
+ msgid "Upload Size Limit"
329
+ msgstr "Dimensione massima caricamento"
330
+
331
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
332
+ msgid "(only for Contributors & Subscribers)"
333
+ msgstr "(solo per Collaboratori & Sottoscrittori)"
334
+
335
+ #. translators: file name
336
+ #: includes/wpua-options-page.php:178
337
+ msgid "%s exceeds the maximum upload size for this site."
338
+ msgstr "%s supera le dimensioni massime di caricamento per questo sito."
339
+
340
+ #: includes/wpua-options-page.php:199
341
+ msgid "Allow users to edit avatars"
342
+ msgstr "Consenti agli utenti di modificare gli avatar"
343
+
344
+ #: includes/wpua-options-page.php:207
345
+ msgid "Resize avatars on upload"
346
+ msgstr "Ridimensiona gli avatar durante il caricamento"
347
+
348
+ #: includes/wpua-options-page.php:212
349
+ msgid "Width"
350
+ msgstr "Larghezza"
351
+
352
+ #: includes/wpua-options-page.php:216
353
+ msgid "Height"
354
+ msgstr "Altezza"
355
+
356
+ #: includes/wpua-options-page.php:224
357
+ msgid "Crop avatars to exact dimensions"
358
+ msgstr "Taglia gli avatar alle dimensioni esatte"
359
+
360
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
361
+ msgid "Avatar Display"
362
+ msgstr "Visualizza l'Avatar"
363
+
364
+ #: includes/wpua-options-page.php:259
365
+ msgid "Show Avatars"
366
+ msgstr "Mostra gli Avatars"
367
+
368
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
369
+ msgid "Maximum Rating"
370
+ msgstr "Valutazione massima"
371
+
372
+ #: includes/wpua-options-page.php:278
373
+ msgid "G &#8212; Suitable for all audiences"
374
+ msgstr "G &#8212; Adatto a tutti i tipi di pubblico"
375
+
376
+ #: includes/wpua-options-page.php:279
377
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
378
+ msgstr ""
379
+ "PG &#8212; Forse offensivo, di solito per un pubblico maggiore di 13 anni"
380
+
381
+ #: includes/wpua-options-page.php:280
382
+ msgid "R &#8212; Intended for adult audiences above 17"
383
+ msgstr "R &#8212; Adatto per un pubblico adulto sopra i 17 anni"
384
+
385
+ #: includes/wpua-options-page.php:281
386
+ msgid "X &#8212; Even more mature than above"
387
+ msgstr "X &#8212; Ancora più maturo rispetto al precedente"
388
+
389
+ #: includes/wpua-options-page.php:310
390
+ msgid ""
391
+ "For users without a custom avatar of their own, you can either display a "
392
+ "generic logo or a generated one based on their e-mail address."
393
+ msgstr ""
394
+ "Per gli utenti senza un avatar personalizzato, è possibile visualizzare un "
395
+ "logo generico o uno generato in base all'indirizzo di posta elettronica."
396
+
397
+ #: includes/wpua-tinymce-window.php:101
398
+ msgid "User Name"
399
+ msgstr "Nome Utente"
400
+
401
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
402
+ msgid "Size:"
403
+ msgstr "Dimensione:"
404
+
405
+ #: includes/wpua-tinymce-window.php:126
406
+ msgid "Large"
407
+ msgstr "Grande"
408
+
409
+ #: includes/wpua-tinymce-window.php:127
410
+ msgid "Medium"
411
+ msgstr "Medio"
412
+
413
+ #: includes/wpua-tinymce-window.php:129
414
+ msgid "Custom"
415
+ msgstr "Personalizzato"
416
+
417
+ #: includes/wpua-tinymce-window.php:140
418
+ msgid "Alignment:"
419
+ msgstr "Allineamento:"
420
+
421
+ #: includes/wpua-tinymce-window.php:144
422
+ msgid "Center"
423
+ msgstr "Centra"
424
+
425
+ #: includes/wpua-tinymce-window.php:145
426
+ msgid "Left"
427
+ msgstr "Sinista"
428
+
429
+ #: includes/wpua-tinymce-window.php:146
430
+ msgid "Right"
431
+ msgstr "Destra"
432
+
433
+ #: includes/wpua-tinymce-window.php:151
434
+ msgid "Link To:"
435
+ msgstr "Collega a:"
436
+
437
+ #: includes/wpua-tinymce-window.php:155
438
+ msgid "Image File"
439
+ msgstr "File Immagine"
440
+
441
+ #: includes/wpua-tinymce-window.php:156
442
+ msgid "Attachment Page"
443
+ msgstr "Pagina dell’allegato"
444
+
445
+ #: includes/wpua-tinymce-window.php:157
446
+ msgid "Custom URL"
447
+ msgstr "Url personalizzato"
448
+
449
+ #: includes/wpua-tinymce-window.php:162
450
+ msgid "URL:"
451
+ msgstr "URL:"
452
+
453
+ #: includes/wpua-tinymce-window.php:170
454
+ msgid "Open link in a new window"
455
+ msgstr "Apri il link in una nuova finestra"
456
+
457
+ #: includes/wpua-tinymce-window.php:174
458
+ msgid "Caption"
459
+ msgstr "Didascalia"
460
+
461
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
462
+ msgid "Insert into Post"
463
+ msgstr "Inserisci nell'articolo"
464
+
465
+ #: includes/wpua-tinymce.php:70
466
+ msgid "Insert Avatar"
467
+ msgstr "Inserisci avatar"
468
+
469
+ #. translators: placeholder for <a> and </a> tags.
470
+ #: one-user-avatar.php:127
471
+ msgid ""
472
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
473
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
474
+ msgstr ""
475
+ "Il plugin One User Avatar è un sostituto del vecchio plugin WP User Avatar. "
476
+ "%1$sDisattiva WP User Avatar%2$s per iniziare a usarlo."
languages/nl_NL.mo ADDED
Binary file
languages/nl_NL.po ADDED
@@ -0,0 +1,479 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 One Designs
2
+ # This file is distributed under the same license as the One User Avatar plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: One User Avatar 2.3.2\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
7
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
8
+ "PO-Revision-Date: 2021-06-01 20:17+0100\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "Language: nl_NL\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.4.3\n"
16
+ "X-Domain: one-user-avatar\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Gebruik een afbeelding uit je WordPress mediabibliotheek als een aangepaste "
37
+ "gebruikersavatar. Voeg je eigen standaardavatar toe. Gebaseerd op of WP User "
38
+ "Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Je hebt geen toestemming om dit bericht te verwijderen."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Fout tijdens het verwijderen."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatars"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Instellingen"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Bibliotheek"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Mysterieuze Man"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Leeg"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Gravatar Logo"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (Gegenereerd)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (Gegenereerd)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (Gegenereerd)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (Gegenereerd)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Kies foto"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Verwijderen"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Ongedaan maken"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Helpforums"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Profielfoto"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Standaard Avatar"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Alle %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Permanent verwijderen"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Geen mediabijlagen gevonden."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Bestand"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Auteur"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Geüpload naar"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Datum"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Selecteer %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Ongepubliceerd"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s vanaf nu"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "%s geleden"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "j F Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Bewerk"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Herstel"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Prullenbak"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Bekijken"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Het spijt ons, maar de pagina template van je thema heeft geen oproep gedaan "
222
+ "naar %s, wat vereist is door One User Avatar. Voeg deze oproep toe aan je "
223
+ "pagina template."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Profiel bijgewerkt."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Profiel bijwerken"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "%s invoegen"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Titel:"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Beschrijving:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Automatisch paragrafen toevoegen"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Kies foto: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Uploaden"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Maximale bestandsgrootte van upload: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Toegestane bestanden: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Originele grootte"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Thumbnail"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Afbeelding verwijderen"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Dit bestand is geen afbeelding. Probeer een ander bestand."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr "Het geheugen is overschreden. Probeer opnieuw met een kleiner bestand."
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid ""
295
+ "Unable to create directory %s. Is its parent directory writable by the "
296
+ "server?"
297
+ msgstr ""
298
+ "Kan map %s niet aanmaken. Is de bovenliggende map beschrijfbaar door de "
299
+ "server?"
300
+
301
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
302
+ msgid "Image"
303
+ msgstr "Afbeelding"
304
+
305
+ #: includes/wpua-media-page.php:46
306
+ msgid "You do not have permission to upload files."
307
+ msgstr "Je hebt geen toestemming om bestanden te uploaden."
308
+
309
+ #. translators: search query
310
+ #: includes/wpua-media-page.php:66
311
+ msgid "Search results for %s"
312
+ msgstr "Zoekresultaten voor %s"
313
+
314
+ #: includes/wpua-media-page.php:98
315
+ msgid "Search"
316
+ msgstr "Zoeken"
317
+
318
+ #: includes/wpua-options-page.php:108
319
+ msgid "Add avatar button to Visual Editor"
320
+ msgstr "Voeg avatar-knop toe aan de visuele editor"
321
+
322
+ #: includes/wpua-options-page.php:119
323
+ msgid "Allow Contributors & Subscribers to upload avatars"
324
+ msgstr "Sta schrijvers & abonnees toe om avatars te uploaden"
325
+
326
+ #: includes/wpua-options-page.php:130
327
+ msgid "Disable Gravatar and use only local avatars"
328
+ msgstr "Schakel Gravatar uit en gebruik alleen lokale avatars"
329
+
330
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
331
+ msgid "Upload Size Limit"
332
+ msgstr "Bestandsgrootte uploadlimiet"
333
+
334
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
335
+ msgid "(only for Contributors & Subscribers)"
336
+ msgstr "(alleen voor schrijvers & abonnees)"
337
+
338
+ #. translators: file name
339
+ #: includes/wpua-options-page.php:178
340
+ msgid "%s exceeds the maximum upload size for this site."
341
+ msgstr "%s overschrijdt de maximale uploadgrootte voor deze site."
342
+
343
+ #: includes/wpua-options-page.php:199
344
+ msgid "Allow users to edit avatars"
345
+ msgstr "Sta gebruikers toe om avatars te bewerken"
346
+
347
+ #: includes/wpua-options-page.php:207
348
+ msgid "Resize avatars on upload"
349
+ msgstr "Pas de grootte van avatars aan bij het uploaden"
350
+
351
+ #: includes/wpua-options-page.php:212
352
+ msgid "Width"
353
+ msgstr "Breedte"
354
+
355
+ #: includes/wpua-options-page.php:216
356
+ msgid "Height"
357
+ msgstr "Hoogte"
358
+
359
+ #: includes/wpua-options-page.php:224
360
+ msgid "Crop avatars to exact dimensions"
361
+ msgstr "Snijd avatars bij tot exacte afmetingen"
362
+
363
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr "Avatar weergave"
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr "Toon avatars"
370
+
371
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
372
+ msgid "Maximum Rating"
373
+ msgstr "Leeftijdsgrens"
374
+
375
+ #: includes/wpua-options-page.php:278
376
+ msgid "G &#8212; Suitable for all audiences"
377
+ msgstr "G &#8212; Geschikt voor alle leeftijden"
378
+
379
+ #: includes/wpua-options-page.php:279
380
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
381
+ msgstr ""
382
+ "PG &#8212; Mogelijk kwetsend, gebruikelijk voor leeftijden van 13 en hoger"
383
+
384
+ #: includes/wpua-options-page.php:280
385
+ msgid "R &#8212; Intended for adult audiences above 17"
386
+ msgstr "R &#8212; Alleen voor boven de 17"
387
+
388
+ #: includes/wpua-options-page.php:281
389
+ msgid "X &#8212; Even more mature than above"
390
+ msgstr "X &#8212; Nog ouder dan hierboven"
391
+
392
+ #: includes/wpua-options-page.php:310
393
+ msgid ""
394
+ "For users without a custom avatar of their own, you can either display a "
395
+ "generic logo or a generated one based on their e-mail address."
396
+ msgstr ""
397
+ "Voor gebruikers zonder aangepaste avatar, kan je of een algemeen logo of een "
398
+ "gegenereerd avatar op basis van hun e-mailadres weergeven."
399
+
400
+ #: includes/wpua-tinymce-window.php:101
401
+ msgid "User Name"
402
+ msgstr "Gebruikersnaam"
403
+
404
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
405
+ msgid "Size:"
406
+ msgstr "Grootte:"
407
+
408
+ #: includes/wpua-tinymce-window.php:126
409
+ msgid "Large"
410
+ msgstr "Groot"
411
+
412
+ #: includes/wpua-tinymce-window.php:127
413
+ msgid "Medium"
414
+ msgstr "Gemiddeld"
415
+
416
+ #: includes/wpua-tinymce-window.php:129
417
+ msgid "Custom"
418
+ msgstr "Aangepast"
419
+
420
+ #: includes/wpua-tinymce-window.php:140
421
+ msgid "Alignment:"
422
+ msgstr "Uitlijning:"
423
+
424
+ #: includes/wpua-tinymce-window.php:144
425
+ msgid "Center"
426
+ msgstr "Gecentreerd"
427
+
428
+ #: includes/wpua-tinymce-window.php:145
429
+ msgid "Left"
430
+ msgstr "Links"
431
+
432
+ #: includes/wpua-tinymce-window.php:146
433
+ msgid "Right"
434
+ msgstr "Rechts"
435
+
436
+ #: includes/wpua-tinymce-window.php:151
437
+ msgid "Link To:"
438
+ msgstr "Link naar:"
439
+
440
+ #: includes/wpua-tinymce-window.php:155
441
+ msgid "Image File"
442
+ msgstr "Afbeeldingsbestand"
443
+
444
+ #: includes/wpua-tinymce-window.php:156
445
+ msgid "Attachment Page"
446
+ msgstr "Bijlagepagina"
447
+
448
+ #: includes/wpua-tinymce-window.php:157
449
+ msgid "Custom URL"
450
+ msgstr "Aangepaste URL"
451
+
452
+ #: includes/wpua-tinymce-window.php:162
453
+ msgid "URL:"
454
+ msgstr "URL:"
455
+
456
+ #: includes/wpua-tinymce-window.php:170
457
+ msgid "Open link in a new window"
458
+ msgstr "Link in nieuw venster openen"
459
+
460
+ #: includes/wpua-tinymce-window.php:174
461
+ msgid "Caption"
462
+ msgstr "Bijschrift"
463
+
464
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
465
+ msgid "Insert into Post"
466
+ msgstr "Invoegen in bericht"
467
+
468
+ #: includes/wpua-tinymce.php:70
469
+ msgid "Insert Avatar"
470
+ msgstr "Avatar invoegen"
471
+
472
+ #. translators: placeholder for <a> and </a> tags.
473
+ #: one-user-avatar.php:127
474
+ msgid ""
475
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
476
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
477
+ msgstr ""
478
+ "De plug-in One User Avatar is een vervanging voor de oude WP User Avatar-"
479
+ "plug-in. %1$sDeactiveer eerst WP User Avatar%2$s om het te gebruiken."
languages/one-user-avatar.pot ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 One Designs
2
+ # This file is distributed under the GPLv2.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: One User Avatar 2.3.2\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.5.0\n"
15
+ "X-Domain: one-user-avatar\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ #: includes/class-wp-user-avatar-admin.php:227
19
+ #: includes/class-wp-user-avatar-admin.php:426
20
+ #: includes/class-wp-user-avatar-widget.php:32
21
+ #: includes/wpua-options-page.php:55
22
+ #: includes/wpua-tinymce-window.php:31
23
+ msgid "One User Avatar"
24
+ msgstr ""
25
+
26
+ #. Plugin URI of the plugin
27
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
28
+ msgstr ""
29
+
30
+ #. Description of the plugin
31
+ msgid "Use any image from your WordPress Media Library as a custom user avatar. Add your own Default Avatar. Fork of WP User Avatar v2.2.16."
32
+ msgstr ""
33
+
34
+ #. Author of the plugin
35
+ msgid "One Designs"
36
+ msgstr ""
37
+
38
+ #. Author URI of the plugin
39
+ msgid "https://onedesigns.com/"
40
+ msgstr ""
41
+
42
+ #: includes/class-wp-user-avatar-admin.php:170
43
+ msgid "You are not allowed to delete this post."
44
+ msgstr ""
45
+
46
+ #: includes/class-wp-user-avatar-admin.php:174
47
+ msgid "Error in deleting."
48
+ msgstr ""
49
+
50
+ #: includes/class-wp-user-avatar-admin.php:228
51
+ #: includes/class-wp-user-avatar-admin.php:286
52
+ #: includes/wpua-media-page.php:59
53
+ msgid "Avatars"
54
+ msgstr ""
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:237
57
+ #: includes/class-wp-user-avatar-admin.php:238
58
+ #: includes/class-wp-user-avatar-admin.php:462
59
+ #: includes/wpua-options-page.php:93
60
+ msgid "Settings"
61
+ msgstr ""
62
+
63
+ #: includes/class-wp-user-avatar-admin.php:246
64
+ #: includes/class-wp-user-avatar-admin.php:247
65
+ msgid "Library"
66
+ msgstr ""
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:372
69
+ msgid "Mystery Man"
70
+ msgstr ""
71
+
72
+ #: includes/class-wp-user-avatar-admin.php:373
73
+ msgid "Blank"
74
+ msgstr ""
75
+
76
+ #: includes/class-wp-user-avatar-admin.php:374
77
+ msgid "Gravatar Logo"
78
+ msgstr ""
79
+
80
+ #: includes/class-wp-user-avatar-admin.php:375
81
+ msgid "Identicon (Generated)"
82
+ msgstr ""
83
+
84
+ #: includes/class-wp-user-avatar-admin.php:376
85
+ msgid "Wavatar (Generated)"
86
+ msgstr ""
87
+
88
+ #: includes/class-wp-user-avatar-admin.php:377
89
+ msgid "MonsterID (Generated)"
90
+ msgstr ""
91
+
92
+ #: includes/class-wp-user-avatar-admin.php:378
93
+ msgid "Retro (Generated)"
94
+ msgstr ""
95
+
96
+ #: includes/class-wp-user-avatar-admin.php:427
97
+ #: includes/class-wp-user-avatar.php:231
98
+ msgid "Choose Image"
99
+ msgstr ""
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:428
102
+ msgid "Remove"
103
+ msgstr ""
104
+
105
+ #: includes/class-wp-user-avatar-admin.php:428
106
+ #: includes/class-wp-user-avatar.php:292
107
+ msgid "Undo"
108
+ msgstr ""
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:480
111
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
112
+ msgstr ""
113
+
114
+ #: includes/class-wp-user-avatar-admin.php:481
115
+ msgid "Support Forums"
116
+ msgstr ""
117
+
118
+ #: includes/class-wp-user-avatar-admin.php:495
119
+ #: includes/class-wp-user-avatar-admin.php:556
120
+ #: includes/wpua-functions.php:93
121
+ #: includes/wpua-functions.php:106
122
+ #: includes/wpua-functions.php:114
123
+ #: includes/wpua-functions.php:186
124
+ #: includes/wpua-tinymce-window.php:94
125
+ msgid "Profile Picture"
126
+ msgstr ""
127
+
128
+ #: includes/class-wp-user-avatar-admin.php:560
129
+ #: includes/wpua-options-page.php:300
130
+ #: includes/wpua-options-page.php:306
131
+ msgid "Default Avatar"
132
+ msgstr ""
133
+
134
+ #: includes/class-wp-user-avatar-functions.php:515
135
+ #: includes/class-wp-user-avatar-functions.php:716
136
+ msgid "Avatar"
137
+ msgstr ""
138
+
139
+ #. translators: uploaded files
140
+ #: includes/class-wp-user-avatar-list-table.php:176
141
+ msgctxt "uploaded files"
142
+ msgid "All %s"
143
+ msgstr ""
144
+
145
+ #: includes/class-wp-user-avatar-list-table.php:192
146
+ #: includes/class-wp-user-avatar-list-table.php:549
147
+ msgid "Delete Permanently"
148
+ msgstr ""
149
+
150
+ #: includes/class-wp-user-avatar-list-table.php:222
151
+ msgid "No media attachments found."
152
+ msgstr ""
153
+
154
+ #: includes/class-wp-user-avatar-list-table.php:235
155
+ msgctxt "column name"
156
+ msgid "File"
157
+ msgstr ""
158
+
159
+ #: includes/class-wp-user-avatar-list-table.php:236
160
+ msgid "Author"
161
+ msgstr ""
162
+
163
+ #: includes/class-wp-user-avatar-list-table.php:237
164
+ msgctxt "column name"
165
+ msgid "Uploaded to"
166
+ msgstr ""
167
+
168
+ #: includes/class-wp-user-avatar-list-table.php:238
169
+ msgctxt "column name"
170
+ msgid "Date"
171
+ msgstr ""
172
+
173
+ #. translators: post title
174
+ #: includes/class-wp-user-avatar-list-table.php:323
175
+ msgid "Select %s"
176
+ msgstr ""
177
+
178
+ #: includes/class-wp-user-avatar-list-table.php:414
179
+ msgid "Unpublished"
180
+ msgstr ""
181
+
182
+ #. translators: time from now
183
+ #: includes/class-wp-user-avatar-list-table.php:422
184
+ msgctxt "time from now"
185
+ msgid "%s from now"
186
+ msgstr ""
187
+
188
+ #. translators: time ago
189
+ #: includes/class-wp-user-avatar-list-table.php:428
190
+ msgctxt "time ago"
191
+ msgid "%s ago"
192
+ msgstr ""
193
+
194
+ #: includes/class-wp-user-avatar-list-table.php:433
195
+ msgid "Y/m/d"
196
+ msgstr ""
197
+
198
+ #: includes/class-wp-user-avatar-list-table.php:523
199
+ msgid "Edit"
200
+ msgstr ""
201
+
202
+ #: includes/class-wp-user-avatar-list-table.php:532
203
+ msgid "Restore"
204
+ msgstr ""
205
+
206
+ #: includes/class-wp-user-avatar-list-table.php:538
207
+ msgid "Trash"
208
+ msgstr ""
209
+
210
+ #: includes/class-wp-user-avatar-list-table.php:561
211
+ msgid "View"
212
+ msgstr ""
213
+
214
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
215
+ #: includes/class-wp-user-avatar-resource-manager.php:190
216
+ msgid "We're sorry, but your theme's page template didn't make a call to %s, which is required by One User Avatar. Please add this call to your page templates."
217
+ msgstr ""
218
+
219
+ #: includes/class-wp-user-avatar-shortcode.php:243
220
+ msgid "Profile updated."
221
+ msgstr ""
222
+
223
+ #: includes/class-wp-user-avatar-shortcode.php:273
224
+ msgid "Update Profile"
225
+ msgstr ""
226
+
227
+ #. translators: [avatar_upload] shortcode
228
+ #: includes/class-wp-user-avatar-widget.php:27
229
+ msgid "Insert %s"
230
+ msgstr ""
231
+
232
+ #: includes/class-wp-user-avatar-widget.php:99
233
+ msgid "Title:"
234
+ msgstr ""
235
+
236
+ #: includes/class-wp-user-avatar-widget.php:105
237
+ msgid "Description:"
238
+ msgstr ""
239
+
240
+ #: includes/class-wp-user-avatar-widget.php:113
241
+ msgid "Automatically add paragraphs"
242
+ msgstr ""
243
+
244
+ #. translators: user display name
245
+ #: includes/class-wp-user-avatar.php:227
246
+ msgid "Choose Image: %s"
247
+ msgstr ""
248
+
249
+ #: includes/class-wp-user-avatar.php:243
250
+ #: includes/class-wp-user-avatar.php:244
251
+ #: includes/wpua-tinymce-window.php:95
252
+ #: includes/wpua-tinymce-window.php:186
253
+ msgid "Upload"
254
+ msgstr ""
255
+
256
+ #. translators: file size in KB
257
+ #: includes/class-wp-user-avatar.php:253
258
+ #: includes/wpua-options-page.php:188
259
+ msgid "Maximum upload file size: %s."
260
+ msgstr ""
261
+
262
+ #. translators: allowed file extensions
263
+ #: includes/class-wp-user-avatar.php:263
264
+ msgid "Allowed Files: %s"
265
+ msgstr ""
266
+
267
+ #: includes/class-wp-user-avatar.php:276
268
+ #: includes/class-wp-user-avatar.php:278
269
+ #: includes/wpua-tinymce-window.php:125
270
+ msgid "Original Size"
271
+ msgstr ""
272
+
273
+ #: includes/class-wp-user-avatar.php:282
274
+ #: includes/class-wp-user-avatar.php:284
275
+ #: includes/wpua-tinymce-window.php:128
276
+ msgid "Thumbnail"
277
+ msgstr ""
278
+
279
+ #: includes/class-wp-user-avatar.php:288
280
+ msgid "Remove Image"
281
+ msgstr ""
282
+
283
+ #: includes/class-wp-user-avatar.php:377
284
+ msgid "This file is not an image. Please try another."
285
+ msgstr ""
286
+
287
+ #: includes/class-wp-user-avatar.php:382
288
+ #: includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr ""
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid "Unable to create directory %s. Is its parent directory writable by the server?"
295
+ msgstr ""
296
+
297
+ #: includes/wpua-functions.php:109
298
+ #: includes/wpua-functions.php:118
299
+ msgid "Image"
300
+ msgstr ""
301
+
302
+ #: includes/wpua-media-page.php:46
303
+ msgid "You do not have permission to upload files."
304
+ msgstr ""
305
+
306
+ #. translators: search query
307
+ #: includes/wpua-media-page.php:66
308
+ msgid "Search results for %s"
309
+ msgstr ""
310
+
311
+ #: includes/wpua-media-page.php:98
312
+ msgid "Search"
313
+ msgstr ""
314
+
315
+ #: includes/wpua-options-page.php:108
316
+ msgid "Add avatar button to Visual Editor"
317
+ msgstr ""
318
+
319
+ #: includes/wpua-options-page.php:119
320
+ msgid "Allow Contributors & Subscribers to upload avatars"
321
+ msgstr ""
322
+
323
+ #: includes/wpua-options-page.php:130
324
+ msgid "Disable Gravatar and use only local avatars"
325
+ msgstr ""
326
+
327
+ #: includes/wpua-options-page.php:158
328
+ #: includes/wpua-options-page.php:167
329
+ msgid "Upload Size Limit"
330
+ msgstr ""
331
+
332
+ #: includes/wpua-options-page.php:159
333
+ #: includes/wpua-options-page.php:168
334
+ msgid "(only for Contributors & Subscribers)"
335
+ msgstr ""
336
+
337
+ #. translators: file name
338
+ #: includes/wpua-options-page.php:178
339
+ msgid "%s exceeds the maximum upload size for this site."
340
+ msgstr ""
341
+
342
+ #: includes/wpua-options-page.php:199
343
+ msgid "Allow users to edit avatars"
344
+ msgstr ""
345
+
346
+ #: includes/wpua-options-page.php:207
347
+ msgid "Resize avatars on upload"
348
+ msgstr ""
349
+
350
+ #: includes/wpua-options-page.php:212
351
+ msgid "Width"
352
+ msgstr ""
353
+
354
+ #: includes/wpua-options-page.php:216
355
+ msgid "Height"
356
+ msgstr ""
357
+
358
+ #: includes/wpua-options-page.php:224
359
+ msgid "Crop avatars to exact dimensions"
360
+ msgstr ""
361
+
362
+ #: includes/wpua-options-page.php:246
363
+ #: includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr ""
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr ""
370
+
371
+ #: includes/wpua-options-page.php:266
372
+ #: includes/wpua-options-page.php:272
373
+ msgid "Maximum Rating"
374
+ msgstr ""
375
+
376
+ #: includes/wpua-options-page.php:278
377
+ msgid "G &#8212; Suitable for all audiences"
378
+ msgstr ""
379
+
380
+ #: includes/wpua-options-page.php:279
381
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
382
+ msgstr ""
383
+
384
+ #: includes/wpua-options-page.php:280
385
+ msgid "R &#8212; Intended for adult audiences above 17"
386
+ msgstr ""
387
+
388
+ #: includes/wpua-options-page.php:281
389
+ msgid "X &#8212; Even more mature than above"
390
+ msgstr ""
391
+
392
+ #: includes/wpua-options-page.php:310
393
+ msgid "For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address."
394
+ msgstr ""
395
+
396
+ #: includes/wpua-tinymce-window.php:101
397
+ msgid "User Name"
398
+ msgstr ""
399
+
400
+ #: includes/wpua-tinymce-window.php:121
401
+ #: includes/wpua-tinymce-window.php:134
402
+ msgid "Size:"
403
+ msgstr ""
404
+
405
+ #: includes/wpua-tinymce-window.php:126
406
+ msgid "Large"
407
+ msgstr ""
408
+
409
+ #: includes/wpua-tinymce-window.php:127
410
+ msgid "Medium"
411
+ msgstr ""
412
+
413
+ #: includes/wpua-tinymce-window.php:129
414
+ msgid "Custom"
415
+ msgstr ""
416
+
417
+ #: includes/wpua-tinymce-window.php:140
418
+ msgid "Alignment:"
419
+ msgstr ""
420
+
421
+ #: includes/wpua-tinymce-window.php:144
422
+ msgid "Center"
423
+ msgstr ""
424
+
425
+ #: includes/wpua-tinymce-window.php:145
426
+ msgid "Left"
427
+ msgstr ""
428
+
429
+ #: includes/wpua-tinymce-window.php:146
430
+ msgid "Right"
431
+ msgstr ""
432
+
433
+ #: includes/wpua-tinymce-window.php:151
434
+ msgid "Link To:"
435
+ msgstr ""
436
+
437
+ #: includes/wpua-tinymce-window.php:155
438
+ msgid "Image File"
439
+ msgstr ""
440
+
441
+ #: includes/wpua-tinymce-window.php:156
442
+ msgid "Attachment Page"
443
+ msgstr ""
444
+
445
+ #: includes/wpua-tinymce-window.php:157
446
+ msgid "Custom URL"
447
+ msgstr ""
448
+
449
+ #: includes/wpua-tinymce-window.php:162
450
+ msgid "URL:"
451
+ msgstr ""
452
+
453
+ #: includes/wpua-tinymce-window.php:170
454
+ msgid "Open link in a new window"
455
+ msgstr ""
456
+
457
+ #: includes/wpua-tinymce-window.php:174
458
+ msgid "Caption"
459
+ msgstr ""
460
+
461
+ #: includes/wpua-tinymce-window.php:180
462
+ #: includes/wpua-tinymce-window.php:192
463
+ msgid "Insert into Post"
464
+ msgstr ""
465
+
466
+ #: includes/wpua-tinymce.php:70
467
+ msgid "Insert Avatar"
468
+ msgstr ""
469
+
470
+ #. translators: placeholder for <a> and </a> tags.
471
+ #: one-user-avatar.php:127
472
+ msgid "The plugin One User Avatar is a replacement for the old WP User Avatar plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
473
+ msgstr ""
languages/pt_BR.mo ADDED
Binary file
languages/pt_BR.po ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 One Designs
2
+ # This file is distributed under the GPLv2.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: One User Avatar 2.3.2\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
12
+ "PO-Revision-Date: 2021-06-01 20:46+0100\n"
13
+ "X-Generator: Poedit 2.4.3\n"
14
+ "X-Domain: one-user-avatar\n"
15
+ "Last-Translator: \n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Language: pt_BR\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Use qualquer imagem da sua biblioteca de mídia do WordPress como um avatar "
37
+ "de usuário personalizado. Adicione seu próprio Avatar padrão. Fork do WP "
38
+ "User Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Não tem permissões para eliminar este conteúdo."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Erro ao excluir."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatares"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Opções"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Biblioteca"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Homem misterioso"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Em branco"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Logotipo Gravatar"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (Gerado)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (Gerado)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (Gerado)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (Gerado)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Escolher imagem"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Remover"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Anular"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Fórum de suporte"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Foto do perfil"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Avatar padrão"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Tudo %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Eliminar permanentemente"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Nenhum anexo de mídia encontrado."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Ficheiro"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Autor"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Carregado para"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Data"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Selecione %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Não publicado"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s a partir de agora"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "%s atrás"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "d/m/Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Editar"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Repor"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Lixo"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Ver"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Lamentamos, mas o modelo de página do seu tema não fez uma chamada para %s, "
222
+ "que é exigido pelo One User Avatar. Por favor, adicione esta chamada aos "
223
+ "seus modelos de página."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Perfil atualizado."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Atualizar perfil"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "Inserir %s"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Título:"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Descrição:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Adicionar parágrafos automaticamente"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Escolher imagem: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Carregar"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Tamanho máximo do ficheiro para carregamento: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Ficheiros permitidos: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Original"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Miniatura"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Remover imagem"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Este ficheiro não é uma imagem. Por favor tente com outro."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr "Memória esgotada. Por favor tente com um ficheiro mais pequeno."
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid ""
295
+ "Unable to create directory %s. Is its parent directory writable by the "
296
+ "server?"
297
+ msgstr ""
298
+ "Não foi possível criar o directório %s. O directório do nível acima tem "
299
+ "permissões de escrita?"
300
+
301
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
302
+ msgid "Image"
303
+ msgstr "Imagem"
304
+
305
+ #: includes/wpua-media-page.php:46
306
+ msgid "You do not have permission to upload files."
307
+ msgstr "Você não tem permissão para fazer upload de arquivos."
308
+
309
+ #. translators: search query
310
+ #: includes/wpua-media-page.php:66
311
+ msgid "Search results for %s"
312
+ msgstr "Resultados da pesquisa por %s"
313
+
314
+ #: includes/wpua-media-page.php:98
315
+ msgid "Search"
316
+ msgstr "Pesquisar"
317
+
318
+ #: includes/wpua-options-page.php:108
319
+ msgid "Add avatar button to Visual Editor"
320
+ msgstr "Adicionar botão de avatar ao Editor Visual"
321
+
322
+ #: includes/wpua-options-page.php:119
323
+ msgid "Allow Contributors & Subscribers to upload avatars"
324
+ msgstr "Permitir que contribuidores e subscritores carreguem avatares"
325
+
326
+ #: includes/wpua-options-page.php:130
327
+ msgid "Disable Gravatar and use only local avatars"
328
+ msgstr "Desative o Gravatar e use apenas avatares locais"
329
+
330
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
331
+ msgid "Upload Size Limit"
332
+ msgstr "Limite de tamanho de upload"
333
+
334
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
335
+ msgid "(only for Contributors & Subscribers)"
336
+ msgstr "(apenas para contribuidores e subscritores)"
337
+
338
+ #. translators: file name
339
+ #: includes/wpua-options-page.php:178
340
+ msgid "%s exceeds the maximum upload size for this site."
341
+ msgstr "%s excede o tamanho máximo de carregamentos para este site."
342
+
343
+ #: includes/wpua-options-page.php:199
344
+ msgid "Allow users to edit avatars"
345
+ msgstr "Permitir que os usuários editem avatares"
346
+
347
+ #: includes/wpua-options-page.php:207
348
+ msgid "Resize avatars on upload"
349
+ msgstr "Redimensionar avatares no upload"
350
+
351
+ #: includes/wpua-options-page.php:212
352
+ msgid "Width"
353
+ msgstr "Largura"
354
+
355
+ #: includes/wpua-options-page.php:216
356
+ msgid "Height"
357
+ msgstr "Altura"
358
+
359
+ #: includes/wpua-options-page.php:224
360
+ msgid "Crop avatars to exact dimensions"
361
+ msgstr "Recorte avatares nas dimensões exatas"
362
+
363
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr "Exibição de Avatar"
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr "Mostrar Avatares"
370
+
371
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
372
+ msgid "Maximum Rating"
373
+ msgstr "Classificação Máxima"
374
+
375
+ #: includes/wpua-options-page.php:278
376
+ msgid "G &#8212; Suitable for all audiences"
377
+ msgstr "G &#8212; Adequado para todos os públicos"
378
+
379
+ #: includes/wpua-options-page.php:279
380
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
381
+ msgstr ""
382
+ "PG &#8212; Possivelmente ofensivo, geralmente para públicos a partir de 13 "
383
+ "anos"
384
+
385
+ #: includes/wpua-options-page.php:280
386
+ msgid "R &#8212; Intended for adult audiences above 17"
387
+ msgstr "R &#8212; Destinado ao público adulto acima de 17"
388
+
389
+ #: includes/wpua-options-page.php:281
390
+ msgid "X &#8212; Even more mature than above"
391
+ msgstr "X &#8212; Ainda mais maduro do que acima"
392
+
393
+ #: includes/wpua-options-page.php:310
394
+ msgid ""
395
+ "For users without a custom avatar of their own, you can either display a "
396
+ "generic logo or a generated one based on their e-mail address."
397
+ msgstr ""
398
+ "Para usuários sem avatar personalizado, você pode exibir um logotipo "
399
+ "genérico ou gerado com base em seus endereça de e-mail."
400
+
401
+ #: includes/wpua-tinymce-window.php:101
402
+ msgid "User Name"
403
+ msgstr "Nome do usuário"
404
+
405
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
406
+ msgid "Size:"
407
+ msgstr "Tamanho:"
408
+
409
+ #: includes/wpua-tinymce-window.php:126
410
+ msgid "Large"
411
+ msgstr "Grande"
412
+
413
+ #: includes/wpua-tinymce-window.php:127
414
+ msgid "Medium"
415
+ msgstr "Média"
416
+
417
+ #: includes/wpua-tinymce-window.php:129
418
+ msgid "Custom"
419
+ msgstr "Personalizado"
420
+
421
+ #: includes/wpua-tinymce-window.php:140
422
+ msgid "Alignment:"
423
+ msgstr "Alinhamento:"
424
+
425
+ #: includes/wpua-tinymce-window.php:144
426
+ msgid "Center"
427
+ msgstr "Centro"
428
+
429
+ #: includes/wpua-tinymce-window.php:145
430
+ msgid "Left"
431
+ msgstr "Esquerda"
432
+
433
+ #: includes/wpua-tinymce-window.php:146
434
+ msgid "Right"
435
+ msgstr "Direita"
436
+
437
+ #: includes/wpua-tinymce-window.php:151
438
+ msgid "Link To:"
439
+ msgstr "Ligar a:"
440
+
441
+ #: includes/wpua-tinymce-window.php:155
442
+ msgid "Image File"
443
+ msgstr "Ficheiro de imagem"
444
+
445
+ #: includes/wpua-tinymce-window.php:156
446
+ msgid "Attachment Page"
447
+ msgstr "Página do anexo"
448
+
449
+ #: includes/wpua-tinymce-window.php:157
450
+ msgid "Custom URL"
451
+ msgstr "URL personalizado"
452
+
453
+ #: includes/wpua-tinymce-window.php:162
454
+ msgid "URL:"
455
+ msgstr "URL:"
456
+
457
+ #: includes/wpua-tinymce-window.php:170
458
+ msgid "Open link in a new window"
459
+ msgstr "Abrir link em uma nova janela"
460
+
461
+ #: includes/wpua-tinymce-window.php:174
462
+ msgid "Caption"
463
+ msgstr "Legenda"
464
+
465
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
466
+ msgid "Insert into Post"
467
+ msgstr "Inserir no artigo"
468
+
469
+ #: includes/wpua-tinymce.php:70
470
+ msgid "Insert Avatar"
471
+ msgstr "Inserir avatar"
472
+
473
+ #. translators: placeholder for <a> and </a> tags.
474
+ #: one-user-avatar.php:127
475
+ msgid ""
476
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
477
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
478
+ msgstr ""
479
+ "O plugin One User Avatar é uma substituição do antigo plugin WP User Avatar. "
480
+ "%1$sDesative o WP User Avatar%2$s para começar a usá-lo."
languages/pt_PT.mo ADDED
Binary file
languages/pt_PT.po ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 One Designs
2
+ # This file is distributed under the GPLv2.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: One User Avatar 2.3.2\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
12
+ "PO-Revision-Date: 2021-06-01 20:44+0100\n"
13
+ "X-Generator: Poedit 2.4.3\n"
14
+ "X-Domain: one-user-avatar\n"
15
+ "Last-Translator: \n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Language: pt_PT\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: includes/class-wp-user-avatar-admin.php:227
21
+ #: includes/class-wp-user-avatar-admin.php:426
22
+ #: includes/class-wp-user-avatar-widget.php:32
23
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
24
+ msgid "One User Avatar"
25
+ msgstr "One User Avatar"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
29
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
34
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
35
+ msgstr ""
36
+ "Use qualquer imagem da sua biblioteca de mídia do WordPress como um avatar "
37
+ "de usuário personalizado. Adicione seu próprio Avatar padrão. Fork do WP "
38
+ "User Avatar v2.2.16."
39
+
40
+ #. Author of the plugin
41
+ msgid "One Designs"
42
+ msgstr "One Designs"
43
+
44
+ #. Author URI of the plugin
45
+ msgid "https://onedesigns.com/"
46
+ msgstr "https://onedesigns.com/"
47
+
48
+ #: includes/class-wp-user-avatar-admin.php:170
49
+ msgid "You are not allowed to delete this post."
50
+ msgstr "Não tem permissões para eliminar este conteúdo."
51
+
52
+ #: includes/class-wp-user-avatar-admin.php:174
53
+ msgid "Error in deleting."
54
+ msgstr "Erro ao excluir."
55
+
56
+ #: includes/class-wp-user-avatar-admin.php:228
57
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
58
+ msgid "Avatars"
59
+ msgstr "Avatares"
60
+
61
+ #: includes/class-wp-user-avatar-admin.php:237
62
+ #: includes/class-wp-user-avatar-admin.php:238
63
+ #: includes/class-wp-user-avatar-admin.php:462
64
+ #: includes/wpua-options-page.php:93
65
+ msgid "Settings"
66
+ msgstr "Opções"
67
+
68
+ #: includes/class-wp-user-avatar-admin.php:246
69
+ #: includes/class-wp-user-avatar-admin.php:247
70
+ msgid "Library"
71
+ msgstr "Biblioteca"
72
+
73
+ #: includes/class-wp-user-avatar-admin.php:372
74
+ msgid "Mystery Man"
75
+ msgstr "Homem misterioso"
76
+
77
+ #: includes/class-wp-user-avatar-admin.php:373
78
+ msgid "Blank"
79
+ msgstr "Em branco"
80
+
81
+ #: includes/class-wp-user-avatar-admin.php:374
82
+ msgid "Gravatar Logo"
83
+ msgstr "Logotipo Gravatar"
84
+
85
+ #: includes/class-wp-user-avatar-admin.php:375
86
+ msgid "Identicon (Generated)"
87
+ msgstr "Identicon (Gerado)"
88
+
89
+ #: includes/class-wp-user-avatar-admin.php:376
90
+ msgid "Wavatar (Generated)"
91
+ msgstr "Wavatar (Gerado)"
92
+
93
+ #: includes/class-wp-user-avatar-admin.php:377
94
+ msgid "MonsterID (Generated)"
95
+ msgstr "MonsterID (Gerado)"
96
+
97
+ #: includes/class-wp-user-avatar-admin.php:378
98
+ msgid "Retro (Generated)"
99
+ msgstr "Retro (Gerado)"
100
+
101
+ #: includes/class-wp-user-avatar-admin.php:427
102
+ #: includes/class-wp-user-avatar.php:231
103
+ msgid "Choose Image"
104
+ msgstr "Escolher imagem"
105
+
106
+ #: includes/class-wp-user-avatar-admin.php:428
107
+ msgid "Remove"
108
+ msgstr "Remover"
109
+
110
+ #: includes/class-wp-user-avatar-admin.php:428
111
+ #: includes/class-wp-user-avatar.php:292
112
+ msgid "Undo"
113
+ msgstr "Anular"
114
+
115
+ #: includes/class-wp-user-avatar-admin.php:480
116
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
117
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+
119
+ #: includes/class-wp-user-avatar-admin.php:481
120
+ msgid "Support Forums"
121
+ msgstr "Fórum de suporte"
122
+
123
+ #: includes/class-wp-user-avatar-admin.php:495
124
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
125
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
126
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
127
+ msgid "Profile Picture"
128
+ msgstr "Foto do perfil"
129
+
130
+ #: includes/class-wp-user-avatar-admin.php:560
131
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
132
+ msgid "Default Avatar"
133
+ msgstr "Avatar padrão"
134
+
135
+ #: includes/class-wp-user-avatar-functions.php:515
136
+ #: includes/class-wp-user-avatar-functions.php:716
137
+ msgid "Avatar"
138
+ msgstr "Avatar"
139
+
140
+ #. translators: uploaded files
141
+ #: includes/class-wp-user-avatar-list-table.php:176
142
+ msgctxt "uploaded files"
143
+ msgid "All %s"
144
+ msgstr "Tudo %s"
145
+
146
+ #: includes/class-wp-user-avatar-list-table.php:192
147
+ #: includes/class-wp-user-avatar-list-table.php:549
148
+ msgid "Delete Permanently"
149
+ msgstr "Eliminar permanentemente"
150
+
151
+ #: includes/class-wp-user-avatar-list-table.php:222
152
+ msgid "No media attachments found."
153
+ msgstr "Nenhum anexo de mídia encontrado."
154
+
155
+ #: includes/class-wp-user-avatar-list-table.php:235
156
+ msgctxt "column name"
157
+ msgid "File"
158
+ msgstr "Ficheiro"
159
+
160
+ #: includes/class-wp-user-avatar-list-table.php:236
161
+ msgid "Author"
162
+ msgstr "Autor"
163
+
164
+ #: includes/class-wp-user-avatar-list-table.php:237
165
+ msgctxt "column name"
166
+ msgid "Uploaded to"
167
+ msgstr "Carregado para"
168
+
169
+ #: includes/class-wp-user-avatar-list-table.php:238
170
+ msgctxt "column name"
171
+ msgid "Date"
172
+ msgstr "Data"
173
+
174
+ #. translators: post title
175
+ #: includes/class-wp-user-avatar-list-table.php:323
176
+ msgid "Select %s"
177
+ msgstr "Selecione %s"
178
+
179
+ #: includes/class-wp-user-avatar-list-table.php:414
180
+ msgid "Unpublished"
181
+ msgstr "Não publicado"
182
+
183
+ #. translators: time from now
184
+ #: includes/class-wp-user-avatar-list-table.php:422
185
+ msgctxt "time from now"
186
+ msgid "%s from now"
187
+ msgstr "%s a partir de agora"
188
+
189
+ #. translators: time ago
190
+ #: includes/class-wp-user-avatar-list-table.php:428
191
+ msgctxt "time ago"
192
+ msgid "%s ago"
193
+ msgstr "%s atrás"
194
+
195
+ #: includes/class-wp-user-avatar-list-table.php:433
196
+ msgid "Y/m/d"
197
+ msgstr "d/m/Y"
198
+
199
+ #: includes/class-wp-user-avatar-list-table.php:523
200
+ msgid "Edit"
201
+ msgstr "Editar"
202
+
203
+ #: includes/class-wp-user-avatar-list-table.php:532
204
+ msgid "Restore"
205
+ msgstr "Repor"
206
+
207
+ #: includes/class-wp-user-avatar-list-table.php:538
208
+ msgid "Trash"
209
+ msgstr "Lixo"
210
+
211
+ #: includes/class-wp-user-avatar-list-table.php:561
212
+ msgid "View"
213
+ msgstr "Ver"
214
+
215
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
216
+ #: includes/class-wp-user-avatar-resource-manager.php:190
217
+ msgid ""
218
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
219
+ "is required by One User Avatar. Please add this call to your page templates."
220
+ msgstr ""
221
+ "Lamentamos, mas o modelo de página do seu tema não fez uma chamada para %s, "
222
+ "que é exigido pelo One User Avatar. Por favor, adicione esta chamada aos "
223
+ "seus modelos de página."
224
+
225
+ #: includes/class-wp-user-avatar-shortcode.php:243
226
+ msgid "Profile updated."
227
+ msgstr "Perfil atualizado."
228
+
229
+ #: includes/class-wp-user-avatar-shortcode.php:273
230
+ msgid "Update Profile"
231
+ msgstr "Atualizar perfil"
232
+
233
+ #. translators: [avatar_upload] shortcode
234
+ #: includes/class-wp-user-avatar-widget.php:27
235
+ msgid "Insert %s"
236
+ msgstr "Inserir %s"
237
+
238
+ #: includes/class-wp-user-avatar-widget.php:99
239
+ msgid "Title:"
240
+ msgstr "Título:"
241
+
242
+ #: includes/class-wp-user-avatar-widget.php:105
243
+ msgid "Description:"
244
+ msgstr "Descrição:"
245
+
246
+ #: includes/class-wp-user-avatar-widget.php:113
247
+ msgid "Automatically add paragraphs"
248
+ msgstr "Adicionar parágrafos automaticamente"
249
+
250
+ #. translators: user display name
251
+ #: includes/class-wp-user-avatar.php:227
252
+ msgid "Choose Image: %s"
253
+ msgstr "Escolher imagem: %s"
254
+
255
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
256
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
257
+ msgid "Upload"
258
+ msgstr "Carregar"
259
+
260
+ #. translators: file size in KB
261
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
262
+ msgid "Maximum upload file size: %s."
263
+ msgstr "Tamanho máximo do ficheiro para carregamento: %s."
264
+
265
+ #. translators: allowed file extensions
266
+ #: includes/class-wp-user-avatar.php:263
267
+ msgid "Allowed Files: %s"
268
+ msgstr "Ficheiros permitidos: %s"
269
+
270
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
271
+ #: includes/wpua-tinymce-window.php:125
272
+ msgid "Original Size"
273
+ msgstr "Original"
274
+
275
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
276
+ #: includes/wpua-tinymce-window.php:128
277
+ msgid "Thumbnail"
278
+ msgstr "Miniatura"
279
+
280
+ #: includes/class-wp-user-avatar.php:288
281
+ msgid "Remove Image"
282
+ msgstr "Remover imagem"
283
+
284
+ #: includes/class-wp-user-avatar.php:377
285
+ msgid "This file is not an image. Please try another."
286
+ msgstr "Este ficheiro não é uma imagem. Por favor tente com outro."
287
+
288
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
289
+ msgid "Memory exceeded. Please try another smaller file."
290
+ msgstr "Memória esgotada. Por favor tente com um ficheiro mais pequeno."
291
+
292
+ #. translators: directory path
293
+ #: includes/class-wp-user-avatar.php:389
294
+ msgid ""
295
+ "Unable to create directory %s. Is its parent directory writable by the "
296
+ "server?"
297
+ msgstr ""
298
+ "Não foi possível criar o directório %s. O directório do nível acima tem "
299
+ "permissões de escrita?"
300
+
301
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
302
+ msgid "Image"
303
+ msgstr "Imagem"
304
+
305
+ #: includes/wpua-media-page.php:46
306
+ msgid "You do not have permission to upload files."
307
+ msgstr "Você não tem permissão para fazer upload de arquivos."
308
+
309
+ #. translators: search query
310
+ #: includes/wpua-media-page.php:66
311
+ msgid "Search results for %s"
312
+ msgstr "Resultados da pesquisa por %s"
313
+
314
+ #: includes/wpua-media-page.php:98
315
+ msgid "Search"
316
+ msgstr "Pesquisar"
317
+
318
+ #: includes/wpua-options-page.php:108
319
+ msgid "Add avatar button to Visual Editor"
320
+ msgstr "Adicionar botão de avatar ao Editor Visual"
321
+
322
+ #: includes/wpua-options-page.php:119
323
+ msgid "Allow Contributors & Subscribers to upload avatars"
324
+ msgstr "Permitir que contribuidores e subscritores carreguem avatares"
325
+
326
+ #: includes/wpua-options-page.php:130
327
+ msgid "Disable Gravatar and use only local avatars"
328
+ msgstr "Desative o Gravatar e use apenas avatares locais"
329
+
330
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
331
+ msgid "Upload Size Limit"
332
+ msgstr "Limite de tamanho de upload"
333
+
334
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
335
+ msgid "(only for Contributors & Subscribers)"
336
+ msgstr "(apenas para contribuidores e subscritores)"
337
+
338
+ #. translators: file name
339
+ #: includes/wpua-options-page.php:178
340
+ msgid "%s exceeds the maximum upload size for this site."
341
+ msgstr "%s excede o tamanho máximo de carregamentos para este site."
342
+
343
+ #: includes/wpua-options-page.php:199
344
+ msgid "Allow users to edit avatars"
345
+ msgstr "Permitir que os usuários editem avatares"
346
+
347
+ #: includes/wpua-options-page.php:207
348
+ msgid "Resize avatars on upload"
349
+ msgstr "Redimensionar avatares no upload"
350
+
351
+ #: includes/wpua-options-page.php:212
352
+ msgid "Width"
353
+ msgstr "Largura"
354
+
355
+ #: includes/wpua-options-page.php:216
356
+ msgid "Height"
357
+ msgstr "Altura"
358
+
359
+ #: includes/wpua-options-page.php:224
360
+ msgid "Crop avatars to exact dimensions"
361
+ msgstr "Recorte avatares nas dimensões exatas"
362
+
363
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
364
+ msgid "Avatar Display"
365
+ msgstr "Exibição de Avatar"
366
+
367
+ #: includes/wpua-options-page.php:259
368
+ msgid "Show Avatars"
369
+ msgstr "Mostrar Avatares"
370
+
371
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
372
+ msgid "Maximum Rating"
373
+ msgstr "Classificação Máxima"
374
+
375
+ #: includes/wpua-options-page.php:278
376
+ msgid "G &#8212; Suitable for all audiences"
377
+ msgstr "G &#8212; Adequado para todos os públicos"
378
+
379
+ #: includes/wpua-options-page.php:279
380
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
381
+ msgstr ""
382
+ "PG &#8212; Possivelmente ofensivo, geralmente para públicos a partir de 13 "
383
+ "anos"
384
+
385
+ #: includes/wpua-options-page.php:280
386
+ msgid "R &#8212; Intended for adult audiences above 17"
387
+ msgstr "R &#8212; Destinado ao público adulto acima de 17"
388
+
389
+ #: includes/wpua-options-page.php:281
390
+ msgid "X &#8212; Even more mature than above"
391
+ msgstr "X &#8212; Ainda mais maduro do que acima"
392
+
393
+ #: includes/wpua-options-page.php:310
394
+ msgid ""
395
+ "For users without a custom avatar of their own, you can either display a "
396
+ "generic logo or a generated one based on their e-mail address."
397
+ msgstr ""
398
+ "Para usuários sem avatar personalizado, você pode exibir um logotipo "
399
+ "genérico ou gerado com base em seus endereça de e-mail."
400
+
401
+ #: includes/wpua-tinymce-window.php:101
402
+ msgid "User Name"
403
+ msgstr "Nome do usuário"
404
+
405
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
406
+ msgid "Size:"
407
+ msgstr "Tamanho:"
408
+
409
+ #: includes/wpua-tinymce-window.php:126
410
+ msgid "Large"
411
+ msgstr "Grande"
412
+
413
+ #: includes/wpua-tinymce-window.php:127
414
+ msgid "Medium"
415
+ msgstr "Média"
416
+
417
+ #: includes/wpua-tinymce-window.php:129
418
+ msgid "Custom"
419
+ msgstr "Personalizado"
420
+
421
+ #: includes/wpua-tinymce-window.php:140
422
+ msgid "Alignment:"
423
+ msgstr "Alinhamento:"
424
+
425
+ #: includes/wpua-tinymce-window.php:144
426
+ msgid "Center"
427
+ msgstr "Centro"
428
+
429
+ #: includes/wpua-tinymce-window.php:145
430
+ msgid "Left"
431
+ msgstr "Esquerda"
432
+
433
+ #: includes/wpua-tinymce-window.php:146
434
+ msgid "Right"
435
+ msgstr "Direita"
436
+
437
+ #: includes/wpua-tinymce-window.php:151
438
+ msgid "Link To:"
439
+ msgstr "Ligar a:"
440
+
441
+ #: includes/wpua-tinymce-window.php:155
442
+ msgid "Image File"
443
+ msgstr "Ficheiro de imagem"
444
+
445
+ #: includes/wpua-tinymce-window.php:156
446
+ msgid "Attachment Page"
447
+ msgstr "Página do anexo"
448
+
449
+ #: includes/wpua-tinymce-window.php:157
450
+ msgid "Custom URL"
451
+ msgstr "URL personalizado"
452
+
453
+ #: includes/wpua-tinymce-window.php:162
454
+ msgid "URL:"
455
+ msgstr "URL:"
456
+
457
+ #: includes/wpua-tinymce-window.php:170
458
+ msgid "Open link in a new window"
459
+ msgstr "Abrir link em uma nova janela"
460
+
461
+ #: includes/wpua-tinymce-window.php:174
462
+ msgid "Caption"
463
+ msgstr "Legenda"
464
+
465
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
466
+ msgid "Insert into Post"
467
+ msgstr "Inserir no artigo"
468
+
469
+ #: includes/wpua-tinymce.php:70
470
+ msgid "Insert Avatar"
471
+ msgstr "Inserir avatar"
472
+
473
+ #. translators: placeholder for <a> and </a> tags.
474
+ #: one-user-avatar.php:127
475
+ msgid ""
476
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
477
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
478
+ msgstr ""
479
+ "O plugin One User Avatar é uma substituição do antigo plugin WP User Avatar. "
480
+ "%1$sDesative o WP User Avatar%2$s para começar a usá-lo."
languages/ro_RO.mo ADDED
Binary file
languages/ro_RO.po ADDED
@@ -0,0 +1,483 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 One Designs
2
+ # This file is distributed under the same license as the One User Avatar plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: One User Avatar 2.3.2\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-user-avatar\n"
7
+ "POT-Creation-Date: 2021-06-01T19:12:54+00:00\n"
8
+ "PO-Revision-Date: 2021-06-01 20:17+0100\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "Language: ro_RO\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.4.3\n"
16
+ "X-Domain: one-user-avatar\n"
17
+ "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && n"
18
+ "%100<=19) ? 1 : 2);\n"
19
+
20
+ #. Plugin Name of the plugin
21
+ #: includes/class-wp-user-avatar-admin.php:227
22
+ #: includes/class-wp-user-avatar-admin.php:426
23
+ #: includes/class-wp-user-avatar-widget.php:32
24
+ #: includes/wpua-options-page.php:55 includes/wpua-tinymce-window.php:31
25
+ msgid "One User Avatar"
26
+ msgstr "One User Avatar"
27
+
28
+ #. Plugin URI of the plugin
29
+ msgid "https://onedesigns.com/plugins/one-user-avatar/"
30
+ msgstr "https://onedesigns.com/plugins/one-user-avatar/"
31
+
32
+ #. Description of the plugin
33
+ msgid ""
34
+ "Use any image from your WordPress Media Library as a custom user avatar. Add "
35
+ "your own Default Avatar. Fork of WP User Avatar v2.2.16."
36
+ msgstr ""
37
+ "Utilizează orice imagine din biblioteca media WordPress ca avatar de "
38
+ "utilizator personalizat. Adăugă propriul avatar implicit. Bazat pe WP User "
39
+ "Avatar v2.2.16."
40
+
41
+ #. Author of the plugin
42
+ msgid "One Designs"
43
+ msgstr "One Designs"
44
+
45
+ #. Author URI of the plugin
46
+ msgid "https://onedesigns.com/"
47
+ msgstr "https://onedesigns.com/"
48
+
49
+ #: includes/class-wp-user-avatar-admin.php:170
50
+ msgid "You are not allowed to delete this post."
51
+ msgstr "Nu ai voie să ștergi această postare."
52
+
53
+ #: includes/class-wp-user-avatar-admin.php:174
54
+ msgid "Error in deleting."
55
+ msgstr "Eroare la ștergere."
56
+
57
+ #: includes/class-wp-user-avatar-admin.php:228
58
+ #: includes/class-wp-user-avatar-admin.php:286 includes/wpua-media-page.php:59
59
+ msgid "Avatars"
60
+ msgstr "Avatare"
61
+
62
+ #: includes/class-wp-user-avatar-admin.php:237
63
+ #: includes/class-wp-user-avatar-admin.php:238
64
+ #: includes/class-wp-user-avatar-admin.php:462
65
+ #: includes/wpua-options-page.php:93
66
+ msgid "Settings"
67
+ msgstr "Setări"
68
+
69
+ #: includes/class-wp-user-avatar-admin.php:246
70
+ #: includes/class-wp-user-avatar-admin.php:247
71
+ msgid "Library"
72
+ msgstr "Bibliotecă"
73
+
74
+ #: includes/class-wp-user-avatar-admin.php:372
75
+ msgid "Mystery Man"
76
+ msgstr "Omul misterios"
77
+
78
+ #: includes/class-wp-user-avatar-admin.php:373
79
+ msgid "Blank"
80
+ msgstr "Gol"
81
+
82
+ #: includes/class-wp-user-avatar-admin.php:374
83
+ msgid "Gravatar Logo"
84
+ msgstr "Logo Gravatar"
85
+
86
+ #: includes/class-wp-user-avatar-admin.php:375
87
+ msgid "Identicon (Generated)"
88
+ msgstr "Identicon (Generat)"
89
+
90
+ #: includes/class-wp-user-avatar-admin.php:376
91
+ msgid "Wavatar (Generated)"
92
+ msgstr "Wavatar (Generat)"
93
+
94
+ #: includes/class-wp-user-avatar-admin.php:377
95
+ msgid "MonsterID (Generated)"
96
+ msgstr "MonsterID (Generat)"
97
+
98
+ #: includes/class-wp-user-avatar-admin.php:378
99
+ msgid "Retro (Generated)"
100
+ msgstr "Retro (Generat)"
101
+
102
+ #: includes/class-wp-user-avatar-admin.php:427
103
+ #: includes/class-wp-user-avatar.php:231
104
+ msgid "Choose Image"
105
+ msgstr "Alege imagine"
106
+
107
+ #: includes/class-wp-user-avatar-admin.php:428
108
+ msgid "Remove"
109
+ msgstr "Elimină"
110
+
111
+ #: includes/class-wp-user-avatar-admin.php:428
112
+ #: includes/class-wp-user-avatar.php:292
113
+ msgid "Undo"
114
+ msgstr "Anulează"
115
+
116
+ #: includes/class-wp-user-avatar-admin.php:480
117
+ msgid "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
118
+ msgstr "https://onedesigns.com/support/forum/plugins/one-user-avatar/"
119
+
120
+ #: includes/class-wp-user-avatar-admin.php:481
121
+ msgid "Support Forums"
122
+ msgstr "Forumuri de asistență"
123
+
124
+ #: includes/class-wp-user-avatar-admin.php:495
125
+ #: includes/class-wp-user-avatar-admin.php:556 includes/wpua-functions.php:93
126
+ #: includes/wpua-functions.php:106 includes/wpua-functions.php:114
127
+ #: includes/wpua-functions.php:186 includes/wpua-tinymce-window.php:94
128
+ msgid "Profile Picture"
129
+ msgstr "Poză de profil"
130
+
131
+ #: includes/class-wp-user-avatar-admin.php:560
132
+ #: includes/wpua-options-page.php:300 includes/wpua-options-page.php:306
133
+ msgid "Default Avatar"
134
+ msgstr "Avatar implicit"
135
+
136
+ #: includes/class-wp-user-avatar-functions.php:515
137
+ #: includes/class-wp-user-avatar-functions.php:716
138
+ msgid "Avatar"
139
+ msgstr "Avatar"
140
+
141
+ #. translators: uploaded files
142
+ #: includes/class-wp-user-avatar-list-table.php:176
143
+ msgctxt "uploaded files"
144
+ msgid "All %s"
145
+ msgstr "Toate %s"
146
+
147
+ #: includes/class-wp-user-avatar-list-table.php:192
148
+ #: includes/class-wp-user-avatar-list-table.php:549
149
+ msgid "Delete Permanently"
150
+ msgstr "Sterge permanent"
151
+
152
+ #: includes/class-wp-user-avatar-list-table.php:222
153
+ msgid "No media attachments found."
154
+ msgstr "Nu s-au găsit atașamente media."
155
+
156
+ #: includes/class-wp-user-avatar-list-table.php:235
157
+ msgctxt "column name"
158
+ msgid "File"
159
+ msgstr "Fişier"
160
+
161
+ #: includes/class-wp-user-avatar-list-table.php:236
162
+ msgid "Author"
163
+ msgstr "Autor"
164
+
165
+ #: includes/class-wp-user-avatar-list-table.php:237
166
+ msgctxt "column name"
167
+ msgid "Uploaded to"
168
+ msgstr "Încărcat în"
169
+
170
+ #: includes/class-wp-user-avatar-list-table.php:238
171
+ msgctxt "column name"
172
+ msgid "Date"
173
+ msgstr "Data"
174
+
175
+ #. translators: post title
176
+ #: includes/class-wp-user-avatar-list-table.php:323
177
+ msgid "Select %s"
178
+ msgstr "Selectează %s"
179
+
180
+ #: includes/class-wp-user-avatar-list-table.php:414
181
+ msgid "Unpublished"
182
+ msgstr "Nepublicat"
183
+
184
+ #. translators: time from now
185
+ #: includes/class-wp-user-avatar-list-table.php:422
186
+ msgctxt "time from now"
187
+ msgid "%s from now"
188
+ msgstr "%s de acum"
189
+
190
+ #. translators: time ago
191
+ #: includes/class-wp-user-avatar-list-table.php:428
192
+ msgctxt "time ago"
193
+ msgid "%s ago"
194
+ msgstr "cu %s înainte"
195
+
196
+ #: includes/class-wp-user-avatar-list-table.php:433
197
+ msgid "Y/m/d"
198
+ msgstr "j.F.Y"
199
+
200
+ #: includes/class-wp-user-avatar-list-table.php:523
201
+ msgid "Edit"
202
+ msgstr "Editează"
203
+
204
+ #: includes/class-wp-user-avatar-list-table.php:532
205
+ msgid "Restore"
206
+ msgstr "Restabileşte"
207
+
208
+ #: includes/class-wp-user-avatar-list-table.php:538
209
+ msgid "Trash"
210
+ msgstr "Coş gunoi"
211
+
212
+ #: includes/class-wp-user-avatar-list-table.php:561
213
+ msgid "View"
214
+ msgstr "Vezi"
215
+
216
+ #. translators: either wp_footer() or wp_print_footer_scripts() hook.
217
+ #: includes/class-wp-user-avatar-resource-manager.php:190
218
+ msgid ""
219
+ "We're sorry, but your theme's page template didn't make a call to %s, which "
220
+ "is required by One User Avatar. Please add this call to your page templates."
221
+ msgstr ""
222
+ "Ne pare rău, dar șablonul paginii temei dvs. nu a efectuat un apel către %s, "
223
+ "necesitat de către One User Avatar. Vă rugăm să adăugați acest apel la "
224
+ "șabloanele de pagină."
225
+
226
+ #: includes/class-wp-user-avatar-shortcode.php:243
227
+ msgid "Profile updated."
228
+ msgstr "Profil actualizat."
229
+
230
+ #: includes/class-wp-user-avatar-shortcode.php:273
231
+ msgid "Update Profile"
232
+ msgstr "Actualizează profil"
233
+
234
+ #. translators: [avatar_upload] shortcode
235
+ #: includes/class-wp-user-avatar-widget.php:27
236
+ msgid "Insert %s"
237
+ msgstr "Introdu %s"
238
+
239
+ #: includes/class-wp-user-avatar-widget.php:99
240
+ msgid "Title:"
241
+ msgstr "Titlu:"
242
+
243
+ #: includes/class-wp-user-avatar-widget.php:105
244
+ msgid "Description:"
245
+ msgstr "Descriere:"
246
+
247
+ #: includes/class-wp-user-avatar-widget.php:113
248
+ msgid "Automatically add paragraphs"
249
+ msgstr "Adaugă paragrafe automat"
250
+
251
+ #. translators: user display name
252
+ #: includes/class-wp-user-avatar.php:227
253
+ msgid "Choose Image: %s"
254
+ msgstr "Alege imagine: %s"
255
+
256
+ #: includes/class-wp-user-avatar.php:243 includes/class-wp-user-avatar.php:244
257
+ #: includes/wpua-tinymce-window.php:95 includes/wpua-tinymce-window.php:186
258
+ msgid "Upload"
259
+ msgstr "Încărcare"
260
+
261
+ #. translators: file size in KB
262
+ #: includes/class-wp-user-avatar.php:253 includes/wpua-options-page.php:188
263
+ msgid "Maximum upload file size: %s."
264
+ msgstr "Dimensiunea maximă a fișierului pentru încărcat: %s."
265
+
266
+ #. translators: allowed file extensions
267
+ #: includes/class-wp-user-avatar.php:263
268
+ msgid "Allowed Files: %s"
269
+ msgstr "Fișiere permise: %s"
270
+
271
+ #: includes/class-wp-user-avatar.php:276 includes/class-wp-user-avatar.php:278
272
+ #: includes/wpua-tinymce-window.php:125
273
+ msgid "Original Size"
274
+ msgstr "Mărimea originală"
275
+
276
+ #: includes/class-wp-user-avatar.php:282 includes/class-wp-user-avatar.php:284
277
+ #: includes/wpua-tinymce-window.php:128
278
+ msgid "Thumbnail"
279
+ msgstr "Thumbnail"
280
+
281
+ #: includes/class-wp-user-avatar.php:288
282
+ msgid "Remove Image"
283
+ msgstr "Elimină imaginea"
284
+
285
+ #: includes/class-wp-user-avatar.php:377
286
+ msgid "This file is not an image. Please try another."
287
+ msgstr "Acest fișier nu este o imagine. Încearcă altul."
288
+
289
+ #: includes/class-wp-user-avatar.php:382 includes/class-wp-user-avatar.php:414
290
+ msgid "Memory exceeded. Please try another smaller file."
291
+ msgstr "Memoria depășită. Încearcă un alt fișier mai mic."
292
+
293
+ #. translators: directory path
294
+ #: includes/class-wp-user-avatar.php:389
295
+ msgid ""
296
+ "Unable to create directory %s. Is its parent directory writable by the "
297
+ "server?"
298
+ msgstr ""
299
+ "Imposibil de creat directorul %s. Directorul său părinte poate fi scris de "
300
+ "către server?"
301
+
302
+ #: includes/wpua-functions.php:109 includes/wpua-functions.php:118
303
+ msgid "Image"
304
+ msgstr "Imagine"
305
+
306
+ #: includes/wpua-media-page.php:46
307
+ msgid "You do not have permission to upload files."
308
+ msgstr "Nu ai permisiunea de a încărca fișiere."
309
+
310
+ #. translators: search query
311
+ #: includes/wpua-media-page.php:66
312
+ msgid "Search results for %s"
313
+ msgstr "Rezultatele căutării pentru: %s"
314
+
315
+ #: includes/wpua-media-page.php:98
316
+ msgid "Search"
317
+ msgstr "Căutare"
318
+
319
+ #: includes/wpua-options-page.php:108
320
+ msgid "Add avatar button to Visual Editor"
321
+ msgstr "Adăugați butonul avatar în editorul vizual"
322
+
323
+ #: includes/wpua-options-page.php:119
324
+ msgid "Allow Contributors & Subscribers to upload avatars"
325
+ msgstr "Permiteți colaboratorilor și abonaților să încarce avatare"
326
+
327
+ #: includes/wpua-options-page.php:130
328
+ msgid "Disable Gravatar and use only local avatars"
329
+ msgstr "Dezactivați Gravatar și utilizați numai avataruri locale"
330
+
331
+ #: includes/wpua-options-page.php:158 includes/wpua-options-page.php:167
332
+ msgid "Upload Size Limit"
333
+ msgstr "Limita de dimensiune a încărcării"
334
+
335
+ #: includes/wpua-options-page.php:159 includes/wpua-options-page.php:168
336
+ msgid "(only for Contributors & Subscribers)"
337
+ msgstr "(numai pentru colaboratori și abonați)"
338
+
339
+ #. translators: file name
340
+ #: includes/wpua-options-page.php:178
341
+ msgid "%s exceeds the maximum upload size for this site."
342
+ msgstr "%s depășește dimensiunea maximă de încărcare pentru acest site."
343
+
344
+ #: includes/wpua-options-page.php:199
345
+ msgid "Allow users to edit avatars"
346
+ msgstr "Permiteți utilizatorilor să editeze avatare"
347
+
348
+ #: includes/wpua-options-page.php:207
349
+ msgid "Resize avatars on upload"
350
+ msgstr "Redimensionați avatarurile la încărcare"
351
+
352
+ #: includes/wpua-options-page.php:212
353
+ msgid "Width"
354
+ msgstr "Lăţime"
355
+
356
+ #: includes/wpua-options-page.php:216
357
+ msgid "Height"
358
+ msgstr "Înălţime"
359
+
360
+ #: includes/wpua-options-page.php:224
361
+ msgid "Crop avatars to exact dimensions"
362
+ msgstr "Decupați avatare la dimensiuni exacte"
363
+
364
+ #: includes/wpua-options-page.php:246 includes/wpua-options-page.php:252
365
+ msgid "Avatar Display"
366
+ msgstr "Afișare avatar"
367
+
368
+ #: includes/wpua-options-page.php:259
369
+ msgid "Show Avatars"
370
+ msgstr "Afișați avatare"
371
+
372
+ #: includes/wpua-options-page.php:266 includes/wpua-options-page.php:272
373
+ msgid "Maximum Rating"
374
+ msgstr "Limită de vârstă"
375
+
376
+ #: includes/wpua-options-page.php:278
377
+ msgid "G &#8212; Suitable for all audiences"
378
+ msgstr "G &#8212; Potrivit pentru toate vârstele"
379
+
380
+ #: includes/wpua-options-page.php:279
381
+ msgid "PG &#8212; Possibly offensive, usually for audiences 13 and above"
382
+ msgstr ""
383
+ "PG &#8212; Eventual ofensator, de obicei pentru vârsta de 13 ani și peste"
384
+
385
+ #: includes/wpua-options-page.php:280
386
+ msgid "R &#8212; Intended for adult audiences above 17"
387
+ msgstr "R &#8212; Destinat adulților cu vârsta peste 17 ani"
388
+
389
+ #: includes/wpua-options-page.php:281
390
+ msgid "X &#8212; Even more mature than above"
391
+ msgstr "X &#8212; Și mai maturi decât cele de mai sus"
392
+
393
+ #: includes/wpua-options-page.php:310
394
+ msgid ""
395
+ "For users without a custom avatar of their own, you can either display a "
396
+ "generic logo or a generated one based on their e-mail address."
397
+ msgstr ""
398
+ "Pentru utilizatorii fără un avatar personalizat propriu, puteți afișa fie o "
399
+ "siglă generică, fie una generată pe baza adresei de e-mail."
400
+
401
+ #: includes/wpua-tinymce-window.php:101
402
+ msgid "User Name"
403
+ msgstr "Nume de utilizator"
404
+
405
+ #: includes/wpua-tinymce-window.php:121 includes/wpua-tinymce-window.php:134
406
+ msgid "Size:"
407
+ msgstr "Mărime:"
408
+
409
+ #: includes/wpua-tinymce-window.php:126
410
+ msgid "Large"
411
+ msgstr "Mare"
412
+
413
+ #: includes/wpua-tinymce-window.php:127
414
+ msgid "Medium"
415
+ msgstr "Mediu"
416
+
417
+ #: includes/wpua-tinymce-window.php:129
418
+ msgid "Custom"
419
+ msgstr "Personalizat"
420
+
421
+ #: includes/wpua-tinymce-window.php:140
422
+ msgid "Alignment:"
423
+ msgstr "Aliniere:"
424
+
425
+ #: includes/wpua-tinymce-window.php:144
426
+ msgid "Center"
427
+ msgstr "Centru"
428
+
429
+ #: includes/wpua-tinymce-window.php:145
430
+ msgid "Left"
431
+ msgstr "Stânga"
432
+
433
+ #: includes/wpua-tinymce-window.php:146
434
+ msgid "Right"
435
+ msgstr "Dreapta"
436
+
437
+ #: includes/wpua-tinymce-window.php:151
438
+ msgid "Link To:"
439
+ msgstr "Link către:"
440
+
441
+ #: includes/wpua-tinymce-window.php:155
442
+ msgid "Image File"
443
+ msgstr "Fișier imagine"
444
+
445
+ #: includes/wpua-tinymce-window.php:156
446
+ msgid "Attachment Page"
447
+ msgstr "Pagina atașament"
448
+
449
+ #: includes/wpua-tinymce-window.php:157
450
+ msgid "Custom URL"
451
+ msgstr "Adresa URL personalizată"
452
+
453
+ #: includes/wpua-tinymce-window.php:162
454
+ msgid "URL:"
455
+ msgstr "URL:"
456
+
457
+ #: includes/wpua-tinymce-window.php:170
458
+ msgid "Open link in a new window"
459
+ msgstr "Deschide linkul într-o fereastră nouă"
460
+
461
+ #: includes/wpua-tinymce-window.php:174
462
+ msgid "Caption"
463
+ msgstr "Legendă"
464
+
465
+ #: includes/wpua-tinymce-window.php:180 includes/wpua-tinymce-window.php:192
466
+ msgid "Insert into Post"
467
+ msgstr "Introduceți în postare"
468
+
469
+ #: includes/wpua-tinymce.php:70
470
+ msgid "Insert Avatar"
471
+ msgstr "Introdu avatar"
472
+
473
+ #. translators: placeholder for <a> and </a> tags.
474
+ #: one-user-avatar.php:127
475
+ msgid ""
476
+ "The plugin One User Avatar is a replacement for the old WP User Avatar "
477
+ "plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it."
478
+ msgstr ""
479
+ "Pluginul One User Avatar înlocuiește vechiul plugin WP User Avatar. "
480
+ "Dezactivează %1$sWP User Avatar%2$s pentru a începe să îl utilizezi."
481
+
482
+ #~ msgid "Edit Image"
483
+ #~ msgstr "Modifică imaginea"
one-user-avatar.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: One User Avatar
4
+ Plugin URI: https://onedesigns.com/plugins/one-user-avatar/
5
+ Description: Use any image from your WordPress Media Library as a custom user avatar. Add your own Default Avatar. Fork of WP User Avatar v2.2.16.
6
+ Author: One Designs
7
+ Author URI: https://onedesigns.com/
8
+ Version: 2.3.2
9
+ Text Domain: one-user-avatar
10
+ Domain Path: /languages/
11
+
12
+ One User Avatar
13
+ Copyright (c) 2021 One Designs https://onedesigns.com/
14
+ License: GPLv2
15
+ Source: https://github.com/onedesigns/one-user-avatar
16
+
17
+ One User Avatar is based on WP User Avatar v2.2.16
18
+ Copyright (c) 2020-2021 ProfilePress https://profilepress.net/
19
+ Copyright (c) 2014-2020 Flippercode https://www.flippercode.com/
20
+ Copyright (c) 2013-2014 Bangbay Siboliban http://bangbay.com/
21
+ License: GPLv2
22
+ Source: https://github.com/profilepress/wp-user-avatar
23
+
24
+ One User Avatar is distributed under the terms of the GNU GPL
25
+
26
+ This program is free software: you can redistribute it and/or modify
27
+ it under the terms of the GNU General Public License as published by
28
+ the Free Software Foundation, either version 2 of the License, or
29
+ (at your option) any later version.
30
+
31
+ This program is distributed in the hope that it will be useful,
32
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
33
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
+ GNU General Public License for more details.
35
+
36
+ One User Avatar bundles the following third-party resources:
37
+
38
+ jQuery UI Slider v1.12.1
39
+ Copyright (c) 2021 jQuery Foundation
40
+ License: MIT
41
+ Source: https://github.com/jquery/jquery-ui
42
+ */
43
+
44
+ if ( ! defined( 'ABSPATH' ) ) {
45
+ die( 'You are not allowed to call this page directly.' );
46
+ }
47
+
48
+ class One_User_Avatar {
49
+ /**
50
+ * Check for conflicts and load plugin
51
+ *
52
+ * @since 2.3.0
53
+ */
54
+ public function __construct() {
55
+ // Check for conflict
56
+ if ( class_exists( 'WP_User_Avatar_Setup' ) ) {
57
+ // Add admin notice
58
+ add_action( 'admin_notices', array( $this, 'conflict_admin_notice' ) );
59
+
60
+ // Bail
61
+ return;
62
+ }
63
+
64
+ // Load plugin
65
+ require_once( plugin_dir_path( self::plugin_file_path() ) . 'includes/class-wp-user-avatar-setup.php' );
66
+ }
67
+
68
+ /**
69
+ * Access plugin file path globally
70
+ *
71
+ * @since 2.3.0
72
+ */
73
+ public static function plugin_file_path() {
74
+ return __FILE__;
75
+ }
76
+
77
+ /**
78
+ * Access plugin directory path globally
79
+ *
80
+ * @since 2.3.0
81
+ */
82
+ public static function plugin_dir_path() {
83
+ return plugin_dir_path( __FILE__ );
84
+ }
85
+
86
+ /**
87
+ * Print admin notice error in case of plugin conflict
88
+ *
89
+ * @since 2.3.1
90
+ */
91
+ public function conflict_admin_notice() {
92
+ global $pagenow, $status, $pagenum, $s;
93
+
94
+ if ( 'plugins.php' != $pagenow ) {
95
+ return;
96
+ }
97
+
98
+ $plugin_file = 'wp-user-avatar/wp-user-avatar.php';
99
+
100
+ if ( ! current_user_can( 'deactivate_plugin', $plugin_file ) ) {
101
+ return;
102
+ }
103
+
104
+ $url = admin_url(
105
+ sprintf(
106
+ 'plugins.php?action=deactivate&plugin=%s',
107
+ urlencode( $plugin_file )
108
+ )
109
+ );
110
+
111
+ if ( ! empty( $status ) ) {
112
+ add_query_arg( 'plugin_status', urlencode( $status ), $url );
113
+ }
114
+
115
+ if ( ! empty( $pagenum ) ) {
116
+ add_query_arg( 'paged', urlencode( $pagenum ), $url );
117
+ }
118
+
119
+ if ( ! empty( $s ) ) {
120
+ add_query_arg( 'paged', urlencode( $s ), $url );
121
+ }
122
+
123
+ $url = wp_nonce_url( $url, sprintf( 'deactivate-plugin_%s', $plugin_file ) );
124
+
125
+ $message = sprintf(
126
+ /* translators: placeholder for <a> and </a> tags. */
127
+ __( 'The plugin One User Avatar is a replacement for the old WP User Avatar plugin. Please %1$sdeactivate WP User Avatar%2$s to start using it.', 'one-user-avatar' ),
128
+ sprintf( '<a href="%s">', esc_url( $url ) ),
129
+ '</a>'
130
+ );
131
+
132
+ ?>
133
+
134
+ <div class="notice notice-error">
135
+ <p><?php echo wp_kses( $message, 'data' ); ?></p>
136
+ </div>
137
+
138
+ <?php
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Load Plugin
144
+ *
145
+ * @since 2.3.0
146
+ */
147
+ function one_user_avatar() {
148
+ global $one_user_avatar;
149
+
150
+ if ( ! isset( $one_user_avatar ) ) {
151
+ $one_user_avatar = new One_User_Avatar();
152
+ }
153
+
154
+ return $one_user_avatar;
155
+ }
156
+ add_action( 'plugins_loaded', 'one_user_avatar', 0 );
readme.txt ADDED
@@ -0,0 +1,920 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === One User Avatar | User Profile Picture ===
2
+
3
+ Contributors: onedesigns, 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.2
7
+ Stable tag: 2.3.2
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ 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.
12
+
13
+ == Description ==
14
+
15
+ WordPress currently only allows you to use custom avatars that are uploaded through [Gravatar](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.
16
+
17
+ **One User Avatar** also lets you:
18
+
19
+ * Upload your own Default Avatar in your One User Avatar settings.
20
+ * Show the user's [Gravatar](http://gravatar.com/) avatar or Default Avatar if the user doesn't have a One User Avatar image.
21
+ * Disable [Gravatar](http://gravatar.com/) avatars and use only local avatars.
22
+ * Use the <code>[avatar_upload]</code> shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users.
23
+ * Use the <code>[avatar]</code> shortcode in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
24
+ * Allow Contributors and Subscribers to upload their own avatars.
25
+ * Limit upload file size and image dimensions for Contributors and Subscribers.
26
+
27
+ == Copyright ==
28
+
29
+ One User Avatar
30
+ Copyright (c) 2021 One Designs https://onedesigns.com/
31
+ License: GPLv2
32
+ Source: https://github.com/onedesigns/one-user-avatar
33
+
34
+ One User Avatar is based on WP User Avatar v2.2.16
35
+ Copyright (c) 2020-2021 ProfilePress https://profilepress.net/
36
+ Copyright (c) 2014-2020 Flippercode https://www.flippercode.com/
37
+ Copyright (c) 2013-2014 Bangbay Siboliban http://bangbay.com/
38
+ License: GPLv2
39
+ Source: https://github.com/profilepress/wp-user-avatar
40
+
41
+ One User Avatar is distributed under the terms of the GNU GPL
42
+
43
+ This program is free software: you can redistribute it and/or modify
44
+ it under the terms of the GNU General Public License as published by
45
+ the Free Software Foundation, either version 2 of the License, or
46
+ (at your option) any later version.
47
+
48
+ This program is distributed in the hope that it will be useful,
49
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
50
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51
+ GNU General Public License for more details.
52
+
53
+ One User Avatar bundles the following third-party resources:
54
+
55
+ jQuery UI Slider v1.12.1
56
+ Copyright (c) 2021 jQuery Foundation
57
+ License: MIT
58
+ Source: https://github.com/jquery/jquery-ui
59
+
60
+ == Installation ==
61
+
62
+ 1. Download, install, and activate the One User Avatar plugin.
63
+ 2. On your profile edit page, click "Edit Image".
64
+ 3. Choose an image, then click "Select Image".
65
+ 4. Click "Update Profile".
66
+ 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.
67
+ 6. Choose a theme that has avatar support. In your theme, manually replace <code>get_avatar</code> with <code>get_wp_user_avatar</code> or leave <code>get_avatar</code> as-is. [Read about the differences here](http://wordpress.org/plugins/one-user-avatar/#faq).
68
+ 7. You can also use the <code>[avatar_upload]</code> and <code>[avatar]</code> shortcodes in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
69
+
70
+ **Warning**
71
+
72
+ 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.
73
+
74
+ **Example Usage**
75
+
76
+ = Posts =
77
+
78
+ Within [The Loop](http://codex.wordpress.org/The_Loop), you may be using:
79
+
80
+ `<?php echo get_avatar( get_the_author_meta( 'ID' ), 96 ); ?>`
81
+
82
+ Replace this function with:
83
+
84
+ `<?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96 ); ?>`
85
+
86
+ You can also use the values "original", "large", "medium", or "thumbnail" for your avatar size:
87
+
88
+ `<?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 'medium' ); ?>`
89
+
90
+ You can also add an alignment of "left", "right", or "center":
91
+
92
+ `<?php echo get_wp_user_avatar( get_the_author_meta( 'ID' ), 96, 'left' ); ?>`
93
+
94
+ = Author Page =
95
+
96
+ On an author page outside of [The Loop](http://codex.wordpress.org/The_Loop), you may be using:
97
+
98
+ `<?php
99
+ $user = get_user_by( 'slug', $author_name );
100
+ echo get_avatar( $user->ID, 96 );
101
+ ?>`
102
+
103
+ Replace this function with:
104
+
105
+ `<?php
106
+ $user = get_user_by( 'slug', $author_name );
107
+ echo get_wp_user_avatar( $user->ID, 96 );
108
+ ?>`
109
+
110
+ If you leave the options blank, One User Avatar will detect whether you're inside [The Loop](http://codex.wordpress.org/The_Loop) or on an author page and return the correct avatar in the default 96x96 size:
111
+
112
+ `<?php echo get_wp_user_avatar(); ?>`
113
+
114
+ The function <code>get_wp_user_avatar</code> can also fall back to <code>get_avatar</code> 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 [Gravatar](http://gravatar.com/) avatar or Default Avatar.
115
+
116
+ = Comments =
117
+
118
+ For comments, you might have in your template:
119
+
120
+ `<?php echo get_avatar($comment, 32); ?>`
121
+
122
+ Replace this function with:
123
+
124
+ `<?php echo get_wp_user_avatar($comment, 32); ?>`
125
+
126
+ For comments, you must specify the $comment variable.
127
+
128
+ **Other Available Functions**
129
+
130
+ = [avatar_upload] shortcode =
131
+
132
+ You can use the <code>[avatar_upload]</code> shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users.
133
+
134
+ You can specify a user with the shortcode, but you must have <code>edit_user</code> capability for that particular user.
135
+
136
+ `[avatar_upload user="admin"]`
137
+
138
+ = [avatar] shortcode =
139
+
140
+ You can use the <code>[avatar]</code> 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.
141
+
142
+ `[avatar user="admin" size="medium" align="left" link="file" /]`
143
+
144
+ You can also add a caption to the shortcode:
145
+
146
+ `[avatar user="admin" size="medium" align="left" link="file"]Photo Credit: Your Name[/avatar]`
147
+
148
+ **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>
149
+
150
+ = get_wp_user_avatar_src =
151
+
152
+ Works just like <code>get_wp_user_avatar</code> 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:
153
+
154
+ `<a href="<?php echo get_wp_user_avatar_src( $user_id, 'large' ); ?>">
155
+ <?php echo get_wp_user_avatar( $user_id, 'thumbnail' ); ?>
156
+ </a>`
157
+
158
+ = has_wp_user_avatar =
159
+
160
+ Returns true if the user has a One User Avatar image. You must specify the user ID:
161
+
162
+ `<?php
163
+ if ( has_wp_user_avatar( $user_id ) ) {
164
+ echo get_wp_user_avatar( $user_id, 96 );
165
+ } else {
166
+ echo '<img src="my-alternate-image.jpg" />';
167
+ }
168
+ ?>`
169
+
170
+ == Frequently Asked Questions ==
171
+
172
+ = How do I use One User Avatar? =
173
+
174
+ 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:
175
+
176
+ = get_wp_user_avatar =
177
+
178
+ 1. Allows you to use the values "original", "large", "medium", or "thumbnail" for your avatar size.
179
+ 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.
180
+ 3. Allows you to use custom image sizes registered with [<code>add_image_size</code>](http://codex.wordpress.org/Function_Reference/add_image_size) (fixed width and height are added to the image).
181
+ 4. Optionally adds CSS classes "alignleft", "alignright", or "aligncenter" to position your avatar.
182
+ 5. Shows nothing if the user has no One User Avatar image.
183
+ 6. Shows the user's [Gravatar](http://gravatar.com/) avatar or Default Avatar only if "Show Avatars" is enabled in your One User Avatar settings.
184
+
185
+ = get_avatar =
186
+
187
+ 1. Requires you to enable "Show Avatars" in your One User Avatar settings to show any avatars.
188
+ 2. Accepts only numeric values for your avatar size.
189
+ 3. Always adds a fixed width and height to your image. This may cause problems if you use responsive CSS in your theme.
190
+ 4. Shows the user's [Gravatar](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.)
191
+ 5. Requires no changes to your theme files if you are currently using <code>get_avatar</code>.
192
+
193
+ [Read more about get_avatar in the WordPress Function Reference](http://codex.wordpress.org/Function_Reference/get_avatar).
194
+
195
+ = Can I create a custom Default Avatar? =
196
+ In your One User Avatar settings, you can upload your own Default Avatar.
197
+
198
+ = Can I disable all Gravatar avatars? =
199
+
200
+ In your One User Avatar settings, you can select "Disable Gravatar — Use only local avatars" to disable all [Gravatar](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.
201
+
202
+ = Can Contributors or Subscribers choose their own One User Avatar image? =
203
+ 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.
204
+
205
+ = Will One User Avatar work with comment author avatars? =
206
+
207
+ Yes, for registered users. Non-registered comment authors will show their [Gravatar](http://gravatar.com/) avatars or Default Avatar.
208
+
209
+ = Will One User Avatar work with bbPress? =
210
+
211
+ Yes!
212
+
213
+ = Will One User Avatar work with BuddyPress? =
214
+
215
+ 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.
216
+
217
+ = How can I see which users have an avatar? =
218
+
219
+ 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.
220
+
221
+ = Can I use the One User Avatar uploader in a front page or widget? =
222
+
223
+ Yes, you can use the <code>[avatar_upload]</code> shortcode to put a standalone uploader in a front page or widget. This uploader is only visible to logged-in users..
224
+
225
+ You can specify a user with the shortcode, but you must have <code>'edit_user'</code> capability to change the user's avatar.
226
+
227
+ `[avatar_upload user="admin"]`
228
+
229
+ = Can I insert One User Avatar directly into a post? =
230
+
231
+ You can use the <code>[avatar]</code> 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.
232
+
233
+ `[avatar user="admin" size="96" align="left" link="file" /]`
234
+
235
+ Outputs:
236
+
237
+ `<a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
238
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
239
+ </a>`
240
+
241
+ If you have a caption, the output will be similar to how WordPress adds captions to other images.
242
+
243
+ `[avatar user="admin" size="96" align="left" link="file"]Photo Credit: Your Name[/avatar]`
244
+
245
+ Outputs:
246
+
247
+ `<div style="width: 106px" class="wp-caption alignleft">
248
+ <a href="{fileURL}" class="wp-user-avatar-link wp-user-avatar-file">
249
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96" />
250
+ </a>
251
+ <p class="wp-caption-text">Photo Credit: Your Name</p>
252
+ </div>`
253
+
254
+ **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>
255
+
256
+ = What CSS can I use with One User Avatar? =
257
+
258
+ 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:
259
+
260
+ `<?php echo get_wp_user_avatar($user_id, 96, 'left'); ?>`
261
+
262
+ Outputs:
263
+
264
+ `<img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />`
265
+
266
+ **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.
267
+
268
+ 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:
269
+
270
+ `<?php echo get_wp_user_avatar($user_id, 'medium'); ?>`
271
+
272
+ Outputs:
273
+
274
+ `<img src="{imageURL}" class="wp-user-avatar wp-user-avatar-medium" />`
275
+
276
+ **Note:** WordPress adds more CSS classes to the avatar not listed here.
277
+
278
+ If you use the <code>[avatar]</code> 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.
279
+
280
+ * Image File: wp-user-avatar-file
281
+ * Attachment: wp-user-avatar-attachment
282
+ * Custom URL: wp-user-avatar-custom
283
+
284
+ `[avatar user="admin" size="96" align="left" link="attachment" /]`
285
+
286
+ Outputs:
287
+
288
+ `<a href="{attachmentURL}" class="wp-user-avatar-link wp-user-avatar-attachment">
289
+ <img src="{imageURL}" width="96" height="96" class="wp-user-avatar wp-user-avatar-96 alignleft" />
290
+ </a>`
291
+
292
+ = What other functions are available for One User Avatar? =
293
+ * <code>get_wp_user_avatar_src</code>: retrieves just the image URL
294
+ * <code>has_wp_user_avatar</code>: checks if the user has a One User Avatar image
295
+ * [See example usage here](http://wordpress.org/plugins/one-user-avatar/#installation)
296
+
297
+ == Advanced Settings ==
298
+
299
+ = Add One User Avatar to your own profile edit page =
300
+
301
+ 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.
302
+
303
+ If you're building your own profile edit page with other fields, One User Avatar is automatically added to the [show_user_profile](http://codex.wordpress.org/Plugin_API/Action_Reference/show_user_profile) and [edit_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:
304
+
305
+ `do_action( 'edit_user_avatar', $current_user );`
306
+
307
+ 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:
308
+
309
+ `function my_avatar_filter() {
310
+ // Remove from show_user_profile hook
311
+ remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
312
+ remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
313
+
314
+ // Remove from edit_user_profile hook
315
+ remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
316
+ remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
317
+
318
+ // Add to edit_user_avatar hook
319
+ add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) );
320
+ add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) );
321
+ }
322
+
323
+ // Loads only outside of administration panel
324
+ if ( ! is_admin() ) {
325
+ add_action( 'init','my_avatar_filter' );
326
+ }`
327
+
328
+ = HTML Wrapper =
329
+
330
+ 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:
331
+
332
+ `<div class="wpua-edit-container">
333
+ <h3>Avatar</h3>
334
+ <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
335
+ <p id="wpua-add-button">
336
+ <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
337
+ </p>
338
+ <p id="wpua-preview">
339
+ <img src="{imageURL}" alt="" />
340
+ Original Size
341
+ </p>
342
+ <p id="wpua-thumbnail">
343
+ <img src="{imageURL}" alt="" />
344
+ Thumbnail
345
+ </p>
346
+ <p id="wpua-remove-button">
347
+ <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
348
+ </p>
349
+ <p id="wpua-undo-button">
350
+ <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
351
+ </p>
352
+ </div>`
353
+
354
+ 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:
355
+
356
+ `remove_action( 'wpua_before_avatar', 'wpua_do_before_avatar' );
357
+ remove_action( 'wpua_after_avatar', 'wpua_do_after_avatar' );`
358
+
359
+ To add your own wrapper, you could create something like this:
360
+
361
+ `function my_before_avatar() {
362
+ echo '<div id="my-avatar">';
363
+ }
364
+ add_action( 'wpua_before_avatar', 'my_before_avatar' );
365
+
366
+ function my_after_avatar() {
367
+ echo '</div>';
368
+ }
369
+ add_action( 'wpua_after_avatar', 'my_after_avatar' );`
370
+
371
+ This would output:
372
+
373
+ `<div id="my-avatar">
374
+ <input type="hidden" name="wp-user-avatar" id="wp-user-avatar" value="{attachmentID}" />
375
+ <p id="wpua-add-button">
376
+ <button type="button" class="button" id="wpua-add" name="wpua-add">Edit Image</button>
377
+ </p>
378
+ <p id="wpua-preview">
379
+ <img src="{imageURL}" alt="" />
380
+ <span class="description">Original Size</span>
381
+ </p>
382
+ <p id="wpua-thumbnail">
383
+ <img src="{imageURL}" alt="" />
384
+ <span class="description">Thumbnail</span>
385
+ </p>
386
+ <p id="wpua-remove-button">
387
+ <button type="button" class="button" id="wpua-remove" name="wpua-remove">Default Avatar</button>
388
+ </p>
389
+ <p id="wpua-undo-button">
390
+ <button type="button" class="button" id="wpua-undo" name="wpua-undo">Undo</button>
391
+ </p>
392
+ </div>`
393
+
394
+ == Screenshots ==
395
+
396
+ 1. One User Avatar admin settings.
397
+ 2. One User Avatar lets you upload your own Default Avatar.
398
+
399
+ == Changelog ==
400
+
401
+ = 2.3.2 =
402
+ * Fix missing Portuguese translation
403
+
404
+ = 2.3.1 =
405
+ * Add Portuguese translation
406
+ * Add One_User_Avatar::plugin_dir_path() function
407
+ * Improve Dutch translation
408
+ * Remove redundant plural translation for 'All %s'
409
+ * Make URLs translatable
410
+ * Remove obsolete translation strings
411
+ * Fix indentation
412
+ * Fix nested call to wp_nonce_url()
413
+
414
+ = 2.3.0 =
415
+ * Rename to One User Avatar
416
+ * Rewrite to conform with WordPress Coding Standards
417
+ * Add translations for Dutch, English (UK), French, German, Italian, Portuguese, Romanian, Spanish
418
+ * Prevent conflict with old WP User Avatar plugin
419
+ * Fix indentation
420
+ * Fix unescaped attributes
421
+ * Fix missing translation strings
422
+ * Fix headers already sent error when performing bulk actions
423
+ * Fix headers already sent error on when updating avatar using shortcode
424
+ * Fix TinyMCE deprecation notice
425
+ * Fix previev image not reverting when removing from user profile
426
+ * Remove unused images
427
+ * Remove MailOptin recommendation
428
+
429
+ = 2.2.16 =
430
+ * Fixed issue of low quality avatar.
431
+
432
+ = 2.2.15 =
433
+ * Fixed broken avatar in some edge cases.
434
+
435
+ = 2.2.14 =
436
+ * Added missing space before classes.
437
+
438
+ = 2.2.13 =
439
+ * Fixed broken avatar image.
440
+
441
+ = 2.2.12 =
442
+ * Fixed issue where contributors and subscribers could see posts in the backend.
443
+ * Fixed Persistent XSS via display name when avatar is displayed.
444
+
445
+ = 2.2.11 =
446
+ * Added classes passed to get_avatar function to avatar display
447
+ * Added avatar_defaults filter.
448
+ * Fix wpua_get_avatar_url not passing args further down.
449
+
450
+ = 2.2.10 =
451
+ * Fixed: Warning: Missing argument 2 for WP_User_Avatar.
452
+ * Re-added support for hook implementation eg on wp frontend.
453
+
454
+ = 2.2.9 =
455
+ * Fixed PHP Notice: Trying to get property 'ID' of non-object.
456
+ * Fixed Fatal Error: Cannot use string offset as an array.
457
+ * Fixed: Deprecated: whitelist_options is deprecated since version 5.5.0
458
+ * Increased the priority of user_profile_picture_description filter usage
459
+
460
+ = 2.2.8 =
461
+ * Fixed: Notice: Object of class WP_User could not be converted.
462
+ * Replace core Profile Picture in profile edit screen with One User Avatar.
463
+ * Replace 'Avatar' as a label with 'Profile Picture'.
464
+ * Removed dashboard access restriction feature.
465
+ * Fixed contextual button display showing undo button on page load.
466
+
467
+ = 2.2.7 =
468
+ * Removed target blank from dismiss url of admin notice
469
+ * Code enhancements and improvements.
470
+
471
+ = 2.2.6 =
472
+ * Improve compatibility with latest WordPress version.
473
+
474
+ = 2.2.5 =
475
+ * Fix: Missing translation strings added.
476
+
477
+ = 2.2.4 =
478
+ * Fix: Warning Resolved on Avatar images.
479
+
480
+ = 2.2.3 =
481
+ * Fix: Broken Avatar in buddypress resolved.
482
+
483
+ = 2.2.2 =
484
+ * Fix: Broken avatars on comments section.
485
+
486
+ = 2.2.1 =
487
+ * Fix: get_avatar_url filter is defined.
488
+
489
+ = 2.2.0 =
490
+ * Fix: Fatel Error "Cannot use string offset as an array" resolved in PHP7.2.
491
+
492
+ = 2.1.9 =
493
+ * New: New filter 'wpua_default_alt_tag' added to modify default image alt tag And warning error resolved on stagging environment.
494
+
495
+ = 2.1.8 =
496
+ * Fix: Language Files are updated and warning error resolved on stagging environment.
497
+
498
+ = 2.1.7 =
499
+ * Fix: Default ALT tag added.
500
+
501
+ = 2.1.6 =
502
+ * Fix: Removed ads from the setting page.
503
+
504
+ = 2.1.5 =
505
+ * Fix: Translation bug resolved in class-wp-user-avatar-admin file in PHP 7.
506
+
507
+ = 2.1.4 =
508
+ * Fix: Remove Ads from dashboard and all other pages.
509
+
510
+ = 2.1.3 =
511
+ * Fix: Better Styling
512
+
513
+ = 2.1.2 =
514
+ * Fix: Tested up to 4.9.7
515
+
516
+ = 2.1.1 =
517
+ * Fix: Insecure content over https issue is fixed.
518
+
519
+ = 2.0.9 =
520
+ * New Shortcode: Use [avatar user=current] shortcode to show current logged in user avatar.
521
+
522
+ = 2.0.8 =
523
+ * Fix: Compatible with php 7.
524
+
525
+ = 2.0.7 =
526
+ * Improvement Fix: Removed languages files to be used from core wordpress language packs.
527
+
528
+ = 2.0.7 =
529
+ * Improvement Fix: Removed languages files to be used from core wordpress language packs.
530
+
531
+ = 2.0.6 =
532
+ * Improvement Fix: Broken Jquery files from UI is resolved.
533
+
534
+ = 2.0.5 =
535
+ * Improvement Fix: Broken JS files from UI is resolved.
536
+
537
+ = 2.0.4 =
538
+ * Improvement Fix: Activation warning in some cases is resolved.
539
+
540
+ = 2.0.3 =
541
+ * Improvement Fix: Added missing translation strings in English version of po file.
542
+
543
+
544
+ = 2.0.0 =
545
+ * Improvement Fix: Added missing translation strings in English version of po file.
546
+ * Bug Fix: Missing $user = $current_user is added in class-wp-user-avatar.php on line 156.
547
+
548
+
549
+ = 1.9.19 =
550
+ * Improvement Fix: Fixed add_query_arg() and remove_query_arg() usage to avoid XSS Vulnerability.
551
+
552
+
553
+ = 1.9.18 =
554
+ * Bug Fix: Removed cron job dependency for excellent performance.
555
+ * Bug Fix: Resolved gravatar was not showing on some special cases.
556
+ * Bug Fix: Resolved speed problem in case of large number of users for multisite, bbpress and buddy press.
557
+ * Bug Fix: Resolved display custom avatar problem when default and customer avatar is same choosen.
558
+
559
+
560
+ = 1.9.17 =
561
+ * Bug Fix: Removed the looping through all users on admin_init action.
562
+
563
+ = 1.9.16 =
564
+ * Bug Fix: lots of entries in wp_options table resolved.
565
+
566
+ = 1.9.15 =
567
+ * Bug Fix: Multiple Cron job added bug resolved.
568
+
569
+
570
+ = 1.9.14 =
571
+ * Bug Fix: Speed Issues due to check many times if gravatar exist.
572
+ * Bug Fix: Default gravatar issue for mustache and gravatar logo at front end and at buddypress pages
573
+ * Bug Fix: Avatar while adding for existing user.
574
+ * Bug Fix: UI issue when Gravatar option is enable/disable.
575
+
576
+
577
+ = 1.9.13 =
578
+ * Bug Fix: Load _load_wp_includes mostly only on front pages
579
+ * Bug Fix: Check for edit_posts capability before enabling filters for Subscribers
580
+
581
+ = 1.9.12 =
582
+ * Add: wpua_edit_user_redirect_url filter
583
+ * Add: wpua_edit_user_safe_redirect filter
584
+ * Bug Fix: Clean output buffer
585
+ * Update: Description field for widget
586
+
587
+ = 1.9.11 =
588
+ * Update: Disable resource manager until a better solution comes along
589
+
590
+ = 1.9.10 =
591
+ * Bug Fix: Check for TinyMCE version
592
+
593
+ = 1.9.9 =
594
+ * Bug Fix: TinyMCE not loaded
595
+
596
+ = 1.9.8 =
597
+ * Bug Fix: Check user permissions for displaying widget
598
+ * Update: Load resource manager only if NextGEN Gallery isn't installed
599
+
600
+ = 1.9.7 =
601
+ * Bug Fix: Remove resource manager
602
+ * Bug Fix: User ID in shortcode
603
+
604
+ = 1.9.6 =
605
+ * Bug Fix: Load resource manager on front pages only
606
+ * Update: [avatar_upload] user variable
607
+ * Update: Documentation
608
+
609
+ = 1.9.5 =
610
+ * Add: Start documentation of functions
611
+ * Bug Fix: [avatar_upload] permalink and redirect
612
+
613
+ = 1.9.4 =
614
+ * Add: Widget for [avatar_upload]
615
+ * Add: wpua_before_avatar_admin and wpua_after_avatar_admin for admin pages
616
+ * Bug Fix: Load functions class on plugins_loaded
617
+ * Update: Allow non-numeric WPUA value
618
+
619
+ = 1.9.3 =
620
+ * Bug Fix: Missing php
621
+
622
+ = 1.9.2 =
623
+ * Add: Setup class
624
+ * Bug Fix: Give wpua_attachment_is_image filter two variables
625
+ * Bug Fix: Return [avatar_upload] instead of echo
626
+ * Remove: Unneccessary filters
627
+ * Update: Allow upload to overwrite avatar for Contributors & Subscribers
628
+ * Update: Move Edit Image link for Contributors & Subscribers
629
+ * Update: Move text from localize script to data attribute
630
+ * Update: Shorten variable names
631
+ * Update: Wrap all classes in init
632
+
633
+ = 1.9.1 =
634
+ * Bug Fix: Double underscore for options page title
635
+ * Bug Fix: Remove TinyMCE language pack
636
+ * Bug Fix: Wrong variables in get_wp_user_avatar filter
637
+
638
+ = 1.9 =
639
+ * Add: Filters throughout plugin
640
+ * Bug Fix: Die messages
641
+ * Update: Move public functions to class
642
+
643
+ = 1.8.10 =
644
+ * Add: Search and screen option in Media Library view
645
+ * Bug Fix: Bulk delete in Media Library view
646
+ * Bug Fix: Hide captions if "Show Avatars" is off
647
+ * Bug Fix: Update avatar metadata on removal
648
+ * Update: Choose Image text
649
+ * Update: Show only images in Media Library modal
650
+ * Update: Show upload tab if no One User Avatar image has been selected yet
651
+
652
+ = 1.8.9 =
653
+ * Bug Fix: Check for post object
654
+
655
+ = 1.8.8 =
656
+ * Bug Fix: Media upload scripts
657
+
658
+ = 1.8.7 =
659
+ * Bug Fix: Bad reference to wpua_is_author_or_above
660
+
661
+ = 1.8.6 =
662
+ * Bug Fix: Check for media upload scripts before setting post parent
663
+
664
+ = 1.8.5 =
665
+ * Add: Capability check in one function
666
+
667
+ = 1.8.4 =
668
+ * Bug Fix: Set avatar post parent to 0
669
+
670
+ = 1.8.3 =
671
+ * Bug Fix: Prevent attachment insert without image
672
+ * Update: Check for delete_posts capability instead of user role for Subscribers
673
+ * Update: Refactor and clean up
674
+
675
+ = 1.8.2 =
676
+ * Bug Fix: Edit avatar setting
677
+
678
+ = 1.8.1 =
679
+ * Bug Fix: Reattach scripts to profile action
680
+
681
+ = 1.8 =
682
+ * Add: Front page uploader
683
+ * Add: Media Library view of all avatars
684
+ * Bug Fix: Identify public static functions
685
+ * Update: Refactor code into separate classes
686
+ * Update: Translations
687
+
688
+ = 1.7.2 =
689
+ * Bug Fix: Files not committed properly in previous release
690
+
691
+ = 1.7.1 =
692
+ * Update: Error message handling for front pages
693
+
694
+ = 1.7 =
695
+ * Add: Caption for avatar
696
+ * Add: Polish translation
697
+ * Update: Error message handling
698
+
699
+ = 1.6.8 =
700
+ * Bug Fix: Shortcode without user
701
+
702
+ = 1.6.7 =
703
+ * Add: Undo button
704
+ * Bug Fix: Get original avatar
705
+
706
+ = 1.6.6 =
707
+ * Add: Donation message
708
+ * Bug Fix: Die page when image is too large
709
+ * Bug Fix: Resize images uploaded through plugin only
710
+ * Remove: Unused function
711
+ * Update: Refactor JavaScript
712
+
713
+ = 1.6.5 =
714
+ * Bug Fix: Use entire comment object instead of just e-mail address
715
+
716
+ = 1.6.4 =
717
+ * Bug Fix: Correct avatar not showing in widget
718
+ * Update: Check compatibility to 3.7.1
719
+
720
+ = 1.6.3 =
721
+ * Bug Fix: Checkbox value for "Crop avatars to exact dimensions"
722
+
723
+ = 1.6.2 =
724
+ * Bug Fix: Show Default Avatar if attachment doesn't exist
725
+ * Bug Fix: manage_users_custom_column not returning values
726
+
727
+ = 1.6.1 =
728
+ * Bug Fix: Profile not saving without an avatar for Contributors & Subscribers
729
+
730
+ = 1.6.0 =
731
+ * Add: Filters to change profile HTML structure
732
+ * Add: Recognition of sizes registered with add_image_size
733
+ * Add: Resize image options for Contributors & Subscribers
734
+ * Bug Fix: Rerrange CSS class names
735
+
736
+ = 1.5.8 =
737
+ * Bug Fix: Add function exists checks to prevent redeclare errors
738
+ * Bug Fix: Page die if file upload is too big
739
+ * Bug Fix: Upload file with submit
740
+
741
+ = 1.5.7 =
742
+ * Bug Fix: Separate out JavaScript for Contributors & Subscribers
743
+ * Bug Fix: Subscriber uploader not finding error type
744
+
745
+ = 1.5.6 =
746
+ * Update: Use cache for wpua_has_gravatar
747
+
748
+ = 1.5.5 =
749
+ * Bug Fix: Hide "Edit Image" button if Contributors & Subscribers can't edit avatar
750
+ * Bug Fix: Remove edit_posts capability if Subscribers can't edit avatar
751
+
752
+ = 1.5.4 =
753
+ * Add: Option to enable avatar editing privilege for Contributors & Subscribers
754
+ * Add: Swedish translation
755
+ * Update: Move inline JavaScript to wp-user-avatar.js and wp-user-avatar-admin.js
756
+ * Update: Load JavaScript in footer
757
+ * Update: Translations
758
+
759
+ = 1.5.3 =
760
+ * Remove: Option to disable scripts in front pages
761
+ * Update: Load media upload scripts only on profile and avatar admin pages
762
+ * Update: Translations
763
+
764
+ = 1.5.2 =
765
+ * Bug Fix: Ability to disable scripts in front pages
766
+
767
+ = 1.5.1 =
768
+ * Add: Ability to disable scripts in front pages
769
+ * Update: Uninstall options
770
+ * Update: Translations
771
+
772
+ = 1.5 =
773
+ * Add: Ability to disable Gravatar avatars
774
+ * Add: Upload size limiter for Contributors & Subscribers
775
+ * Add: French, German, and Spanish translations
776
+
777
+ = 1.4.2 =
778
+ * Bug Fix: Include screen.php for get_current_screen function
779
+
780
+ = 1.4.1 =
781
+ * Bug Fix: Allow multipart data in form
782
+ * Bug Fix: Use wp_die for errors
783
+
784
+ = 1.4 =
785
+ * Add: Uploader for Contributors & Subscribers
786
+ * Add: Media states for avatar images
787
+ * Add: Plugin admin settings
788
+ * Update: Change support only to WP 3.4+
789
+
790
+ = 1.3.6 =
791
+ * Add: Target for link in shortcode
792
+ * Update: Clean up code and add more comments
793
+
794
+ = 1.3.5 =
795
+ * Bug Fix: Swap TinyMCE file locations
796
+
797
+ = 1.3.4 =
798
+ * Update: Change support only to WP 3.3+ because of jQuery 1.7.1 support
799
+
800
+ = 1.3.3 =
801
+ * Update: Shortcode checks for user ID, login, slug, or e-mail address
802
+ * Update: Move jquery to register_script for < WP 3.5
803
+
804
+ = 1.3.2 =
805
+ * Bug Fix: Check for user before setting name in alt tag
806
+ * Update: readme.txt
807
+
808
+ = 1.3.1 =
809
+ * Bug Fix: Rename usermeta only if found
810
+
811
+ = 1.3 =
812
+ * Add: Multisite support
813
+ * Bug Fix: Warnings if no user found
814
+ * Update: Enable action_show_user_profile for any class using show_user_profile hook
815
+
816
+ = 1.2.6 =
817
+ * Bug Fix: options-discussion.php page doesn't show default avatars
818
+
819
+ = 1.2.5 =
820
+ * Bug Fix: Comment author showing wrong avatar
821
+ * Bug Fix: Avatar adds fixed dimensions when non-numeric size is used
822
+ * Update: Use local image for default avatar instead of calling image from Gravatar
823
+
824
+ = 1.2.4 =
825
+ * Bug Fix: Show default avatar when user removes custom avatar
826
+ * Bug Fix: Default Avatar save setting
827
+
828
+ = 1.2.3 =
829
+ * Bug Fix: Show default avatar when user removes custom avatar
830
+ * Bug Fix: Default Avatar save setting
831
+
832
+ = 1.2.2 =
833
+ * Add: Ability for bbPress users to edit avatar on front profile page
834
+ * Add: Link options for shortcode
835
+ * Bug Fix: Show One User Avatar only to users with upload_files capability
836
+
837
+ = 1.2.1 =
838
+ * Add: TinyMCE button
839
+ * Update: Clean up redundant code
840
+ * Update: Compatibility only back to WordPress 3.3
841
+
842
+ = 1.2 =
843
+ * Add: Default Avatar setting
844
+
845
+ = 1.1.8 =
846
+ * Bug Fix: Change update_usermeta to update_user_meta
847
+
848
+ = 1.1.6 =
849
+ * Bug Fix: Image not showing in user profile edit
850
+
851
+ = 1.1.5a =
852
+ * Update: readme.txt
853
+
854
+ = 1.1.5 =
855
+ * Bug Fix: Remove stray curly bracket
856
+
857
+ = 1.1.4 =
858
+ * Bug Fix: Change get_usermeta to get_user_meta
859
+ * Bug Fix: Non-object warning when retrieving user ID
860
+
861
+ = 1.1.3 =
862
+ * Bug Fix: Comment author with no e-mail address
863
+
864
+ = 1.1.2 =
865
+ * Remove: Unused variables
866
+
867
+ = 1.1.1 =
868
+ * Bug Fix: Capabilities error in comment avatar
869
+
870
+ = 1.1 =
871
+ * Add: Add filter for get_avatar
872
+ * Add: CSS alignment classes
873
+ * Add: Replace comment author avatar
874
+ * Add: Shortcode
875
+ * Update: readme.txt
876
+
877
+ = 1.0.2 =
878
+ * Update: FAQ
879
+ * Remove: CSS that hides "Insert into Post"
880
+
881
+ = 1.0.1 =
882
+ * Add: CSS classes to image output
883
+
884
+ = 1.0 =
885
+ * Initial release
886
+
887
+ == Upgrade Notice ==
888
+
889
+ = 1.8 =
890
+ * New Feature: Front page uploader
891
+ * New Feature: Media Library view of all avatars
892
+
893
+ = 1.5.3 =
894
+ * 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.
895
+
896
+ = 1.5 =
897
+ * New Feature: Ability to disable Gravatar avatars
898
+ * New Feature: Upload size limiter for Contributors & Subscribers
899
+ * New Feature: French and German translations
900
+
901
+ = 1.4 =
902
+ * New Feature: Setting to allow all users to upload avatars
903
+ * New Feature: Setting to add or remove Visual Editor button
904
+ * New Feature: Media states for avatar images
905
+ * 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.
906
+
907
+ = 1.3 =
908
+ * New Feature: Multisite support
909
+
910
+ = 1.2.2 =
911
+ * New Features: Link options for shortcode, bbPress integration
912
+
913
+ = 1.2.1 =
914
+ * New Feature: Shortcode insertion button for Visual Editor
915
+
916
+ = 1.2 =
917
+ * New Feature: Default Avatar customization
918
+
919
+ = 1.1 =
920
+ * New Features: [avatar] shortcode, direct replacement of get_avatar() and comment author avatar, more CSS classes
uninstall.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Remove user metadata and options on plugin delete.
4
+ *
5
+ * @package One User Avatar
6
+ * @author Bangbay Siboliban
7
+ * @author Flippercode
8
+ * @author ProfilePress
9
+ * @author One Designs
10
+ * @copyright 2013-2014 Bangbay Siboliban
11
+ * @copyright 2014-2020 Flippercode
12
+ * @copyright 2020-2021 ProfilePress
13
+ * @copyright 2021 One Designs
14
+ * @version 2.3.2
15
+ */
16
+
17
+ /**
18
+ * @since 1.4
19
+ * @uses int $blog_id
20
+ * @uses object $wpdb
21
+ * @uses delete_option()
22
+ * @uses delete_post_meta_by_key()
23
+ * @uses delete_user_meta()
24
+ * @uses get_users()
25
+ * @uses get_blog_prefix()
26
+ * @uses is_multisite()
27
+ * @uses switch_to_blog()
28
+ * @uses update_option()
29
+ * @uses wp_get_sites()
30
+ */
31
+
32
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
33
+ die( 'You are not allowed to call this page directly.' );
34
+ }
35
+
36
+ global $blog_id, $wpdb;
37
+
38
+ $users = get_users();
39
+
40
+ // Remove settings for all sites in multisite
41
+ if ( is_multisite() ) {
42
+ $blogs = wp_get_sites();
43
+
44
+ foreach ( $users as $user ) {
45
+ foreach ( $blogs as $blog ) {
46
+ delete_user_meta( $user->ID, $wpdb->get_blog_prefix( $blog->blog_id ) . 'user_avatar' );
47
+ }
48
+ }
49
+
50
+ foreach ( $blogs as $blog ) {
51
+ switch_to_blog( $blog->blog_id );
52
+
53
+ delete_option( 'avatar_default_wp_user_avatar' );
54
+ delete_option( 'wp_user_avatar_allow_upload' );
55
+ delete_option( 'wp_user_avatar_disable_gravatar' );
56
+ delete_option( 'wp_user_avatar_edit_avatar' );
57
+ delete_option( 'wp_user_avatar_load_scripts' );
58
+ delete_option( 'wp_user_avatar_resize_crop' );
59
+ delete_option( 'wp_user_avatar_resize_h' );
60
+ delete_option( 'wp_user_avatar_resize_upload' );
61
+ delete_option( 'wp_user_avatar_resize_w' );
62
+ delete_option( 'wp_user_avatar_tinymce' );
63
+ delete_option( 'wp_user_avatar_upload_size_limit' );
64
+ delete_option( 'wp_user_avatar_default_avatar_updated' );
65
+ delete_option( 'wp_user_avatar_media_updated' );
66
+ delete_option( 'wp_user_avatar_users_updated' );
67
+ delete_option( 'wpua_has_gravatar' );
68
+ }
69
+
70
+ restore_current_blog();
71
+ } else {
72
+ foreach ( $users as $user ) {
73
+ delete_user_meta( $user->ID, $wpdb->get_blog_prefix( $blog_id ) . 'user_avatar' );
74
+ }
75
+
76
+ delete_option( 'avatar_default_wp_user_avatar' );
77
+ delete_option( 'wp_user_avatar_allow_upload' );
78
+ delete_option( 'wp_user_avatar_disable_gravatar' );
79
+ delete_option( 'wp_user_avatar_edit_avatar' );
80
+ delete_option( 'wp_user_avatar_load_scripts' );
81
+ delete_option( 'wp_user_avatar_resize_crop' );
82
+ delete_option( 'wp_user_avatar_resize_h' );
83
+ delete_option( 'wp_user_avatar_resize_upload' );
84
+ delete_option( 'wp_user_avatar_resize_w' );
85
+ delete_option( 'wp_user_avatar_tinymce' );
86
+ delete_option( 'wp_user_avatar_upload_size_limit' );
87
+ delete_option( 'wp_user_avatar_default_avatar_updated' );
88
+ delete_option( 'wp_user_avatar_media_updated' );
89
+ delete_option( 'wp_user_avatar_users_updated' );
90
+ delete_option( 'wpua_has_gravatar' );
91
+ }
92
+
93
+ // Delete post meta
94
+ delete_post_meta_by_key( '_wp_attachment_wp_user_avatar' );
95
+
96
+ // Reset all default avatars to Mystery Man
97
+ update_option( 'avatar_default', 'mystery' );