User Profile Picture - Version 1.2.1

Version Description

  • Released 03 March 2014
  • Fixed internationalization errors.
  • Added Spanish translation.
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 User Profile Picture
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

languages/metronet-profile-picture-es_ES.mo ADDED
Binary file
languages/metronet-profile-picture-es_ES.po ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Metronet Profile Picture\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/simple-comment-editing\n"
5
+ "POT-Creation-Date: 2015-03-09 22:01-0600\n"
6
+ "PO-Revision-Date: 2015-03-09 22:01-0600\n"
7
+ "Last-Translator: Ronald Huereca <ron@ronalfy.com>\n"
8
+ "Language-Team: \n"
9
+ "Language: en\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.5.3\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: _e;__;esc_html__;esc_html_e;esc_attr__;esc_attr_e\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+
19
+ #: ../metronet-profile-picture.php:85 ../metronet-profile-picture.php:108
20
+ #: ../metronet-profile-picture.php:359 ../metronet-profile-picture.php:407
21
+ msgid "Remove profile image"
22
+ msgstr "Eliminar la Foto de Perfil"
23
+
24
+ #: ../metronet-profile-picture.php:116 ../metronet-profile-picture.php:135
25
+ #: ../metronet-profile-picture.php:350
26
+ msgid "Upload or Change Profile Picture"
27
+ msgstr "Seleccionar una Foto de Perfil"
28
+
29
+ #: ../metronet-profile-picture.php:271 ../metronet-profile-picture.php:408
30
+ msgid "Crop Thumbnail"
31
+ msgstr "Recortar la imagen"
32
+
33
+ #: ../metronet-profile-picture.php:335
34
+ msgid "Profile Image"
35
+ msgstr "Foto de Perfil"
36
+
37
+ #: ../metronet-profile-picture.php:381
38
+ msgid "Override Avatar?"
39
+ msgstr ""
40
+ "¿Anteponer esta foto al Avatar? (Marca esta casilla si no tienes Gravatar "
41
+ "para que tu foto sea visible)"
42
+
43
+ #: ../metronet-profile-picture.php:406
44
+ msgid "Set profile image"
45
+ msgstr "Establecer la Foto de Perfil"
46
+
47
+ #~ msgid ""
48
+ #~ "Select \"Set profile image\" after uploading to choose the profile image"
49
+ #~ msgstr ""
50
+ #~ "Selecciona \"Seleccionar una Foto de Perfil\" tras subir la imagen "
51
+ #~ "elegida a la librería"
languages/metronet-profile-picture.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Metronet Profile Picture\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/simple-comment-editing\n"
5
- "POT-Creation-Date: 2014-11-11 20:47-0600\n"
6
- "PO-Revision-Date: 2014-11-11 20:48-0600\n"
7
  "Last-Translator: Ronald Huereca <ron@ronalfy.com>\n"
8
  "Language-Team: \n"
9
  "Language: English\n"
@@ -16,31 +16,28 @@ msgstr ""
16
  "X-Poedit-Basepath: .\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../metronet-profile-picture.php:257 ../metronet-profile-picture.php:393
20
- msgid "Crop Thumbnail"
 
21
  msgstr ""
22
 
23
- #: ../metronet-profile-picture.php:320
 
24
  msgid "Upload or Change Profile Picture"
25
  msgstr ""
26
 
27
- #: ../metronet-profile-picture.php:323
28
- msgid "Profile Image"
29
  msgstr ""
30
 
31
- #: ../metronet-profile-picture.php:337
32
- msgid ""
33
- "Select \"Set profile image\" after uploading to choose the profile image"
34
  msgstr ""
35
 
36
- #: ../metronet-profile-picture.php:358
37
  msgid "Override Avatar?"
38
  msgstr ""
39
 
40
- #: ../metronet-profile-picture.php:368 ../metronet-profile-picture.php:392
41
- msgid "Remove profile image"
42
- msgstr ""
43
-
44
- #: ../metronet-profile-picture.php:391
45
  msgid "Set profile image"
46
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Metronet Profile Picture\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/simple-comment-editing\n"
5
+ "POT-Creation-Date: 2015-03-09 23:35-0600\n"
6
+ "PO-Revision-Date: 2015-03-09 23:35-0600\n"
7
  "Last-Translator: Ronald Huereca <ron@ronalfy.com>\n"
8
  "Language-Team: \n"
9
  "Language: English\n"
16
  "X-Poedit-Basepath: .\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../metronet-profile-picture.php:85 ../metronet-profile-picture.php:108
20
+ #: ../metronet-profile-picture.php:359 ../metronet-profile-picture.php:407
21
+ msgid "Remove profile image"
22
  msgstr ""
23
 
24
+ #: ../metronet-profile-picture.php:116 ../metronet-profile-picture.php:135
25
+ #: ../metronet-profile-picture.php:350
26
  msgid "Upload or Change Profile Picture"
27
  msgstr ""
28
 
29
+ #: ../metronet-profile-picture.php:271 ../metronet-profile-picture.php:408
30
+ msgid "Crop Thumbnail"
31
  msgstr ""
32
 
33
+ #: ../metronet-profile-picture.php:335
34
+ msgid "Profile Image"
 
35
  msgstr ""
36
 
37
+ #: ../metronet-profile-picture.php:381
38
  msgid "Override Avatar?"
39
  msgstr ""
40
 
41
+ #: ../metronet-profile-picture.php:406
 
 
 
 
42
  msgid "Set profile image"
43
  msgstr ""
metronet-profile-picture.php CHANGED
@@ -3,10 +3,10 @@
3
  Plugin Name: Metronet Profile Picture
4
  Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
5
  Description: Use the native WP uploader on your user profile page.
6
- Author: Metronet
7
- Version: 1.2.0
8
  Requires at least: 3.5
9
- Author URI: http://www.metronet.no
10
  Contributors: ronalfy, metronet
11
  Text Domain: metronet-profile-picture
12
  Domain Path: /languages
@@ -82,7 +82,7 @@ class Metronet_Profile_Picture {
82
  $post_thumbnail = get_the_post_thumbnail( $post_id, 'thumbnail' );
83
  $crop_html = $this->get_post_thumbnail_editor_link( $post_id );
84
  $thumb_html = sprintf( '<a href="#" class="mpp_add_media">%s</a>', $post_thumbnail );
85
- $thumb_html .= sprintf( '<a id="metronet-remove" class="dashicons dashicons-trash" href="#" title="%s">%s</a>', esc_attr__( 'Remove profile image', 'metronet_profile_picture' ), esc_html__( "Remove profile image", "metronet_profile_picture" ) );
86
  die( json_encode( array(
87
  'thumb_html' => $thumb_html,
88
  'crop_html' => $crop_html,
@@ -105,7 +105,7 @@ class Metronet_Profile_Picture {
105
  $post_thumbnail = get_the_post_thumbnail( $post_id, 'thumbnail' );
106
  $crop_html = $this->get_post_thumbnail_editor_link( $post_id );
107
  $thumb_html = sprintf( '<a href="#" class="mpp_add_media">%s</a>', $post_thumbnail );
108
- $thumb_html .= sprintf( '<a id="metronet-remove" class="dashicons dashicons-trash" href="#" title="%s">%s</a>', esc_attr__( 'Remove profile image', 'metronet_profile_picture' ), esc_html__( "Remove profile image", "metronet_profile_picture" ) );
109
  die( json_encode( array(
110
  'thumb_html' => $thumb_html,
111
  'crop_html' => $crop_html,
@@ -113,7 +113,7 @@ class Metronet_Profile_Picture {
113
  ) ) );
114
  } else {
115
  $thumb_html = '<a href="#" class="mpp_add_media">';
116
- $thumb_html.= sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet_profile_picture' ) );
117
  $thumb_html .= '</a>';
118
  }
119
  die( json_encode( array( 'thumb_html' => $thumb_html, 'crop_html' => '', 'has_thumb' => false ) ) );
@@ -132,7 +132,7 @@ class Metronet_Profile_Picture {
132
  check_ajax_referer( "update-post_$post_id" );
133
 
134
  $thumb_html = '<a href="#" class="mpp_add_media">';
135
- $thumb_html.= sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet_profile_picture' ) );
136
  $thumb_html .= '</a>';
137
 
138
  //Save user meta and update thumbnail
@@ -268,7 +268,7 @@ class Metronet_Profile_Picture {
268
  'page' => 'pte-edit',
269
  'pte-id' => $post_thumbnail_id
270
  ), admin_url('upload.php') );
271
- printf( ' - <a href="%s">%s</a>', $pte_url, __( 'Crop Thumbnail', 'metronet_profile_picture' ) );
272
  } //end post thumbnail editor
273
  return ob_get_clean();
274
  } //end get_post_thumbnail_editor_link
@@ -332,7 +332,7 @@ class Metronet_Profile_Picture {
332
 
333
  ?>
334
  <tr valign="top">
335
- <th scope="row"><?php esc_html_e( "Profile Image", "metronet_profile_picture" ); ?></th>
336
  <td id="mpp">
337
  <input type="hidden" name="metronet_profile_id" id="metronet_profile_id" value="<?php echo esc_attr( $user_id ); ?>" />
338
  <input type="hidden" name="metronet_post_id" id="metronet_post_id" value="<?php echo esc_attr( $post_id ); ?>" />
@@ -347,7 +347,7 @@ class Metronet_Profile_Picture {
347
  echo '</a>';
348
  } else {
349
  echo '<a href="#" class="mpp_add_media">';
350
- $post_thumbnail = sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet_profile_picture' ) );
351
  echo $post_thumbnail;
352
  echo '</a>';
353
  }
@@ -356,7 +356,7 @@ class Metronet_Profile_Picture {
356
  $remove_classes[] = 'mpp-no-profile-image';
357
  }
358
  ?>
359
- <a id="metronet-remove" class="<?php echo implode( ' ', $remove_classes ); ?>" href="#" title="<?php esc_attr_e( 'Remove profile image', 'metronet_profile_picture' ); ?>"><?php esc_html_e( "Remove profile image", "metronet_profile_picture" );?></a>
360
  </div><!-- #metronet-profile-image -->
361
  <div id="metronet-override-avatar">
362
  <input type="hidden" name="metronet-user-avatar" value="off" />
@@ -378,7 +378,7 @@ class Metronet_Profile_Picture {
378
  <?php
379
  else:
380
  ?>
381
- <br /><input type="checkbox" name="metronet-user-avatar" id="metronet-user-avatar" value="on" <?php echo $checked; ?> /><label for="metronet-user-avatar"> <?php esc_html_e( "Override Avatar?", "metronet_profile_picture" ); ?></label>
382
  <?php endif; ?>
383
  </div><!-- #metronet-override-avatar -->
384
  </td>
@@ -403,9 +403,9 @@ class Metronet_Profile_Picture {
403
  wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '20141111', true );
404
  wp_localize_script( 'mt-pp', 'metronet_profile_image',
405
  array(
406
- 'set_profile_text' => __( 'Set profile image', 'metronet_profile_picture' ),
407
- 'remove_profile_text' => __( 'Remove profile image', 'metronet_profile_picture' ),
408
- 'crop' => __( 'Crop Thumbnail', 'metronet_profile_picture' ),
409
  'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) )
410
  )
411
  );
3
  Plugin Name: Metronet Profile Picture
4
  Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
5
  Description: Use the native WP uploader on your user profile page.
6
+ Author: ronalfy
7
+ Version: 1.2.1
8
  Requires at least: 3.5
9
+ Author URI: http://www.ronalfy.com
10
  Contributors: ronalfy, metronet
11
  Text Domain: metronet-profile-picture
12
  Domain Path: /languages
82
  $post_thumbnail = get_the_post_thumbnail( $post_id, 'thumbnail' );
83
  $crop_html = $this->get_post_thumbnail_editor_link( $post_id );
84
  $thumb_html = sprintf( '<a href="#" class="mpp_add_media">%s</a>', $post_thumbnail );
85
+ $thumb_html .= sprintf( '<a id="metronet-remove" class="dashicons dashicons-trash" href="#" title="%s">%s</a>', esc_attr__( 'Remove profile image', 'metronet-profile-picture' ), esc_html__( "Remove profile image", "metronet-profile-picture" ) );
86
  die( json_encode( array(
87
  'thumb_html' => $thumb_html,
88
  'crop_html' => $crop_html,
105
  $post_thumbnail = get_the_post_thumbnail( $post_id, 'thumbnail' );
106
  $crop_html = $this->get_post_thumbnail_editor_link( $post_id );
107
  $thumb_html = sprintf( '<a href="#" class="mpp_add_media">%s</a>', $post_thumbnail );
108
+ $thumb_html .= sprintf( '<a id="metronet-remove" class="dashicons dashicons-trash" href="#" title="%s">%s</a>', esc_attr__( 'Remove profile image', 'metronet-profile-picture' ), esc_html__( "Remove profile image", "metronet-profile-picture" ) );
109
  die( json_encode( array(
110
  'thumb_html' => $thumb_html,
111
  'crop_html' => $crop_html,
113
  ) ) );
114
  } else {
115
  $thumb_html = '<a href="#" class="mpp_add_media">';
116
+ $thumb_html.= sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet-profile-picture' ) );
117
  $thumb_html .= '</a>';
118
  }
119
  die( json_encode( array( 'thumb_html' => $thumb_html, 'crop_html' => '', 'has_thumb' => false ) ) );
132
  check_ajax_referer( "update-post_$post_id" );
133
 
134
  $thumb_html = '<a href="#" class="mpp_add_media">';
135
+ $thumb_html.= sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet-profile-picture' ) );
136
  $thumb_html .= '</a>';
137
 
138
  //Save user meta and update thumbnail
268
  'page' => 'pte-edit',
269
  'pte-id' => $post_thumbnail_id
270
  ), admin_url('upload.php') );
271
+ printf( ' - <a href="%s">%s</a>', $pte_url, __( 'Crop Thumbnail', 'metronet-profile-picture' ) );
272
  } //end post thumbnail editor
273
  return ob_get_clean();
274
  } //end get_post_thumbnail_editor_link
332
 
333
  ?>
334
  <tr valign="top">
335
+ <th scope="row"><?php esc_html_e( "Profile Image", "metronet-profile-picture" ); ?></th>
336
  <td id="mpp">
337
  <input type="hidden" name="metronet_profile_id" id="metronet_profile_id" value="<?php echo esc_attr( $user_id ); ?>" />
338
  <input type="hidden" name="metronet_post_id" id="metronet_post_id" value="<?php echo esc_attr( $post_id ); ?>" />
347
  echo '</a>';
348
  } else {
349
  echo '<a href="#" class="mpp_add_media">';
350
+ $post_thumbnail = sprintf( '<img src="%s" width="150" height="150" title="%s" />', $this->get_plugin_url( 'img/mystery.png' ), esc_attr__( "Upload or Change Profile Picture", 'metronet-profile-picture' ) );
351
  echo $post_thumbnail;
352
  echo '</a>';
353
  }
356
  $remove_classes[] = 'mpp-no-profile-image';
357
  }
358
  ?>
359
+ <a id="metronet-remove" class="<?php echo implode( ' ', $remove_classes ); ?>" href="#" title="<?php esc_attr_e( 'Remove profile image', 'metronet-profile-picture' ); ?>"><?php esc_html_e( "Remove profile image", "metronet-profile-picture" );?></a>
360
  </div><!-- #metronet-profile-image -->
361
  <div id="metronet-override-avatar">
362
  <input type="hidden" name="metronet-user-avatar" value="off" />
378
  <?php
379
  else:
380
  ?>
381
+ <br /><input type="checkbox" name="metronet-user-avatar" id="metronet-user-avatar" value="on" <?php echo $checked; ?> /><label for="metronet-user-avatar"> <?php esc_html_e( "Override Avatar?", "metronet-profile-picture" ); ?></label>
382
  <?php endif; ?>
383
  </div><!-- #metronet-override-avatar -->
384
  </td>
403
  wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '20141111', true );
404
  wp_localize_script( 'mt-pp', 'metronet_profile_image',
405
  array(
406
+ 'set_profile_text' => __( 'Set profile image', 'metronet-profile-picture' ),
407
+ 'remove_profile_text' => __( 'Remove profile image', 'metronet-profile-picture' ),
408
+ 'crop' => __( 'Crop Thumbnail', 'metronet-profile-picture' ),
409
  'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) )
410
  )
411
  );
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: metronet, ronalfy
3
  Tags: users, user, user profile
4
  Requires at least: 3.5
5
- Tested up to: 4.1
6
- Stable tag: 1.2.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -17,6 +17,11 @@ A template tag is supplied for outputting to a theme and the option to override
17
  If you like this plugin, please leave a rating/review and mark the plugin as working.
18
 
19
  <h3>Translations</h3>
 
 
 
 
 
20
  If you would like to contribute a translation, please leave a support request with a link to your translation or <a href="http://www.ronalfy.com/contact/">get in touch</a>.
21
 
22
  == Installation ==
@@ -100,6 +105,11 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
103
  = 1.2.0 =
104
  * Released 07 December 2014
105
  * Reducing clutter in the interface. Removed text option to upload. Added default image if no profile image is available. Added option to remove the profile image.
@@ -164,44 +174,9 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
164
 
165
  == Upgrade Notice ==
166
 
 
 
 
167
  = 1.2.0 =
168
  Reducing clutter in the interface. Removed text option to upload. Added default image if no profile image is available. Added option to remove the profile image.
169
 
170
- = 1.1.0 =
171
- Added the ability to remove profile images (aside from deleting the image). Added better internationalization capabilities. Added compatibility with Theme My Login.
172
-
173
- = 1.0.23 =
174
- Added a new filter to allow the "Override Avatar" interface to be hidden (and turned on my default).
175
-
176
- = 1.0.22 =
177
- Added minor update to additional user meta for easier querying (props Solinx)
178
-
179
- = 1.0.21 =
180
- Fixed avatar override on options discussion page.
181
-
182
- = 1.0.20 =
183
- Added a filter for turning on "Override Avatar" by default.
184
-
185
- = 1.0.19 =
186
- Added support for version 2.0.x of Post Thumbnail Editor
187
-
188
- = 1.0.18 =
189
- Added basic multisite support
190
-
191
- = 1.0.16 =
192
- Fixed a bug where only the profile image interface was showing for only authors and not editors and administrators.
193
-
194
- = 1.0.15 =
195
- Built-in support for Post Thumbnail Editor. Better integration with the new WP 3.5 media uploader. Various bug fixes.
196
-
197
- = 1.0.10 =
198
- 3.5 media uploader support. Usability enhancements. Code cleanup.
199
-
200
- = 1.0.9 =
201
- 3.5 media uploader support.
202
-
203
- = 1.0.1 =
204
- Several important bug fixes including the ability to uncheck the avatar override, and the behavior when someone deletes their profile picture.
205
-
206
- = 1.0.0 =
207
- Initial release.
2
  Contributors: metronet, ronalfy
3
  Tags: users, user, user profile
4
  Requires at least: 3.5
5
+ Tested up to: 4.1.1
6
+ Stable tag: 1.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
17
  If you like this plugin, please leave a rating/review and mark the plugin as working.
18
 
19
  <h3>Translations</h3>
20
+
21
+ <ul>
22
+ <li>Spanish - Thanks Eva F.</li>
23
+ </ul>
24
+
25
  If you would like to contribute a translation, please leave a support request with a link to your translation or <a href="http://www.ronalfy.com/contact/">get in touch</a>.
26
 
27
  == Installation ==
105
 
106
  == Changelog ==
107
 
108
+ = 1.2.1 =
109
+ * Released 03 March 2014
110
+ * Fixed internationalization errors.
111
+ * Added Spanish translation.
112
+
113
  = 1.2.0 =
114
  * Released 07 December 2014
115
  * Reducing clutter in the interface. Removed text option to upload. Added default image if no profile image is available. Added option to remove the profile image.
174
 
175
  == Upgrade Notice ==
176
 
177
+ = 1.2.1 =
178
+ Fixed internationalization errors. Added Spanish translation.
179
+
180
  = 1.2.0 =
181
  Reducing clutter in the interface. Removed text option to upload. Added default image if no profile image is available. Added option to remove the profile image.
182