Ultimate Member – User Profile & Membership Plugin - Version 1.0.93

Version Description

Download this release

Release Info

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

Code changes from version 1.0.92 to 1.0.93

admin/templates/directory/general.php CHANGED
@@ -58,6 +58,7 @@
58
  <option value="last_name" <?php selected('last_name', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Last Name</option>
59
  <option value="random" <?php selected('random', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Random</option>
60
  <option value="other" <?php selected('other', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Other (custom field)</option>
 
61
  </select>
62
 
63
  </span>
58
  <option value="last_name" <?php selected('last_name', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Last Name</option>
59
  <option value="random" <?php selected('random', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Random</option>
60
  <option value="other" <?php selected('other', $ultimatemember->query->get_meta_value('_um_sortby') ); ?>>Other (custom field)</option>
61
+ <?php do_action('um_admin_directory_sort_users_select', '_um_sortby'); ?>
62
  </select>
63
 
64
  </span>
admin/templates/directory/search.php CHANGED
@@ -29,6 +29,10 @@
29
 
30
  <?php
31
 
 
 
 
 
32
  $meta_test = get_post_meta( get_the_ID(), '_um_search_fields', true );
33
  $i = 0;
34
  if ( is_array( $meta_test ) ) {
@@ -38,7 +42,7 @@
38
  <span class="um-admin-field">
39
 
40
  <select name="_um_search_fields[]" id="_um_search_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
41
- <?php foreach($ultimatemember->builtin->all_user_fields('date,time,url') as $key => $arr) { ?>
42
  <option value="<?php echo $key; ?>" <?php selected($key, $val ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
43
  <?php } ?>
44
  </select>
@@ -59,7 +63,7 @@
59
  <span class="um-admin-field">
60
 
61
  <select name="_um_search_fields[]" id="_um_search_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
62
- <?php foreach($ultimatemember->builtin->all_user_fields('date,time,url') as $key => $arr) { ?>
63
  <option value="<?php echo $key; ?>" <?php selected($key, $ultimatemember->query->get_meta_value('_um_search_fields', $key) ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
64
  <?php } ?>
65
  </select>
29
 
30
  <?php
31
 
32
+ $custom_search = apply_filters('um_admin_custom_search_filters', array() );
33
+ $searchable_fields = $ultimatemember->builtin->all_user_fields('date,time,url');
34
+ $searchable_fields = $searchable_fields + $custom_search;
35
+
36
  $meta_test = get_post_meta( get_the_ID(), '_um_search_fields', true );
37
  $i = 0;
38
  if ( is_array( $meta_test ) ) {
42
  <span class="um-admin-field">
43
 
44
  <select name="_um_search_fields[]" id="_um_search_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
45
+ <?php foreach( $searchable_fields as $key => $arr) { ?>
46
  <option value="<?php echo $key; ?>" <?php selected($key, $val ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
47
  <?php } ?>
48
  </select>
63
  <span class="um-admin-field">
64
 
65
  <select name="_um_search_fields[]" id="_um_search_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
66
+ <?php foreach( $searchable_fields as $key => $arr) { ?>
67
  <option value="<?php echo $key; ?>" <?php selected($key, $ultimatemember->query->get_meta_value('_um_search_fields', $key) ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
68
  <?php } ?>
69
  </select>
core/um-actions-members.php CHANGED
@@ -240,6 +240,8 @@
240
  <div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_cap_initials( um_user('display_name') ); ?>"><?php echo um_cap_initials( um_user('display_name') ); ?></a></div>
241
  <?php } ?>
242
 
 
 
243
  <?php
244
  if ( $show_tagline && is_array( $tagline_fields ) ) {
245
  foreach( $tagline_fields as $key ) {
240
  <div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_cap_initials( um_user('display_name') ); ?>"><?php echo um_cap_initials( um_user('display_name') ); ?></a></div>
241
  <?php } ?>
242
 
243
+ <?php do_action('um_members_after_user_name', um_user('ID'), $args); ?>
244
+
245
  <?php
246
  if ( $show_tagline && is_array( $tagline_fields ) ) {
247
  foreach( $tagline_fields as $key ) {
core/um-builtin.php CHANGED
@@ -17,10 +17,16 @@ class UM_Builtin {
17
  /***
18
  *** @regular or multi-select/options
19
  ***/
20
- function is_dropdown_field( $field ) {
 
 
 
 
21
  $fields = $this->all_user_fields;
 
22
  if ( isset($fields[$field]['options']) )
23
  return true;
 
24
  return false;
25
  }
26
 
17
  /***
18
  *** @regular or multi-select/options
19
  ***/
20
+ function is_dropdown_field( $field, $attrs ) {
21
+
22
+ if ( isset( $attrs['options'] ) )
23
+ return true;
24
+
25
  $fields = $this->all_user_fields;
26
+
27
  if ( isset($fields[$field]['options']) )
28
  return true;
29
+
30
  return false;
31
  }
32
 
core/um-fields.php CHANGED
@@ -246,7 +246,16 @@ class UM_Fields {
246
  *** @Print field error
247
  ***/
248
  function field_error($text) {
249
- $output = '<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>'.$text.'</div>';
 
 
 
 
 
 
 
 
 
250
  return $output;
251
  }
252
 
246
  *** @Print field error
247
  ***/
248
  function field_error($text) {
249
+ global $ultimatemember;
250
+ if ( isset( $this->set_id ) && $ultimatemember->form->processing == $this->set_id ) {
251
+ $output = '<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>'.$text.'</div>';
252
+ } else {
253
+ $output = '';
254
+ }
255
+
256
+ if ( !isset( $ultimatemember->form->processing ) ) {
257
+ $output = '<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>'.$text.'</div>';
258
+ }
259
  return $output;
260
  }
261
 
core/um-filters-members.php CHANGED
@@ -175,6 +175,8 @@
175
  if ( isset( $order ) ) {
176
  $query_args['order'] = $order;
177
  }
 
 
178
 
179
  }
180
 
175
  if ( isset( $order ) ) {
176
  $query_args['order'] = $order;
177
  }
178
+
179
+ $query_args = apply_filters('um_modify_sortby_parameter', $query_args, $sortby);
180
 
181
  }
182
 
core/um-form.php CHANGED
@@ -12,6 +12,8 @@ class UM_Form {
12
 
13
  $this->errors = null;
14
 
 
 
15
  add_action('init', array(&$this, 'form_init'), 2);
16
 
17
  add_action('init', array(&$this, 'field_declare'), 10);
@@ -107,6 +109,8 @@ class UM_Form {
107
 
108
  $this->form_suffix = '-' . $form['form_id'];
109
 
 
 
110
  foreach($form as $key => $value){
111
  if (strstr($key, $this->form_suffix) ) {
112
  $a_key = str_replace( $this->form_suffix, '', $key);
12
 
13
  $this->errors = null;
14
 
15
+ $this->processing = null;
16
+
17
  add_action('init', array(&$this, 'form_init'), 2);
18
 
19
  add_action('init', array(&$this, 'field_declare'), 10);
109
 
110
  $this->form_suffix = '-' . $form['form_id'];
111
 
112
+ $this->processing = $form['form_id'];
113
+
114
  foreach($form as $key => $value){
115
  if (strstr($key, $this->form_suffix) ) {
116
  $a_key = str_replace( $this->form_suffix, '', $key);
core/um-members.php CHANGED
@@ -73,9 +73,13 @@ class UM_Members {
73
 
74
  $fields = $ultimatemember->builtin->all_user_fields;
75
 
76
- $attrs = $fields[$filter];
 
 
 
 
77
 
78
- if ( $ultimatemember->builtin->is_dropdown_field( $filter ) ) {
79
  $type = 'select';
80
  } else {
81
  $type = 'text';
@@ -99,6 +103,9 @@ class UM_Members {
99
 
100
  if ( strstr($filter, 'role_') )
101
  $opt = $k;
 
 
 
102
 
103
  ?>
104
 
73
 
74
  $fields = $ultimatemember->builtin->all_user_fields;
75
 
76
+ if ( isset( $fields[$filter] ) ) {
77
+ $attrs = $fields[$filter];
78
+ } else {
79
+ $attrs = apply_filters("um_custom_search_field_{$filter}", array() );
80
+ }
81
 
82
+ if ( $ultimatemember->builtin->is_dropdown_field( $filter, $attrs ) ) {
83
  $type = 'select';
84
  } else {
85
  $type = 'text';
103
 
104
  if ( strstr($filter, 'role_') )
105
  $opt = $k;
106
+
107
+ if ( isset( $attrs['custom'] ) )
108
+ $opt = $k;
109
 
110
  ?>
111
 
core/um-short-functions.php CHANGED
@@ -321,7 +321,7 @@ function um_profile_id() {
321
  global $ultimatemember;
322
  if ( isset($_REQUEST['um_search']) ) {
323
  $query = $ultimatemember->permalinks->get_query_array();
324
- if ( in_array( $val, $query ) )
325
  echo 'selected="selected"';
326
  }
327
  echo '';
321
  global $ultimatemember;
322
  if ( isset($_REQUEST['um_search']) ) {
323
  $query = $ultimatemember->permalinks->get_query_array();
324
+ if ( isset( $query[$filter] ) && $val == $query[$filter] )
325
  echo 'selected="selected"';
326
  }
327
  echo '';
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.92
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.93
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.92
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
@@ -203,6 +203,10 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
203
 
204
  == Changelog ==
205
 
 
 
 
 
206
  = 1.0.92: March 20, 2015 =
207
 
208
  * New: added option to customize redirection URL after e-mail activation
7
  Requires at least: 4.1
8
  Tested up to: 4.1.1
9
 
10
+ Stable Tag: 1.0.93
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
203
 
204
  == Changelog ==
205
 
206
+ = 1.0.93: March 22, 2015 =
207
+
208
+ * Fixed: bug with showing register and login forms on same page
209
+
210
  = 1.0.92: March 20, 2015 =
211
 
212
  * New: added option to customize redirection URL after e-mail activation