Ultimate Member – User Profile & Membership Plugin - Version 1.3.24

Version Description

Download this release

Release Info

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

Code changes from version 1.3.23 to 1.3.24

admin/core/um-admin-dashboard.php CHANGED
@@ -84,6 +84,7 @@ class UM_Admin_Dashboard {
84
  'value' => 'awaiting_admin_review',
85
  'compare' => '='
86
  );
 
87
  $users = new WP_User_Query( $args );
88
 
89
  delete_option('um_cached_users_queue');
84
  'value' => 'awaiting_admin_review',
85
  'compare' => '='
86
  );
87
+ $args = apply_filters('um_admin_pending_queue_filter', $args );
88
  $users = new WP_User_Query( $args );
89
 
90
  delete_option('um_cached_users_queue');
admin/core/um-admin-users.php CHANGED
@@ -86,6 +86,16 @@ class UM_Admin_Users {
86
  if ( is_admin() && $pagenow=='users.php' && isset($_GET[ 'status' ]) && $_GET[ 'status' ] != '') {
87
 
88
  $status = urldecode($_GET[ 'status' ]);
 
 
 
 
 
 
 
 
 
 
89
  $query->query_where = str_replace('WHERE 1=1',
90
  "WHERE 1=1 AND {$wpdb->users}.ID IN (
91
  SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta
@@ -93,6 +103,7 @@ class UM_Admin_Users {
93
  AND {$wpdb->usermeta}.meta_value = '{$status}')",
94
  $query->query_where
95
  );
 
96
 
97
  }
98
 
@@ -136,6 +147,8 @@ class UM_Admin_Users {
136
  $views[ $k ] = '<a href="'.admin_url('users.php').'?status='.$k.'" ' . $current . '>'. $v . ' <span class="count">('.$ultimatemember->query->count_users_by_status( $k ).')</span></a>';
137
  }
138
 
 
 
139
  return $views;
140
  }
141
 
86
  if ( is_admin() && $pagenow=='users.php' && isset($_GET[ 'status' ]) && $_GET[ 'status' ] != '') {
87
 
88
  $status = urldecode($_GET[ 'status' ]);
89
+
90
+ if ( $status == 'needs-verification') {
91
+ $query->query_where = str_replace('WHERE 1=1',
92
+ "WHERE 1=1 AND {$wpdb->users}.ID IN (
93
+ SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta
94
+ WHERE {$wpdb->usermeta}.meta_key = '_um_verified'
95
+ AND {$wpdb->usermeta}.meta_value = 'pending')",
96
+ $query->query_where
97
+ );
98
+ } else {
99
  $query->query_where = str_replace('WHERE 1=1',
100
  "WHERE 1=1 AND {$wpdb->users}.ID IN (
101
  SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta
103
  AND {$wpdb->usermeta}.meta_value = '{$status}')",
104
  $query->query_where
105
  );
106
+ }
107
 
108
  }
109
 
147
  $views[ $k ] = '<a href="'.admin_url('users.php').'?status='.$k.'" ' . $current . '>'. $v . ' <span class="count">('.$ultimatemember->query->count_users_by_status( $k ).')</span></a>';
148
  }
149
 
150
+ $views = apply_filters('um_admin_views_users', $views );
151
+
152
  return $views;
153
  }
154
 
core/um-cache.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- class UM_Cache {
4
-
5
- function __construct() {
6
-
7
- add_action( 'init', array(&$this, 'do_not_cache' ) );
8
-
9
- }
10
-
11
- /***
12
- *** @needed for some cache plugins
13
- ***/
14
- function do_not_cache() {
15
-
16
- if ( um_is_core_uri() && ! defined( 'DONOTCACHEPAGE' ) ) {
17
- define( "DONOTCACHEPAGE", true );
18
- }
19
-
20
- }
21
-
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/um-rewrite.php CHANGED
@@ -32,36 +32,33 @@ class UM_Rewrite {
32
 
33
  global $ultimatemember;
34
 
35
- if ( isset( $ultimatemember->permalinks->core['user'] ) ) {
36
 
37
  $user_page_id = $ultimatemember->permalinks->core['user'];
38
  $account_page_id = $ultimatemember->permalinks->core['account'];
39
-
40
  $user = get_post($user_page_id);
 
41
  if ( isset( $user->post_name ) ) {
42
- $user_slug = $user->post_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
- $account = get_post($account_page_id);
45
- $account_slug = $account->post_name;
46
-
47
- add_rewrite_rule(
48
- '^'.$user_slug.'/([^/]*)$',
49
- 'index.php?page_id='.$user_page_id.'&um_user=$matches[1]',
50
- 'top'
51
- );
52
-
53
- add_rewrite_rule(
54
- '^'.$account_slug.'/([^/]*)$',
55
- 'index.php?page_id='.$account_page_id.'&um_tab=$matches[1]',
56
- 'top'
57
- );
58
-
59
- if ( !get_option('um_flush_rules') ) {
60
  flush_rewrite_rules( true );
61
  update_option('um_flush_rules', true);
62
- }
63
-
64
- flush_rewrite_rules( true );
65
  }
66
 
67
  }
32
 
33
  global $ultimatemember;
34
 
35
+ if ( isset( $ultimatemember->permalinks->core['user'] ) && !get_option('um_flush_rules') ) {
36
 
37
  $user_page_id = $ultimatemember->permalinks->core['user'];
38
  $account_page_id = $ultimatemember->permalinks->core['account'];
 
39
  $user = get_post($user_page_id);
40
+
41
  if ( isset( $user->post_name ) ) {
42
+
43
+ $user_slug = $user->post_name;
44
+ $account = get_post($account_page_id);
45
+ $account_slug = $account->post_name;
46
+
47
+ add_rewrite_rule(
48
+ '^'.$user_slug.'/([^/]*)$',
49
+ 'index.php?page_id='.$user_page_id.'&um_user=$matches[1]',
50
+ 'top'
51
+ );
52
+
53
+ add_rewrite_rule(
54
+ '^'.$account_slug.'/([^/]*)$',
55
+ 'index.php?page_id='.$account_page_id.'&um_tab=$matches[1]',
56
+ 'top'
57
+ );
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  flush_rewrite_rules( true );
60
  update_option('um_flush_rules', true);
61
+
 
 
62
  }
63
 
64
  }
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.23
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.24
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.3
9
 
10
- Stable Tag: 1.3.23
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
@@ -152,6 +152,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
 
155
  = 1.3.23: September 2, 2015 =
156
 
157
  * Fixed: PHP strstr() notice on profile
7
  Requires at least: 4.1
8
  Tested up to: 4.3
9
 
10
+ Stable Tag: 1.3.24
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
152
 
153
  == Changelog ==
154
 
155
+ = 1.3.24: September 6, 2015 =
156
+
157
+ * Tweak: saved some database queries
158
+ * Tweak: plugin not compatible with cache plugins out of the box - needs to exclude dynamic urls from cache
159
+ * Tweak: added more development filters in backend
160
+
161
  = 1.3.23: September 2, 2015 =
162
 
163
  * Fixed: PHP strstr() notice on profile
um-init.php CHANGED
@@ -96,7 +96,6 @@ class UM_API {
96
  require_once um_path . 'core/um-logout.php';
97
  require_once um_path . 'core/um-modal.php';
98
  require_once um_path . 'core/um-cron.php';
99
- require_once um_path . 'core/um-cache.php';
100
  require_once um_path . 'core/um-tracking.php';
101
 
102
  if ( !class_exists( 'Mobile_Detect' ) ) {
@@ -166,7 +165,6 @@ class UM_API {
166
  $this->logout = new UM_Logout();
167
  $this->modal = new UM_Modal();
168
  $this->cron = new UM_Cron();
169
- $this->cache = new UM_Cache();
170
  $this->tracking = new UM_Tracking();
171
 
172
  $this->mobile = new Mobile_Detect;
96
  require_once um_path . 'core/um-logout.php';
97
  require_once um_path . 'core/um-modal.php';
98
  require_once um_path . 'core/um-cron.php';
 
99
  require_once um_path . 'core/um-tracking.php';
100
 
101
  if ( !class_exists( 'Mobile_Detect' ) ) {
165
  $this->logout = new UM_Logout();
166
  $this->modal = new UM_Modal();
167
  $this->cron = new UM_Cron();
 
168
  $this->tracking = new UM_Tracking();
169
 
170
  $this->mobile = new Mobile_Detect;