Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.0.58 |
Comparing to | |
See all releases |
Code changes from version 1.0.57 to 1.0.58
- admin/core/um-admin-redux.php +3 -3
- assets/js/um-conditional.js +8 -1
- assets/js/um.min.js +1 -1
- core/um-actions-register.php +3 -3
- core/um-fields.php +5 -1
- core/um-filters-members.php +1 -1
- core/um-form.php +1 -1
- core/um-members.php +11 -0
- core/um-short-functions.php +1 -1
- index.php +1 -1
- readme.txt +9 -1
- um-config.php +13 -13
admin/core/um-admin-redux.php
CHANGED
@@ -52,12 +52,12 @@
|
|
52 |
|
53 |
$this->args = array(
|
54 |
'opt_name' => 'um_options', // This is where your data is stored in the database and also becomes your global variable name.
|
55 |
-
'display_name' => 'Settings',
|
56 |
'display_version' => ultimatemember_version, // Version that appears at the top of your panel
|
57 |
'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
|
58 |
'allow_sub_menu' => false, // Show the sections below the admin menu item or not
|
59 |
-
'menu_title' => __('Settings', '
|
60 |
-
'page_title' => __('Settings', '
|
61 |
|
62 |
'google_api_key' => '', // Must be defined to add google fonts to the typography module
|
63 |
'async_typography' => true, // Use a asynchronous font on the front end or font string
|
52 |
|
53 |
$this->args = array(
|
54 |
'opt_name' => 'um_options', // This is where your data is stored in the database and also becomes your global variable name.
|
55 |
+
'display_name' => __('Settings', 'ultimatemember'), // Name that appears at the top of your panel
|
56 |
'display_version' => ultimatemember_version, // Version that appears at the top of your panel
|
57 |
'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
|
58 |
'allow_sub_menu' => false, // Show the sections below the admin menu item or not
|
59 |
+
'menu_title' => __('Settings', 'ultimatemember'),
|
60 |
+
'page_title' => __('Settings', 'ultimatemember'),
|
61 |
|
62 |
'google_api_key' => '', // Must be defined to add google fonts to the typography module
|
63 |
'async_typography' => true, // Use a asynchronous font on the front end or font string
|
assets/js/um-conditional.js
CHANGED
@@ -15,7 +15,14 @@ jQuery(document).ready(function() {
|
|
15 |
live_value = jQuery(this).val();
|
16 |
|
17 |
if ( jQuery(this).is(':checkbox') ) {
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
if ( jQuery(this).is(':radio') ) {
|
15 |
live_value = jQuery(this).val();
|
16 |
|
17 |
if ( jQuery(this).is(':checkbox') ) {
|
18 |
+
if ( jQuery(this).parents('.um-field').find('input:checked').length > 1 ) {
|
19 |
+
live_value = '';
|
20 |
+
jQuery(this).parents('.um-field').find('input:checked').each(function(){
|
21 |
+
live_value = live_value + jQuery(this).val() + ' ';
|
22 |
+
});
|
23 |
+
} else {
|
24 |
+
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
|
25 |
+
}
|
26 |
}
|
27 |
|
28 |
if ( jQuery(this).is(':radio') ) {
|
assets/js/um.min.js
CHANGED
@@ -121,6 +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');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 select,.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(document).on('click','.um-ajax-paginate',function(e){e.preventDefault();var parent = jQuery(this).parent();parent.addClass('loading');var args = jQuery(this).data('args');var hook = jQuery(this).data('hook');var container = jQuery(this).parents('.um').find('.um-ajax-items');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_ajax_paginate',hook:hook,args:args},complete:function(){parent.removeClass('loading')},success:function(data){parent.remove();container.append(data)}});return false});jQuery(document).on('click','.um-ajax-action',function(e){e.preventDefault();var hook = jQuery(this).data('hook');var user_id = jQuery(this).data('user_id');var arguments = jQuery(this).data('arguments');if(jQuery(this).data('js-remove')){jQuery(this).parents('.'+jQuery(this).data('js-remove')).fadeOut('fast')}jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_muted_action',hook:hook,user_id:user_id,arguments:arguments}});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})});
|
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')){if(jQuery(this).parents('.um-field').find('input:checked').length>1){live_value = '';jQuery(this).parents('.um-field').find('input:checked').each(function(){live_value = live_value+jQuery(this).val()+' '})}else{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 select,.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(document).on('click','.um-ajax-paginate',function(e){e.preventDefault();var parent = jQuery(this).parent();parent.addClass('loading');var args = jQuery(this).data('args');var hook = jQuery(this).data('hook');var container = jQuery(this).parents('.um').find('.um-ajax-items');jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_ajax_paginate',hook:hook,args:args},complete:function(){parent.removeClass('loading')},success:function(data){parent.remove();container.append(data)}});return false});jQuery(document).on('click','.um-ajax-action',function(e){e.preventDefault();var hook = jQuery(this).data('hook');var user_id = jQuery(this).data('user_id');var arguments = jQuery(this).data('arguments');if(jQuery(this).data('js-remove')){jQuery(this).parents('.'+jQuery(this).data('js-remove')).fadeOut('fast')}jQuery.ajax({url:ultimatemember_ajax_url,type:'post',data:{action:'ultimatemember_muted_action',hook:hook,user_id:user_id,arguments:arguments}});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-register.php
CHANGED
@@ -39,14 +39,14 @@
|
|
39 |
$user_login = $user_email;
|
40 |
}
|
41 |
|
42 |
-
if ( isset( $username ) && !isset($user_login) ) {
|
43 |
$user_login = $username;
|
44 |
}
|
45 |
-
|
46 |
if ( isset( $username ) && is_email( $username ) ) {
|
47 |
$user_email = $username;
|
48 |
}
|
49 |
-
|
50 |
if (!isset($user_password)){
|
51 |
$user_password = $ultimatemember->validation->generate();
|
52 |
}
|
39 |
$user_login = $user_email;
|
40 |
}
|
41 |
|
42 |
+
if ( isset( $username ) && !isset($args['user_login']) ) {
|
43 |
$user_login = $username;
|
44 |
}
|
45 |
+
|
46 |
if ( isset( $username ) && is_email( $username ) ) {
|
47 |
$user_email = $username;
|
48 |
}
|
49 |
+
|
50 |
if (!isset($user_password)){
|
51 |
$user_password = $ultimatemember->validation->generate();
|
52 |
}
|
core/um-fields.php
CHANGED
@@ -406,6 +406,10 @@ class UM_Fields {
|
|
406 |
return true;
|
407 |
}
|
408 |
|
|
|
|
|
|
|
|
|
409 |
if ( isset($data['default']) && !is_array($data['default']) && $data['default'] == $value ) {
|
410 |
return true;
|
411 |
}
|
@@ -1013,7 +1017,7 @@ class UM_Fields {
|
|
1013 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">';
|
1014 |
|
1015 |
if ( isset( $data['label'] ) ) {
|
1016 |
-
$output .= $this->field_label( sprintf(__('Confirm
|
1017 |
}
|
1018 |
|
1019 |
$output .= '<div class="um-field-area">';
|
406 |
return true;
|
407 |
}
|
408 |
|
409 |
+
if ( strstr( $data['default'], ', ') ) {
|
410 |
+
$data['default'] = explode(', ', $data['default']);
|
411 |
+
}
|
412 |
+
|
413 |
if ( isset($data['default']) && !is_array($data['default']) && $data['default'] == $value ) {
|
414 |
return true;
|
415 |
}
|
1017 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">';
|
1018 |
|
1019 |
if ( isset( $data['label'] ) ) {
|
1020 |
+
$output .= $this->field_label( sprintf(__('Confirm %s','ultimatemember'), $data['label'] ), $key, $data);
|
1021 |
}
|
1022 |
|
1023 |
$output .= '<div class="um-field-area">';
|
core/um-filters-members.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
foreach( $ultimatemember->members->core_search_fields as $key ) {
|
21 |
if ( isset( $query[$key] ) ) {
|
22 |
$query_args['search'] = '*' . $query[$key] . '*';
|
23 |
-
$query_args['search_columns'] = array( 'user_login', 'user_email' );
|
24 |
}
|
25 |
}
|
26 |
|
20 |
foreach( $ultimatemember->members->core_search_fields as $key ) {
|
21 |
if ( isset( $query[$key] ) ) {
|
22 |
$query_args['search'] = '*' . $query[$key] . '*';
|
23 |
+
$query_args['search_columns'] = array( 'user_login', 'user_email', 'display_name' );
|
24 |
}
|
25 |
}
|
26 |
|
core/um-form.php
CHANGED
@@ -81,7 +81,7 @@ class UM_Form {
|
|
81 |
if ( $form_timestamp == '' )
|
82 |
wp_die( __('Hello, spam bot!') );
|
83 |
|
84 |
-
if ( $live_timestamp - $form_timestamp <
|
85 |
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') );
|
86 |
|
87 |
}
|
81 |
if ( $form_timestamp == '' )
|
82 |
wp_die( __('Hello, spam bot!') );
|
83 |
|
84 |
+
if ( $live_timestamp - $form_timestamp < 3 )
|
85 |
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') );
|
86 |
|
87 |
}
|
core/um-members.php
CHANGED
@@ -6,15 +6,26 @@ class UM_Members {
|
|
6 |
|
7 |
add_filter('pre_user_query', array(&$this, 'custom_order_query') );
|
8 |
|
|
|
|
|
9 |
add_action('template_redirect', array(&$this, 'access_members'), 555);
|
10 |
|
11 |
$this->core_search_fields = array(
|
12 |
'user_login',
|
13 |
'username',
|
|
|
14 |
);
|
15 |
|
16 |
}
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/***
|
19 |
*** @Members page allowed?
|
20 |
***/
|
6 |
|
7 |
add_filter('pre_user_query', array(&$this, 'custom_order_query') );
|
8 |
|
9 |
+
add_filter('user_search_columns', array(&$this, 'add_display_name'), 99 );
|
10 |
+
|
11 |
add_action('template_redirect', array(&$this, 'access_members'), 555);
|
12 |
|
13 |
$this->core_search_fields = array(
|
14 |
'user_login',
|
15 |
'username',
|
16 |
+
'display_name',
|
17 |
);
|
18 |
|
19 |
}
|
20 |
|
21 |
+
/***
|
22 |
+
*** @Add display name
|
23 |
+
***/
|
24 |
+
function add_display_name(){
|
25 |
+
$search_columns[] = 'display_name';
|
26 |
+
return $search_columns;
|
27 |
+
}
|
28 |
+
|
29 |
/***
|
30 |
*** @Members page allowed?
|
31 |
***/
|
core/um-short-functions.php
CHANGED
@@ -94,7 +94,7 @@ function um_user_ip() {
|
|
94 |
***/
|
95 |
function um_cap_initials( $name ) {
|
96 |
if ( is_email( $name ) ) return $name;
|
97 |
-
$name = str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ',
|
98 |
return $name;
|
99 |
}
|
100 |
|
94 |
***/
|
95 |
function um_cap_initials( $name ) {
|
96 |
if ( is_email( $name ) ) return $name;
|
97 |
+
$name = str_replace('\' ', '\'', ucwords( str_replace('\'', '\' ', mb_strtolower($name, 'UTF-8') ) ) );
|
98 |
return $name;
|
99 |
}
|
100 |
|
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.
|
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.58
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.1
|
9 |
|
10 |
-
Stable Tag: 1.0.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -187,6 +187,14 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= 1.0.57: February 16, 2015 =
|
191 |
|
192 |
* Tweak: Italian language up-to-date
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.1
|
9 |
|
10 |
+
Stable Tag: 1.0.58
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 1.0.58: February 16, 2015 =
|
191 |
+
|
192 |
+
* Fixed: display name as search field in member directory
|
193 |
+
* Fixed: translation issues in backend settings
|
194 |
+
* Fixed: issue with non-english letters in display names
|
195 |
+
* Fixed: bug with multiple default values for multi-select and checkbox fields
|
196 |
+
* Fixed: bug with multiple conditional logic based on different checkbox values
|
197 |
+
|
198 |
= 1.0.57: February 16, 2015 =
|
199 |
|
200 |
* Tweak: Italian language up-to-date
|
um-config.php
CHANGED
@@ -33,9 +33,9 @@ $this->sections[] = array(
|
|
33 |
'default' => 'user_login',
|
34 |
'desc' => 'e.g. ' . trailingslashit( um_get_core_page('user') ) .'<strong>username</strong>/',
|
35 |
'options' => array(
|
36 |
-
'user_login' => 'Username',
|
37 |
-
'name' => 'First and Last Name',
|
38 |
-
'user_id' => 'User ID',
|
39 |
),
|
40 |
'placeholder' => __('Select...','ultimatemember')
|
41 |
),
|
@@ -48,14 +48,14 @@ $this->sections[] = array(
|
|
48 |
'desc' => __( 'This is the name that will be displayed for users on the front end of your site. Default setting uses first/last name as display name if it exists','ultimatemember' ),
|
49 |
'default' => 'full_name',
|
50 |
'options' => array(
|
51 |
-
'username' => 'Username',
|
52 |
-
'full_name' => 'First name & last name',
|
53 |
-
'sur_name' => 'Last name & first name',
|
54 |
-
'initial_name' => 'First name & first initial of last name',
|
55 |
-
'initial_name_f' => 'First initial of first name & last name',
|
56 |
-
'first_name' => 'First name only',
|
57 |
-
'public_name' => 'Display name',
|
58 |
-
'field' => 'Custom field(s)',
|
59 |
),
|
60 |
'placeholder' => __('Select...')
|
61 |
),
|
@@ -561,7 +561,7 @@ $this->sections[] = array(
|
|
561 |
'id' => 'inactive_email_sub',
|
562 |
'type' => 'text',
|
563 |
'title' => __( 'Account Deactivated Email','ultimatemember' ),
|
564 |
-
'subtitle' => __( 'Subject Line' ),
|
565 |
'default' => 'Your account has been deactivated',
|
566 |
'required' => array( 'inactive_email_on', '=', 1 ),
|
567 |
'desc' => __('This is the subject line of the e-mail','ultimatemember'),
|
@@ -1548,7 +1548,7 @@ $this->sections[] = array(
|
|
1548 |
$this->sections[] = array(
|
1549 |
|
1550 |
'subsection' => true,
|
1551 |
-
'title' => __( 'Login Form'),
|
1552 |
'fields' => array(
|
1553 |
|
1554 |
array(
|
33 |
'default' => 'user_login',
|
34 |
'desc' => 'e.g. ' . trailingslashit( um_get_core_page('user') ) .'<strong>username</strong>/',
|
35 |
'options' => array(
|
36 |
+
'user_login' => __('Username','ultimatemember'),
|
37 |
+
'name' => __('First and Last Name','ultimatemember'),
|
38 |
+
'user_id' => __('User ID','ultimatemember'),
|
39 |
),
|
40 |
'placeholder' => __('Select...','ultimatemember')
|
41 |
),
|
48 |
'desc' => __( 'This is the name that will be displayed for users on the front end of your site. Default setting uses first/last name as display name if it exists','ultimatemember' ),
|
49 |
'default' => 'full_name',
|
50 |
'options' => array(
|
51 |
+
'username' => __('Username','ultimatemember'),
|
52 |
+
'full_name' => __('First name & last name','ultimatemember'),
|
53 |
+
'sur_name' => __('Last name & first name','ultimatemember'),
|
54 |
+
'initial_name' => __('First name & first initial of last name','ultimatemember'),
|
55 |
+
'initial_name_f' => __('First initial of first name & last name','ultimatemember'),
|
56 |
+
'first_name' => __('First name only','ultimatemember'),
|
57 |
+
'public_name' => __('Display name','ultimatemember'),
|
58 |
+
'field' => __('Custom field(s)','ultimatemember'),
|
59 |
),
|
60 |
'placeholder' => __('Select...')
|
61 |
),
|
561 |
'id' => 'inactive_email_sub',
|
562 |
'type' => 'text',
|
563 |
'title' => __( 'Account Deactivated Email','ultimatemember' ),
|
564 |
+
'subtitle' => __( 'Subject Line','ultimatemember' ),
|
565 |
'default' => 'Your account has been deactivated',
|
566 |
'required' => array( 'inactive_email_on', '=', 1 ),
|
567 |
'desc' => __('This is the subject line of the e-mail','ultimatemember'),
|
1548 |
$this->sections[] = array(
|
1549 |
|
1550 |
'subsection' => true,
|
1551 |
+
'title' => __( 'Login Form','ultimatemember'),
|
1552 |
'fields' => array(
|
1553 |
|
1554 |
array(
|