Ultimate Member – User Profile & Membership Plugin - Version 1.3.49

Version Description

Download this release

Release Info

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

Code changes from version 1.3.48 to 1.3.49

Files changed (4) hide show
  1. admin/core/um-admin-notices.php +38 -35
  2. core/um-files.php +4 -0
  3. index.php +1 -1
  4. readme.txt +6 -3
admin/core/um-admin-notices.php CHANGED
@@ -41,65 +41,68 @@ class UM_Admin_Notices {
41
global $ultimatemember;
42
$hide_register_notice = get_option('um_can_register_notice');
43
44
- if ( !get_option('users_can_register') && !$hide_register_notice ) {
45
46
- echo '<div class="updated" style="border-color: #3ba1da;"><p>';
47
48
- echo sprintf(__( 'Registration is disabled. Please go to the <a href="%s">general settings</a> page in the WordPress admin and select anyone can register. <a href="%s">Hide this notice</a>', 'ultimatemember' ), admin_url('options-general.php'), add_query_arg('um_adm_action', 'um_can_register_notice') );
49
50
- echo '</p></div>';
51
52
- }
53
54
- $hide_exif_notice = get_option('um_hide_exif_notice');
55
56
- if ( !extension_loaded('exif') && !$hide_exif_notice ) {
57
58
- echo '<div class="updated" style="border-color: #3ba1da;"><p>';
59
60
- echo sprintf(__( 'Exif is not enabled on your server. Mobile photo uploads will not be rotated correctly until you enable the exif extension. <a href="%s">Hide this notice</a>', 'ultimatemember' ), add_query_arg('um_adm_action', 'um_hide_exif_notice') );
61
62
- echo '</p></div>';
63
64
- }
65
66
- // Regarding page setup
67
- $pages = $ultimatemember->permalinks->core;
68
- if ( $pages && is_array( $pages ) ) {
69
70
- $err = false;
71
72
- foreach( $pages as $slug => $page_id ) {
73
74
- $page = get_post( $page_id );
75
- if ( !isset( $page->ID ) && in_array( $slug, array( 'user','account','members','register','login','logout','password-reset' ) ) ) {
76
- $err = true;
77
- }
78
79
- }
80
81
- if ( $err ) {
82
- echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('One or more of your Ultimate Member pages are not correctly setup. Please visit <strong>Ultimate Member > Settings</strong> to re-assign your missing pages.','ultimatemember') . '</p></div>';
83
- }
84
85
- if ( isset( $pages['user'] ) ) {
86
- $test = get_post( $pages['user'] );
87
- if ( isset( $test->post_parent ) && $test->post_parent > 0 ) {
88
- echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('Ultimate Member Setup Error: User page can not be a child page.','ultimatemember') . '</p></div>';
89
}
90
- }
91
92
- if ( isset( $pages['account'] ) ) {
93
- $test = get_post( $pages['account'] );
94
- if ( isset( $test->post_parent ) && $test->post_parent > 0 ) {
95
- echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('Ultimate Member Setup Error: Account page can not be a child page.','ultimatemember') . '</p></div>';
96
}
97
}
98
99
}
100
101
- do_action('um_admin_after_main_notices');
102
-
103
}
104
105
41
global $ultimatemember;
42
$hide_register_notice = get_option('um_can_register_notice');
43
44
+ if ( ! defined('DOING_AJAX') ) {
45
46
+ if ( !get_option('users_can_register') && !$hide_register_notice ) {
47
48
+ echo '<div class="updated" style="border-color: #3ba1da;"><p>';
49
50
+ echo sprintf(__( 'Registration is disabled. Please go to the <a href="%s">general settings</a> page in the WordPress admin and select anyone can register. <a href="%s">Hide this notice</a>', 'ultimatemember' ), admin_url('options-general.php'), add_query_arg('um_adm_action', 'um_can_register_notice') );
51
52
+ echo '</p></div>';
53
54
+ }
55
56
+ $hide_exif_notice = get_option('um_hide_exif_notice');
57
58
+ if ( !extension_loaded('exif') && !$hide_exif_notice ) {
59
60
+ echo '<div class="updated" style="border-color: #3ba1da;"><p>';
61
62
+ echo sprintf(__( 'Exif is not enabled on your server. Mobile photo uploads will not be rotated correctly until you enable the exif extension. <a href="%s">Hide this notice</a>', 'ultimatemember' ), add_query_arg('um_adm_action', 'um_hide_exif_notice') );
63
64
+ echo '</p></div>';
65
66
+ }
67
68
+ // Regarding page setup
69
+ $pages = $ultimatemember->permalinks->core;
70
+ if ( $pages && is_array( $pages ) ) {
71
72
+ $err = false;
73
74
+ foreach( $pages as $slug => $page_id ) {
75
76
+ $page = get_post( $page_id );
77
+ if ( !isset( $page->ID ) && in_array( $slug, array( 'user','account','members','register','login','logout','password-reset' ) ) ) {
78
+ $err = true;
79
+ }
80
81
+ }
82
83
+ if ( $err ) {
84
+ echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('One or more of your Ultimate Member pages are not correctly setup. Please visit <strong>Ultimate Member > Settings</strong> to re-assign your missing pages.','ultimatemember') . '</p></div>';
85
+ }
86
+
87
+ if ( isset( $pages['user'] ) ) {
88
+ $test = get_post( $pages['user'] );
89
+ if ( isset( $test->post_parent ) && $test->post_parent > 0 ) {
90
+ echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('Ultimate Member Setup Error: User page can not be a child page.','ultimatemember') . '</p></div>';
91
+ }
92
}
93
94
+ if ( isset( $pages['account'] ) ) {
95
+ $test = get_post( $pages['account'] );
96
+ if ( isset( $test->post_parent ) && $test->post_parent > 0 ) {
97
+ echo '<div class="updated" style="border-color: #3ba1da;"><p>' . __('Ultimate Member Setup Error: Account page can not be a child page.','ultimatemember') . '</p></div>';
98
+ }
99
}
100
+
101
}
102
103
+ do_action('um_admin_after_main_notices');
104
}
105
106
}
107
108
core/um-files.php CHANGED
@@ -528,6 +528,8 @@ class UM_Files {
528
***/
529
function new_user_upload( $user_id, $source, $key ) {
530
531
// if he does not have uploads dir yet
532
$this->new_user( $user_id );
533
@@ -550,6 +552,8 @@ class UM_Files {
550
$filename = basename( $source );
551
}
552
553
if ( file_exists( $this->upload_basedir . $user_id . '/' . $filename ) ) {
554
unlink( $this->upload_basedir . $user_id . '/' . $filename );
555
}
528
***/
529
function new_user_upload( $user_id, $source, $key ) {
530
531
+ $user_id = trim( $user_id );
532
+
533
// if he does not have uploads dir yet
534
$this->new_user( $user_id );
535
552
$filename = basename( $source );
553
}
554
555
+
556
+
557
if ( file_exists( $this->upload_basedir . $user_id . '/' . $filename ) ) {
558
unlink( $this->upload_basedir . $user_id . '/' . $filename );
559
}
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
- Version: 1.3.48
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
*/
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
+ Version: 1.3.49
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.4
9
10
- Stable Tag: 1.3.48
11
12
License: GNU Version 2 or Any Later Version
13
@@ -148,6 +148,11 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
148
16. Screenshot 16
149
150
== Changelog ==
151
= 1.3.48: April 11, 2016 =
152
* New: advanced option to disable profile object caching
153
* Added: ssl media uri function
@@ -161,8 +166,6 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
161
* Fixed: dependencies fatal errors
162
* Fixed: remove notices
163
164
-
165
-
166
= 1.3.47: April 6, 2016 =
167
* Fixed: Fatal errors with language filter file
168
7
Requires at least: 4.1
8
Tested up to: 4.4
9
10
+ Stable Tag: 1.3.49
11
12
License: GNU Version 2 or Any Later Version
13
148
16. Screenshot 16
149
150
== Changelog ==
151
+
152
+ = 1.3.49: April 14, 2016 =
153
+ * Fixed: remove core notices from ajax requests
154
+ * Fixed: upload form and media path
155
+
156
= 1.3.48: April 11, 2016 =
157
* New: advanced option to disable profile object caching
158
* Added: ssl media uri function
166
* Fixed: dependencies fatal errors
167
* Fixed: remove notices
168
169
= 1.3.47: April 6, 2016 =
170
* Fixed: Fatal errors with language filter file
171