Version Description
- Fixed issue with a PHP warning when getting the user with the WP_User object.
Download this release
Release Info
Developer | 3five |
Plugin | Custom User Profile Photo |
Version | 0.5.2 |
Comparing to | |
See all releases |
Code changes from version 0.5.1 to 0.5.2
- 3five_cupp.php +6 -5
- readme.txt +5 -2
3five_cupp.php
CHANGED
@@ -9,7 +9,7 @@ Author: 3five
|
|
9 |
Author URI: http://3five.com
|
10 |
Text Domain: custom-user-profile-photo
|
11 |
Domain Path: /languages/
|
12 |
-
Version: 0.5.
|
13 |
*/
|
14 |
|
15 |
/**
|
@@ -58,6 +58,7 @@ Version: 0.5.1
|
|
58 |
function cupp_load_plugin_textdomain() {
|
59 |
load_plugin_textdomain( 'custom-user-profile-photo', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
60 |
}
|
|
|
61 |
add_action( 'init', 'cupp_load_plugin_textdomain' );
|
62 |
|
63 |
/**
|
@@ -135,11 +136,11 @@ function cupp_profile_img_fields( $user ) {
|
|
135 |
<div id="cupp_options">
|
136 |
<input type="radio" id="upload_option" name="img_option" value="upload" class="tog" checked>
|
137 |
<label
|
138 |
-
|
139 |
|
140 |
<input type="radio" id="external_option" name="img_option" value="external" class="tog">
|
141 |
<label
|
142 |
-
|
143 |
</div>
|
144 |
|
145 |
<!-- Hold the value here if this is a WPMU image -->
|
@@ -296,8 +297,8 @@ function cupp_get_user_by_id_or_email( $identifier ) {
|
|
296 |
return get_user_by( 'id', (int) $identifier );
|
297 |
}
|
298 |
|
299 |
-
if ( property_exists( $identifier, '
|
300 |
-
return get_user_by( 'id', (int) $identifier->
|
301 |
}
|
302 |
|
303 |
return get_user_by( 'email', $identifier );
|
9 |
Author URI: http://3five.com
|
10 |
Text Domain: custom-user-profile-photo
|
11 |
Domain Path: /languages/
|
12 |
+
Version: 0.5.2
|
13 |
*/
|
14 |
|
15 |
/**
|
58 |
function cupp_load_plugin_textdomain() {
|
59 |
load_plugin_textdomain( 'custom-user-profile-photo', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
60 |
}
|
61 |
+
|
62 |
add_action( 'init', 'cupp_load_plugin_textdomain' );
|
63 |
|
64 |
/**
|
136 |
<div id="cupp_options">
|
137 |
<input type="radio" id="upload_option" name="img_option" value="upload" class="tog" checked>
|
138 |
<label
|
139 |
+
for="upload_option"><?php _e( 'Upload New Image', 'custom-user-profile-photo' ); ?></label><br>
|
140 |
|
141 |
<input type="radio" id="external_option" name="img_option" value="external" class="tog">
|
142 |
<label
|
143 |
+
for="external_option"><?php _e( 'Use External URL', 'custom-user-profile-photo' ); ?></label><br>
|
144 |
</div>
|
145 |
|
146 |
<!-- Hold the value here if this is a WPMU image -->
|
297 |
return get_user_by( 'id', (int) $identifier );
|
298 |
}
|
299 |
|
300 |
+
if ( is_object( $identifier ) && property_exists( $identifier, 'ID' ) ) {
|
301 |
+
return get_user_by( 'id', (int) $identifier->ID );
|
302 |
}
|
303 |
|
304 |
return get_user_by( 'email', $identifier );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: 3five, VincentListrani, jmichaelward
|
|
3 |
Donate link:
|
4 |
Tags: custom profile photo, custom profile picture, profile picture, user profile, profile photo, user profile photo, user profile picture
|
5 |
Requires at least: 3.6.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 0.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -84,6 +84,9 @@ Where the $user_ID is the users ID number and the size is a registered image siz
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
87 |
= 0.5.1 =
|
88 |
* Fixed issue with `update_user_attribute`.
|
89 |
|
3 |
Donate link:
|
4 |
Tags: custom profile photo, custom profile picture, profile picture, user profile, profile photo, user profile photo, user profile picture
|
5 |
Requires at least: 3.6.1
|
6 |
+
Tested up to: 4.7.3
|
7 |
+
Stable tag: 0.5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 0.5.2 =
|
88 |
+
* Fixed issue with a PHP warning when getting the user with the WP_User object.
|
89 |
+
|
90 |
= 0.5.1 =
|
91 |
* Fixed issue with `update_user_attribute`.
|
92 |
|