Ultimate Member – User Profile & Membership Plugin - Version 1.0.57

Version Description

Download this release

Release Info

Developer ultimatemember
Plugin Icon 128x128 Ultimate Member – User Profile & Membership Plugin
Version 1.0.57
Comparing to
See all releases

Code changes from version 1.0.56 to 1.0.57

core/um-actions-form.php CHANGED
@@ -170,13 +170,13 @@
170
}
171
172
if ( isset( $array['min_chars'] ) && $array['min_chars'] > 0 ) {
173
- if ( strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
174
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain at least %s characters','ultimatemember'), $array['label'], $array['min_chars']) );
175
}
176
}
177
178
if ( isset( $array['max_chars'] ) && $array['max_chars'] > 0 ) {
179
- if ( strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
180
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) );
181
}
182
}
170
}
171
172
if ( isset( $array['min_chars'] ) && $array['min_chars'] > 0 ) {
173
+ if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
174
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain at least %s characters','ultimatemember'), $array['label'], $array['min_chars']) );
175
}
176
}
177
178
if ( isset( $array['max_chars'] ) && $array['max_chars'] > 0 ) {
179
+ if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
180
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) );
181
}
182
}
core/um-actions-user.php CHANGED
@@ -6,16 +6,21 @@
6
add_action('um_after_user_upload','um_remove_unused_uploads', 10);
7
function um_remove_unused_uploads( $user_id ) {
8
global $ultimatemember;
9
-
10
um_fetch_user( $user_id );
11
12
$array = $ultimatemember->user->profile;
13
-
14
$files = glob( um_user_uploads_dir() . '*', GLOB_BRACE);
15
- foreach($files as $file) {
16
- $str = basename($file);
17
- if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) )
18
- unlink( $file );
19
}
20
21
}
6
add_action('um_after_user_upload','um_remove_unused_uploads', 10);
7
function um_remove_unused_uploads( $user_id ) {
8
global $ultimatemember;
9
+
10
um_fetch_user( $user_id );
11
12
$array = $ultimatemember->user->profile;
13
+
14
$files = glob( um_user_uploads_dir() . '*', GLOB_BRACE);
15
+
16
+ if ( file_exists( um_user_uploads_dir() ) && $files && isset( $array ) && is_array( $array ) ) {
17
+
18
+ foreach($files as $file) {
19
+ $str = basename($file);
20
+ if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) )
21
+ unlink( $file );
22
+ }
23
+
24
}
25
26
}
core/um-fields.php CHANGED
@@ -342,6 +342,9 @@ class UM_Fields {
342
function field_value( $key, $default = false, $data = null ) {
343
global $ultimatemember;
344
345
$type = (isset($data['type']))?$data['type']:'';
346
347
// preview in backend
342
function field_value( $key, $default = false, $data = null ) {
343
global $ultimatemember;
344
345
+ if ( isset($_SESSION) && isset($_SESSION['um_social_profile'][$key]) )
346
+ return $_SESSION['um_social_profile'][$key];
347
+
348
$type = (isset($data['type']))?$data['type']:'';
349
350
// preview in backend
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
6
- Version: 1.0.56
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
*/
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
6
+ Version: 1.0.57
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
*/
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
7
Requires at least: 4.1
8
Tested up to: 4.1
9
10
- Stable Tag: 1.0.56
11
12
License: GNU Version 2 or Any Later Version
13
@@ -187,6 +187,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
187
188
== Changelog ==
189
190
= 1.0.56: February 15, 2015 =
191
192
* Fixed: issue with permalink changes
7
Requires at least: 4.1
8
Tested up to: 4.1
9
10
+ Stable Tag: 1.0.57
11
12
License: GNU Version 2 or Any Later Version
13
187
188
== Changelog ==
189
190
+ = 1.0.57: February 16, 2015 =
191
+
192
+ * Tweak: Italian language up-to-date
193
+ * Fixed: issue with registration where it can trigger a php warning
194
+ * Fixed: some translation issues
195
+
196
= 1.0.56: February 15, 2015 =
197
198
* Fixed: issue with permalink changes