Version Description
Download this release
Release Info
| Developer | nsinelnikov |
| Plugin | |
| Version | 2.0.47 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.46 to 2.0.47
- assets/js/um-functions.js +4 -6
- assets/js/um-functions.min.js +1 -1
- assets/js/um-modal.js +1 -1
- assets/js/um-modal.min.js +1 -1
- assets/js/um-profile.js +11 -4
- assets/js/um-profile.min.js +1 -1
- assets/js/um-scripts.js +23 -31
- assets/js/um-scripts.min.js +1 -1
- includes/class-functions.php +3 -3
- includes/class-init.php +3 -1
- includes/core/class-fields.php +18 -16
- includes/core/class-validation.php +6 -5
- includes/core/um-actions-profile.php +44 -33
- languages/ultimate-member-en_US.mo +0 -0
- languages/ultimate-member-en_US.po +48 -45
- readme.txt +10 -1
- ultimate-member.php +1 -1
assets/js/um-functions.js
CHANGED
|
@@ -16,11 +16,9 @@ function UM_check_password_matched() {
|
|
| 16 |
}
|
| 17 |
|
| 18 |
function UM_hide_menus() {
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
menu.hide();
|
| 23 |
-
|
| 24 |
}
|
| 25 |
|
| 26 |
function UM_domenus(){
|
|
@@ -31,7 +29,7 @@ function UM_domenus(){
|
|
| 31 |
var element = jQuery(this).attr('data-element');
|
| 32 |
var position = jQuery(this).attr('data-position');
|
| 33 |
|
| 34 |
-
jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));
|
| 35 |
|
| 36 |
if ( jQuery(window).width() <= 1200 && element == 'div.um-profile-edit' ) {
|
| 37 |
position = 'lc';
|
| 16 |
}
|
| 17 |
|
| 18 |
function UM_hide_menus() {
|
| 19 |
+
var menu = jQuery( '.um-dropdown' );
|
| 20 |
+
menu.parents('div' ).find('a').removeClass( 'active' );
|
| 21 |
+
menu.hide();
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
function UM_domenus(){
|
| 29 |
var element = jQuery(this).attr('data-element');
|
| 30 |
var position = jQuery(this).attr('data-position');
|
| 31 |
|
| 32 |
+
jQuery( element ).addClass('um-trigger-menu-on-' + menu.attr( 'data-trigger' ) );
|
| 33 |
|
| 34 |
if ( jQuery(window).width() <= 1200 && element == 'div.um-profile-edit' ) {
|
| 35 |
position = 'lc';
|
assets/js/um-functions.min.js
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),i=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?i.removeClass("um-validate-matched").addClass("um-validate-not-matched"):i.removeClass("um-validate-not-matched").addClass("um-validate-matched"):i.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}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 e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),i=t.split(":");calcHeight=Math.round(a/i[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(r){r.data("upload_help_text")?upload_help_text='<span class="help">'+r.data("upload_help_text")+"</span>":upload_help_text="",r.data("icon")?icon='<span class="icon"><i class="'+r.data("icon")+'"></i></span>':icon="",r.data("upload_text")?upload_text='<span class="str">'+r.data("upload_text")+"</span>":upload_text="";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),r.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:r.data("key"),set_id:r.data("set_id"),set_mode:r.data("set_mode"),_wpnonce:r.data("nonce"),timestamp:r.data("timestamp"),user_id:e},fileName:r.data("key"),allowedTypes:r.data("allowed_types"),maxFileSize:r.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:r.data("max_size_error"),extErrorStr:r.data("extension_error"),maxFileCountErrorStr:r.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){r.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){r.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(r.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),r.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(t.data,function(e,t){var a=r.parents(".um-modal-body").find(".um-single-image-preview img"),i=r.parents(".um-modal-body").find(".um-single-image-preview"),o=new Date;a.attr("src",t.url+"?"+o.getTime()),a.data("file",t.file),a.load(function(){r.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),r.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(i){i.data("upload_help_text")?upload_help_text='<span class="help">'+i.data("upload_help_text")+"</span>":upload_help_text="",i.data("icon")?icon='<span class="icon"><i class="'+i.data("icon")+'"></i></span>':icon="",i.data("upload_text")?upload_text='<span class="str">'+i.data("upload_text")+"</span>":upload_text="",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),i.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:i.data("key"),set_id:i.data("set_id"),user_id:i.data("user_id"),set_mode:i.data("set_mode"),_wpnonce:i.data("nonce"),timestamp:i.data("timestamp")},fileName:i.data("key"),allowedTypes:i.data("allowed_types"),maxFileSize:i.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:i.data("max_size_error"),extErrorStr:i.data("extension_error"),maxFileCountErrorStr:i.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){i.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){i.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(i.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),i.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(t.data,function(e,t){i.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),i.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?i.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(t):"icon_bg"==e?i.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":t}):"filename"==e?i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",t):"original_name"==e?(i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",t),i.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(t)):"url"==e&&i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",t)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function initCrop_UM(){var t=jQuery(".um-modal .um-single-image-preview img").first(),e=jQuery(".um-modal .um-single-image-preview"),a=t.parent().attr("data-crop"),i=t.parent().attr("data-min_width"),o=t.parent().attr("data-min_height"),r=t.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))r=(r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio")).split(":")[0];if(t.length&&""!=t.attr("src")){var u=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(t.css({height:"auto"}),e.css({height:"auto"}),jQuery(window).height()<=400?(e.css({height:u+"px","max-height":u+"px"}),t.css({height:"auto"})):(t.css({height:"auto","max-height":u+"px"}),e.css({height:t.height(),"max-height":u+"px"})),"square"==a)var d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};else if("cover"==a){0<Math.round(i/r)&&(o=Math.round(i/r));d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}}}else if("user"==a)d={minWidth:i,minHeight:o,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};0!=a&&(t.cropper(d),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,i){if(0==jQuery("body").find(".um-modal-overlay").length)if(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()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var o=jQuery(".um-modal-photo img"),r=jQuery(window).width()-60,u=jQuery(window).height()-.25*jQuery(window).height();o.attr("src",i),o.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),o.css({opacity:0}),o.css({"max-width":r}),o.css({"max-height":u}),jQuery(".um-modal").css({width:o.width(),"margin-left":"-"+o.width()/2+"px"}),o.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),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 e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=jQuery(".um-modal:visible");if(jQuery(".um-modal-body.photo:visible").length){a.removeClass("uimob340"),a.removeClass("uimob500");var i=jQuery(".um-modal-photo img"),o=e-60,r=t-.25*t;i.css({opacity:0}),i.css({"max-width":o}),i.css({"max-height":r}),jQuery(".um-modal").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}),i.animate({opacity:1},1e3);var u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(a.length)if(a.removeClass("uimob340"),a.removeClass("uimob500"),e<=340)a.addClass("uimob340"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=500)a.addClass("uimob500"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=800){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(e<=960){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(960<e){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},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(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(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(){jQuery(".um-popup-overlay").length&&(jQuery(document).trigger("um_before_modal_removed"),jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),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(){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,350<ag_height&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
| 1 |
+
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),i=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?i.removeClass("um-validate-matched").addClass("um-validate-not-matched"):i.removeClass("um-validate-not-matched").addClass("um-validate-matched"):i.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){var e=jQuery(".um-dropdown");e.parents("div").find("a").removeClass("active"),e.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),i=t.split(":");calcHeight=Math.round(a/i[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(r){r.data("upload_help_text")?upload_help_text='<span class="help">'+r.data("upload_help_text")+"</span>":upload_help_text="",r.data("icon")?icon='<span class="icon"><i class="'+r.data("icon")+'"></i></span>':icon="",r.data("upload_text")?upload_text='<span class="str">'+r.data("upload_text")+"</span>":upload_text="";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),r.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:r.data("key"),set_id:r.data("set_id"),set_mode:r.data("set_mode"),_wpnonce:r.data("nonce"),timestamp:r.data("timestamp"),user_id:e},fileName:r.data("key"),allowedTypes:r.data("allowed_types"),maxFileSize:r.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:r.data("max_size_error"),extErrorStr:r.data("extension_error"),maxFileCountErrorStr:r.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){r.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){r.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(r.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),r.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(t.data,function(e,t){var a=r.parents(".um-modal-body").find(".um-single-image-preview img"),i=r.parents(".um-modal-body").find(".um-single-image-preview"),o=new Date;a.attr("src",t.url+"?"+o.getTime()),a.data("file",t.file),a.load(function(){r.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),r.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(i){i.data("upload_help_text")?upload_help_text='<span class="help">'+i.data("upload_help_text")+"</span>":upload_help_text="",i.data("icon")?icon='<span class="icon"><i class="'+i.data("icon")+'"></i></span>':icon="",i.data("upload_text")?upload_text='<span class="str">'+i.data("upload_text")+"</span>":upload_text="",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),i.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:i.data("key"),set_id:i.data("set_id"),user_id:i.data("user_id"),set_mode:i.data("set_mode"),_wpnonce:i.data("nonce"),timestamp:i.data("timestamp")},fileName:i.data("key"),allowedTypes:i.data("allowed_types"),maxFileSize:i.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:i.data("max_size_error"),extErrorStr:i.data("extension_error"),maxFileCountErrorStr:i.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){i.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){i.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(i.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),i.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(t.data,function(e,t){i.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),i.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?i.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(t):"icon_bg"==e?i.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":t}):"filename"==e?i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",t):"original_name"==e?(i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",t),i.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(t)):"url"==e&&i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",t)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function initCrop_UM(){var t=jQuery(".um-modal .um-single-image-preview img").first(),e=jQuery(".um-modal .um-single-image-preview"),a=t.parent().attr("data-crop"),i=t.parent().attr("data-min_width"),o=t.parent().attr("data-min_height"),r=t.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))r=(r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio")).split(":")[0];if(t.length&&""!=t.attr("src")){var u=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(t.css({height:"auto"}),e.css({height:"auto"}),jQuery(window).height()<=400?(e.css({height:u+"px","max-height":u+"px"}),t.css({height:"auto"})):(t.css({height:"auto","max-height":u+"px"}),e.css({height:t.height(),"max-height":u+"px"})),"square"==a)var d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};else if("cover"==a){0<Math.round(i/r)&&(o=Math.round(i/r));d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}}}else if("user"==a)d={minWidth:i,minHeight:o,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};0!=a&&(t.cropper(d),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,i){if(0==jQuery("body").find(".um-modal-overlay").length)if(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()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var o=jQuery(".um-modal-photo img"),r=jQuery(window).width()-60,u=jQuery(window).height()-.25*jQuery(window).height();o.attr("src",i),o.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),o.css({opacity:0}),o.css({"max-width":r}),o.css({"max-height":u}),jQuery(".um-modal").css({width:o.width(),"margin-left":"-"+o.width()/2+"px"}),o.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),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 e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=jQuery(".um-modal:visible");if(jQuery(".um-modal-body.photo:visible").length){a.removeClass("uimob340"),a.removeClass("uimob500");var i=jQuery(".um-modal-photo img"),o=e-60,r=t-.25*t;i.css({opacity:0}),i.css({"max-width":o}),i.css({"max-height":r}),jQuery(".um-modal").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}),i.animate({opacity:1},1e3);var u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(a.length)if(a.removeClass("uimob340"),a.removeClass("uimob500"),e<=340)a.addClass("uimob340"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=500)a.addClass("uimob500"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=800){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(e<=960){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(960<e){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},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(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(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(){jQuery(".um-popup-overlay").length&&(jQuery(document).trigger("um_before_modal_removed"),jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),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(){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,350<ag_height&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
assets/js/um-modal.js
CHANGED
|
@@ -166,7 +166,7 @@ jQuery(document).ready(function() {
|
|
| 166 |
}
|
| 167 |
});
|
| 168 |
|
| 169 |
-
jQuery(document).on('click', 'a[data-modal^="um_"], span[data-modal^="um_"]', function(e){
|
| 170 |
|
| 171 |
var modal_id = jQuery(this).attr('data-modal');
|
| 172 |
|
| 166 |
}
|
| 167 |
});
|
| 168 |
|
| 169 |
+
jQuery(document.body).on('click', 'a[data-modal^="um_"], span[data-modal^="um_"]', function(e){
|
| 170 |
|
| 171 |
var modal_id = jQuery(this).attr('data-modal');
|
| 172 |
|
assets/js/um-modal.min.js
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
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(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-modal .um-single-file-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-fileinfo a").attr("href");return 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:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um-modal .um-single-image-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview img").attr("src");return 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:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html();um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a);var t=jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file");jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(t)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a=jQuery(this),t=jQuery(this).attr("data-key"),e=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),i=e.find("img").attr("src"),r=e.attr("data-coord"),u=e.find("img").data("file"),n=0;jQuery(this).parents("#um_upload_single").data("user_id")&&(n=jQuery(this).parents("#um_upload_single").data("user_id")),r?(jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:i,coord:r,user_id:n,key:t,nonce:um_scripts.nonce},success:function(e){1==e.success&&(d=new Date,"profile_photo"==t&&jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+d.getTime()),"cover_photo"==t&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+d.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing")&&jQuery(".um-cover-overlay").show()),jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(d=new Date,jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",i+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find("input[type=hidden]").val(u))}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";if(jQuery(this).data("modal-size"))t=jQuery(this).data("modal-size");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")),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")),0<jQuery("input[type=hidden][name='user_id']").length&&jQuery("#"+a).attr("data-user_id",jQuery("input[type=hidden][name='user_id']").val())),um_new_modal(a,t)})});
|
| 1 |
+
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(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-modal .um-single-file-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-fileinfo a").attr("href");return 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:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um-modal .um-single-image-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview img").attr("src");return 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:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html();um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a);var t=jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file");jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(t)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a=jQuery(this),t=jQuery(this).attr("data-key"),e=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),i=e.find("img").attr("src"),r=e.attr("data-coord"),u=e.find("img").data("file"),n=0;jQuery(this).parents("#um_upload_single").data("user_id")&&(n=jQuery(this).parents("#um_upload_single").data("user_id")),r?(jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:i,coord:r,user_id:n,key:t,nonce:um_scripts.nonce},success:function(e){1==e.success&&(d=new Date,"profile_photo"==t&&jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+d.getTime()),"cover_photo"==t&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+d.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing")&&jQuery(".um-cover-overlay").show()),jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(d=new Date,jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",i+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find("input[type=hidden]").val(u))}),jQuery(document.body).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";if(jQuery(this).data("modal-size"))t=jQuery(this).data("modal-size");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")),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")),0<jQuery("input[type=hidden][name='user_id']").length&&jQuery("#"+a).attr("data-user_id",jQuery("input[type=hidden][name='user_id']").val())),um_new_modal(a,t)})});
|
assets/js/um-profile.js
CHANGED
|
@@ -34,13 +34,15 @@ jQuery(document).ready(function() {
|
|
| 34 |
return false;
|
| 35 |
});
|
| 36 |
|
| 37 |
-
jQuery(document.body).on('click', '.um-reset-profile-photo', function(e){
|
| 38 |
|
| 39 |
-
jQuery('.um-profile-photo-img img').attr('src', jQuery(this).attr('data-default_src') );
|
| 40 |
|
| 41 |
user_id = jQuery(this).attr('data-user_id');
|
| 42 |
metakey = 'profile_photo';
|
| 43 |
|
|
|
|
|
|
|
| 44 |
jQuery.ajax({
|
| 45 |
url: wp.ajax.settings.url,
|
| 46 |
type: 'post',
|
|
@@ -52,13 +54,16 @@ jQuery(document).ready(function() {
|
|
| 52 |
}
|
| 53 |
});
|
| 54 |
|
|
|
|
|
|
|
| 55 |
});
|
| 56 |
|
| 57 |
jQuery(document.body).on('click', '.um-reset-cover-photo', function(e){
|
| 58 |
var obj = jQuery(this);
|
|
|
|
| 59 |
jQuery('.um-cover-overlay').hide();
|
| 60 |
-
|
| 61 |
-
jQuery('.um-
|
| 62 |
|
| 63 |
um_responsive();
|
| 64 |
|
|
@@ -79,6 +84,8 @@ jQuery(document).ready(function() {
|
|
| 79 |
}
|
| 80 |
});
|
| 81 |
|
|
|
|
|
|
|
| 82 |
});
|
| 83 |
|
| 84 |
/*function um_update_bio_countdown() {
|
| 34 |
return false;
|
| 35 |
});
|
| 36 |
|
| 37 |
+
jQuery(document.body).on('click', '.um-reset-profile-photo', function(e) {
|
| 38 |
|
| 39 |
+
jQuery('.um-profile-photo-img img').attr( 'src', jQuery(this).attr( 'data-default_src' ) );
|
| 40 |
|
| 41 |
user_id = jQuery(this).attr('data-user_id');
|
| 42 |
metakey = 'profile_photo';
|
| 43 |
|
| 44 |
+
UM_hide_menus();
|
| 45 |
+
|
| 46 |
jQuery.ajax({
|
| 47 |
url: wp.ajax.settings.url,
|
| 48 |
type: 'post',
|
| 54 |
}
|
| 55 |
});
|
| 56 |
|
| 57 |
+
jQuery(this).parents('li').hide();
|
| 58 |
+
return false;
|
| 59 |
});
|
| 60 |
|
| 61 |
jQuery(document.body).on('click', '.um-reset-cover-photo', function(e){
|
| 62 |
var obj = jQuery(this);
|
| 63 |
+
|
| 64 |
jQuery('.um-cover-overlay').hide();
|
| 65 |
+
|
| 66 |
+
jQuery('.um-cover-e').html('<a href="javascript:void(0);" class="um-cover-add" style="height: 370px;"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" original-title="Upload a cover photo"></i></span></a>');
|
| 67 |
|
| 68 |
um_responsive();
|
| 69 |
|
| 84 |
}
|
| 85 |
});
|
| 86 |
|
| 87 |
+
UM_hide_menus();
|
| 88 |
+
return false;
|
| 89 |
});
|
| 90 |
|
| 91 |
/*function um_update_bio_countdown() {
|
assets/js/um-profile.min.js
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
jQuery(document).ready(function(){jQuery(".um-profile.um-viewing .um-profile-body .um-row").each(function(){var e=jQuery(this);0==e.find(".um-field").length&&(e.prev(".um-row-heading").remove(),e.remove())}),jQuery(".um-profile.um-viewing .um-profile-body").length&&0==jQuery(".um-profile.um-viewing .um-profile-body").find(".um-field").length&&(jQuery(".um-row-heading,.um-row").remove(),jQuery(".um-profile-note").show()),jQuery(document.body).on("click",".um-profile-save",function(e){return e.preventDefault(),jQuery(this).parents(".um").find("form").submit(),!1}),jQuery(document.body).on("click",".um-profile-edit-a",function(e){jQuery(this).addClass("active")}),jQuery(document.body).on("click",".um-cover a.um-cover-add, .um-photo a",function(e){e.preventDefault()}),jQuery(document.body).on("click",".um-photo-modal",function(e){e.preventDefault();var t=jQuery(this).attr("data-src");return um_new_modal("um_view_photo","fit",!0,t),!1}),jQuery(document.body).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:wp.ajax.settings.url,type:"post",data:{action:"um_delete_profile_photo",metakey:metakey,user_id:user_id,nonce:um_scripts.nonce}})}),jQuery(document.body).on("click",".um-reset-cover-photo",function(e){var t=jQuery(this);jQuery(".um-cover-overlay").hide(),jQuery(".um-cover-e").html('<a href="
|
| 1 |
+
jQuery(document).ready(function(){jQuery(".um-profile.um-viewing .um-profile-body .um-row").each(function(){var e=jQuery(this);0==e.find(".um-field").length&&(e.prev(".um-row-heading").remove(),e.remove())}),jQuery(".um-profile.um-viewing .um-profile-body").length&&0==jQuery(".um-profile.um-viewing .um-profile-body").find(".um-field").length&&(jQuery(".um-row-heading,.um-row").remove(),jQuery(".um-profile-note").show()),jQuery(document.body).on("click",".um-profile-save",function(e){return e.preventDefault(),jQuery(this).parents(".um").find("form").submit(),!1}),jQuery(document.body).on("click",".um-profile-edit-a",function(e){jQuery(this).addClass("active")}),jQuery(document.body).on("click",".um-cover a.um-cover-add, .um-photo a",function(e){e.preventDefault()}),jQuery(document.body).on("click",".um-photo-modal",function(e){e.preventDefault();var t=jQuery(this).attr("data-src");return um_new_modal("um_view_photo","fit",!0,t),!1}),jQuery(document.body).on("click",".um-reset-profile-photo",function(e){return 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",UM_hide_menus(),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_profile_photo",metakey:metakey,user_id:user_id,nonce:um_scripts.nonce}}),jQuery(this).parents("li").hide(),!1}),jQuery(document.body).on("click",".um-reset-cover-photo",function(e){var t=jQuery(this);return jQuery(".um-cover-overlay").hide(),jQuery(".um-cover-e").html('<a href="javascript:void(0);" class="um-cover-add" style="height: 370px;"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" original-title="Upload a cover photo"></i></span></a>'),um_responsive(),user_id=jQuery(this).attr("data-user_id"),metakey="cover_photo",jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_cover_photo",metakey:metakey,user_id:user_id,nonce:um_scripts.nonce},success:function(e){t.hide()}}),UM_hide_menus(),!1}),jQuery(document.body).on("change, keyup",'textarea[id="um-meta-bio"]',function(){if(void 0!==jQuery(this).val()){var e=jQuery(this).attr("data-character-limit")-jQuery(this).val().length;jQuery("span.um-meta-bio-character span.um-bio-limit").text(e),e<5?jQuery("span.um-meta-bio-character").css("color","red"):jQuery("span.um-meta-bio-character").css("color","")}}),jQuery('textarea[id="um-meta-bio"]').trigger("change"),jQuery(".um-profile-edit a.um_delete-item").click(function(e){if(e.preventDefault(),!confirm("Are you sure that you want to delete this user?"))return!1}),jQuery(".um-profile-nav a").on("touchend",function(e){e.currentTarget.click()})});
|
assets/js/um-scripts.js
CHANGED
|
@@ -84,31 +84,28 @@ function um_init_datetimepicker() {
|
|
| 84 |
|
| 85 |
jQuery(document).ready(function() {
|
| 86 |
|
| 87 |
-
jQuery(document).on('click', '.um-dropdown a', function(e){
|
| 88 |
-
|
| 89 |
-
return false;
|
| 90 |
-
});
|
| 91 |
-
|
| 92 |
-
jQuery(document).on('click', '.um-dropdown a.real_url', function(e){
|
| 93 |
-
|
| 94 |
window.location = jQuery(this).attr('href');
|
| 95 |
});
|
| 96 |
|
| 97 |
-
jQuery(document).on('click', '.um-trigger-menu-on-click', function(e){
|
| 98 |
jQuery('.um-dropdown').hide();
|
| 99 |
-
menu = jQuery(this).find('.um-dropdown');
|
| 100 |
menu.show();
|
| 101 |
return false;
|
| 102 |
});
|
| 103 |
|
| 104 |
-
jQuery(document).on('click', '.um-dropdown-hide', function(e){
|
| 105 |
UM_hide_menus();
|
|
|
|
| 106 |
});
|
| 107 |
|
| 108 |
-
jQuery(document).on('click', 'a.um-manual-trigger', function(){
|
| 109 |
var child = jQuery(this).attr('data-child');
|
| 110 |
var parent = jQuery(this).attr('data-parent');
|
| 111 |
jQuery(this).parents( parent ).find( child ).trigger('click');
|
|
|
|
|
|
|
| 112 |
});
|
| 113 |
|
| 114 |
jQuery('.um-tip-n').tipsy({gravity: 'n', opacity: 1, live: 'a.live', offset: 3 });
|
|
@@ -116,7 +113,7 @@ jQuery(document).ready(function() {
|
|
| 116 |
jQuery('.um-tip-e').tipsy({gravity: 'e', opacity: 1, live: 'a.live', offset: 3 });
|
| 117 |
jQuery('.um-tip-s').tipsy({gravity: 's', opacity: 1, live: 'a.live', offset: 3 });
|
| 118 |
|
| 119 |
-
jQuery(document).on('change', '.um-field-area input[type=radio]', function(){
|
| 120 |
var field = jQuery(this).parents('.um-field-area');
|
| 121 |
var this_field = jQuery(this).parents('label');
|
| 122 |
field.find('.um-field-radio').removeClass('active');
|
|
@@ -125,7 +122,7 @@ jQuery(document).ready(function() {
|
|
| 125 |
this_field.find('i').removeAttr('class').addClass('um-icon-android-radio-button-on');
|
| 126 |
});
|
| 127 |
|
| 128 |
-
jQuery(document).on('change', '.um-field-area input[type=checkbox]', function(){
|
| 129 |
|
| 130 |
var field = jQuery(this).parents('.um-field-area');
|
| 131 |
var this_field = jQuery(this).parents('label');
|
|
@@ -220,8 +217,7 @@ jQuery(document).ready(function() {
|
|
| 220 |
}
|
| 221 |
|
| 222 |
jQuery(".um-s1").select2({
|
| 223 |
-
|
| 224 |
-
allowClear: true,
|
| 225 |
});
|
| 226 |
|
| 227 |
jQuery(".um-s2").select2({
|
|
@@ -363,16 +359,14 @@ jQuery(document).ready(function() {
|
|
| 363 |
});
|
| 364 |
|
| 365 |
jQuery(document).on('click', '#um-search-button', function() {
|
| 366 |
-
|
| 367 |
jQuery(this).parents('form').submit();
|
| 368 |
});
|
| 369 |
|
| 370 |
-
jQuery('.um-form input[class=um-button][type=submit]').removeAttr('disabled');
|
| 371 |
|
| 372 |
-
jQuery(document).one('click', '.um:not(.um-account) .um-form input[class=um-button][type=submit]:not(.um-has-recaptcha)', function() {
|
| 373 |
jQuery(this).attr('disabled','disabled');
|
| 374 |
jQuery(this).parents('form').submit();
|
| 375 |
-
|
| 376 |
});
|
| 377 |
|
| 378 |
|
|
@@ -393,10 +387,10 @@ jQuery(document).ready(function() {
|
|
| 393 |
|
| 394 |
jQuery(document).on('change','select[name="'+parent_option+'"]',function(){
|
| 395 |
var parent = jQuery(this);
|
| 396 |
-
var form_id = parent.closest('form').find('input[type=hidden][name=form_id]').val();
|
| 397 |
var arr_key = parent.val();
|
| 398 |
|
| 399 |
-
if( parent.val() != '' && typeof um_select_options_cache[ arr_key ] != 'object' ){
|
| 400 |
|
| 401 |
jQuery.ajax({
|
| 402 |
url: wp.ajax.settings.url,
|
|
@@ -428,12 +422,12 @@ jQuery(document).ready(function() {
|
|
| 428 |
|
| 429 |
}
|
| 430 |
|
| 431 |
-
if( parent.val() != '' && typeof um_select_options_cache[ arr_key ] == 'object' ) {
|
| 432 |
var data = um_select_options_cache[ arr_key ];
|
| 433 |
um_field_populate_child_options( me, data, arr_key );
|
| 434 |
}
|
| 435 |
|
| 436 |
-
if( parent.val() == '' ){
|
| 437 |
me.find('option[value!=""]').remove();
|
| 438 |
me.val('').trigger('change');
|
| 439 |
}
|
|
@@ -450,15 +444,13 @@ jQuery(document).ready(function() {
|
|
| 450 |
* @param array data
|
| 451 |
* @param string key
|
| 452 |
*/
|
| 453 |
-
function um_field_populate_child_options( me, data, arr_key, arr_items ){
|
| 454 |
-
|
| 455 |
-
|
| 456 |
var parent_option = me.data('um-parent');
|
| 457 |
var child_name = me.attr('name');
|
| 458 |
var parent_dom = jQuery('select[name="'+parent_option+'"]');
|
| 459 |
me.find('option[value!=""]').remove();
|
| 460 |
|
| 461 |
-
if( ! me.hasClass('um-child-option-disabled') ){
|
| 462 |
me.removeAttr('disabled');
|
| 463 |
}
|
| 464 |
|
|
@@ -481,13 +473,13 @@ jQuery(document).ready(function() {
|
|
| 481 |
});
|
| 482 |
|
| 483 |
if ( data.post.members_directory !== 'yes' ) {
|
| 484 |
-
if( typeof data.field.default !== 'undefined' && ! me.data('um-original-value') ){
|
| 485 |
me.val( data.field.default ).trigger('change');
|
| 486 |
-
}else if( me.data('um-original-value') != '' ){
|
| 487 |
me.val( me.data('um-original-value') ).trigger('change');
|
| 488 |
}
|
| 489 |
|
| 490 |
-
if( data.field.editable == 0 ){
|
| 491 |
me.addClass('um-child-option-disabled');
|
| 492 |
me.attr('disabled','disabled');
|
| 493 |
}
|
|
@@ -497,4 +489,4 @@ jQuery(document).ready(function() {
|
|
| 497 |
|
| 498 |
}
|
| 499 |
|
| 500 |
-
});
|
| 84 |
|
| 85 |
jQuery(document).ready(function() {
|
| 86 |
|
| 87 |
+
jQuery( document.body ).on('click', '.um-dropdown a.real_url', function(e){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
window.location = jQuery(this).attr('href');
|
| 89 |
});
|
| 90 |
|
| 91 |
+
jQuery( document.body ).on( 'click', '.um-trigger-menu-on-click', function(e) {
|
| 92 |
jQuery('.um-dropdown').hide();
|
| 93 |
+
var menu = jQuery(this).find('.um-dropdown');
|
| 94 |
menu.show();
|
| 95 |
return false;
|
| 96 |
});
|
| 97 |
|
| 98 |
+
jQuery( document.body ).on('click', '.um-dropdown-hide', function(e) {
|
| 99 |
UM_hide_menus();
|
| 100 |
+
return false;
|
| 101 |
});
|
| 102 |
|
| 103 |
+
jQuery( document.body ).on('click', 'a.um-manual-trigger', function(){
|
| 104 |
var child = jQuery(this).attr('data-child');
|
| 105 |
var parent = jQuery(this).attr('data-parent');
|
| 106 |
jQuery(this).parents( parent ).find( child ).trigger('click');
|
| 107 |
+
UM_hide_menus();
|
| 108 |
+
return false;
|
| 109 |
});
|
| 110 |
|
| 111 |
jQuery('.um-tip-n').tipsy({gravity: 'n', opacity: 1, live: 'a.live', offset: 3 });
|
| 113 |
jQuery('.um-tip-e').tipsy({gravity: 'e', opacity: 1, live: 'a.live', offset: 3 });
|
| 114 |
jQuery('.um-tip-s').tipsy({gravity: 's', opacity: 1, live: 'a.live', offset: 3 });
|
| 115 |
|
| 116 |
+
jQuery(document).on('change', '.um-field-area input[type="radio"]', function(){
|
| 117 |
var field = jQuery(this).parents('.um-field-area');
|
| 118 |
var this_field = jQuery(this).parents('label');
|
| 119 |
field.find('.um-field-radio').removeClass('active');
|
| 122 |
this_field.find('i').removeAttr('class').addClass('um-icon-android-radio-button-on');
|
| 123 |
});
|
| 124 |
|
| 125 |
+
jQuery(document).on('change', '.um-field-area input[type="checkbox"]', function(){
|
| 126 |
|
| 127 |
var field = jQuery(this).parents('.um-field-area');
|
| 128 |
var this_field = jQuery(this).parents('label');
|
| 217 |
}
|
| 218 |
|
| 219 |
jQuery(".um-s1").select2({
|
| 220 |
+
allowClear: true
|
|
|
|
| 221 |
});
|
| 222 |
|
| 223 |
jQuery(".um-s2").select2({
|
| 359 |
});
|
| 360 |
|
| 361 |
jQuery(document).on('click', '#um-search-button', function() {
|
|
|
|
| 362 |
jQuery(this).parents('form').submit();
|
| 363 |
});
|
| 364 |
|
| 365 |
+
jQuery('.um-form input[class="um-button"][type="submit"]').removeAttr('disabled');
|
| 366 |
|
| 367 |
+
jQuery(document).one('click', '.um:not(.um-account) .um-form input[class="um-button"][type="submit"]:not(.um-has-recaptcha)', function() {
|
| 368 |
jQuery(this).attr('disabled','disabled');
|
| 369 |
jQuery(this).parents('form').submit();
|
|
|
|
| 370 |
});
|
| 371 |
|
| 372 |
|
| 387 |
|
| 388 |
jQuery(document).on('change','select[name="'+parent_option+'"]',function(){
|
| 389 |
var parent = jQuery(this);
|
| 390 |
+
var form_id = parent.closest('form').find('input[type="hidden"][name="form_id"]').val();
|
| 391 |
var arr_key = parent.val();
|
| 392 |
|
| 393 |
+
if ( parent.val() != '' && typeof um_select_options_cache[ arr_key ] != 'object' ) {
|
| 394 |
|
| 395 |
jQuery.ajax({
|
| 396 |
url: wp.ajax.settings.url,
|
| 422 |
|
| 423 |
}
|
| 424 |
|
| 425 |
+
if ( parent.val() != '' && typeof um_select_options_cache[ arr_key ] == 'object' ) {
|
| 426 |
var data = um_select_options_cache[ arr_key ];
|
| 427 |
um_field_populate_child_options( me, data, arr_key );
|
| 428 |
}
|
| 429 |
|
| 430 |
+
if ( parent.val() == '' ){
|
| 431 |
me.find('option[value!=""]').remove();
|
| 432 |
me.val('').trigger('change');
|
| 433 |
}
|
| 444 |
* @param array data
|
| 445 |
* @param string key
|
| 446 |
*/
|
| 447 |
+
function um_field_populate_child_options( me, data, arr_key, arr_items ) {
|
|
|
|
|
|
|
| 448 |
var parent_option = me.data('um-parent');
|
| 449 |
var child_name = me.attr('name');
|
| 450 |
var parent_dom = jQuery('select[name="'+parent_option+'"]');
|
| 451 |
me.find('option[value!=""]').remove();
|
| 452 |
|
| 453 |
+
if ( ! me.hasClass('um-child-option-disabled') ) {
|
| 454 |
me.removeAttr('disabled');
|
| 455 |
}
|
| 456 |
|
| 473 |
});
|
| 474 |
|
| 475 |
if ( data.post.members_directory !== 'yes' ) {
|
| 476 |
+
if ( typeof data.field.default !== 'undefined' && ! me.data('um-original-value') ) {
|
| 477 |
me.val( data.field.default ).trigger('change');
|
| 478 |
+
} else if ( me.data('um-original-value') != '' ) {
|
| 479 |
me.val( me.data('um-original-value') ).trigger('change');
|
| 480 |
}
|
| 481 |
|
| 482 |
+
if ( data.field.editable == 0 ) {
|
| 483 |
me.addClass('um-child-option-disabled');
|
| 484 |
me.attr('disabled','disabled');
|
| 485 |
}
|
| 489 |
|
| 490 |
}
|
| 491 |
|
| 492 |
+
});
|
assets/js/um-scripts.min.js
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
function um_init_datetimepicker(){jQuery(".um-datepicker:not(.picker__input)").each(function(){if(elem=jQuery(this),void 0!==elem.attr("data-disabled_weekdays")&&""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=null;void 0!==elem.attr("data-years")&&(t=elem.attr("data-years"));var a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=[],n=[];void 0!==a&&(r=a.split(",")),void 0!==i&&(n=i.split(","));var u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var s=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(s))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var d=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(d))}var l={disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}};null!==t&&(l.selectYears=t),null!==u&&(l.min=u),null!==o&&(l.max=o),elem.pickadate(l)}),jQuery(".um-timepicker:not(.picker__input)").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})})}jQuery(document).ready(function(){jQuery(document
|
| 1 |
+
function um_init_datetimepicker(){jQuery(".um-datepicker:not(.picker__input)").each(function(){if(elem=jQuery(this),void 0!==elem.attr("data-disabled_weekdays")&&""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=null;void 0!==elem.attr("data-years")&&(t=elem.attr("data-years"));var a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=[],n=[];void 0!==a&&(r=a.split(",")),void 0!==i&&(n=i.split(","));var u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var s=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(s))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var d=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(d))}var l={disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}};null!==t&&(l.selectYears=t),null!==u&&(l.min=u),null!==o&&(l.max=o),elem.pickadate(l)}),jQuery(".um-timepicker:not(.picker__input)").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})})}jQuery(document).ready(function(){jQuery(document.body).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document.body).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),jQuery(this).find(".um-dropdown").show(),!1}),jQuery(document.body).on("click",".um-dropdown-hide",function(e){return UM_hide_menus(),!1}),jQuery(document.body).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");return jQuery(this).parents(t).find(e).trigger("click"),UM_hide_menus(),!1}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",'.um-field-area input[type="radio"]',function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",'.um-field-area input[type="checkbox"]',function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),um_init_datetimepicker(),jQuery(".um-rating").um_raty({half:!1,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:!1,click:function(e,t){live_field=this.id,live_value=e,um_apply_conditions(jQuery(this),!1)}}),jQuery(".um-rating-readonly").um_raty({half:!1,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:!1,readOnly:!0}),jQuery(document).on("click",".um .um-single-image-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-image-preview img").attr("src");return t.find(".um-single-image-preview img").attr("src",""),t.find(".um-single-image-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um .um-single-file-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-fileinfo a").attr("href");return t.find(".um-single-file-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a,nonce:um_scripts.nonce}}),!1}),jQuery(".um-s1,.um-s2").css({display:"block"}),0<jQuery(".um-s1").length&&jQuery(".um-s1").each(function(){var e=jQuery(this);""===e.val()&&e.attr("data-default")&&e.val(e.attr("data-default"))}),jQuery(".um-s1").select2({allowClear:!0}),jQuery(".um-s2").select2({allowClear:!1,minimumResultsForSearch:10}),jQuery(document).on("click",".um-field-group-head:not(.disabled)",function(){var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries");e.find(".um-field-group-body").is(":hidden")?e.find(".um-field-group-body").show():e.find(".um-field-group-body:first").clone().appendTo(e),increase_id=0,e.find(".um-field-group-body").each(function(){increase_id++,jQuery(this).find("input").each(function(){var e=jQuery(this);e.attr("id",e.data("key")+"-"+increase_id),e.attr("name",e.data("key")+"-"+increase_id),e.parent().parent().find("label").attr("for",e.data("key")+"-"+increase_id)})}),0<t&&e.find(".um-field-group-body").length==t&&jQuery(this).addClass("disabled")}),jQuery(document).on("click",".um-field-group-cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field-group"),a=t.data("max_entries");return 1<t.find(".um-field-group-body").length?jQuery(this).parents(".um-field-group-body").remove():jQuery(this).parents(".um-field-group-body").hide(),0<a&&t.find(".um-field-group-body").length<a&&t.find(".um-field-group-head").removeClass("disabled"),!1}),jQuery(document.body).on("click",".um-ajax-paginate",function(e){e.preventDefault();var t=jQuery(this),a=jQuery(this).parent();a.addClass("loading");var i=jQuery(this).data("hook");if("um_load_posts"===i){var r=1*jQuery(this).data("pages"),n=1*jQuery(this).data("page")+1;jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_posts",author:jQuery(this).data("author"),page:n,nonce:um_scripts.nonce},complete:function(){a.removeClass("loading")},success:function(e){a.before(e),n===r?a.remove():t.data("page",n)}})}else{var u=jQuery(this).data("args"),o=jQuery(this).parents(".um").find(".um-ajax-items");jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate",hook:i,args:u,nonce:um_scripts.nonce},complete:function(){a.removeClass("loading")},success:function(e){a.remove(),o.append(e)}})}}),jQuery(document).on("click",".um-ajax-action",function(e){e.preventDefault();var t=jQuery(this).data("hook"),a=jQuery(this).data("user_id"),arguments=jQuery(this).data("arguments");return jQuery(this).data("js-remove")&&jQuery(this).parents("."+jQuery(this).data("js-remove")).fadeOut("fast"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_muted_action",hook:t,user_id:a,arguments:arguments,nonce:um_scripts.nonce},success:function(e){}}),!1}),jQuery(document).on("click","#um-search-button",function(){jQuery(this).parents("form").submit()}),jQuery('.um-form input[class="um-button"][type="submit"]').removeAttr("disabled"),jQuery(document).one("click",'.um:not(.um-account) .um-form input[class="um-button"][type="submit"]:not(.um-has-recaptcha)',function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parents("form").submit()});var o={};function s(e,t,a,i){var r=e.data("um-parent");e.attr("name"),jQuery('select[name="'+r+'"]');e.find('option[value!=""]').remove(),e.hasClass("um-child-option-disabled")||e.removeAttr("disabled");i=[];var n="";if("yes"===t.post.members_directory){var u=new URLSearchParams(window.location.search);n=u.get(t.post.child_name)}jQuery.each(t.items,function(e,t){i.push({id:e,text:t,selected:t===n})}),e.select2("destroy"),e.select2({data:i,allowClear:!0,minimumResultsForSearch:10}),"yes"!==t.post.members_directory&&(void 0===t.field.default||e.data("um-original-value")?""!=e.data("um-original-value")&&e.val(e.data("um-original-value")).trigger("change"):e.val(t.field.default).trigger("change"),0==t.field.editable&&(e.addClass("um-child-option-disabled"),e.attr("disabled","disabled"))),o[a]=t}jQuery("select[data-um-parent]").each(function(){var r=jQuery(this),n=r.data("um-parent"),u=(r.data("um-ajax-url"),r.data("um-ajax-source"));r.val();r.attr("data-um-init-field",!0),jQuery(document).on("change",'select[name="'+n+'"]',function(){var t=jQuery(this),e=t.closest("form").find('input[type="hidden"][name="form_id"]').val(),a=t.val();if(""!=t.val()&&"object"!=typeof o[a]&&jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_select_options",parent_option_name:n,parent_option:t.val(),child_callback:u,child_name:r.attr("name"),members_directory:r.attr("data-mebers-directory"),form_id:e,nonce:um_scripts.nonce},success:function(e){"success"==e.status&&""!=t.val()&&s(r,e,a),void 0!==e.debug&&console.log(e)},error:function(e){console.log(e)}}),""!=t.val()&&"object"==typeof o[a]){var i=o[a];s(r,i,a)}""==t.val()&&(r.find('option[value!=""]').remove(),r.val("").trigger("change"))}),jQuery('select[name="'+n+'"]').trigger("change")})});
|
includes/class-functions.php
CHANGED
|
@@ -167,7 +167,7 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
|
| 167 |
}
|
| 168 |
|
| 169 |
$path = '';
|
| 170 |
-
if( $basename ) {
|
| 171 |
$array = explode( '/', trim( $basename, '/' ) );
|
| 172 |
$path = $array[0];
|
| 173 |
}
|
|
@@ -279,8 +279,8 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
|
| 279 |
trailingslashit( 'ultimate-member/' . $path ) . $template_name
|
| 280 |
) );
|
| 281 |
|
| 282 |
-
if(
|
| 283 |
-
if( $path ) {
|
| 284 |
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path );
|
| 285 |
} else {
|
| 286 |
$template = trailingslashit( um_path );
|
| 167 |
}
|
| 168 |
|
| 169 |
$path = '';
|
| 170 |
+
if ( $basename ) {
|
| 171 |
$array = explode( '/', trim( $basename, '/' ) );
|
| 172 |
$path = $array[0];
|
| 173 |
}
|
| 279 |
trailingslashit( 'ultimate-member/' . $path ) . $template_name
|
| 280 |
) );
|
| 281 |
|
| 282 |
+
if ( ! $template ) {
|
| 283 |
+
if ( $path ) {
|
| 284 |
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path );
|
| 285 |
} else {
|
| 286 |
$template = trailingslashit( um_path );
|
includes/class-init.php
CHANGED
|
@@ -1417,10 +1417,11 @@ if ( ! class_exists( 'UM' ) ) {
|
|
| 1417 |
return $this->classes['mobile'];
|
| 1418 |
}
|
| 1419 |
|
|
|
|
| 1420 |
/**
|
| 1421 |
* @since 2.0.44
|
| 1422 |
*
|
| 1423 |
-
* @return um\
|
| 1424 |
*/
|
| 1425 |
function multisite() {
|
| 1426 |
|
|
@@ -1431,6 +1432,7 @@ if ( ! class_exists( 'UM' ) ) {
|
|
| 1431 |
return $this->classes['multisite'];
|
| 1432 |
}
|
| 1433 |
|
|
|
|
| 1434 |
/**
|
| 1435 |
* Include files with hooked filters/actions
|
| 1436 |
*
|
| 1417 |
return $this->classes['mobile'];
|
| 1418 |
}
|
| 1419 |
|
| 1420 |
+
|
| 1421 |
/**
|
| 1422 |
* @since 2.0.44
|
| 1423 |
*
|
| 1424 |
+
* @return um\core\Multisite
|
| 1425 |
*/
|
| 1426 |
function multisite() {
|
| 1427 |
|
| 1432 |
return $this->classes['multisite'];
|
| 1433 |
}
|
| 1434 |
|
| 1435 |
+
|
| 1436 |
/**
|
| 1437 |
* Include files with hooked filters/actions
|
| 1438 |
*
|
includes/core/class-fields.php
CHANGED
|
@@ -687,6 +687,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 687 |
* ?>
|
| 688 |
*/
|
| 689 |
$value = apply_filters( "um_edit_{$key}_field_value", $value, $key );
|
|
|
|
| 690 |
|
| 691 |
} elseif ( $default ) {
|
| 692 |
|
|
@@ -786,6 +787,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 786 |
*/
|
| 787 |
$value = apply_filters( "um_edit_{$key}_field_value", $default, $key );
|
| 788 |
|
|
|
|
|
|
|
| 789 |
} elseif ( ! isset( $value ) ) {
|
| 790 |
$value = '';
|
| 791 |
}
|
|
@@ -2304,13 +2307,13 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2304 |
$img = '';
|
| 2305 |
}
|
| 2306 |
$output .= '<div class="um-single-image-preview show ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
| 2307 |
-
<a href="
|
| 2308 |
-
</div><a href="
|
| 2309 |
} else {
|
| 2310 |
$output .= '<div class="um-single-image-preview ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
| 2311 |
-
<a href="
|
| 2312 |
<img src="" alt="" />
|
| 2313 |
-
<div class="um-clear"></div></div><a href="
|
| 2314 |
}
|
| 2315 |
$output .= '</div>';
|
| 2316 |
/* modal hidden */
|
|
@@ -2446,18 +2449,18 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2446 |
|
| 2447 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
|
| 2448 |
|
| 2449 |
-
if (isset( $data['allowclear'] ) && $data['allowclear'] == 0) {
|
| 2450 |
$class = 'um-s2';
|
| 2451 |
} else {
|
| 2452 |
$class = 'um-s1';
|
| 2453 |
}
|
| 2454 |
|
| 2455 |
-
if (isset( $data['label'] )) {
|
| 2456 |
$output .= $this->field_label( $label, $key, $data );
|
| 2457 |
}
|
| 2458 |
|
| 2459 |
$output .= '<div class="um-field-area ' . ( isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
| 2460 |
-
if (isset( $icon ) && $icon && isset( $this->field_icons ) && $this->field_icons == 'field') {
|
| 2461 |
$output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
|
| 2462 |
}
|
| 2463 |
|
|
@@ -2466,7 +2469,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2466 |
$atts_ajax = '';
|
| 2467 |
$select_original_option_value = '';
|
| 2468 |
|
| 2469 |
-
if (
|
| 2470 |
|
| 2471 |
$disabled_by_parent_option = 'disabled = disabled';
|
| 2472 |
|
|
@@ -2496,20 +2499,19 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2496 |
$parent_dropdown_relationship = apply_filters( "um_custom_dropdown_options_parent__{$form_key}", $data['parent_dropdown_relationship'], $data );
|
| 2497 |
$atts_ajax .= " data-um-parent='{$parent_dropdown_relationship}' ";
|
| 2498 |
|
| 2499 |
-
if (
|
| 2500 |
-
$has_parent_option && function_exists( $data['custom_dropdown_options_source'] ) &&
|
| 2501 |
um_user( $data['parent_dropdown_relationship'] )
|
| 2502 |
) {
|
| 2503 |
$options = call_user_func( $data['custom_dropdown_options_source'], $data['parent_dropdown_relationship'] );
|
| 2504 |
$disabled_by_parent_option = '';
|
| 2505 |
-
if (um_user( $form_key )) {
|
| 2506 |
$select_original_option_value = " data-um-original-value='" . um_user( $form_key ) . "' ";
|
| 2507 |
}
|
| 2508 |
}
|
| 2509 |
|
| 2510 |
}
|
| 2511 |
|
| 2512 |
-
if (!empty( $data['custom_dropdown_options_source'] )) {
|
| 2513 |
|
| 2514 |
/**
|
| 2515 |
* UM hook
|
|
@@ -2589,12 +2591,12 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2589 |
*/
|
| 2590 |
$enable_options_pair = apply_filters( "um_fields_options_enable_pairs__{$key}", false );
|
| 2591 |
|
| 2592 |
-
if( ! $has_parent_option ) {
|
| 2593 |
-
if ( isset($options) && $options == 'builtin'){
|
| 2594 |
$options = UM()->builtin()->get ( $filter );
|
| 2595 |
}
|
| 2596 |
|
| 2597 |
-
if ( ! isset( $options )) {
|
| 2598 |
$options = UM()->builtin()->get( 'countries' );
|
| 2599 |
}
|
| 2600 |
|
|
@@ -2684,7 +2686,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
| 2684 |
$um_field_checkbox_item_title = $v;
|
| 2685 |
}
|
| 2686 |
|
| 2687 |
-
if (isset( $options_pair )) {
|
| 2688 |
$option_value = $k;
|
| 2689 |
$um_field_checkbox_item_title = $v;
|
| 2690 |
}
|
| 687 |
* ?>
|
| 688 |
*/
|
| 689 |
$value = apply_filters( "um_edit_{$key}_field_value", $value, $key );
|
| 690 |
+
$value = maybe_unserialize( $value );
|
| 691 |
|
| 692 |
} elseif ( $default ) {
|
| 693 |
|
| 787 |
*/
|
| 788 |
$value = apply_filters( "um_edit_{$key}_field_value", $default, $key );
|
| 789 |
|
| 790 |
+
} elseif ( isset( $value ) && is_array( $value ) && ! count( $value ) ) {
|
| 791 |
+
$value = '';
|
| 792 |
} elseif ( ! isset( $value ) ) {
|
| 793 |
$value = '';
|
| 794 |
}
|
| 2307 |
$img = '';
|
| 2308 |
}
|
| 2309 |
$output .= '<div class="um-single-image-preview show ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
| 2310 |
+
<a href="javascript:void(0);" class="cancel"><i class="um-icon-close"></i></a>' . $img . '
|
| 2311 |
+
</div><a href="javascript:void(0);" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>';
|
| 2312 |
} else {
|
| 2313 |
$output .= '<div class="um-single-image-preview ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
| 2314 |
+
<a href="javascript:void(0);" class="cancel"><i class="um-icon-close"></i></a>
|
| 2315 |
<img src="" alt="" />
|
| 2316 |
+
<div class="um-clear"></div></div><a href="javascript:void(0);" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . $button_text . '</a>';
|
| 2317 |
}
|
| 2318 |
$output .= '</div>';
|
| 2319 |
/* modal hidden */
|
| 2449 |
|
| 2450 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
|
| 2451 |
|
| 2452 |
+
if ( isset( $data['allowclear'] ) && $data['allowclear'] == 0 ) {
|
| 2453 |
$class = 'um-s2';
|
| 2454 |
} else {
|
| 2455 |
$class = 'um-s1';
|
| 2456 |
}
|
| 2457 |
|
| 2458 |
+
if ( isset( $data['label'] ) ) {
|
| 2459 |
$output .= $this->field_label( $label, $key, $data );
|
| 2460 |
}
|
| 2461 |
|
| 2462 |
$output .= '<div class="um-field-area ' . ( isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
| 2463 |
+
if ( isset( $icon ) && $icon && isset( $this->field_icons ) && $this->field_icons == 'field' ) {
|
| 2464 |
$output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
|
| 2465 |
}
|
| 2466 |
|
| 2469 |
$atts_ajax = '';
|
| 2470 |
$select_original_option_value = '';
|
| 2471 |
|
| 2472 |
+
if ( ! empty( $data['parent_dropdown_relationship'] ) && ! UM()->user()->preview ) {
|
| 2473 |
|
| 2474 |
$disabled_by_parent_option = 'disabled = disabled';
|
| 2475 |
|
| 2499 |
$parent_dropdown_relationship = apply_filters( "um_custom_dropdown_options_parent__{$form_key}", $data['parent_dropdown_relationship'], $data );
|
| 2500 |
$atts_ajax .= " data-um-parent='{$parent_dropdown_relationship}' ";
|
| 2501 |
|
| 2502 |
+
if ( ! empty( $data['custom_dropdown_options_source'] ) && $has_parent_option && function_exists( $data['custom_dropdown_options_source'] ) &&
|
|
|
|
| 2503 |
um_user( $data['parent_dropdown_relationship'] )
|
| 2504 |
) {
|
| 2505 |
$options = call_user_func( $data['custom_dropdown_options_source'], $data['parent_dropdown_relationship'] );
|
| 2506 |
$disabled_by_parent_option = '';
|
| 2507 |
+
if ( um_user( $form_key ) ) {
|
| 2508 |
$select_original_option_value = " data-um-original-value='" . um_user( $form_key ) . "' ";
|
| 2509 |
}
|
| 2510 |
}
|
| 2511 |
|
| 2512 |
}
|
| 2513 |
|
| 2514 |
+
if ( ! empty( $data['custom_dropdown_options_source'] ) ) {
|
| 2515 |
|
| 2516 |
/**
|
| 2517 |
* UM hook
|
| 2591 |
*/
|
| 2592 |
$enable_options_pair = apply_filters( "um_fields_options_enable_pairs__{$key}", false );
|
| 2593 |
|
| 2594 |
+
if ( ! $has_parent_option ) {
|
| 2595 |
+
if ( isset( $options ) && $options == 'builtin' ) {
|
| 2596 |
$options = UM()->builtin()->get ( $filter );
|
| 2597 |
}
|
| 2598 |
|
| 2599 |
+
if ( ! isset( $options ) ) {
|
| 2600 |
$options = UM()->builtin()->get( 'countries' );
|
| 2601 |
}
|
| 2602 |
|
| 2686 |
$um_field_checkbox_item_title = $v;
|
| 2687 |
}
|
| 2688 |
|
| 2689 |
+
if ( isset( $options_pair ) ) {
|
| 2690 |
$option_value = $k;
|
| 2691 |
$um_field_checkbox_item_title = $v;
|
| 2692 |
}
|
includes/core/class-validation.php
CHANGED
|
@@ -73,18 +73,19 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
|
| 73 |
}
|
| 74 |
|
| 75 |
//validation of correct values from options in wp-admin
|
|
|
|
| 76 |
if ( in_array( $fields[ $key ]['type'], array( 'select' ) ) &&
|
| 77 |
-
|
| 78 |
-
! in_array( $
|
| 79 |
unset( $changes[ $key ] );
|
| 80 |
}
|
| 81 |
|
| 82 |
//validation of correct values from options in wp-admin
|
| 83 |
//the user cannot set invalid value in the hidden input at the page
|
| 84 |
if ( in_array( $fields[ $key ]['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
$changes[ $key ] = array_intersect( $value, $fields[ $key ]['options'] );
|
| 88 |
}
|
| 89 |
|
| 90 |
}
|
| 73 |
}
|
| 74 |
|
| 75 |
//validation of correct values from options in wp-admin
|
| 76 |
+
$stripslashes = stripslashes( $value );
|
| 77 |
if ( in_array( $fields[ $key ]['type'], array( 'select' ) ) &&
|
| 78 |
+
! empty( $stripslashes ) && ! empty( $fields[ $key ]['options'] ) &&
|
| 79 |
+
! in_array( $stripslashes, array_map( 'trim', $fields[ $key ]['options'] ) ) ) {
|
| 80 |
unset( $changes[ $key ] );
|
| 81 |
}
|
| 82 |
|
| 83 |
//validation of correct values from options in wp-admin
|
| 84 |
//the user cannot set invalid value in the hidden input at the page
|
| 85 |
if ( in_array( $fields[ $key ]['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
| 86 |
+
! empty( $value ) && ! empty( $fields[ $key ]['options'] ) ) {
|
| 87 |
+
$value = array_map( 'stripslashes', array_map( 'trim', $value ) );
|
| 88 |
+
$changes[ $key ] = array_intersect( $value, array_map( 'trim', $fields[ $key ]['options'] ) );
|
| 89 |
}
|
| 90 |
|
| 91 |
}
|
includes/core/um-actions-profile.php
CHANGED
|
@@ -247,18 +247,19 @@ function um_user_edit_profile( $args ) {
|
|
| 247 |
}
|
| 248 |
|
| 249 |
//validation of correct values from options in wp-admin
|
|
|
|
| 250 |
if ( in_array( $array['type'], array( 'select' ) ) &&
|
| 251 |
-
|
| 252 |
-
! in_array( $
|
| 253 |
continue;
|
| 254 |
}
|
| 255 |
|
| 256 |
//validation of correct values from options in wp-admin
|
| 257 |
//the user cannot set invalid value in the hidden input at the page
|
| 258 |
if ( in_array( $array['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
$args['submitted'][ $key ] = array_intersect( $args['submitted'][ $key ], $array['options'] );
|
| 262 |
}
|
| 263 |
|
| 264 |
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
|
@@ -551,7 +552,7 @@ add_action( 'wp_head', 'um_profile_dynamic_meta_desc', 9999999 );
|
|
| 551 |
* @param $args
|
| 552 |
*/
|
| 553 |
function um_profile_header_cover_area( $args ) {
|
| 554 |
-
if ($args['cover_enabled'] == 1) {
|
| 555 |
|
| 556 |
$default_cover = UM()->options()->get( 'default_cover' );
|
| 557 |
|
|
@@ -566,7 +567,7 @@ function um_profile_header_cover_area( $args ) {
|
|
| 566 |
|
| 567 |
?>
|
| 568 |
|
| 569 |
-
<div class="um-cover <?php if (um_profile( 'cover_photo' ) || ( $default_cover && $default_cover['url'] )) echo 'has-cover'; ?>"
|
| 570 |
data-user_id="<?php echo um_profile_id(); ?>" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
| 571 |
|
| 572 |
<?php
|
|
@@ -594,27 +595,38 @@ function um_profile_header_cover_area( $args ) {
|
|
| 594 |
|
| 595 |
$hide_remove = um_profile( 'cover_photo' ) ? false : ' style="display:none;"';
|
| 596 |
|
|
|
|
|
|
|
| 597 |
$items = array(
|
| 598 |
-
'<a href="
|
| 599 |
-
'<a href="
|
| 600 |
-
'<a href="
|
| 601 |
);
|
| 602 |
|
| 603 |
UM()->profile()->new_ui( 'bc', 'div.um-cover', 'click', $items );
|
| 604 |
-
}
|
| 605 |
|
| 606 |
-
|
| 607 |
|
| 608 |
-
|
|
|
|
|
|
|
|
|
|
| 609 |
|
| 610 |
-
|
| 611 |
|
| 612 |
-
|
| 613 |
|
| 614 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 615 |
|
| 616 |
-
|
| 617 |
-
|
|
|
|
|
|
|
| 618 |
echo um_user( 'cover_photo', 1000 );
|
| 619 |
} else {
|
| 620 |
echo um_user( 'cover_photo', 300 );
|
|
@@ -623,9 +635,7 @@ function um_profile_header_cover_area( $args ) {
|
|
| 623 |
echo um_user( 'cover_photo', 1000 );
|
| 624 |
}
|
| 625 |
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
<?php } else if ($default_cover && $default_cover['url']) {
|
| 629 |
|
| 630 |
$default_cover = $default_cover['url'];
|
| 631 |
|
|
@@ -633,10 +643,9 @@ function um_profile_header_cover_area( $args ) {
|
|
| 633 |
|
| 634 |
} else {
|
| 635 |
|
| 636 |
-
if (!isset( UM()->user()->cannot_edit )) { ?>
|
| 637 |
|
| 638 |
-
<a href="
|
| 639 |
-
data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i
|
| 640 |
class="um-icon-plus um-tip-n"
|
| 641 |
title="<?php _e( 'Upload a cover photo', 'ultimate-member' ); ?>"></i></span></a>
|
| 642 |
|
|
@@ -646,6 +655,8 @@ function um_profile_header_cover_area( $args ) {
|
|
| 646 |
|
| 647 |
</div>
|
| 648 |
|
|
|
|
|
|
|
| 649 |
</div>
|
| 650 |
|
| 651 |
<?php
|
|
@@ -728,15 +739,15 @@ function um_profile_header( $args ) {
|
|
| 728 |
|
| 729 |
<?php
|
| 730 |
|
| 731 |
-
if (!isset( UM()->user()->cannot_edit )) {
|
| 732 |
|
| 733 |
UM()->fields()->add_hidden_field( 'profile_photo' );
|
| 734 |
|
| 735 |
-
if (!um_profile( 'profile_photo' )) { // has profile photo
|
| 736 |
|
| 737 |
$items = array(
|
| 738 |
-
'<a href="
|
| 739 |
-
'<a href="
|
| 740 |
);
|
| 741 |
|
| 742 |
/**
|
|
@@ -764,12 +775,12 @@ function um_profile_header( $args ) {
|
|
| 764 |
|
| 765 |
echo UM()->profile()->new_ui( 'bc', 'div.um-profile-photo', 'click', $items );
|
| 766 |
|
| 767 |
-
}
|
| 768 |
|
| 769 |
$items = array(
|
| 770 |
-
'<a href="
|
| 771 |
-
'<a href="
|
| 772 |
-
'<a href="
|
| 773 |
);
|
| 774 |
|
| 775 |
/**
|
|
@@ -1121,7 +1132,7 @@ function um_add_edit_icon( $args ) {
|
|
| 1121 |
'editprofile' => '<a href="' . um_edit_profile_url() . '" class="real_url">' . __( 'Edit Profile', 'ultimate-member' ) . '</a>',
|
| 1122 |
'myaccount' => '<a href="' . um_get_core_page( 'account' ) . '" class="real_url">' . __( 'My Account', 'ultimate-member' ) . '</a>',
|
| 1123 |
'logout' => '<a href="' . um_get_core_page( 'logout' ) . '" class="real_url">' . __( 'Logout', 'ultimate-member' ) . '</a>',
|
| 1124 |
-
'cancel' => '<a href="
|
| 1125 |
);
|
| 1126 |
|
| 1127 |
if ( ! empty( UM()->user()->cannot_edit ) ) {
|
| 247 |
}
|
| 248 |
|
| 249 |
//validation of correct values from options in wp-admin
|
| 250 |
+
$stripslashes = stripslashes( $args['submitted'][ $key ] );
|
| 251 |
if ( in_array( $array['type'], array( 'select' ) ) &&
|
| 252 |
+
! empty( $array['options'] ) && ! empty( $stripslashes ) &&
|
| 253 |
+
! in_array( $stripslashes, array_map( 'trim', $array['options'] ) ) ) {
|
| 254 |
continue;
|
| 255 |
}
|
| 256 |
|
| 257 |
//validation of correct values from options in wp-admin
|
| 258 |
//the user cannot set invalid value in the hidden input at the page
|
| 259 |
if ( in_array( $array['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
| 260 |
+
! empty( $args['submitted'][ $key ] ) && ! empty( $array['options'] ) ) {
|
| 261 |
+
$args['submitted'][ $key ] = array_map( 'stripslashes', array_map( 'trim', $args['submitted'][ $key ] ) );
|
| 262 |
+
$args['submitted'][ $key ] = array_intersect( $args['submitted'][ $key ], array_map( 'trim', $array['options'] ) );
|
| 263 |
}
|
| 264 |
|
| 265 |
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
| 552 |
* @param $args
|
| 553 |
*/
|
| 554 |
function um_profile_header_cover_area( $args ) {
|
| 555 |
+
if ( $args['cover_enabled'] == 1 ) {
|
| 556 |
|
| 557 |
$default_cover = UM()->options()->get( 'default_cover' );
|
| 558 |
|
| 567 |
|
| 568 |
?>
|
| 569 |
|
| 570 |
+
<div class="um-cover <?php if ( um_profile( 'cover_photo' ) || ( $default_cover && $default_cover['url'] ) ) echo 'has-cover'; ?>"
|
| 571 |
data-user_id="<?php echo um_profile_id(); ?>" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
| 572 |
|
| 573 |
<?php
|
| 595 |
|
| 596 |
$hide_remove = um_profile( 'cover_photo' ) ? false : ' style="display:none;"';
|
| 597 |
|
| 598 |
+
$text = ! um_profile( 'cover_photo' ) ? __( 'Upload a cover photo', 'ultimate-member' ) : __( 'Change cover photo', 'ultimate-member' ) ;
|
| 599 |
+
|
| 600 |
$items = array(
|
| 601 |
+
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width">' . $text . '</a>',
|
| 602 |
+
'<a href="javascript:void(0);" class="um-reset-cover-photo" data-user_id="' . um_profile_id() . '" ' . $hide_remove . '>' . __( 'Remove', 'ultimate-member' ) . '</a>',
|
| 603 |
+
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
| 604 |
);
|
| 605 |
|
| 606 |
UM()->profile()->new_ui( 'bc', 'div.um-cover', 'click', $items );
|
| 607 |
+
} else {
|
| 608 |
|
| 609 |
+
if ( ! isset( UM()->user()->cannot_edit ) && ! um_profile( 'cover_photo' ) ) {
|
| 610 |
|
| 611 |
+
$items = array(
|
| 612 |
+
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width">' . __( 'Upload a cover photo', 'ultimate-member' ) . '</a>',
|
| 613 |
+
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
| 614 |
+
);
|
| 615 |
|
| 616 |
+
UM()->profile()->new_ui( 'bc', 'div.um-cover', 'click', $items );
|
| 617 |
|
| 618 |
+
}
|
| 619 |
|
| 620 |
+
}
|
| 621 |
+
|
| 622 |
+
UM()->fields()->add_hidden_field( 'cover_photo' ); ?>
|
| 623 |
+
|
| 624 |
+
<div class="um-cover-e" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
| 625 |
|
| 626 |
+
<?php if ( um_profile( 'cover_photo' ) ) {
|
| 627 |
+
|
| 628 |
+
if ( UM()->mobile()->isMobile() ) {
|
| 629 |
+
if ( UM()->mobile()->isTablet() ) {
|
| 630 |
echo um_user( 'cover_photo', 1000 );
|
| 631 |
} else {
|
| 632 |
echo um_user( 'cover_photo', 300 );
|
| 635 |
echo um_user( 'cover_photo', 1000 );
|
| 636 |
}
|
| 637 |
|
| 638 |
+
} elseif ( $default_cover && $default_cover['url'] ) {
|
|
|
|
|
|
|
| 639 |
|
| 640 |
$default_cover = $default_cover['url'];
|
| 641 |
|
| 643 |
|
| 644 |
} else {
|
| 645 |
|
| 646 |
+
if ( ! isset( UM()->user()->cannot_edit ) ) { ?>
|
| 647 |
|
| 648 |
+
<a href="javascript:void(0);" class="um-cover-add"><span class="um-cover-add-i"><i
|
|
|
|
| 649 |
class="um-icon-plus um-tip-n"
|
| 650 |
title="<?php _e( 'Upload a cover photo', 'ultimate-member' ); ?>"></i></span></a>
|
| 651 |
|
| 655 |
|
| 656 |
</div>
|
| 657 |
|
| 658 |
+
<?php echo $overlay; ?>
|
| 659 |
+
|
| 660 |
</div>
|
| 661 |
|
| 662 |
<?php
|
| 739 |
|
| 740 |
<?php
|
| 741 |
|
| 742 |
+
if ( ! isset( UM()->user()->cannot_edit ) ) {
|
| 743 |
|
| 744 |
UM()->fields()->add_hidden_field( 'profile_photo' );
|
| 745 |
|
| 746 |
+
if ( ! um_profile( 'profile_photo' ) ) { // has profile photo
|
| 747 |
|
| 748 |
$items = array(
|
| 749 |
+
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Upload photo', 'ultimate-member' ) . '</a>',
|
| 750 |
+
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
| 751 |
);
|
| 752 |
|
| 753 |
/**
|
| 775 |
|
| 776 |
echo UM()->profile()->new_ui( 'bc', 'div.um-profile-photo', 'click', $items );
|
| 777 |
|
| 778 |
+
} elseif ( UM()->fields()->editing == true ) {
|
| 779 |
|
| 780 |
$items = array(
|
| 781 |
+
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>',
|
| 782 |
+
'<a href="javascript:void(0);" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __( 'Remove photo', 'ultimate-member' ) . '</a>',
|
| 783 |
+
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
| 784 |
);
|
| 785 |
|
| 786 |
/**
|
| 1132 |
'editprofile' => '<a href="' . um_edit_profile_url() . '" class="real_url">' . __( 'Edit Profile', 'ultimate-member' ) . '</a>',
|
| 1133 |
'myaccount' => '<a href="' . um_get_core_page( 'account' ) . '" class="real_url">' . __( 'My Account', 'ultimate-member' ) . '</a>',
|
| 1134 |
'logout' => '<a href="' . um_get_core_page( 'logout' ) . '" class="real_url">' . __( 'Logout', 'ultimate-member' ) . '</a>',
|
| 1135 |
+
'cancel' => '<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
| 1136 |
);
|
| 1137 |
|
| 1138 |
if ( ! empty( UM()->user()->cannot_edit ) ) {
|
languages/ultimate-member-en_US.mo
CHANGED
|
Binary file
|
languages/ultimate-member-en_US.po
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Ultimate Member\n"
|
| 4 |
-
"POT-Creation-Date: 2019-05-10
|
| 5 |
-
"PO-Revision-Date: 2019-05-10
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: en_US\n"
|
|
@@ -103,7 +103,7 @@ msgstr ""
|
|
| 103 |
#: includes/admin/core/class-admin-builder.php:767
|
| 104 |
#: includes/admin/core/class-admin-dragdrop.php:32
|
| 105 |
#: includes/admin/core/class-admin-menu.php:104
|
| 106 |
-
#: includes/core/class-fields.php:
|
| 107 |
msgid "Please login as administrator"
|
| 108 |
msgstr ""
|
| 109 |
|
|
@@ -268,7 +268,7 @@ msgstr ""
|
|
| 268 |
#: includes/admin/core/class-admin-forms.php:951
|
| 269 |
#: includes/admin/core/class-admin-forms.php:960
|
| 270 |
#: includes/admin/core/class-admin-notices.php:390
|
| 271 |
-
#: includes/core/um-actions-profile.php:
|
| 272 |
msgid "Remove"
|
| 273 |
msgstr ""
|
| 274 |
|
|
@@ -2630,7 +2630,7 @@ msgid "UM Action"
|
|
| 2630 |
msgstr ""
|
| 2631 |
|
| 2632 |
#: includes/admin/core/class-admin-users.php:123
|
| 2633 |
-
#: includes/core/class-fields.php:
|
| 2634 |
msgid "Apply"
|
| 2635 |
msgstr ""
|
| 2636 |
|
|
@@ -3614,12 +3614,13 @@ msgstr ""
|
|
| 3614 |
#: includes/admin/templates/modal/dynamic_new_group.php:15
|
| 3615 |
#: includes/admin/templates/modal/fonticons.php:11
|
| 3616 |
#: includes/admin/templates/role/publish.php:24
|
| 3617 |
-
#: includes/core/class-fields.php:
|
| 3618 |
-
#: includes/core/um-actions-profile.php:
|
| 3619 |
-
#: includes/core/um-actions-profile.php:
|
| 3620 |
-
#: includes/core/um-actions-profile.php:
|
| 3621 |
-
#: includes/core/um-actions-profile.php:
|
| 3622 |
-
#: includes/core/um-actions-profile.php:
|
|
|
|
| 3623 |
msgid "Cancel"
|
| 3624 |
msgstr ""
|
| 3625 |
|
|
@@ -3982,7 +3983,7 @@ msgid "Members"
|
|
| 3982 |
msgstr ""
|
| 3983 |
|
| 3984 |
#: includes/class-config.php:133 includes/class-config.php:745
|
| 3985 |
-
#: includes/core/um-actions-profile.php:
|
| 3986 |
#: includes/core/um-actions-user.php:15
|
| 3987 |
msgid "Logout"
|
| 3988 |
msgstr ""
|
|
@@ -4399,7 +4400,7 @@ msgid "Cover Photo"
|
|
| 4399 |
msgstr ""
|
| 4400 |
|
| 4401 |
#: includes/core/class-builtin.php:1085
|
| 4402 |
-
#: includes/core/um-actions-profile.php:
|
| 4403 |
msgid "Change your cover photo"
|
| 4404 |
msgstr ""
|
| 4405 |
|
|
@@ -6318,89 +6319,89 @@ msgstr ""
|
|
| 6318 |
msgid "Add translation to %s"
|
| 6319 |
msgstr ""
|
| 6320 |
|
| 6321 |
-
#: includes/core/class-fields.php:
|
| 6322 |
#, php-format
|
| 6323 |
msgid "%s"
|
| 6324 |
msgstr ""
|
| 6325 |
|
| 6326 |
-
#: includes/core/class-fields.php:
|
| 6327 |
msgid "Custom Field"
|
| 6328 |
msgstr ""
|
| 6329 |
|
| 6330 |
-
#: includes/core/class-fields.php:
|
| 6331 |
msgid "Please upload a valid image!"
|
| 6332 |
msgstr ""
|
| 6333 |
|
| 6334 |
-
#: includes/core/class-fields.php:
|
| 6335 |
msgid "Upload"
|
| 6336 |
msgstr ""
|
| 6337 |
|
| 6338 |
-
#: includes/core/class-fields.php:
|
| 6339 |
msgid "Sorry this is not a valid image."
|
| 6340 |
msgstr ""
|
| 6341 |
|
| 6342 |
-
#: includes/core/class-fields.php:
|
| 6343 |
msgid "This image is too large!"
|
| 6344 |
msgstr ""
|
| 6345 |
|
| 6346 |
-
#: includes/core/class-fields.php:
|
| 6347 |
msgid "This image is too small!"
|
| 6348 |
msgstr ""
|
| 6349 |
|
| 6350 |
-
#: includes/core/class-fields.php:
|
| 6351 |
msgid "You can only upload one image"
|
| 6352 |
msgstr ""
|
| 6353 |
|
| 6354 |
-
#: includes/core/class-fields.php:
|
| 6355 |
msgid "Current Password"
|
| 6356 |
msgstr ""
|
| 6357 |
|
| 6358 |
-
#: includes/core/class-fields.php:
|
| 6359 |
msgid "New Password"
|
| 6360 |
msgstr ""
|
| 6361 |
|
| 6362 |
-
#: includes/core/class-fields.php:
|
| 6363 |
#, php-format
|
| 6364 |
msgid "Confirm %s"
|
| 6365 |
msgstr ""
|
| 6366 |
|
| 6367 |
-
#: includes/core/class-fields.php:
|
| 6368 |
msgid "Upload Photo"
|
| 6369 |
msgstr ""
|
| 6370 |
|
| 6371 |
-
#: includes/core/class-fields.php:
|
| 6372 |
-
#: includes/core/um-actions-profile.php:
|
| 6373 |
msgid "Change photo"
|
| 6374 |
msgstr ""
|
| 6375 |
|
| 6376 |
-
#: includes/core/class-fields.php:
|
| 6377 |
msgid "Processing..."
|
| 6378 |
msgstr ""
|
| 6379 |
|
| 6380 |
-
#: includes/core/class-fields.php:
|
| 6381 |
msgid "Upload File"
|
| 6382 |
msgstr ""
|
| 6383 |
|
| 6384 |
-
#: includes/core/class-fields.php:
|
| 6385 |
msgid "This file has been removed."
|
| 6386 |
msgstr ""
|
| 6387 |
|
| 6388 |
-
#: includes/core/class-fields.php:
|
| 6389 |
msgid "Change file"
|
| 6390 |
msgstr ""
|
| 6391 |
|
| 6392 |
-
#: includes/core/class-fields.php:
|
| 6393 |
msgid "Save"
|
| 6394 |
msgstr ""
|
| 6395 |
|
| 6396 |
-
#: includes/core/class-fields.php:
|
| 6397 |
#, php-format
|
| 6398 |
msgid ""
|
| 6399 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
| 6400 |
"information!"
|
| 6401 |
msgstr ""
|
| 6402 |
|
| 6403 |
-
#: includes/core/class-fields.php:
|
| 6404 |
msgid "This user has not added any information to their profile yet."
|
| 6405 |
msgstr ""
|
| 6406 |
|
|
@@ -6949,42 +6950,44 @@ msgstr ""
|
|
| 6949 |
msgid "You are not allowed to edit this user."
|
| 6950 |
msgstr ""
|
| 6951 |
|
| 6952 |
-
#: includes/core/um-actions-profile.php:
|
| 6953 |
#, php-format
|
| 6954 |
msgid "Your choosed %s"
|
| 6955 |
msgstr ""
|
| 6956 |
|
| 6957 |
#: includes/core/um-actions-profile.php:598
|
| 6958 |
-
|
|
|
|
|
|
|
| 6959 |
msgstr ""
|
| 6960 |
|
| 6961 |
-
#: includes/core/um-actions-profile.php:
|
| 6962 |
-
msgid "
|
| 6963 |
msgstr ""
|
| 6964 |
|
| 6965 |
-
#: includes/core/um-actions-profile.php:
|
| 6966 |
msgid "Upload photo"
|
| 6967 |
msgstr ""
|
| 6968 |
|
| 6969 |
-
#: includes/core/um-actions-profile.php:
|
| 6970 |
msgid "Remove photo"
|
| 6971 |
msgstr ""
|
| 6972 |
|
| 6973 |
-
#: includes/core/um-actions-profile.php:
|
| 6974 |
msgid "Tell us a bit about yourself..."
|
| 6975 |
msgstr ""
|
| 6976 |
|
| 6977 |
-
#: includes/core/um-actions-profile.php:
|
| 6978 |
#, php-format
|
| 6979 |
msgid "This user account status is %s"
|
| 6980 |
msgstr ""
|
| 6981 |
|
| 6982 |
-
#: includes/core/um-actions-profile.php:
|
| 6983 |
-
#: includes/core/um-actions-profile.php:
|
| 6984 |
msgid "Edit Profile"
|
| 6985 |
msgstr ""
|
| 6986 |
|
| 6987 |
-
#: includes/core/um-actions-profile.php:
|
| 6988 |
msgid "My Account"
|
| 6989 |
msgstr ""
|
| 6990 |
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Ultimate Member\n"
|
| 4 |
+
"POT-Creation-Date: 2019-05-14 10:09+0300\n"
|
| 5 |
+
"PO-Revision-Date: 2019-05-14 10:09+0300\n"
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: en_US\n"
|
| 103 |
#: includes/admin/core/class-admin-builder.php:767
|
| 104 |
#: includes/admin/core/class-admin-dragdrop.php:32
|
| 105 |
#: includes/admin/core/class-admin-menu.php:104
|
| 106 |
+
#: includes/core/class-fields.php:4120
|
| 107 |
msgid "Please login as administrator"
|
| 108 |
msgstr ""
|
| 109 |
|
| 268 |
#: includes/admin/core/class-admin-forms.php:951
|
| 269 |
#: includes/admin/core/class-admin-forms.php:960
|
| 270 |
#: includes/admin/core/class-admin-notices.php:390
|
| 271 |
+
#: includes/core/um-actions-profile.php:602
|
| 272 |
msgid "Remove"
|
| 273 |
msgstr ""
|
| 274 |
|
| 2630 |
msgstr ""
|
| 2631 |
|
| 2632 |
#: includes/admin/core/class-admin-users.php:123
|
| 2633 |
+
#: includes/core/class-fields.php:2335
|
| 2634 |
msgid "Apply"
|
| 2635 |
msgstr ""
|
| 2636 |
|
| 3614 |
#: includes/admin/templates/modal/dynamic_new_group.php:15
|
| 3615 |
#: includes/admin/templates/modal/fonticons.php:11
|
| 3616 |
#: includes/admin/templates/role/publish.php:24
|
| 3617 |
+
#: includes/core/class-fields.php:2336 includes/core/class-fields.php:2433
|
| 3618 |
+
#: includes/core/um-actions-profile.php:603
|
| 3619 |
+
#: includes/core/um-actions-profile.php:613
|
| 3620 |
+
#: includes/core/um-actions-profile.php:750
|
| 3621 |
+
#: includes/core/um-actions-profile.php:783
|
| 3622 |
+
#: includes/core/um-actions-profile.php:1128
|
| 3623 |
+
#: includes/core/um-actions-profile.php:1135
|
| 3624 |
msgid "Cancel"
|
| 3625 |
msgstr ""
|
| 3626 |
|
| 3983 |
msgstr ""
|
| 3984 |
|
| 3985 |
#: includes/class-config.php:133 includes/class-config.php:745
|
| 3986 |
+
#: includes/core/um-actions-profile.php:1134
|
| 3987 |
#: includes/core/um-actions-user.php:15
|
| 3988 |
msgid "Logout"
|
| 3989 |
msgstr ""
|
| 4400 |
msgstr ""
|
| 4401 |
|
| 4402 |
#: includes/core/class-builtin.php:1085
|
| 4403 |
+
#: includes/core/um-actions-profile.php:563
|
| 4404 |
msgid "Change your cover photo"
|
| 4405 |
msgstr ""
|
| 4406 |
|
| 6319 |
msgid "Add translation to %s"
|
| 6320 |
msgstr ""
|
| 6321 |
|
| 6322 |
+
#: includes/core/class-fields.php:1199 templates/message.php:5
|
| 6323 |
#, php-format
|
| 6324 |
msgid "%s"
|
| 6325 |
msgstr ""
|
| 6326 |
|
| 6327 |
+
#: includes/core/class-fields.php:1218
|
| 6328 |
msgid "Custom Field"
|
| 6329 |
msgstr ""
|
| 6330 |
|
| 6331 |
+
#: includes/core/class-fields.php:1515
|
| 6332 |
msgid "Please upload a valid image!"
|
| 6333 |
msgstr ""
|
| 6334 |
|
| 6335 |
+
#: includes/core/class-fields.php:1522 includes/core/class-fields.php:1543
|
| 6336 |
msgid "Upload"
|
| 6337 |
msgstr ""
|
| 6338 |
|
| 6339 |
+
#: includes/core/class-fields.php:1523
|
| 6340 |
msgid "Sorry this is not a valid image."
|
| 6341 |
msgstr ""
|
| 6342 |
|
| 6343 |
+
#: includes/core/class-fields.php:1524
|
| 6344 |
msgid "This image is too large!"
|
| 6345 |
msgstr ""
|
| 6346 |
|
| 6347 |
+
#: includes/core/class-fields.php:1525
|
| 6348 |
msgid "This image is too small!"
|
| 6349 |
msgstr ""
|
| 6350 |
|
| 6351 |
+
#: includes/core/class-fields.php:1526
|
| 6352 |
msgid "You can only upload one image"
|
| 6353 |
msgstr ""
|
| 6354 |
|
| 6355 |
+
#: includes/core/class-fields.php:1994
|
| 6356 |
msgid "Current Password"
|
| 6357 |
msgstr ""
|
| 6358 |
|
| 6359 |
+
#: includes/core/class-fields.php:2023
|
| 6360 |
msgid "New Password"
|
| 6361 |
msgstr ""
|
| 6362 |
|
| 6363 |
+
#: includes/core/class-fields.php:2055
|
| 6364 |
#, php-format
|
| 6365 |
msgid "Confirm %s"
|
| 6366 |
msgstr ""
|
| 6367 |
|
| 6368 |
+
#: includes/core/class-fields.php:2290
|
| 6369 |
msgid "Upload Photo"
|
| 6370 |
msgstr ""
|
| 6371 |
|
| 6372 |
+
#: includes/core/class-fields.php:2311 includes/core/class-fields.php:2335
|
| 6373 |
+
#: includes/core/um-actions-profile.php:781
|
| 6374 |
msgid "Change photo"
|
| 6375 |
msgstr ""
|
| 6376 |
|
| 6377 |
+
#: includes/core/class-fields.php:2335 includes/core/class-fields.php:2432
|
| 6378 |
msgid "Processing..."
|
| 6379 |
msgstr ""
|
| 6380 |
|
| 6381 |
+
#: includes/core/class-fields.php:2357
|
| 6382 |
msgid "Upload File"
|
| 6383 |
msgstr ""
|
| 6384 |
|
| 6385 |
+
#: includes/core/class-fields.php:2399 includes/core/um-filters-fields.php:243
|
| 6386 |
msgid "This file has been removed."
|
| 6387 |
msgstr ""
|
| 6388 |
|
| 6389 |
+
#: includes/core/class-fields.php:2402 includes/core/class-fields.php:2432
|
| 6390 |
msgid "Change file"
|
| 6391 |
msgstr ""
|
| 6392 |
|
| 6393 |
+
#: includes/core/class-fields.php:2432
|
| 6394 |
msgid "Save"
|
| 6395 |
msgstr ""
|
| 6396 |
|
| 6397 |
+
#: includes/core/class-fields.php:3854
|
| 6398 |
#, php-format
|
| 6399 |
msgid ""
|
| 6400 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
| 6401 |
"information!"
|
| 6402 |
msgstr ""
|
| 6403 |
|
| 6404 |
+
#: includes/core/class-fields.php:3856
|
| 6405 |
msgid "This user has not added any information to their profile yet."
|
| 6406 |
msgstr ""
|
| 6407 |
|
| 6950 |
msgid "You are not allowed to edit this user."
|
| 6951 |
msgstr ""
|
| 6952 |
|
| 6953 |
+
#: includes/core/um-actions-profile.php:284
|
| 6954 |
#, php-format
|
| 6955 |
msgid "Your choosed %s"
|
| 6956 |
msgstr ""
|
| 6957 |
|
| 6958 |
#: includes/core/um-actions-profile.php:598
|
| 6959 |
+
#: includes/core/um-actions-profile.php:612
|
| 6960 |
+
#: includes/core/um-actions-profile.php:650
|
| 6961 |
+
msgid "Upload a cover photo"
|
| 6962 |
msgstr ""
|
| 6963 |
|
| 6964 |
+
#: includes/core/um-actions-profile.php:598
|
| 6965 |
+
msgid "Change cover photo"
|
| 6966 |
msgstr ""
|
| 6967 |
|
| 6968 |
+
#: includes/core/um-actions-profile.php:749
|
| 6969 |
msgid "Upload photo"
|
| 6970 |
msgstr ""
|
| 6971 |
|
| 6972 |
+
#: includes/core/um-actions-profile.php:782
|
| 6973 |
msgid "Remove photo"
|
| 6974 |
msgstr ""
|
| 6975 |
|
| 6976 |
+
#: includes/core/um-actions-profile.php:946
|
| 6977 |
msgid "Tell us a bit about yourself..."
|
| 6978 |
msgstr ""
|
| 6979 |
|
| 6980 |
+
#: includes/core/um-actions-profile.php:962
|
| 6981 |
#, php-format
|
| 6982 |
msgid "This user account status is %s"
|
| 6983 |
msgstr ""
|
| 6984 |
|
| 6985 |
+
#: includes/core/um-actions-profile.php:1101
|
| 6986 |
+
#: includes/core/um-actions-profile.php:1132
|
| 6987 |
msgid "Edit Profile"
|
| 6988 |
msgstr ""
|
| 6989 |
|
| 6990 |
+
#: includes/core/um-actions-profile.php:1133
|
| 6991 |
msgid "My Account"
|
| 6992 |
msgstr ""
|
| 6993 |
|
readme.txt
CHANGED
|
@@ -6,7 +6,7 @@ Donate link:
|
|
| 6 |
Tags: community, member, membership, user-profile, user-registration
|
| 7 |
Requires at least: 4.9
|
| 8 |
Tested up to: 5.2
|
| 9 |
-
Stable tag: 2.0.
|
| 10 |
License: GNU Version 2 or Any Later Version
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
| 12 |
|
|
@@ -133,6 +133,15 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
| 133 |
|
| 134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
| 135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
= 2.0.46: May 10, 2019 =
|
| 137 |
|
| 138 |
* Bugfixes:
|
| 6 |
Tags: community, member, membership, user-profile, user-registration
|
| 7 |
Requires at least: 4.9
|
| 8 |
Tested up to: 5.2
|
| 9 |
+
Stable tag: 2.0.47
|
| 10 |
License: GNU Version 2 or Any Later Version
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
| 12 |
|
| 133 |
|
| 134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
| 135 |
|
| 136 |
+
= 2.0.47: May 14, 2019 =
|
| 137 |
+
|
| 138 |
+
* Bugfixes:
|
| 139 |
+
- Fixed save special characters values
|
| 140 |
+
- Fixed trim fields options before validation
|
| 141 |
+
- Fixed save empty value at Profile Registration form in radio/checkbox/select/multiselect fields
|
| 142 |
+
- Fixed displaying empty value of multiselect field at Profile Page
|
| 143 |
+
- Fixed cover photo dropdown menus
|
| 144 |
+
|
| 145 |
= 2.0.46: May 10, 2019 =
|
| 146 |
|
| 147 |
* Bugfixes:
|
ultimate-member.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: 2.0.
|
| 7 |
Author: Ultimate Member
|
| 8 |
Author URI: http://ultimatemember.com/
|
| 9 |
Text Domain: ultimate-member
|
| 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: 2.0.47
|
| 7 |
Author: Ultimate Member
|
| 8 |
Author URI: http://ultimatemember.com/
|
| 9 |
Text Domain: ultimate-member
|
