Ultimate Member – User Profile & Membership Plugin - Version 1.0.53

Version Description

Download this release

Release Info

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

Code changes from version 1.0.52 to 1.0.53

admin/assets/css/um-admin-dashboard.css CHANGED
@@ -1,11 +1,11 @@
1
- .wrap h2 {
2
font-size: 23px;
3
font-weight: 400;
4
padding: 9px 15px 4px 0px;
5
line-height: 29px;
6
}
7
8
- .wrap h2 sup {
9
font-size: 15px;
10
}
11
1
+ #um-metaboxes-general.wrap h2 {
2
font-size: 23px;
3
font-weight: 400;
4
padding: 9px 15px 4px 0px;
5
line-height: 29px;
6
}
7
8
+ #um-metaboxes-general.wrap h2 sup {
9
font-size: 15px;
10
}
11
admin/core/um-admin-actions.php CHANGED
@@ -1,5 +1,67 @@
1
<?php
2
3
/***
4
*** @purge temp
5
***/
1
<?php
2
3
+ /***
4
+ *** @delete users need confirmation
5
+ ***/
6
+ add_action('um_admin_do_action__delete_users', 'um_admin_do_action__delete_users');
7
+ function um_admin_do_action__delete_users( $action ){
8
+ global $ultimatemember;
9
+ if ( !is_admin() || !current_user_can('manage_options') ) die();
10
+
11
+ $redirect = admin_url('users.php');
12
+
13
+ $users = array_map( 'intval', (array) $_REQUEST['user'] );
14
+ if ( !$users ) exit( wp_redirect( $redirect ) );
15
+
16
+ if ( isset( $_REQUEST['confirm'] ) && $_REQUEST['confirm'] == 1 ) { // delete
17
+
18
+ $bulk_action = 'um_delete';
19
+
20
+ foreach($users as $user_id){
21
+ $ultimatemember->user->set( $user_id );
22
+ if ( !um_user('super_admin') ) {
23
+
24
+ do_action("um_admin_user_action_hook", $bulk_action);
25
+
26
+ do_action("um_admin_user_action_{$bulk_action}_hook");
27
+
28
+ } else {
29
+ $admin_err = 1;
30
+ }
31
+ }
32
+
33
+ // Finished. redirect now
34
+ if ( $admin_err == 0 ){
35
+ wp_redirect( admin_url('users.php?update=users_updated') );
36
+ exit;
37
+ } else {
38
+ wp_redirect( admin_url('users.php?update=err_users_updated') );
39
+ exit;
40
+ }
41
+
42
+ } else {
43
+
44
+ $redirect = add_query_arg('update','confirm_delete',$redirect);
45
+
46
+ foreach( $users as $id ) {
47
+ $query .= '&user[]='.$id;
48
+ }
49
+
50
+ $uri = $ultimatemember->permalinks->get_current_url( true );
51
+ $uri = add_query_arg('um_adm_action', 'delete_users', $uri);
52
+ foreach( $users as $user_id ) {
53
+ $uri = add_query_arg('user[]', $user_id, $uri);
54
+ $redirect = add_query_arg('user[]', $user_id, $redirect);
55
+ }
56
+ $uri = add_query_arg('confirm', 1, $uri);
57
+ $redirect = add_query_arg('_refer', urlencode($uri), $redirect);
58
+
59
+ exit( wp_redirect($redirect) );
60
+
61
+ }
62
+
63
+ }
64
+
65
/***
66
*** @purge temp
67
***/
admin/core/um-admin-notices.php CHANGED
@@ -113,6 +113,18 @@ class UM_Admin_Notices {
113
$update = $_REQUEST['update'];
114
switch($update) {
115
116
case 'language_updated':
117
$messages[0]['content'] = __('Your translation files have been updated successfully.','ultimatemember');
118
break;
113
$update = $_REQUEST['update'];
114
switch($update) {
115
116
+ case 'confirm_delete':
117
+
118
+ $confirm_uri = urldecode($_REQUEST['_refer']);
119
+ $users = implode(', ', $_REQUEST['user']);
120
+
121
+ $ignore = admin_url('users.php');
122
+
123
+ $messages[0]['err_content'] = sprintf(__('Are you sure you want to delete the selected user(s)? The following users will be deleted: (%s) <strong>This cannot be undone!</strong>','ultimatemember'), $users);
124
+ $messages[0]['err_content'] .= '&nbsp;&nbsp;<a href="'.$confirm_uri.'" class="button-primary">' . __('Yes! Delete','ultimatemember') . '</a>&nbsp;&nbsp;<a href="'.$ignore.'" class="button">' . __('Cancel','ultimatemember') . '</a>';
125
+
126
+ break;
127
+
128
case 'language_updated':
129
$messages[0]['content'] = __('Your translation files have been updated successfully.','ultimatemember');
130
break;
admin/core/um-admin-users.php CHANGED
@@ -183,6 +183,21 @@ class UM_Admin_Users {
183
$users = $_REQUEST['users'];
184
$bulk_action = $_REQUEST['um_bulk_action'];
185
186
foreach($users as $user_id){
187
$ultimatemember->user->set( $user_id );
188
if ( !um_user('super_admin') ) {
@@ -196,6 +211,7 @@ class UM_Admin_Users {
196
}
197
}
198
199
if ( $admin_err == 0 ){
200
wp_redirect( admin_url('users.php?update=users_updated') );
201
exit;
183
$users = $_REQUEST['users'];
184
$bulk_action = $_REQUEST['um_bulk_action'];
185
186
+ if ( $bulk_action == 'um_delete' ) { // this needs confirmation
187
+
188
+ $uri = admin_url('users.php');
189
+ $userids = array_map( 'intval', (array) $_REQUEST['users'] );
190
+
191
+ if ( is_array( $userids ) ) {
192
+ $uri = add_query_arg('um_adm_action', 'delete_users', $uri);
193
+ foreach( $userids as $user_id ) {
194
+ $uri = add_query_arg('user[]', $user_id, $uri);
195
+ }
196
+ exit( wp_redirect( $uri ) );
197
+ }
198
+
199
+ }
200
+
201
foreach($users as $user_id){
202
$ultimatemember->user->set( $user_id );
203
if ( !um_user('super_admin') ) {
211
}
212
}
213
214
+ // Finished. redirect now
215
if ( $admin_err == 0 ){
216
wp_redirect( admin_url('users.php?update=users_updated') );
217
exit;
admin/templates/dashboard/language-contrib.php CHANGED
@@ -1,3 +1,3 @@
1
<p><?php printf(__('Ultimate Member is not yet available in your language: <strong>%1$s</strong>.','ultimatemember'), $locale); ?></p>
2
3
- <p><?php _e('If you want to contribute this translation to the plugin, please add it on our <a href="https://ultimatemember.com/forums/"><forums</a>.','ultimatemember'); ?></p>
1
<p><?php printf(__('Ultimate Member is not yet available in your language: <strong>%1$s</strong>.','ultimatemember'), $locale); ?></p>
2
3
+ <p><?php _e('If you want to contribute this translation to the plugin, please add it on our <a href="https://ultimatemember.com/forums/">community forum</a>.','ultimatemember'); ?></p>
core/um-enqueue.php CHANGED
@@ -35,9 +35,8 @@ class UM_Enqueue {
35
*** @Enqueue scripts and styles
36
***/
37
function wp_enqueue_scripts() {
38
-
39
global $ultimatemember;
40
-
41
$exclude_home = um_get_option('js_css_exlcude_home');
42
if ( $exclude_home && ( is_home() || is_front_page() ) ) {
43
return;
@@ -49,24 +48,33 @@ class UM_Enqueue {
49
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
50
51
foreach( $exclude as $match ) {
52
- if ( strstr( $c_url, untrailingslashit( $match ) ) )
53
return;
54
}
55
56
}
57
58
$include = um_get_option('js_css_include');
59
if ( $include && !is_admin() && is_array( $include ) ) {
60
-
61
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
62
63
foreach( $include as $match ) {
64
- if ( !strstr( $c_url, untrailingslashit( $match ) ) )
65
- return;
66
}
67
-
68
}
69
70
if ( um_get_option('disable_minify') ) {
71
72
$this->load_original();
35
*** @Enqueue scripts and styles
36
***/
37
function wp_enqueue_scripts() {
38
global $ultimatemember;
39
+
40
$exclude_home = um_get_option('js_css_exlcude_home');
41
if ( $exclude_home && ( is_home() || is_front_page() ) ) {
42
return;
48
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
49
50
foreach( $exclude as $match ) {
51
+ if ( strstr( $c_url, untrailingslashit( $match ) ) ) {
52
return;
53
+ }
54
}
55
56
}
57
58
$include = um_get_option('js_css_include');
59
if ( $include && !is_admin() && is_array( $include ) ) {
60
+
61
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
62
63
foreach( $include as $match ) {
64
+ if ( strstr( $c_url, untrailingslashit( $match ) ) ) {
65
+ $force_load = true;
66
+ } else {
67
+ if ( !isset( $force_load ) ) {
68
+ $force_load = false;
69
+ }
70
+ }
71
}
72
+
73
}
74
+
75
+ if ( isset($force_load) && $force_load == false ) return;
76
77
+ // enqueue styles
78
if ( um_get_option('disable_minify') ) {
79
80
$this->load_original();
core/um-user.php CHANGED
@@ -333,7 +333,7 @@ class UM_User {
333
require_once( ABSPATH . 'wp-admin/includes/user.php' );
334
}
335
336
- wp_delete_user( $this->id );
337
338
}
339
333
require_once( ABSPATH . 'wp-admin/includes/user.php' );
334
}
335
336
+ wp_delete_user( $this->id, 1 );
337
338
}
339
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.52
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.53
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.52
11
12
License: GNU Version 2 or Any Later Version
13
@@ -186,6 +186,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
186
187
== Changelog ==
188
189
= 1.0.52: February 13, 2015 =
190
191
* Fixed: issue with users backend **update recommended**
7
Requires at least: 4.1
8
Tested up to: 4.1
9
10
+ Stable Tag: 1.0.53
11
12
License: GNU Version 2 or Any Later Version
13
186
187
== Changelog ==
188
189
+ = 1.0.53: February 14, 2015 =
190
+
191
+ * Tweak: when deleting users in backend, users will be deleted upon confirmation only
192
+ * Tweak: deleted users content is assigned to admin by default (to avoid losing content)
193
+ * Fixed: include plugin js and css on specific pages only
194
+
195
= 1.0.52: February 13, 2015 =
196
197
* Fixed: issue with users backend **update recommended**