Ultimate Member – User Profile & Membership Plugin - Version 1.0.73

Version Description

Download this release

Release Info

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

Code changes from version 1.0.72 to 1.0.73

admin/core/um-admin-actions.php CHANGED
@@ -179,7 +179,7 @@
179
180
update_option('um_tracking_notice', 1 );
181
182
- $tracking = new UM_Admin_Tracking();
183
$tracking->send_checkin(true);
184
185
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
179
180
update_option('um_tracking_notice', 1 );
181
182
+ $tracking = new UM_Tracking();
183
$tracking->send_checkin(true);
184
185
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
admin/um-admin-init.php CHANGED
@@ -39,8 +39,7 @@ class UM_Admin_API {
39
require_once um_path . 'admin/core/um-admin-roles.php';
40
require_once um_path . 'admin/core/um-admin-builder.php';
41
require_once um_path . 'admin/core/um-admin-dragdrop.php';
42
- require_once um_path . 'admin/core/um-admin-tracking.php';
43
-
44
require_once um_path . 'admin/core/um-admin-actions-user.php';
45
require_once um_path . 'admin/core/um-admin-actions-modal.php';
46
require_once um_path . 'admin/core/um-admin-actions-fields.php';
@@ -60,8 +59,7 @@ class UM_Admin_API {
60
$this->access = new UM_Admin_Access();
61
$this->builder = new UM_Admin_Builder();
62
$this->dragdrop = new UM_Admin_DragDrop();
63
- $this->tracking = new UM_Admin_Tracking();
64
-
65
if ( is_admin() &&
66
current_user_can('manage_options') &&
67
isset($_REQUEST['um_adm_action']) &&
39
require_once um_path . 'admin/core/um-admin-roles.php';
40
require_once um_path . 'admin/core/um-admin-builder.php';
41
require_once um_path . 'admin/core/um-admin-dragdrop.php';
42
+
43
require_once um_path . 'admin/core/um-admin-actions-user.php';
44
require_once um_path . 'admin/core/um-admin-actions-modal.php';
45
require_once um_path . 'admin/core/um-admin-actions-fields.php';
59
$this->access = new UM_Admin_Access();
60
$this->builder = new UM_Admin_Builder();
61
$this->dragdrop = new UM_Admin_DragDrop();
62
+
63
if ( is_admin() &&
64
current_user_can('manage_options') &&
65
isset($_REQUEST['um_adm_action']) &&
core/um-actions-account.php CHANGED
@@ -162,6 +162,8 @@
162
163
<?php echo $output; ?>
164
165
<div class="um-col-alt um-col-alt-b">
166
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Delete Account','ultimatemember'); ?>" class="um-button" /></div>
167
<?php do_action('um_after_account_delete_button'); ?>
@@ -171,9 +173,7 @@
171
<?php
172
173
}
174
-
175
- do_action('um_after_account_delete');
176
-
177
}
178
179
/***
@@ -192,6 +192,8 @@
192
193
<?php echo $output; ?>
194
195
<div class="um-col-alt um-col-alt-b">
196
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div>
197
<?php do_action('um_after_account_privacy_button'); ?>
@@ -201,9 +203,7 @@
201
<?php
202
203
}
204
-
205
- do_action('um_after_account_privacy');
206
-
207
}
208
209
/***
@@ -222,6 +222,8 @@
222
223
<?php echo $output; ?>
224
225
<div class="um-col-alt um-col-alt-b">
226
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div>
227
<?php do_action('um_after_account_general_button'); ?>
@@ -231,9 +233,7 @@
231
<?php
232
233
}
234
-
235
- do_action('um_after_account_general');
236
-
237
}
238
239
/***
@@ -252,6 +252,8 @@
252
253
<?php echo $output; ?>
254
255
<div class="um-col-alt um-col-alt-b">
256
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div>
257
<?php do_action('um_after_account_password_button'); ?>
@@ -261,9 +263,7 @@
261
<?php
262
263
}
264
-
265
- do_action('um_after_account_password');
266
-
267
}
268
269
/***
@@ -282,6 +282,8 @@
282
283
<?php echo $output; ?>
284
285
<div class="um-col-alt um-col-alt-b">
286
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Notifications','ultimatemember'); ?>" class="um-button" /></div>
287
<?php do_action('um_after_account_notifications_button'); ?>
@@ -291,9 +293,7 @@
291
<?php
292
293
}
294
-
295
- do_action('um_after_account_notifications');
296
-
297
}
298
299
/***
162
163
<?php echo $output; ?>
164
165
+ <?php do_action('um_after_account_delete'); ?>
166
+
167
<div class="um-col-alt um-col-alt-b">
168
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Delete Account','ultimatemember'); ?>" class="um-button" /></div>
169
<?php do_action('um_after_account_delete_button'); ?>
173
<?php
174
175
}
176
+
177
}
178
179
/***
192
193
<?php echo $output; ?>
194
195
+ <?php do_action('um_after_account_privacy'); ?>
196
+
197
<div class="um-col-alt um-col-alt-b">
198
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div>
199
<?php do_action('um_after_account_privacy_button'); ?>
203
<?php
204
205
}
206
+
207
}
208
209
/***
222
223
<?php echo $output; ?>
224
225
+ <?php do_action('um_after_account_general'); ?>
226
+
227
<div class="um-col-alt um-col-alt-b">
228
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div>
229
<?php do_action('um_after_account_general_button'); ?>
233
<?php
234
235
}
236
+
237
}
238
239
/***
252
253
<?php echo $output; ?>
254
255
+ <?php do_action('um_after_account_password'); ?>
256
+
257
<div class="um-col-alt um-col-alt-b">
258
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div>
259
<?php do_action('um_after_account_password_button'); ?>
263
<?php
264
265
}
266
+
267
}
268
269
/***
282
283
<?php echo $output; ?>
284
285
+ <?php do_action('um_after_account_notifications'); ?>
286
+
287
<div class="um-col-alt um-col-alt-b">
288
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Notifications','ultimatemember'); ?>" class="um-button" /></div>
289
<?php do_action('um_after_account_notifications_button'); ?>
293
<?php
294
295
}
296
+
297
}
298
299
/***
core/um-files.php CHANGED
@@ -378,6 +378,8 @@ class UM_Files {
378
379
delete_user_meta( $user_id, $type );
380
381
$dir = $this->upload_basedir . $user_id . '/';
382
$prefix = $type;
383
chdir($dir);
378
379
delete_user_meta( $user_id, $type );
380
381
+ do_action("um_after_remove_{$type}", $user_id);
382
+
383
$dir = $this->upload_basedir . $user_id . '/';
384
$prefix = $type;
385
chdir($dir);
core/um-setup.php CHANGED
@@ -4,6 +4,8 @@ class UM_Setup {
4
5
function __construct() {
6
7
add_action('init', array(&$this, 'install_default_forms'), 9);
8
9
add_action('init', array(&$this, 'install_default_roles'), 9);
@@ -226,6 +228,14 @@ class UM_Setup {
226
}
227
}
228
229
/***
230
*** @Default Forms
231
***/
4
5
function __construct() {
6
7
+ add_action('init', array(&$this, 'install_basics'), 9);
8
+
9
add_action('init', array(&$this, 'install_default_forms'), 9);
10
11
add_action('init', array(&$this, 'install_default_roles'), 9);
228
}
229
}
230
231
+ /***
232
+ *** @Basics
233
+ ***/
234
+ function install_basics() {
235
+ if ( !get_option('__ultimatemember_sitekey') )
236
+ update_option('__ultimatemember_sitekey', str_replace( array('http://','https://'), '', sanitize_user( get_bloginfo('url') ) ) . '-' . wp_generate_password( 20, false ) );
237
+ }
238
+
239
/***
240
*** @Default Forms
241
***/
admin/core/um-admin-tracking.php → core/um-tracking.php RENAMED
@@ -1,6 +1,6 @@
1
<?php
2
3
- class UM_Admin_Tracking {
4
5
private $data;
6
@@ -17,6 +17,8 @@ class UM_Admin_Tracking {
17
***/
18
private function setup_data() {
19
20
$data = array();
21
22
// Retrieve current theme info
@@ -64,6 +66,12 @@ class UM_Admin_Tracking {
64
65
$data['multisite'] = ( is_multisite() ) ? 1 : 0;
66
67
$this->data = $data;
68
69
}
@@ -74,14 +82,6 @@ class UM_Admin_Tracking {
74
private function tracking_allowed() {
75
if ( !um_get_option('allow_tracking') )
76
return 0;
77
-
78
- if( stristr( network_site_url( '/' ), 'dev' ) !== false ||
79
- stristr( network_site_url( '/' ), 'localhost' ) !== false ||
80
- stristr( network_site_url( '/' ), ':8888' ) !== false // This is common with MAMP on OS X
81
- ) {
82
- return 0;
83
- }
84
-
85
return 1;
86
}
87
@@ -100,9 +100,9 @@ class UM_Admin_Tracking {
100
if( ! $this->tracking_allowed() && ! $override )
101
return;
102
103
- // Send a maximum of once per week
104
$last_send = $this->get_last_send();
105
- if( $last_send && $last_send > strtotime( '-1 week' ) )
106
return;
107
108
$this->setup_data();
@@ -118,14 +118,13 @@ class UM_Admin_Tracking {
118
) );
119
120
update_option( 'um_tracking_last_send', time() );
121
-
122
}
123
124
/***
125
*** @run a scheduled report
126
***/
127
private function schedule_send() {
128
- add_action( 'um_weekly_scheduled_events', array( $this, 'send_checkin' ) );
129
}
130
131
/***
1
<?php
2
3
+ class UM_Tracking {
4
5
private $data;
6
17
***/
18
private function setup_data() {
19
20
+ global $ultimatemember;
21
+
22
$data = array();
23
24
// Retrieve current theme info
66
67
$data['multisite'] = ( is_multisite() ) ? 1 : 0;
68
69
+ if ( !get_option('__ultimatemember_sitekey') ) {
70
+ $ultimatemember->setup->install_basics();
71
+ }
72
+
73
+ $data['unique_sitekey'] = get_option('__ultimatemember_sitekey');
74
+
75
$this->data = $data;
76
77
}
82
private function tracking_allowed() {
83
if ( !um_get_option('allow_tracking') )
84
return 0;
85
return 1;
86
}
87
100
if( ! $this->tracking_allowed() && ! $override )
101
return;
102
103
+ // Send a maximum of once per period
104
$last_send = $this->get_last_send();
105
+ if( $last_send && $last_send > strtotime( '-1 hour' ) )
106
return;
107
108
$this->setup_data();
118
) );
119
120
update_option( 'um_tracking_last_send', time() );
121
}
122
123
/***
124
*** @run a scheduled report
125
***/
126
private function schedule_send() {
127
+ add_action( 'um_hourly_scheduled_events', array( $this, 'send_checkin' ) );
128
}
129
130
/***
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.0.72
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.0.73
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.1
9
10
- Stable Tag: 1.0.72
11
12
License: GNU Version 2 or Any Later Version
13
@@ -189,6 +189,10 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
189
190
== Changelog ==
191
192
= 1.0.72: March 2, 2015 =
193
194
* Fixed: bug with e-mail activation since last update
7
Requires at least: 4.1
8
Tested up to: 4.1.1
9
10
+ Stable Tag: 1.0.73
11
12
License: GNU Version 2 or Any Later Version
13
189
190
== Changelog ==
191
192
+ = 1.0.73: March 3, 2015 =
193
+
194
+ * Tweak: general code improvements
195
+
196
= 1.0.72: March 2, 2015 =
197
198
* Fixed: bug with e-mail activation since last update
um-init.php CHANGED
@@ -67,6 +67,7 @@ class UM_API {
67
require_once um_path . 'core/um-modal.php';
68
require_once um_path . 'core/um-cron.php';
69
require_once um_path . 'core/um-cache.php';
70
71
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
72
@@ -134,6 +135,7 @@ class UM_API {
134
$this->modal = new UM_Modal();
135
$this->cron = new UM_Cron();
136
$this->cache = new UM_Cache();
137
138
$this->mobile = new Mobile_Detect;
139
67
require_once um_path . 'core/um-modal.php';
68
require_once um_path . 'core/um-cron.php';
69
require_once um_path . 'core/um-cache.php';
70
+ require_once um_path . 'core/um-tracking.php';
71
72
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
73
135
$this->modal = new UM_Modal();
136
$this->cron = new UM_Cron();
137
$this->cache = new UM_Cache();
138
+ $this->tracking = new UM_Tracking();
139
140
$this->mobile = new Mobile_Detect;
141