Ultimate Member – User Profile & Membership Plugin - Version 1.0.19

Version Description

Download this release

Release Info

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

Code changes from version 1.0.18 to 1.0.19

admin/core/um-admin-actions-modal.php CHANGED
@@ -46,7 +46,7 @@
46
<?php if ( $k == '' ) { ?>
47
<p><a href="#" class="um-admin-new-condition button um-admin-tipsy-n" title="Add new condition"><i class="um-icon-plus" style="margin-right:0!important"></i></a></p>
48
<?php } else { ?>
49
- <p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-remove" style="margin-right:0!important"></i></a></p>
50
<?php } ?>
51
52
<div class="um-admin-clear"></div>
46
<?php if ( $k == '' ) { ?>
47
<p><a href="#" class="um-admin-new-condition button um-admin-tipsy-n" title="Add new condition"><i class="um-icon-plus" style="margin-right:0!important"></i></a></p>
48
<?php } else { ?>
49
+ <p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
50
<?php } ?>
51
52
<div class="um-admin-clear"></div>
admin/templates/directory/profile_card.php CHANGED
@@ -16,4 +16,8 @@
16
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_css_img_bordercolor', null, 'na'); ?>" class="um-admin-colorpicker" name="_um_css_img_bordercolor" id="_um_css_img_bordercolor" />
17
</p>
18
19
</div>
16
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_css_img_bordercolor', null, 'na'); ?>" class="um-admin-colorpicker" name="_um_css_img_bordercolor" id="_um_css_img_bordercolor" />
17
</p>
18
19
+ <p><label for="_um_css_card_thickness"><?php _e('Profile card border thickness','ultimatemember'); ?></label>
20
+ <input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_css_card_thickness', null, '1px'); ?>" name="_um_css_card_thickness" id="_um_css_card_thickness" />
21
+ </p>
22
+
23
</div>
admin/templates/form/login_customize.php CHANGED
@@ -88,6 +88,15 @@
88
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_login_secondary_btn_text', null, um_get_option('secondary_btn_text') ); ?>" class="um-admin-colorpicker" name="_um_login_secondary_btn_text" id="_um_login_secondary_btn_text" data-default-color="<?php echo um_get_option('secondary_btn_text'); ?>" />
89
</p>
90
91
</div>
92
93
</div>
88
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_login_secondary_btn_text', null, um_get_option('secondary_btn_text') ); ?>" class="um-admin-colorpicker" name="_um_login_secondary_btn_text" id="_um_login_secondary_btn_text" data-default-color="<?php echo um_get_option('secondary_btn_text'); ?>" />
89
</p>
90
91
+ <p>
92
+ <label><?php _e('Show Forgot Password Link?','ultimatemember'); ?></label>
93
+ <span>
94
+
95
+ <?php $this->ui_on_off('_um_login_forgot_pass_link', um_get_option('login_forgot_pass_link') ); ?>
96
+
97
+ </span>
98
+ </p><div class="um-admin-clear"></div>
99
+
100
</div>
101
102
</div>
assets/dynamic_css/dynamic_directory.php CHANGED
@@ -9,6 +9,14 @@ print ".um-$form_id .um-member {
9
10
}
11
12
if ($css_profile_card_text) {
13
14
print ".um-$form_id .um-member-card * {
9
10
}
11
12
+ if ( isset( $css_card_thickness ) ) {
13
+
14
+ print ".um-$form_id .um-member {
15
+ border-width: $css_card_thickness !important;
16
+ }";
17
+
18
+ }
19
+
20
if ($css_profile_card_text) {
21
22
print ".um-$form_id .um-member-card * {
assets/js/um-conditional.js CHANGED
@@ -13,13 +13,18 @@ jQuery(document).ready(function() {
13
14
live_field = jQuery(this).parents('.um-field').data('key');
15
live_value = jQuery(this).val();
16
-
17
if ( jQuery(this).is(':checkbox') ) {
18
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
19
}
20
21
um_conditional();
22
23
});
24
25
});
13
14
live_field = jQuery(this).parents('.um-field').data('key');
15
live_value = jQuery(this).val();
16
+
17
if ( jQuery(this).is(':checkbox') ) {
18
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
19
}
20
21
+ if ( jQuery(this).is(':radio') ) {
22
+ live_value = jQuery(this).parents('.um-field').find('input[type=radio]:checked').val();
23
+ }
24
+
25
um_conditional();
26
27
});
28
+ jQuery('.um-field input[type=radio], .um-field input[type=checkbox]').trigger('change');
29
30
});
assets/js/um.min.js CHANGED
@@ -121,7 +121,6 @@ jQuery(document).on("click",".um-finish-upload.image",function(){var a=jQuery(th
121
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="+
122
b+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change"));jQuery(".um-single-image-preview[data-key="+b+"]").parents(".um-field").find("input[type=hidden]").val(e)}})}else{d=new Date;jQuery(".um-single-image-preview[data-key="+b+"]").fadeIn().find("img").attr("src",f+"?"+d.getTime());um_remove_modal();jQuery(".um-single-image-preview[data-key="+b+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change"));jQuery(".um-single-image-preview[data-key="+b+
123
"]").parents(".um-field").find("input[type=hidden]").val(f)}});jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(){var a=jQuery(this).attr("data-modal"),b=jQuery(this).data("modal-size")?jQuery(this).data("modal-size"):"normal";if(jQuery(this).data("modal-copy")){jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html());jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id"));
124
- jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio"));jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id"))}um_new_modal(a,b)});jQuery(document).on("input",".um-field input[type=text]",function(){live_field=jQuery(this).parents(".um-field").data("key");live_value=jQuery(this).val();um_conditional()});jQuery(".um-field input[type=text]").trigger("input");
125
- jQuery(document).on("change",".um-field select, .um-field input[type=radio], .um-field input[type=checkbox]",function(){live_field=jQuery(this).parents(".um-field").data("key");live_value=jQuery(this).val();if(jQuery(this).is(":checkbox"))live_value=jQuery(this).parents(".um-field").find("input:checked").val();um_conditional()});jQuery(document).on('click','.um-dropdown a',function(e){return false});jQuery(document).on('click','.um-dropdown a.real_url',function(e){window.location = jQuery(this).attr('href')});jQuery(document).on('click','.um-trigger-menu-on-click',function(e){jQuery('.um-dropdown').hide();menu = jQuery(this).find('.um-dropdown');menu.show();return false});jQuery(document).on('click','.um-dropdown-hide',function(e){UM_hide_menus()});jQuery(document).on('click','a.um-manual-trigger',function(){var child = jQuery(this).attr('data-child');var parent = jQuery(this).attr('data-parent');jQuery(this).parents(parent).find(child).trigger('click')});jQuery('.um-tip-n').tipsy({gravity:'n',opacity:1,live:true,offset:3});jQuery('.um-tip-w').tipsy({gravity:'w',opacity:1,live:true,offset:3});jQuery('.um-tip-e').tipsy({gravity:'e',opacity:1,live:true,offset:3});jQuery('.um-tip-s').tipsy({gravity:'s',opacity:1,live:true,offset:3});jQuery('.um-field input[type=radio]').change(function(){var field = jQuery(this).parents('.um-field');var this_field = jQuery(this).parents('label');field.find('.um-field-radio').removeClass('active');field.find('.um-field-radio').find('i').removeClass().addClass('um-icon-android-radio-button-off');this_field.addClass('active');this_field.find('i').removeClass().addClass('um-icon-android-radio-button-on')});jQuery('.um-field input[type=checkbox]').change(function(){var field = jQuery(this).parents('.um-field');var this_field = jQuery(this).parents('label');if(this_field.hasClass('active')){this_field.removeClass('active');this_field.find('i').removeClass().addClass('um-icon-android-checkbox-outline-blank')}else{this_field.addClass('active');this_field.find('i').removeClass().addClass('um-icon-android-checkbox-outline')}});jQuery('.um-datepicker').each(function(){elem = jQuery(this);if(elem.attr('data-disabled_weekdays')!= ''){var disable = JSON.parse(elem.attr('data-disabled_weekdays'))}else{var disable = false}var years_n = elem.attr('data-years');var min = new Date(elem.attr('data-date_min'));var max = new Date(elem.attr('data-date_max'));elem.pickadate({selectYears:years_n,min:min,max:max,disable:disable,format:elem.attr('data-format'),formatSubmit:'yyyy/mm/dd',hiddenName:true})});jQuery('.um-timepicker').each(function(){elem = jQuery(this);elem.pickatime({format:elem.attr('data-format'),interval:parseInt(elem.attr('data-intervals')),formatSubmit:'HH:i',hiddenName:true})});jQuery('.um-rating').raty({half:false,starType:'i',number:function(){return jQuery(this).attr('data-number')},score:function(){return jQuery(this).attr('data-score')},scoreName:function(){return jQuery(this).attr('data-key')},hints:false,click:function(score,evt){live_field = this.id;live_value = score;um_conditional()}});jQuery('.um-rating-readonly').raty({half:false,starType:'i',number:function(){return jQuery(this).attr('data-number')},score:function(){return jQuery(this).attr('data-score')},scoreName:function(){return jQuery(this).attr('data-key')},hints:false,readOnly:true});jQuery(document).on('click','.um .um-single-image-preview a.cancel',function(e){e.preventDefault();var parent = jQuery(this).parents('.um-field');var src = jQuery(this).parents('.um-field').find('.um-single-image-preview img').attr('src');parent.find('.um-single-image-preview img').attr('src','');parent.find('.um-single-image-preview').hide();parent.find('.um-btn-auto-width').html('Upload');parent.find('input[type=hidden]').val('');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_remove_file',src:src}});return false});jQuery(document).on('click','.um .um-single-file-preview a.cancel',function(e){e.preventDefault();var parent = jQuery(this).parents('.um-field');var src = jQuery(this).parents('.um-field').find('.um-single-fileinfo a').attr('href');parent.find('.um-single-file-preview').hide();parent.find('.um-btn-auto-width').html('Upload');parent.find('input[type=hidden]').val('');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_remove_file',src:src}});return false});jQuery(".um-s1").select2({allowClear:true,minimumResultsForSearch:10});jQuery(".um-s2").select2({allowClear:false,minimumResultsForSearch:10});jQuery('.um-s1,.um-s2').css({'display':'block'});jQuery(document).on('click','.um-field-group-head:not(.disabled)',function(){var field = jQuery(this).parents('.um-field-group');var limit = field.data('max_entries');if(field.find('.um-field-group-body').is(':hidden')){field.find('.um-field-group-body').show()}else{field.find('.um-field-group-body:first').clone().appendTo(field)}increase_id = 0;field.find('.um-field-group-body').each(function(){increase_id++;jQuery(this).find('input').each(function(){var input = jQuery(this);input.attr('id',input.data('key')+'-'+increase_id);input.attr('name',input.data('key')+'-'+increase_id);input.parent().parent().find('label').attr('for',input.data('key')+'-'+increase_id)})});if(limit>0 && field.find('.um-field-group-body').length == limit){jQuery(this).addClass('disabled')}});jQuery(document).on('click','.um-field-group-cancel',function(e){e.preventDefault();var field = jQuery(this).parents('.um-field-group');var limit = field.data('max_entries');if(field.find('.um-field-group-body').length>1){jQuery(this).parents('.um-field-group-body').remove()}else{jQuery(this).parents('.um-field-group-body').hide()}if(limit>0 && field.find('.um-field-group-body').length < limit){field.find('.um-field-group-head').removeClass('disabled')}return false});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});jQuery('.um-member-connect').each(function(){if(jQuery(this).find('a').length == 0){jQuery(this).remove()}});jQuery('.um-member-meta-main').each(function(){if(jQuery(this).find('.um-member-metaline').length == 0 && jQuery(this).find('.um-member-connect').find('a').length == 0){jQuery(this).remove()}});jQuery(document).on('click','.um-member-more a',function(e){e.preventDefault();var block = jQuery(this).parents('.um-member');var container = jQuery(this).parents('.um-members');block.find('.um-member-more').hide();block.find('.um-member-meta').slideDown(function(){UM_Member_Grid(container)});block.find('.um-member-less').fadeIn();setTimeout(function(){UM_Member_Grid(container)},100);return false});jQuery(document).on('click','.um-member-less a',function(e){e.preventDefault();var block = jQuery(this).parents('.um-member');var container = jQuery(this).parents('.um-members');block.find('.um-member-less').hide();block.find('.um-member-meta').slideUp(function(){block.find('.um-member-more').fadeIn();UM_Member_Grid(container)});return false});jQuery(document).on('click','.um-do-search',function(e){e.preventDefault();jQuery(this).parents('form').submit();return false});if(jQuery('.um-profile.um-viewing .um-profile-body').length && jQuery('.um-profile.um-viewing .um-profile-body').find('.um-field').length == 0){jQuery('.um-profile-note').show()}jQuery(document).on('click','.um-profile-save',function(e){e.preventDefault();jQuery(this).parents('.um').find('form').submit();return false});jQuery(document).on('click','.um-profile-edit-a',function(e){jQuery(this).addClass('active')});jQuery(document).on('click','.um-cover a,.um-photo a',function(e){e.preventDefault();return false});jQuery(document).on('click','.um-photo-modal',function(e){var photo_src = jQuery(this).attr('data-src');um_new_modal('um_view_photo','fit',true,photo_src)});jQuery(document).on('click','.um-reset-profile-photo',function(e){jQuery('.um-profile-photo-img img').attr('src',jQuery(this).attr('data-default_src'));user_id = jQuery(this).attr('data-user_id');metakey = 'profile_photo';jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_delete_profile_photo',metakey:metakey,user_id:user_id}})});jQuery(document).on('click','.um-reset-cover-photo',function(e){jQuery('.um-cover-overlay').hide();jQuery('.um-cover-e').html('<a href="#" class="um-cover-add um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" title="Upload a cover photo"></i></span></a>');jQuery('.um-dropdown').hide();um_responsive();user_id = jQuery(this).attr('data-user_id');metakey = 'cover_photo';jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_delete_cover_photo',metakey:metakey,user_id:user_id}})});var g=jQuery(".um-account-main").attr("data-current_tab");g&&jQuery(".um-account-tab[data-tab="+g+"]").show();jQuery(document).on("click",".um-account-side li a",function(a){a.preventDefault();a=jQuery(this);a.parents("ul").find("li a").removeClass("current");
126
a.addClass("current");a=jQuery(this).attr("href");var b=jQuery(this).attr("data-tab");window.history.pushState("","",a);jQuery(".um-account-tab").hide();jQuery(".um-account-tab[data-tab="+b+"]").fadeIn();jQuery(".um-account-nav a").removeClass("current");jQuery(".um-account-nav a[data-tab="+b+"]").addClass("current");return false});jQuery(document).on("click",".um-account-nav a",function(a){a.preventDefault();a=jQuery(this).attr("data-tab");var b=jQuery(this).parents("div"),c=jQuery(this);jQuery(".um-account-tab").hide();
127
if(c.hasClass("current")){b.next(".um-account-tab").slideUp();c.removeClass("current")}else{b.next(".um-account-tab").slideDown();c.parents("div").find("a").removeClass("current");c.addClass("current")}jQuery(".um-account-side li a").removeClass("current");jQuery(".um-account-side li a[data-tab="+a+"]").addClass("current");return false})});
121
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="+
122
b+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change"));jQuery(".um-single-image-preview[data-key="+b+"]").parents(".um-field").find("input[type=hidden]").val(e)}})}else{d=new Date;jQuery(".um-single-image-preview[data-key="+b+"]").fadeIn().find("img").attr("src",f+"?"+d.getTime());um_remove_modal();jQuery(".um-single-image-preview[data-key="+b+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change"));jQuery(".um-single-image-preview[data-key="+b+
123
"]").parents(".um-field").find("input[type=hidden]").val(f)}});jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(){var a=jQuery(this).attr("data-modal"),b=jQuery(this).data("modal-size")?jQuery(this).data("modal-size"):"normal";if(jQuery(this).data("modal-copy")){jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html());jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id"));
124
+ jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio"));jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id"))}um_new_modal(a,b)});jQuery(document).on('input','.um-field input[type=text]',function(){live_field = jQuery(this).parents('.um-field').data('key');live_value = jQuery(this).val();um_conditional()});jQuery('.um-field input[type=text]').trigger('input');jQuery(document).on('change','.um-field select,.um-field input[type=radio],.um-field input[type=checkbox]',function(){live_field = jQuery(this).parents('.um-field').data('key');live_value = jQuery(this).val();if(jQuery(this).is(':checkbox')){live_value = jQuery(this).parents('.um-field').find('input:checked').val()}if(jQuery(this).is(':radio')){live_value = jQuery(this).parents('.um-field').find('input[type=radio]:checked').val()}um_conditional()});jQuery('.um-field input[type=radio],.um-field input[type=checkbox]').trigger('change');jQuery(document).on('click','.um-dropdown a',function(e){return false});jQuery(document).on('click','.um-dropdown a.real_url',function(e){window.location = jQuery(this).attr('href')});jQuery(document).on('click','.um-trigger-menu-on-click',function(e){jQuery('.um-dropdown').hide();menu = jQuery(this).find('.um-dropdown');menu.show();return false});jQuery(document).on('click','.um-dropdown-hide',function(e){UM_hide_menus()});jQuery(document).on('click','a.um-manual-trigger',function(){var child = jQuery(this).attr('data-child');var parent = jQuery(this).attr('data-parent');jQuery(this).parents(parent).find(child).trigger('click')});jQuery('.um-tip-n').tipsy({gravity:'n',opacity:1,live:true,offset:3});jQuery('.um-tip-w').tipsy({gravity:'w',opacity:1,live:true,offset:3});jQuery('.um-tip-e').tipsy({gravity:'e',opacity:1,live:true,offset:3});jQuery('.um-tip-s').tipsy({gravity:'s',opacity:1,live:true,offset:3});jQuery('.um-field input[type=radio]').change(function(){var field = jQuery(this).parents('.um-field');var this_field = jQuery(this).parents('label');field.find('.um-field-radio').removeClass('active');field.find('.um-field-radio').find('i').removeClass().addClass('um-icon-android-radio-button-off');this_field.addClass('active');this_field.find('i').removeClass().addClass('um-icon-android-radio-button-on')});jQuery('.um-field input[type=checkbox]').change(function(){var field = jQuery(this).parents('.um-field');var this_field = jQuery(this).parents('label');if(this_field.hasClass('active')){this_field.removeClass('active');this_field.find('i').removeClass().addClass('um-icon-android-checkbox-outline-blank')}else{this_field.addClass('active');this_field.find('i').removeClass().addClass('um-icon-android-checkbox-outline')}});jQuery('.um-datepicker').each(function(){elem = jQuery(this);if(elem.attr('data-disabled_weekdays')!= ''){var disable = JSON.parse(elem.attr('data-disabled_weekdays'))}else{var disable = false}var years_n = elem.attr('data-years');var min = new Date(elem.attr('data-date_min'));var max = new Date(elem.attr('data-date_max'));elem.pickadate({selectYears:years_n,min:min,max:max,disable:disable,format:elem.attr('data-format'),formatSubmit:'yyyy/mm/dd',hiddenName:true})});jQuery('.um-timepicker').each(function(){elem = jQuery(this);elem.pickatime({format:elem.attr('data-format'),interval:parseInt(elem.attr('data-intervals')),formatSubmit:'HH:i',hiddenName:true})});jQuery('.um-rating').raty({half:false,starType:'i',number:function(){return jQuery(this).attr('data-number')},score:function(){return jQuery(this).attr('data-score')},scoreName:function(){return jQuery(this).attr('data-key')},hints:false,click:function(score,evt){live_field = this.id;live_value = score;um_conditional()}});jQuery('.um-rating-readonly').raty({half:false,starType:'i',number:function(){return jQuery(this).attr('data-number')},score:function(){return jQuery(this).attr('data-score')},scoreName:function(){return jQuery(this).attr('data-key')},hints:false,readOnly:true});jQuery(document).on('click','.um .um-single-image-preview a.cancel',function(e){e.preventDefault();var parent = jQuery(this).parents('.um-field');var src = jQuery(this).parents('.um-field').find('.um-single-image-preview img').attr('src');parent.find('.um-single-image-preview img').attr('src','');parent.find('.um-single-image-preview').hide();parent.find('.um-btn-auto-width').html('Upload');parent.find('input[type=hidden]').val('');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_remove_file',src:src}});return false});jQuery(document).on('click','.um .um-single-file-preview a.cancel',function(e){e.preventDefault();var parent = jQuery(this).parents('.um-field');var src = jQuery(this).parents('.um-field').find('.um-single-fileinfo a').attr('href');parent.find('.um-single-file-preview').hide();parent.find('.um-btn-auto-width').html('Upload');parent.find('input[type=hidden]').val('');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_remove_file',src:src}});return false});jQuery(".um-s1").select2({allowClear:true,minimumResultsForSearch:10});jQuery(".um-s2").select2({allowClear:false,minimumResultsForSearch:10});jQuery('.um-s1,.um-s2').css({'display':'block'});jQuery(document).on('click','.um-field-group-head:not(.disabled)',function(){var field = jQuery(this).parents('.um-field-group');var limit = field.data('max_entries');if(field.find('.um-field-group-body').is(':hidden')){field.find('.um-field-group-body').show()}else{field.find('.um-field-group-body:first').clone().appendTo(field)}increase_id = 0;field.find('.um-field-group-body').each(function(){increase_id++;jQuery(this).find('input').each(function(){var input = jQuery(this);input.attr('id',input.data('key')+'-'+increase_id);input.attr('name',input.data('key')+'-'+increase_id);input.parent().parent().find('label').attr('for',input.data('key')+'-'+increase_id)})});if(limit>0 && field.find('.um-field-group-body').length == limit){jQuery(this).addClass('disabled')}});jQuery(document).on('click','.um-field-group-cancel',function(e){e.preventDefault();var field = jQuery(this).parents('.um-field-group');var limit = field.data('max_entries');if(field.find('.um-field-group-body').length>1){jQuery(this).parents('.um-field-group-body').remove()}else{jQuery(this).parents('.um-field-group-body').hide()}if(limit>0 && field.find('.um-field-group-body').length < limit){field.find('.um-field-group-head').removeClass('disabled')}return false});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});jQuery('.um-member-connect').each(function(){if(jQuery(this).find('a').length == 0){jQuery(this).remove()}});jQuery('.um-member-meta-main').each(function(){if(jQuery(this).find('.um-member-metaline').length == 0 && jQuery(this).find('.um-member-connect').find('a').length == 0){jQuery(this).remove()}});jQuery(document).on('click','.um-member-more a',function(e){e.preventDefault();var block = jQuery(this).parents('.um-member');var container = jQuery(this).parents('.um-members');block.find('.um-member-more').hide();block.find('.um-member-meta').slideDown(function(){UM_Member_Grid(container)});block.find('.um-member-less').fadeIn();setTimeout(function(){UM_Member_Grid(container)},100);return false});jQuery(document).on('click','.um-member-less a',function(e){e.preventDefault();var block = jQuery(this).parents('.um-member');var container = jQuery(this).parents('.um-members');block.find('.um-member-less').hide();block.find('.um-member-meta').slideUp(function(){block.find('.um-member-more').fadeIn();UM_Member_Grid(container)});return false});jQuery(document).on('click','.um-do-search',function(e){e.preventDefault();jQuery(this).parents('form').submit();return false});if(jQuery('.um-profile.um-viewing .um-profile-body').length && jQuery('.um-profile.um-viewing .um-profile-body').find('.um-field').length == 0){jQuery('.um-profile-note').show()}jQuery(document).on('click','.um-profile-save',function(e){e.preventDefault();jQuery(this).parents('.um').find('form').submit();return false});jQuery(document).on('click','.um-profile-edit-a',function(e){jQuery(this).addClass('active')});jQuery(document).on('click','.um-cover a,.um-photo a',function(e){e.preventDefault();return false});jQuery(document).on('click','.um-photo-modal',function(e){var photo_src = jQuery(this).attr('data-src');um_new_modal('um_view_photo','fit',true,photo_src)});jQuery(document).on('click','.um-reset-profile-photo',function(e){jQuery('.um-profile-photo-img img').attr('src',jQuery(this).attr('data-default_src'));user_id = jQuery(this).attr('data-user_id');metakey = 'profile_photo';jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_delete_profile_photo',metakey:metakey,user_id:user_id}})});jQuery(document).on('click','.um-reset-cover-photo',function(e){jQuery('.um-cover-overlay').hide();jQuery('.um-cover-e').html('<a href="#" class="um-cover-add um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" title="Upload a cover photo"></i></span></a>');jQuery('.um-dropdown').hide();um_responsive();user_id = jQuery(this).attr('data-user_id');metakey = 'cover_photo';jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_delete_cover_photo',metakey:metakey,user_id:user_id}})});var g=jQuery(".um-account-main").attr("data-current_tab");g&&jQuery(".um-account-tab[data-tab="+g+"]").show();jQuery(document).on("click",".um-account-side li a",function(a){a.preventDefault();a=jQuery(this);a.parents("ul").find("li a").removeClass("current");
125
a.addClass("current");a=jQuery(this).attr("href");var b=jQuery(this).attr("data-tab");window.history.pushState("","",a);jQuery(".um-account-tab").hide();jQuery(".um-account-tab[data-tab="+b+"]").fadeIn();jQuery(".um-account-nav a").removeClass("current");jQuery(".um-account-nav a[data-tab="+b+"]").addClass("current");return false});jQuery(document).on("click",".um-account-nav a",function(a){a.preventDefault();a=jQuery(this).attr("data-tab");var b=jQuery(this).parents("div"),c=jQuery(this);jQuery(".um-account-tab").hide();
126
if(c.hasClass("current")){b.next(".um-account-tab").slideUp();c.removeClass("current")}else{b.next(".um-account-tab").slideDown();c.parents("div").find("a").removeClass("current");c.addClass("current")}jQuery(".um-account-side li a").removeClass("current");jQuery(".um-account-side li a[data-tab="+a+"]").addClass("current");return false})});
core/um-actions-login.php CHANGED
@@ -196,7 +196,12 @@
196
*** @Display a forgot password link
197
***/
198
add_action('um_after_login_fields', 'um_after_login_submit', 1001);
199
- function um_after_login_submit(){ ?>
200
201
<div class="um-col-alt-b">
202
<a href="<?php echo um_get_core_page('password-reset'); ?>" class="um-link-alt"><?php _e('Forgot your password?','ultimatemember'); ?></a>
196
*** @Display a forgot password link
197
***/
198
add_action('um_after_login_fields', 'um_after_login_submit', 1001);
199
+ function um_after_login_submit( $args ){
200
+ global $ultimatemember;
201
+
202
+ if ( $args['forgot_pass_link'] == 0 ) return;
203
+
204
+ ?>
205
206
<div class="um-col-alt-b">
207
<a href="<?php echo um_get_core_page('password-reset'); ?>" class="um-link-alt"><?php _e('Forgot your password?','ultimatemember'); ?></a>
core/um-actions-members.php CHANGED
@@ -233,7 +233,7 @@
233
<div class="um-member-card <?php if (!$profile_photo) { echo 'no-photo'; } ?>">
234
235
<?php if ( $show_name ) { ?>
236
- <div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a></div>
237
<?php } ?>
238
239
<?php
233
<div class="um-member-card <?php if (!$profile_photo) { echo 'no-photo'; } ?>">
234
235
<?php if ( $show_name ) { ?>
236
+ <div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_cap_initials( um_user('display_name') ); ?></a></div>
237
<?php } ?>
238
239
<?php
core/um-fields.php CHANGED
@@ -78,7 +78,13 @@ class UM_Fields {
78
79
if ( $args['type'] == 'row' ) {
80
if ( isset( $fields[$id] ) ){
81
- $args = array_merge( $fields[$id], $args );
82
}
83
}
84
@@ -517,7 +523,7 @@ class UM_Fields {
517
if (!isset($array['validate'])) $array['validate'] = null;
518
if (!isset($array['default'])) $array['default'] = null;
519
520
- if ( isset( $array['conditions'] ) && is_array( $array['conditions'] ) ) {
521
$array['conditional'] = '';
522
foreach( $array['conditions'] as $key => $cond ) {
523
$array['conditional'] .= ' data-cond-'.$key.'-action="'. $cond[0] . '" data-cond-'.$key.'-field="'. $cond[1] . '" data-cond-'.$key.'-operator="'. $cond[2] . '" data-cond-'.$key.'-value="'. $cond[3] . '"';
@@ -1799,6 +1805,8 @@ class UM_Fields {
1799
1800
if ( !um_can_view_field( $data ) ) return;
1801
1802
switch( $type ) {
1803
1804
/* Default */
78
79
if ( $args['type'] == 'row' ) {
80
if ( isset( $fields[$id] ) ){
81
+ $old_args = $fields[$id];
82
+ foreach( $old_args as $k => $v ) {
83
+ if (!in_array($k, array('sub_rows','cols')) ) {
84
+ unset($old_args[$k]);
85
+ }
86
+ }
87
+ $args = array_merge( $old_args, $args );
88
}
89
}
90
523
if (!isset($array['validate'])) $array['validate'] = null;
524
if (!isset($array['default'])) $array['default'] = null;
525
526
+ if ( isset( $array['conditions'] ) && is_array( $array['conditions'] ) && !$this->viewing ) {
527
$array['conditional'] = '';
528
foreach( $array['conditions'] as $key => $cond ) {
529
$array['conditional'] .= ' data-cond-'.$key.'-action="'. $cond[0] . '" data-cond-'.$key.'-field="'. $cond[1] . '" data-cond-'.$key.'-operator="'. $cond[2] . '" data-cond-'.$key.'-value="'. $cond[3] . '"';
1805
1806
if ( !um_can_view_field( $data ) ) return;
1807
1808
+ if ( !um_field_conditions_are_met( $data ) ) return;
1809
+
1810
switch( $type ) {
1811
1812
/* Default */
core/um-permalinks.php CHANGED
@@ -21,8 +21,10 @@ class UM_Permalinks {
21
***/
22
function get_query_array() {
23
$parts = parse_url( $this->get_current_url() );
24
parse_str($parts['query'], $query);
25
return $query;
26
}
27
28
/***
21
***/
22
function get_query_array() {
23
$parts = parse_url( $this->get_current_url() );
24
+ if ( isset( $parts['query'] ) ){
25
parse_str($parts['query'], $query);
26
return $query;
27
+ }
28
}
29
30
/***
core/um-setup.php CHANGED
@@ -122,7 +122,7 @@ class UM_Setup {
122
'_um_register_primary_btn_color' => '#3ba1da',
123
'_um_register_primary_btn_hover' => '#44b0ec',
124
'_um_register_primary_btn_text' => '#fff',
125
- '_um_register_secondary_btn' => '1',
126
'_um_register_secondary_btn_word' => 'Login',
127
'_um_register_secondary_btn_color' => '#eee',
128
'_um_register_secondary_btn_hover' => '#e5e5e5',
@@ -135,7 +135,8 @@ class UM_Setup {
135
'_um_login_primary_btn_color' => '#3ba1da',
136
'_um_login_primary_btn_hover' => '#44b0ec',
137
'_um_login_primary_btn_text' => '#fff',
138
- '_um_login_secondary_btn' => '1',
139
'_um_login_secondary_btn_word' => 'Register',
140
'_um_login_secondary_btn_color' => '#eee',
141
'_um_login_secondary_btn_hover' => '#e5e5e5',
122
'_um_register_primary_btn_color' => '#3ba1da',
123
'_um_register_primary_btn_hover' => '#44b0ec',
124
'_um_register_primary_btn_text' => '#fff',
125
+ '_um_register_secondary_btn' => 1,
126
'_um_register_secondary_btn_word' => 'Login',
127
'_um_register_secondary_btn_color' => '#eee',
128
'_um_register_secondary_btn_hover' => '#e5e5e5',
135
'_um_login_primary_btn_color' => '#3ba1da',
136
'_um_login_primary_btn_hover' => '#44b0ec',
137
'_um_login_primary_btn_text' => '#fff',
138
+ '_um_login_forgot_pass_link' => 1,
139
+ '_um_login_secondary_btn' => 1,
140
'_um_login_secondary_btn_word' => 'Register',
141
'_um_login_secondary_btn_color' => '#eee',
142
'_um_login_secondary_btn_hover' => '#e5e5e5',
core/um-short-functions.php CHANGED
@@ -1,5 +1,57 @@
1
<?php
2
3
/***
4
*** @Exit and redirect to home
5
***/
@@ -7,6 +59,14 @@
7
exit( wp_redirect( home_url() ) );
8
}
9
10
/***
11
*** @Get submitted user information
12
***/
1
<?php
2
3
+ /***
4
+ *** @If conditions are met return true;
5
+ ***/
6
+ function um_field_conditions_are_met( $data ) {
7
+ if ( !isset( $data['conditions'] ) ) return true;
8
+
9
+ $state = 1;
10
+
11
+ foreach( $data['conditions'] as $k => $arr ) {
12
+ if ( $arr[0] == 'show' ) {
13
+
14
+ $state = 1;
15
+ $val = $arr[3];
16
+ $op = $arr[2];
17
+ $field = um_profile($arr[1]);
18
+
19
+ switch( $op ) {
20
+ case 'equals to': if ( $field != $val ) $state = 0; break;
21
+ case 'not equals': if ( $field == $val ) $state = 0; break;
22
+ case 'empty': if ( $field ) $state = 0; break;
23
+ case 'not empty': if ( !$field ) $state = 0; break;
24
+ case 'greater than': if ( $field <= $val ) $state = 0; break;
25
+ case 'less than': if ( $field >= $val ) $state = 0; break;
26
+ case 'contains': if ( !strstr( $field, $val ) ) $state = 0; break;
27
+ }
28
+ }
29
+
30
+ if ( $arr[0] == 'hide' ) {
31
+
32
+ $state = 0;
33
+ $val = $arr[3];
34
+ $op = $arr[2];
35
+ $field = um_profile($arr[1]);
36
+
37
+ switch( $op ) {
38
+ case 'equals to': if ( $field != $val ) $state = 1; break;
39
+ case 'not equals': if ( $field == $val ) $state = 1; break;
40
+ case 'empty': if ( $field ) $state = 1; break;
41
+ case 'not empty': if ( !$field ) $state = 1; break;
42
+ case 'greater than': if ( $field <= $val ) $state = 1; break;
43
+ case 'less than': if ( $field >= $val ) $state = 1; break;
44
+ case 'contains': if ( !strstr( $field, $val ) ) $state = 1; break;
45
+ }
46
+ }
47
+
48
+ }
49
+
50
+ if ( $state )
51
+ return true;
52
+ return false;
53
+ }
54
+
55
/***
56
*** @Exit and redirect to home
57
***/
59
exit( wp_redirect( home_url() ) );
60
}
61
62
+ /***
63
+ *** @Capitalize first initial
64
+ ***/
65
+ function um_cap_initials( $name ) {
66
+ $name = str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ', strtolower($name))));
67
+ return $name;
68
+ }
69
+
70
/***
71
*** @Get submitted user information
72
***/
core/um-validation.php CHANGED
@@ -74,6 +74,8 @@ class UM_Validation {
74
*** @is phone number
75
***/
76
function is_phone_number( $string ){
77
if ( !preg_match( $this->regex_phone_number, $string) )
78
return false;
79
return true;
74
*** @is phone number
75
***/
76
function is_phone_number( $string ){
77
+ if ( !$string )
78
+ return true;
79
if ( !preg_match( $this->regex_phone_number, $string) )
80
return false;
81
return true;
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
6
- Version: 1.0.18
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
*/
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
6
+ Version: 1.0.19
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
*/
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: members, member, membership, community, communities, profile, profiles, re
7
Requires at least: 4.1
8
Tested up to: 4.1
9
10
- Stable Tag: 1.0.18
11
12
License: GNU Version 2 or Any Later Version
13
@@ -26,7 +26,8 @@ Features of the plugin include:
26
* Front-end user registration
27
* Front-end user login
28
* Front-end user profiles
29
- * Custom profile fields
30
* Drag and drop form builder
31
* User account page
32
* Custom user roles
@@ -50,10 +51,14 @@ Allow users to login directly from your site and avoid the ugly WordPress login
50
51
Ultimate Member gives every user of your site a beautiful user profile where they can edit their information. You can create unique profiles for each user role and decide what information to show on the profiles.
52
53
- **Custom profile fields**
54
55
With our custom profile fields, Ultimate Member allows you to gather any information you like from user's when they register or when they fill in their profiles. The plugin comes with a full range of field types including: text box, textarea, dropdown, multi-select, radio, checkbox, url, password, image upload, file upload, date picker, time picker and star ratings.
56
57
**Drag and drop form builder**
58
59
Our advanced drag and drop form builder makes it extremely easy to build unique registration, login and profile forms for your site. The form builder allows for up to three columns and multiple rows which enables you to create distinct sections to the forms.
@@ -78,7 +83,7 @@ The plugin provides a range of customizable text only email templates which are
78
79
With Ultimate Member you can restrict content on a global on per page/post basis. You can restrict pages/posts so everyone can see the page/post; only logged out users can see the page/post or only logged in users can see the page/post (you can also restrict it to certain user roles). You can also set redirect urls for when people who are not allowed to access the page/post
80
81
- **Conditional Menus**
82
83
The plugin provides a range of customizable text only email templates which are triggered depending on certain events (e.g welcome email, account activation, account deleted etc). Each email type can be turned on/off. The plugin also offers a range of optional admin notification emails so you can find out when a new user registers or if new user needs reviewed.
84
@@ -94,7 +99,7 @@ The plugin is very SEO friendly and provides customizable dynamic page titles an
94
95
Ultimate Member is developer friendly and includes hundreds of actions and filters for developers to customize the plugin. If you are wanting to integrate with Ultimate Member you can view codex here.
96
97
- **Future Plans for Ultimate Member**
98
99
We have big plans for Ultimate Member and we will be working extremely hard to create the best community plugin ever. In the near future we will be releasing extensions on our site that will allow you to add extra features and extend the functionality of Ultimate Member. If you'd like to find out when the first extensions will be ready you can follow us on [Twitter](https://twitter.com/umplugin), like us on [Facebook](https://www.facebook.com/pages/Ultimate-Member/1413909622233054) or view our [Trello roadmap](https://trello.com/b/30quaczv/ultimate-member).
100
@@ -163,6 +168,17 @@ Yes. The plugin works fine with WordPress network / multisite now. In a recent u
163
164
== Changelog ==
165
166
= 1.0.18: January 23, 2015 =
167
168
* Fixed: Issue with drag and drop form builder
7
Requires at least: 4.1
8
Tested up to: 4.1
9
10
+ Stable Tag: 1.0.19
11
12
License: GNU Version 2 or Any Later Version
13
26
* Front-end user registration
27
* Front-end user login
28
* Front-end user profiles
29
+ * Custom form fields
30
+ * Conditional logic for form fields
31
* Drag and drop form builder
32
* User account page
33
* Custom user roles
51
52
Ultimate Member gives every user of your site a beautiful user profile where they can edit their information. You can create unique profiles for each user role and decide what information to show on the profiles.
53
54
+ **Custom form fields**
55
56
With our custom profile fields, Ultimate Member allows you to gather any information you like from user's when they register or when they fill in their profiles. The plugin comes with a full range of field types including: text box, textarea, dropdown, multi-select, radio, checkbox, url, password, image upload, file upload, date picker, time picker and star ratings.
57
58
+ **Conditional logic for form fields**
59
+
60
+ You can create advanced register, login and profile forms by applying conditional logic to any fields you like. This allows you to show or hide fields depending on a user’s actions when they fill in a form.
61
+
62
**Drag and drop form builder**
63
64
Our advanced drag and drop form builder makes it extremely easy to build unique registration, login and profile forms for your site. The form builder allows for up to three columns and multiple rows which enables you to create distinct sections to the forms.
83
84
With Ultimate Member you can restrict content on a global on per page/post basis. You can restrict pages/posts so everyone can see the page/post; only logged out users can see the page/post or only logged in users can see the page/post (you can also restrict it to certain user roles). You can also set redirect urls for when people who are not allowed to access the page/post
85
86
+ **Conditional menus**
87
88
The plugin provides a range of customizable text only email templates which are triggered depending on certain events (e.g welcome email, account activation, account deleted etc). Each email type can be turned on/off. The plugin also offers a range of optional admin notification emails so you can find out when a new user registers or if new user needs reviewed.
89
99
100
Ultimate Member is developer friendly and includes hundreds of actions and filters for developers to customize the plugin. If you are wanting to integrate with Ultimate Member you can view codex here.
101
102
+ **Future plans for Ultimate Member**
103
104
We have big plans for Ultimate Member and we will be working extremely hard to create the best community plugin ever. In the near future we will be releasing extensions on our site that will allow you to add extra features and extend the functionality of Ultimate Member. If you'd like to find out when the first extensions will be ready you can follow us on [Twitter](https://twitter.com/umplugin), like us on [Facebook](https://www.facebook.com/pages/Ultimate-Member/1413909622233054) or view our [Trello roadmap](https://trello.com/b/30quaczv/ultimate-member).
105
168
169
== Changelog ==
170
171
+ = 1.0.19: January 23, 2015 =
172
+
173
+ * New: Border thickness option for members directory
174
+ * New: Option to show/hide forgot password link on login form
175
+ * Tweak: Capital initials on members directory
176
+ * Fixed: Issue with row styling in form builder
177
+ * Fixed: Conditional logic bug fixes
178
+ * Fixed: Icon for conditional rules in backend
179
+ * Fixed: php warning in debug mode
180
+ * Fixed: Mobile/phone number validation fixed
181
+
182
= 1.0.18: January 23, 2015 =
183
184
* Fixed: Issue with drag and drop form builder
um-config.php CHANGED
@@ -1386,6 +1386,14 @@ $this->sections[] = array(
1386
'required' => array( 'login_secondary_btn', '=', 1 ),
1387
),
1388
1389
)
1390
1391
);
1386
'required' => array( 'login_secondary_btn', '=', 1 ),
1387
),
1388
1389
+ array(
1390
+ 'id' => 'login_forgot_pass_link',
1391
+ 'type' => 'switch',
1392
+ 'title' => __( 'Login Forgot Password Link' ),
1393
+ 'default' => 1,
1394
+ 'desc' => 'Switch on/off the forgot password link in login form',
1395
+ ),
1396
+
1397
)
1398
1399
);