Ultimate Member – User Profile & Membership Plugin - Version 1.3.20

Version Description

Download this release

Release Info

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

Code changes from version 1.3.19 to 1.3.20

admin/core/um-admin-actions-fields.php CHANGED
@@ -33,9 +33,10 @@
33
  $new_key = ltrim ($key,'_');
34
 
35
  if ( $new_key == 'options' ) {
36
- $save[ $_metakey ][$new_key] = explode(PHP_EOL, $val);
 
37
  } else {
38
- $save[ $_metakey ][$new_key] = $val;
39
  }
40
 
41
  } else if ( strstr( $key, 'um_editor' ) ) {
33
  $new_key = ltrim ($key,'_');
34
 
35
  if ( $new_key == 'options' ) {
36
+ //$save[ $_metakey ][$new_key] = explode(PHP_EOL, $val);
37
+ $save[ $_metakey ][$new_key] = preg_split('/[\r\n]+/', $val, -1, PREG_SPLIT_NO_EMPTY);
38
  } else {
39
+ $save[ $_metakey ][$new_key] = $val;
40
  }
41
 
42
  } else if ( strstr( $key, 'um_editor' ) ) {
admin/core/um-admin-actions-modal.php CHANGED
@@ -167,7 +167,7 @@
167
  if ( !isset( $array['account_only'] ) && !isset( $array['private_use'] ) ) {
168
  ?>
169
 
170
- <a href="#" class="button" data-silent_action="um_admin_add_field_from_predefined" data-arg1="<?php echo $field_key; ?>" data-arg2="<?php echo $arg2; ?>"><?php echo $array['title']; ?></a>
171
 
172
  <?php } } } else { echo '<p>' . __('None','ultimatemember') . '</p>'; } ?>
173
 
@@ -182,7 +182,7 @@
182
 
183
  ?>
184
 
185
- <a href="#" class="button with-icon" data-silent_action="um_admin_add_field_from_list" data-arg1="<?php echo $field_key; ?>" data-arg2="<?php echo $arg2; ?>"><?php echo $array['title']; ?><span class="remove"></span></a>
186
 
187
  <?php } } else { echo '<p>' . __('You did not create any custom fields', 'ultimatemember') . '</p>'; } ?>
188
 
167
  if ( !isset( $array['account_only'] ) && !isset( $array['private_use'] ) ) {
168
  ?>
169
 
170
+ <a href="#" class="button" data-silent_action="um_admin_add_field_from_predefined" data-arg1="<?php echo $field_key; ?>" data-arg2="<?php echo $arg2; ?>"><?php echo stripslashes( $array['title'] ); ?></a>
171
 
172
  <?php } } } else { echo '<p>' . __('None','ultimatemember') . '</p>'; } ?>
173
 
182
 
183
  ?>
184
 
185
+ <a href="#" class="button with-icon" data-silent_action="um_admin_add_field_from_list" data-arg1="<?php echo $field_key; ?>" data-arg2="<?php echo $arg2; ?>"><?php echo stripslashes( $array['title'] ); ?><span class="remove"></span></a>
186
 
187
  <?php } } else { echo '<p>' . __('You did not create any custom fields', 'ultimatemember') . '</p>'; } ?>
188
 
admin/core/um-admin-dragdrop.php CHANGED
@@ -129,6 +129,10 @@ class UM_Admin_DragDrop {
129
  function load_field_order(){
130
 
131
  global $ultimatemember;
 
 
 
 
132
 
133
  ?>
134
 
129
  function load_field_order(){
130
 
131
  global $ultimatemember;
132
+
133
+ $screen = get_current_screen();
134
+
135
+ if ( !isset( $screen->id ) || $screen->id != 'um_form' ) return;
136
 
137
  ?>
138
 
assets/js/um-functions.js CHANGED
@@ -733,7 +733,7 @@ function um_modal_responsive() {
733
 
734
  function um_remove_modal(){
735
 
736
- jQuery('.um-modal .um-single-image-preview img').cropper("destroy");
737
 
738
  jQuery('body,html,textarea').css("overflow", "auto");
739
 
733
 
734
  function um_remove_modal(){
735
 
736
+ jQuery('img.cropper-hidden').cropper('destroy');
737
 
738
  jQuery('body,html,textarea').css("overflow", "auto");
739
 
assets/js/um-modal.js CHANGED
@@ -45,7 +45,7 @@ jQuery(document).ready(function() {
45
  var parent = jQuery(this).parents('.um-modal-body');
46
  var src = jQuery(this).parents('.um-modal-body').find('.um-single-image-preview img').attr('src');
47
 
48
- parent.find('.um-modal .um-single-image-preview img').cropper("destroy");
49
 
50
  parent.find('.um-single-image-preview img').attr('src', '');
51
 
45
  var parent = jQuery(this).parents('.um-modal-body');
46
  var src = jQuery(this).parents('.um-modal-body').find('.um-single-image-preview img').attr('src');
47
 
48
+ jQuery('img.cropper-hidden').cropper('destroy');
49
 
50
  parent.find('.um-single-image-preview img').attr('src', '');
51
 
assets/js/um-responsive.js CHANGED
@@ -7,7 +7,8 @@ jQuery(window).load(function() {
7
 
8
  jQuery(window).resize(function() {
9
  responsive_Modal();
10
- jQuery('.um-modal .um-single-image-preview.crop:visible img').cropper("destroy");
 
11
 
12
  um_responsive();
13
  um_modal_responsive();
7
 
8
  jQuery(window).resize(function() {
9
  responsive_Modal();
10
+
11
+ jQuery('img.cropper-hidden').cropper('destroy');
12
 
13
  um_responsive();
14
  um_modal_responsive();
assets/js/um.min.js CHANGED
@@ -113,7 +113,7 @@ b.data(this,"tipsy-pointee"),c;if(!(c=!a)){a:{for(;a=a.parentNode;)if(a==documen
113
 
114
  ;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);if(!e.length)return;case "object":if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
115
 
116
- var live_field;var live_value;function um_conditional(){jQuery('.um-field.um-is-conditional').each(function(){for(var i = 0;i < 5;i++){var action0 = jQuery(this).data('cond-'+i+'-action');var field0 = jQuery(this).data('cond-'+i+'-field');var operator0 = jQuery(this).data('cond-'+i+'-operator');var value0 = jQuery(this).data('cond-'+i+'-value');if(action0 == 'show' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).fadeIn()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).fadeIn()}else{jQuery(this).hide()}}}if(action0 == 'hide' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).hide()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).hide()}else{jQuery(this).fadeIn()}}}}})}function UM_hide_menus(){menu = jQuery('.um-dropdown');menu.parents('div').find('a').removeClass('active');menu.hide()}function UM_domenus(){jQuery('.um-dropdown').each(function(){var menu = jQuery(this);var element = jQuery(this).attr('data-element');var position = jQuery(this).attr('data-position');jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));if(jQuery(window).width() <= 1200 && element == 'div.um-profile-edit'){position = 'lc'}if(position == 'lc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}gap_right = jQuery(element).width()+17;menu.css({'top':0,'width':200,'left':'auto','right':gap_right+'px','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');menu.find('.um-dropdown-arr').css({'top':'4px','left':'auto','right':'-17px'})}if(position == 'bc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}menu.css({'top':top_p,'width':200,'left':left_p+left_gap,'right':'auto','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');menu.find('.um-dropdown-arr').css({'top':'-17px','left':(menu.width() / 2) - 12,'right':'auto'})}})}function um_responsive(){jQuery('.um').each(function(){element_width = jQuery(this).width();if(element_width <= 340){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob340')}else if(element_width <= 500){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob500')}else if(element_width <= 800){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob800')}else if(element_width <= 960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob960')}else if(element_width>960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960')}if(jQuery('.um-account-nav').length>0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0){jQuery('.um-account-side li a.current').trigger('click')}jQuery(this).css('opacity',1)});jQuery('.um-cover,.um-member-cover').each(function(){var elem = jQuery(this);var ratio = elem.data('ratio');var width = elem.width();var ratios = ratio.split(':');calcHeight = Math.round(width / ratios[0])+'px';elem.height(calcHeight);elem.find('.um-cover-add').height(calcHeight)});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});UM_domenus()}function UM_Member_Grid(container){container.masonry({itemSelector:'.um-member',columnWidth:'.um-member',gutter:'.um-gutter-sizer'})}function initImageUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');img_id.attr("src",value);img_id.load(function(){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);img_id_h.show(0);um_modal_responsive()})})}}})}function initFileUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);if(key == 'icon'){trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value)}else if(key == 'icon_bg'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.icon').css({'background-color':value})}else if(key == 'filename'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.filename').html(value)}else{trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href',value)}});um_modal_responsive()}}})}function initCrop_UM(){var target_img = jQuery('.um-modal:visible .um-single-image-preview img');var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');var crop_data = target_img.parent().attr('data-crop');var min_width = target_img.parent().attr('data-min_width');var min_height = target_img.parent().attr('data-min_height');var ratio = target_img.parent().attr('data-ratio');if(jQuery('.um-modal').find('#um_upload_single').attr('data-ratio')){var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');var ratio_split = ratio.split(':');var ratio = ratio_split[0]}if(target_img.length){if(target_img.attr('src')!= ''){var max_height = jQuery(window).height() -(jQuery('.um-modal-footer a').height()+20) - 50 -(jQuery('.um-modal-header:visible').height());target_img.css({'height':'auto'});target_img_parent.css({'height':'auto'});if(jQuery(window).height() <= 400){target_img_parent.css({'height':max_height+'px','max-height':max_height+'px'});target_img.css({'height':'auto'})}else{target_img.css({'height':'auto','max-height':max_height+'px'});target_img_parent.css({'height':target_img.height(),'max-height':max_height+'px'})}if(crop_data == 'square'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:false,aspectRatio:1.0,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'cover'){var opts ={minWidth:min_width,minHeight:Math.round(min_width / ratio),dragCrop:false,aspectRatio:ratio,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'user'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:true,aspectRatio:"auto",zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}if(crop_data!= 0){target_img.cropper(opts)}}}}function um_new_modal(id,size,isPhoto,source){var modal = jQuery('body').find('.um-modal-overlay');if(modal.length == 0){jQuery('.tipsy').hide();UM_hide_menus();jQuery('body,html,textarea').css("overflow","hidden");jQuery(document).bind("touchmove",function(e){e.preventDefault()});jQuery('.um-modal').on('touchmove',function(e){e.stopPropagation()});if(isPhoto){jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal is-photo" ></div>')}else{jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal no-photo" ></div>')}jQuery('#'+id).prependTo('.um-modal');if(isPhoto){jQuery('.um-modal').find('.um-modal-photo').html('<img />');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.attr("src",source);photo_.load(function(){jQuery('#'+id).show();jQuery('.um-modal').show();photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);um_modal_responsive()})}else{jQuery('#'+id).show();jQuery('.um-modal').show();um_modal_size(size);initImageUpload_UM(jQuery('.um-modal:visible').find('.um-single-image-upload'));initFileUpload_UM(jQuery('.um-modal:visible').find('.um-single-file-upload'));um_modal_responsive()}}}function um_modal_responsive(){var modal = jQuery('.um-modal:visible');var photo_modal = jQuery('.um-modal-body.photo:visible');if(photo_modal.length){modal.removeClass('uimob340');modal.removeClass('uimob500');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(modal.length){var element_width = jQuery(window).width();modal.removeClass('uimob340');modal.removeClass('uimob500');if(element_width <= 340){modal.addClass('uimob340');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 500){modal.addClass('uimob500');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 800){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width <= 960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width>960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}}}function um_remove_modal(){jQuery('.um-modal .um-single-image-preview img').cropper("destroy");jQuery('body,html,textarea').css("overflow","auto");jQuery(document).unbind('touchmove');jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');jQuery('.um-modal,.um-modal-overlay').remove()}function um_modal_size(aclass){jQuery('.um-modal:visible').addClass(aclass)}function um_modal_add_attr(id,value){jQuery('.um-modal:visible').data(id,value)}
117
 
118
  /* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
119
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
@@ -123,9 +123,9 @@ if(s.trigger=n.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(e(".mCSB_"+s.id
123
 
124
  function prepare_Modal(){if(jQuery('.um-popup-overlay').length == 0){jQuery('body').append('<div class="um-popup-overlay"></div>');jQuery('body').append('<div class="um-popup"></div>');jQuery('.um-popup').addClass('loading');jQuery("body,html").css({overflow:'hidden'})}}function remove_Modal(){if(jQuery('.um-popup-overlay').length){jQuery('.tipsy').remove();jQuery('.um-popup').empty().remove();jQuery('.um-popup-overlay').empty().remove();jQuery("body,html").css({overflow:'auto'})}}function show_Modal(contents){if(jQuery('.um-popup-overlay').length){jQuery('.um-popup').removeClass('loading').html(contents);jQuery('.um-tip-n').tipsy({gravity:'n',opacity:1,offset:3});jQuery('.um-tip-w').tipsy({gravity:'w',opacity:1,offset:3});jQuery('.um-tip-e').tipsy({gravity:'e',opacity:1,offset:3});jQuery('.um-tip-s').tipsy({gravity:'s',opacity:1,offset:3})}}function responsive_Modal(){if(jQuery('.um-popup-overlay').length){ag_height = jQuery(window).height() - jQuery('.um-popup um-popup-header').outerHeight() - jQuery('.um-popup .um-popup-footer').outerHeight() - 80;if(ag_height>350){ag_height = 350}if(jQuery('.um-popup-autogrow:visible').length){jQuery('.um-popup-autogrow:visible').css({'height':ag_height+'px'});jQuery('.um-popup-autogrow:visible').mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})}else if(jQuery('.um-popup-autogrow2:visible').length){jQuery('.um-popup-autogrow2:visible').css({'max-height':ag_height+'px'});jQuery('.um-popup-autogrow2:visible').mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})}}}
125
 
126
- jQuery(window).load(function(){um_responsive();um_modal_responsive()});jQuery(window).resize(function(){responsive_Modal();jQuery(".um-modal .um-single-image-preview.crop:visible img").cropper("destroy");um_responsive();um_modal_responsive()});jQuery(document).ready(function(){jQuery(document).on('click','.um-popup-overlay',function(){remove_Modal()});jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()});jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal a',function(a){a.preventDefault();return false});jQuery(document).on("click",".um-modal .um-single-file-preview a.cancel",function(a){a.preventDefault();a=jQuery(this).parents(".um-modal-body");var b=jQuery(this).parents(".um-modal-body").find(".um-single-fileinfo a").attr("href");
127
  a.find(".um-single-file-preview").hide();a.find(".ajax-upload-dragdrop").show();a.find(".um-modal-btn.um-finish-upload").addClass("disabled");um_modal_responsive();jQuery.ajax({url:um_scripts.ajaxurl,type:"post",data:{action:"ultimatemember_remove_file",src:b}});return false});jQuery(document).on("click",".um-modal .um-single-image-preview a.cancel",function(a){a.preventDefault();a=jQuery(this).parents(".um-modal-body");var b=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview img").attr("src");
128
- a.find(".um-modal .um-single-image-preview img").cropper("destroy");a.find(".um-single-image-preview img").attr("src","");a.find(".um-single-image-preview").hide();a.find(".ajax-upload-dragdrop").show();a.find(".um-modal-btn.um-finish-upload").addClass("disabled");um_modal_responsive();jQuery.ajax({url:um_scripts.ajaxurl,type:"post",data:{action:"ultimatemember_remove_file",src:b}});return false});jQuery(document).on("click",".um-finish-upload.file",function(){var a=jQuery(this).attr("data-key"),
129
  b=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html();um_remove_modal();jQuery(".um-single-file-preview[data-key="+a+"]").fadeIn().html(b);jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change"));jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find("input[type=hidden]").val(jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find(".um-single-fileinfo a").attr("href"))});
130
  jQuery(document).on("click",".um-finish-upload.image",function(){var a=jQuery(this),b=jQuery(this).attr("data-key"),c=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),f=c.find("img").attr("src");c=c.attr("data-coord");var g=jQuery(this).parents("#um_upload_single").attr("data-user_id")?jQuery(this).parents("#um_upload_single").attr("data-user_id"):0;if(c){jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled");jQuery.ajax({url:um_scripts.ajaxurl,type:"POST",
131
  data:{action:"ultimatemember_resize_image",src:f,coord:c,user_id:g,key:b},success:function(e){d=new Date;b=="profile_photo"&&jQuery(".um-profile-photo-img img").attr("src",e+"?"+d.getTime());if(b=="cover_photo"){jQuery(".um-cover-e").empty().html('<img src="'+e+"?"+d.getTime()+'" alt="" />');jQuery(".um").hasClass("um-editing")&&jQuery(".um-cover-overlay").show()}jQuery(".um-single-image-preview[data-key="+b+"]").fadeIn().find("img").attr("src",e+"?"+d.getTime());um_remove_modal();jQuery(".um-single-image-preview[data-key="+
113
 
114
  ;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);if(!e.length)return;case "object":if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
115
 
116
+ var live_field;var live_value;function um_conditional(){jQuery('.um-field.um-is-conditional').each(function(){for(var i = 0;i < 5;i++){var action0 = jQuery(this).data('cond-'+i+'-action');var field0 = jQuery(this).data('cond-'+i+'-field');var operator0 = jQuery(this).data('cond-'+i+'-operator');var value0 = jQuery(this).data('cond-'+i+'-value');if(action0 == 'show' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).fadeIn()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).fadeIn()}else{jQuery(this).hide()}}}if(action0 == 'hide' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).hide()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).hide()}else{jQuery(this).fadeIn()}}}}})}function UM_hide_menus(){menu = jQuery('.um-dropdown');menu.parents('div').find('a').removeClass('active');menu.hide()}function UM_domenus(){jQuery('.um-dropdown').each(function(){var menu = jQuery(this);var element = jQuery(this).attr('data-element');var position = jQuery(this).attr('data-position');jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));if(jQuery(window).width() <= 1200 && element == 'div.um-profile-edit'){position = 'lc'}if(position == 'lc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}gap_right = jQuery(element).width()+17;menu.css({'top':0,'width':200,'left':'auto','right':gap_right+'px','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');menu.find('.um-dropdown-arr').css({'top':'4px','left':'auto','right':'-17px'})}if(position == 'bc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}menu.css({'top':top_p,'width':200,'left':left_p+left_gap,'right':'auto','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');menu.find('.um-dropdown-arr').css({'top':'-17px','left':(menu.width() / 2) - 12,'right':'auto'})}})}function um_responsive(){jQuery('.um').each(function(){element_width = jQuery(this).width();if(element_width <= 340){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob340')}else if(element_width <= 500){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob500')}else if(element_width <= 800){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob800')}else if(element_width <= 960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob960')}else if(element_width>960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960')}if(jQuery('.um-account-nav').length>0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0){jQuery('.um-account-side li a.current').trigger('click')}jQuery(this).css('opacity',1)});jQuery('.um-cover,.um-member-cover').each(function(){var elem = jQuery(this);var ratio = elem.data('ratio');var width = elem.width();var ratios = ratio.split(':');calcHeight = Math.round(width / ratios[0])+'px';elem.height(calcHeight);elem.find('.um-cover-add').height(calcHeight)});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});UM_domenus()}function UM_Member_Grid(container){container.masonry({itemSelector:'.um-member',columnWidth:'.um-member',gutter:'.um-gutter-sizer'})}function initImageUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');img_id.attr("src",value);img_id.load(function(){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);img_id_h.show(0);um_modal_responsive()})})}}})}function initFileUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);if(key == 'icon'){trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value)}else if(key == 'icon_bg'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.icon').css({'background-color':value})}else if(key == 'filename'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.filename').html(value)}else{trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href',value)}});um_modal_responsive()}}})}function initCrop_UM(){var target_img = jQuery('.um-modal:visible .um-single-image-preview img');var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');var crop_data = target_img.parent().attr('data-crop');var min_width = target_img.parent().attr('data-min_width');var min_height = target_img.parent().attr('data-min_height');var ratio = target_img.parent().attr('data-ratio');if(jQuery('.um-modal').find('#um_upload_single').attr('data-ratio')){var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');var ratio_split = ratio.split(':');var ratio = ratio_split[0]}if(target_img.length){if(target_img.attr('src')!= ''){var max_height = jQuery(window).height() -(jQuery('.um-modal-footer a').height()+20) - 50 -(jQuery('.um-modal-header:visible').height());target_img.css({'height':'auto'});target_img_parent.css({'height':'auto'});if(jQuery(window).height() <= 400){target_img_parent.css({'height':max_height+'px','max-height':max_height+'px'});target_img.css({'height':'auto'})}else{target_img.css({'height':'auto','max-height':max_height+'px'});target_img_parent.css({'height':target_img.height(),'max-height':max_height+'px'})}if(crop_data == 'square'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:false,aspectRatio:1.0,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'cover'){var opts ={minWidth:min_width,minHeight:Math.round(min_width / ratio),dragCrop:false,aspectRatio:ratio,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'user'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:true,aspectRatio:"auto",zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}if(crop_data!= 0){target_img.cropper(opts)}}}}function um_new_modal(id,size,isPhoto,source){var modal = jQuery('body').find('.um-modal-overlay');if(modal.length == 0){jQuery('.tipsy').hide();UM_hide_menus();jQuery('body,html,textarea').css("overflow","hidden");jQuery(document).bind("touchmove",function(e){e.preventDefault()});jQuery('.um-modal').on('touchmove',function(e){e.stopPropagation()});if(isPhoto){jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal is-photo" ></div>')}else{jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal no-photo" ></div>')}jQuery('#'+id).prependTo('.um-modal');if(isPhoto){jQuery('.um-modal').find('.um-modal-photo').html('<img />');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.attr("src",source);photo_.load(function(){jQuery('#'+id).show();jQuery('.um-modal').show();photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);um_modal_responsive()})}else{jQuery('#'+id).show();jQuery('.um-modal').show();um_modal_size(size);initImageUpload_UM(jQuery('.um-modal:visible').find('.um-single-image-upload'));initFileUpload_UM(jQuery('.um-modal:visible').find('.um-single-file-upload'));um_modal_responsive()}}}function um_modal_responsive(){var modal = jQuery('.um-modal:visible');var photo_modal = jQuery('.um-modal-body.photo:visible');if(photo_modal.length){modal.removeClass('uimob340');modal.removeClass('uimob500');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(modal.length){var element_width = jQuery(window).width();modal.removeClass('uimob340');modal.removeClass('uimob500');if(element_width <= 340){modal.addClass('uimob340');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 500){modal.addClass('uimob500');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 800){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width <= 960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width>960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}}}function um_remove_modal(){jQuery('img.cropper-hidden').cropper('destroy');jQuery('body,html,textarea').css("overflow","auto");jQuery(document).unbind('touchmove');jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');jQuery('.um-modal,.um-modal-overlay').remove()}function um_modal_size(aclass){jQuery('.um-modal:visible').addClass(aclass)}function um_modal_add_attr(id,value){jQuery('.um-modal:visible').data(id,value)}
117
 
118
  /* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
119
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
123
 
124
  function prepare_Modal(){if(jQuery('.um-popup-overlay').length == 0){jQuery('body').append('<div class="um-popup-overlay"></div>');jQuery('body').append('<div class="um-popup"></div>');jQuery('.um-popup').addClass('loading');jQuery("body,html").css({overflow:'hidden'})}}function remove_Modal(){if(jQuery('.um-popup-overlay').length){jQuery('.tipsy').remove();jQuery('.um-popup').empty().remove();jQuery('.um-popup-overlay').empty().remove();jQuery("body,html").css({overflow:'auto'})}}function show_Modal(contents){if(jQuery('.um-popup-overlay').length){jQuery('.um-popup').removeClass('loading').html(contents);jQuery('.um-tip-n').tipsy({gravity:'n',opacity:1,offset:3});jQuery('.um-tip-w').tipsy({gravity:'w',opacity:1,offset:3});jQuery('.um-tip-e').tipsy({gravity:'e',opacity:1,offset:3});jQuery('.um-tip-s').tipsy({gravity:'s',opacity:1,offset:3})}}function responsive_Modal(){if(jQuery('.um-popup-overlay').length){ag_height = jQuery(window).height() - jQuery('.um-popup um-popup-header').outerHeight() - jQuery('.um-popup .um-popup-footer').outerHeight() - 80;if(ag_height>350){ag_height = 350}if(jQuery('.um-popup-autogrow:visible').length){jQuery('.um-popup-autogrow:visible').css({'height':ag_height+'px'});jQuery('.um-popup-autogrow:visible').mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})}else if(jQuery('.um-popup-autogrow2:visible').length){jQuery('.um-popup-autogrow2:visible').css({'max-height':ag_height+'px'});jQuery('.um-popup-autogrow2:visible').mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})}}}
125
 
126
+ jQuery(window).load(function(){um_responsive();um_modal_responsive()});jQuery(window).resize(function(){responsive_Modal();jQuery('img.cropper-hidden').cropper('destroy');um_responsive();um_modal_responsive()});jQuery(document).ready(function(){jQuery(document).on('click','.um-popup-overlay',function(){remove_Modal()});jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()});jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal a',function(a){a.preventDefault();return false});jQuery(document).on("click",".um-modal .um-single-file-preview a.cancel",function(a){a.preventDefault();a=jQuery(this).parents(".um-modal-body");var b=jQuery(this).parents(".um-modal-body").find(".um-single-fileinfo a").attr("href");
127
  a.find(".um-single-file-preview").hide();a.find(".ajax-upload-dragdrop").show();a.find(".um-modal-btn.um-finish-upload").addClass("disabled");um_modal_responsive();jQuery.ajax({url:um_scripts.ajaxurl,type:"post",data:{action:"ultimatemember_remove_file",src:b}});return false});jQuery(document).on("click",".um-modal .um-single-image-preview a.cancel",function(a){a.preventDefault();a=jQuery(this).parents(".um-modal-body");var b=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview img").attr("src");
128
+ jQuery('img.cropper-hidden').cropper('destroy');a.find(".um-single-image-preview img").attr("src","");a.find(".um-single-image-preview").hide();a.find(".ajax-upload-dragdrop").show();a.find(".um-modal-btn.um-finish-upload").addClass("disabled");um_modal_responsive();jQuery.ajax({url:um_scripts.ajaxurl,type:"post",data:{action:"ultimatemember_remove_file",src:b}});return false});jQuery(document).on("click",".um-finish-upload.file",function(){var a=jQuery(this).attr("data-key"),
129
  b=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html();um_remove_modal();jQuery(".um-single-file-preview[data-key="+a+"]").fadeIn().html(b);jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change"));jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find("input[type=hidden]").val(jQuery(".um-single-file-preview[data-key="+a+"]").parents(".um-field").find(".um-single-fileinfo a").attr("href"))});
130
  jQuery(document).on("click",".um-finish-upload.image",function(){var a=jQuery(this),b=jQuery(this).attr("data-key"),c=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),f=c.find("img").attr("src");c=c.attr("data-coord");var g=jQuery(this).parents("#um_upload_single").attr("data-user_id")?jQuery(this).parents("#um_upload_single").attr("data-user_id"):0;if(c){jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled");jQuery.ajax({url:um_scripts.ajaxurl,type:"POST",
131
  data:{action:"ultimatemember_resize_image",src:f,coord:c,user_id:g,key:b},success:function(e){d=new Date;b=="profile_photo"&&jQuery(".um-profile-photo-img img").attr("src",e+"?"+d.getTime());if(b=="cover_photo"){jQuery(".um-cover-e").empty().html('<img src="'+e+"?"+d.getTime()+'" alt="" />');jQuery(".um").hasClass("um-editing")&&jQuery(".um-cover-overlay").show()}jQuery(".um-single-image-preview[data-key="+b+"]").fadeIn().find("img").attr("src",e+"?"+d.getTime());um_remove_modal();jQuery(".um-single-image-preview[data-key="+
core/um-actions-access.php CHANGED
@@ -198,6 +198,7 @@
198
  if ( is_feed() ) {
199
 
200
  } else {
 
201
  $ultimatemember->access->redirect_handler = $redirect_to;
202
  }
203
  }
198
  if ( is_feed() ) {
199
 
200
  } else {
201
+ $ultimatemember->access->allow_access = false;
202
  $ultimatemember->access->redirect_handler = $redirect_to;
203
  }
204
  }
core/um-enqueue.php CHANGED
@@ -44,6 +44,9 @@ class UM_Enqueue {
44
  }
45
 
46
  $exclude = um_get_option('js_css_exclude');
 
 
 
47
  if ( $exclude && !is_admin() && is_array( $exclude ) ) {
48
 
49
  $c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
@@ -57,6 +60,9 @@ class UM_Enqueue {
57
  }
58
 
59
  $include = um_get_option('js_css_include');
 
 
 
60
  if ( $include && !is_admin() && is_array( $include ) ) {
61
 
62
  $c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
44
  }
45
 
46
  $exclude = um_get_option('js_css_exclude');
47
+ if ( is_array( $exclude ) ) {
48
+ array_filter( $exclude );
49
+ }
50
  if ( $exclude && !is_admin() && is_array( $exclude ) ) {
51
 
52
  $c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
60
  }
61
 
62
  $include = um_get_option('js_css_include');
63
+ if ( is_array( $include ) ) {
64
+ array_filter( $include );
65
+ }
66
  if ( $include && !is_admin() && is_array( $include ) ) {
67
 
68
  $c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
core/um-files.php CHANGED
@@ -446,6 +446,14 @@ class UM_Files {
446
  // if he does not have uploads dir yet
447
  $this->new_user( $user_id );
448
 
 
 
 
 
 
 
 
 
449
  // name and extension stuff
450
  $source_name = basename( $source );
451
 
@@ -530,8 +538,12 @@ class UM_Files {
530
  // update user's meta
531
  do_action('um_before_upload_db_meta', $user_id, $key );
532
  do_action("um_before_upload_db_meta_{$key}", $user_id );
 
533
  update_user_meta( $user_id, $key, $filename );
534
 
 
 
 
535
  // the url of upload
536
  return $this->upload_baseurl . $user_id . '/' . $filename;
537
 
446
  // if he does not have uploads dir yet
447
  $this->new_user( $user_id );
448
 
449
+ if ( is_user_logged_in() && ( get_current_user_id() != $user_id ) && !um_user_can('can_edit_everyone') ) {
450
+ wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
451
+ }
452
+
453
+ if ( !is_user_logged_in() && ( $key == 'profile_photo' || $key == 'cover_photo' ) ) {
454
+ wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
455
+ }
456
+
457
  // name and extension stuff
458
  $source_name = basename( $source );
459
 
538
  // update user's meta
539
  do_action('um_before_upload_db_meta', $user_id, $key );
540
  do_action("um_before_upload_db_meta_{$key}", $user_id );
541
+
542
  update_user_meta( $user_id, $key, $filename );
543
 
544
+ do_action('um_after_upload_db_meta', $user_id, $key );
545
+ do_action("um_after_upload_db_meta_{$key}", $user_id );
546
+
547
  // the url of upload
548
  return $this->upload_baseurl . $user_id . '/' . $filename;
549
 
core/um-short-functions.php CHANGED
@@ -129,6 +129,9 @@ function um_user_ip() {
129
  if ( $style ) $output .= '<div class="um-admin-infobox">';
130
 
131
  if ( isset( $data ) && is_array( $data ) ) {
 
 
 
132
  foreach( $data as $k => $v ) {
133
 
134
  if ( !strstr( $k, 'user_pass' ) && $k != 'g-recaptcha-response' && $k != 'request' ) {
@@ -697,6 +700,8 @@ function um_reset_user() {
697
  ***/
698
  function um_user_can( $permission ) {
699
  global $ultimatemember;
 
 
700
  $user_id = get_current_user_id();
701
  $role = get_user_meta( $user_id, 'role', true );
702
  $permissions = $ultimatemember->query->role_data( $role );
@@ -1113,65 +1118,64 @@ function um_user( $data, $attrs = null ) {
1113
 
1114
  if ( $op == 'full_name' ) {
1115
  if ( um_user('first_name') && um_user('last_name') ) {
1116
- return um_user('first_name') . ' ' . um_user('last_name');
1117
  } else {
1118
- return um_profile( $data );
1119
  }
1120
  }
1121
 
1122
  if ( $op == 'sur_name' ) {
1123
  if ( um_user('first_name') && um_user('last_name') ) {
1124
- return um_user('last_name') . ', ' . um_user('first_name');
1125
  } else {
1126
- return um_profile( $data );
1127
  }
1128
  }
1129
 
1130
  if ( $op == 'first_name' ) {
1131
  if ( um_user('first_name') ) {
1132
- return um_user('first_name');
1133
  } else {
1134
- return um_profile( $data );
1135
  }
1136
  }
1137
 
1138
  if ( $op == 'username' ) {
1139
- return um_user('user_login');
1140
  }
1141
 
1142
  if ( $op == 'initial_name' ) {
1143
  if ( um_user('first_name') && um_user('last_name') ) {
1144
  $initial = um_user('last_name');
1145
- return um_user('first_name') . ' ' . $initial[0];
1146
  } else {
1147
- return um_profile( $data );
1148
  }
1149
  }
1150
 
1151
  if ( $op == 'initial_name_f' ) {
1152
  if ( um_user('first_name') && um_user('last_name') ) {
1153
  $initial = um_user('first_name');
1154
- return $initial[0] . ' ' . um_user('last_name');
1155
  } else {
1156
- return um_profile( $data );
1157
  }
1158
  }
1159
 
1160
  if ( $op == 'public_name' ) {
1161
- return um_profile( $data );
1162
  }
1163
 
1164
  if ( $op == 'field' && um_get_option('display_name_field') != '' ) {
1165
  $fields = array_filter(preg_split('/[,\s]+/', um_get_option('display_name_field') ));
1166
- $output = '';
1167
  foreach( $fields as $field ) {
1168
- $output .= um_profile( $field ) . ' ';
1169
  }
1170
- return $output;
1171
  }
1172
-
1173
- return um_profile( $data );
1174
-
1175
  break;
1176
 
1177
  case 'role_select':
129
  if ( $style ) $output .= '<div class="um-admin-infobox">';
130
 
131
  if ( isset( $data ) && is_array( $data ) ) {
132
+
133
+ $data = apply_filters('um_email_registration_data', $data );
134
+
135
  foreach( $data as $k => $v ) {
136
 
137
  if ( !strstr( $k, 'user_pass' ) && $k != 'g-recaptcha-response' && $k != 'request' ) {
700
  ***/
701
  function um_user_can( $permission ) {
702
  global $ultimatemember;
703
+ if ( !is_user_logged_in() )
704
+ return false;
705
  $user_id = get_current_user_id();
706
  $role = get_user_meta( $user_id, 'role', true );
707
  $permissions = $ultimatemember->query->role_data( $role );
1118
 
1119
  if ( $op == 'full_name' ) {
1120
  if ( um_user('first_name') && um_user('last_name') ) {
1121
+ $name = um_user('first_name') . ' ' . um_user('last_name');
1122
  } else {
1123
+ $name = um_profile( $data );
1124
  }
1125
  }
1126
 
1127
  if ( $op == 'sur_name' ) {
1128
  if ( um_user('first_name') && um_user('last_name') ) {
1129
+ $name = um_user('last_name') . ', ' . um_user('first_name');
1130
  } else {
1131
+ $name = um_profile( $data );
1132
  }
1133
  }
1134
 
1135
  if ( $op == 'first_name' ) {
1136
  if ( um_user('first_name') ) {
1137
+ $name = um_user('first_name');
1138
  } else {
1139
+ $name = um_profile( $data );
1140
  }
1141
  }
1142
 
1143
  if ( $op == 'username' ) {
1144
+ $name = um_user('user_login');
1145
  }
1146
 
1147
  if ( $op == 'initial_name' ) {
1148
  if ( um_user('first_name') && um_user('last_name') ) {
1149
  $initial = um_user('last_name');
1150
+ $name = um_user('first_name') . ' ' . $initial[0];
1151
  } else {
1152
+ $name = um_profile( $data );
1153
  }
1154
  }
1155
 
1156
  if ( $op == 'initial_name_f' ) {
1157
  if ( um_user('first_name') && um_user('last_name') ) {
1158
  $initial = um_user('first_name');
1159
+ $name = $initial[0] . ' ' . um_user('last_name');
1160
  } else {
1161
+ $name = um_profile( $data );
1162
  }
1163
  }
1164
 
1165
  if ( $op == 'public_name' ) {
1166
+ $name = um_profile( $data );
1167
  }
1168
 
1169
  if ( $op == 'field' && um_get_option('display_name_field') != '' ) {
1170
  $fields = array_filter(preg_split('/[,\s]+/', um_get_option('display_name_field') ));
1171
+ $name = '';
1172
  foreach( $fields as $field ) {
1173
+ $$name .= um_profile( $field ) . ' ';
1174
  }
 
1175
  }
1176
+
1177
+ return apply_filters('um_user_display_name_filter', $name, um_user('ID') );
1178
+
1179
  break;
1180
 
1181
  case 'role_select':
core/um-shortcodes.php CHANGED
@@ -93,19 +93,20 @@ class UM_Shortcodes {
93
  $classes[] = ( $ultimatemember->mobile->isMobile() ) ? 'um-mobile' : 'um-desktop';
94
 
95
  $array = $ultimatemember->permalinks->core;
96
-
97
  if ( !$array ) return $classes;
98
 
99
  foreach( $array as $slug => $info ) {
100
  if ( um_is_core_page( $slug ) ) {
 
101
  $classes[] = 'um-page-' . $slug;
102
- }
103
- }
 
 
 
 
104
 
105
- if ( is_user_logged_in() ) {
106
- $classes[] = 'um-page-loggedin';
107
- } else {
108
- $classes[] = 'um-page-loggedout';
109
  }
110
 
111
  return $classes;
93
  $classes[] = ( $ultimatemember->mobile->isMobile() ) ? 'um-mobile' : 'um-desktop';
94
 
95
  $array = $ultimatemember->permalinks->core;
 
96
  if ( !$array ) return $classes;
97
 
98
  foreach( $array as $slug => $info ) {
99
  if ( um_is_core_page( $slug ) ) {
100
+
101
  $classes[] = 'um-page-' . $slug;
102
+
103
+ if ( is_user_logged_in() ) {
104
+ $classes[] = 'um-page-loggedin';
105
+ } else {
106
+ $classes[] = 'um-page-loggedout';
107
+ }
108
 
109
+ }
 
 
 
110
  }
111
 
112
  return $classes;
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.19
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.20
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.19
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
@@ -151,6 +151,19 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  = 1.3.19: August 20, 2015 =
155
 
156
  * Fixed: please update - profile issue
7
  Requires at least: 4.1
8
  Tested up to: 4.3
9
 
10
+ Stable Tag: 1.3.20
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.3.20: August 28, 2015 =
155
+
156
+ * New: added security measure for profile photo uploads
157
+ * New: added filter to hook in registration details sent in email notification
158
+ * New: added core pages filter to allow you change pages of extensions within plugin settings (e.g. activity)
159
+ * Fixed: multi-select field filtering bug
160
+ * Fixed: strip slashes from field names in fields modal
161
+ * Fixed: show drag and drop footer content only in the drag and drop form builder page
162
+ * Fixed: profile photo crop/upload issue
163
+ * Fixed: category/post specific restriction conflict
164
+ * Fixed: display UM classes only in UM pages
165
+ * Fixed: minor code improvements
166
+
167
  = 1.3.19: August 20, 2015 =
168
 
169
  * Fixed: please update - profile issue
um-config.php CHANGED
@@ -17,6 +17,8 @@ $core_pages = array(
17
  'password-reset' => __('Password reset page','ultimatemember'),
18
  );
19
 
 
 
20
  foreach( $core_pages as $page_s => $page ) {
21
  $page_setup[] = array(
22
  'id' => 'core_' . $page_s,
@@ -54,6 +56,9 @@ function um_core_page_setting_saved($options, $css, $changed_values) {
54
  'password-reset' => __('Password reset page','ultimatemember'),
55
  );
56
  $pages = get_option('um_core_pages');
 
 
 
57
  foreach( $core_pages as $slug => $page ) {
58
  $pages[ $slug ] = $options['core_' . $slug ];
59
  }
17
  'password-reset' => __('Password reset page','ultimatemember'),
18
  );
19
 
20
+ $core_pages = apply_filters('um_core_pages', $core_pages );
21
+
22
  foreach( $core_pages as $page_s => $page ) {
23
  $page_setup[] = array(
24
  'id' => 'core_' . $page_s,
56
  'password-reset' => __('Password reset page','ultimatemember'),
57
  );
58
  $pages = get_option('um_core_pages');
59
+
60
+ $core_pages = apply_filters('um_core_pages', $core_pages );
61
+
62
  foreach( $core_pages as $slug => $page ) {
63
  $pages[ $slug ] = $options['core_' . $slug ];
64
  }