Version Description
- 22/11/2022
- Fix - User Registration string translation issue.
- Fix - Auto approving users even when admin approval was enabled.
- Fix - Default role set to administrator after getting started end.
- Fix - Critical error while approving or updating user details by admin.
- Fix - Replace str_contains with strpos for compatibility below php version 8.
- Fix - Upgrade plan button in extensions page even when license was activated.
- Dev - Added trigger before redirect to another page after registration in JS.
Download this release
Release Info
Developer | wpeverestdev |
Plugin | User Registration – Custom Registration Form, Login Form And User Profile For WordPress |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4.1 to 2.2.5
- assets/js/frontend/user-registration.js +7 -0
- assets/js/frontend/user-registration.min.js +1 -1
- includes/RestApi/class-ur-rest-api.php +6 -1
- includes/admin/class-ur-admin-notices.php +2 -2
- includes/admin/class-ur-admin.php +1 -1
- includes/admin/functions-ur-admin.php +1 -1
- includes/class-ur-form-block.php +1 -1
- includes/functions-ur-core.php +22 -13
- languages/user-registration.pot +69 -72
- readme.txt +12 -2
- user-registration.php +2 -2
assets/js/frontend/user-registration.js
CHANGED
@@ -853,6 +853,10 @@
|
|
853 |
typeof redirect_url &&
|
854 |
redirect_url !== ""
|
855 |
) {
|
|
|
|
|
|
|
|
|
856 |
window.setTimeout(
|
857 |
function () {
|
858 |
window.location =
|
@@ -869,6 +873,9 @@
|
|
869 |
response.data
|
870 |
.auto_login
|
871 |
) {
|
|
|
|
|
|
|
872 |
location.reload();
|
873 |
}
|
874 |
}
|
853 |
typeof redirect_url &&
|
854 |
redirect_url !== ""
|
855 |
) {
|
856 |
+
$(document).trigger(
|
857 |
+
"user_registration_frontend_before_redirect_url",
|
858 |
+
[redirect_url]
|
859 |
+
);
|
860 |
window.setTimeout(
|
861 |
function () {
|
862 |
window.location =
|
873 |
response.data
|
874 |
.auto_login
|
875 |
) {
|
876 |
+
$(document).trigger(
|
877 |
+
"user_registration_frontend_before_auto_login"
|
878 |
+
);
|
879 |
location.reload();
|
880 |
}
|
881 |
}
|
assets/js/frontend/user-registration.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function ur_includes(e,r){if(Array.isArray(e))for(var t=0;t<e.length;t+=1)if(e[t]===r)return!0;return!1}!function(e){var r=function(){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(r){if(r===t.closest(".ur-frontend-form").attr("id")||e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){var a=this,i=[],n=s.separate_form_handler(""),o=new Array;e.each(n,function(){var r=e(this).attr("name");if(s.separate_form_handler('[name="'+r+'"]').length<2){var t=a.get_fieldwise_data(e(this)),n=document.querySelector(".field-invite_code");"invite_code"===t.field_name?"none"!==n.style.display&&i.push(t):i.push(t)}else e.inArray(r,o)<0&&o.push(r)});for(var d=0;d<o.length;d++){var u=s.separate_form_handler('[name="'+o[d]+'"]'),f=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),l=new Array;if(e.each(u,function(){var r=e(this),t="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(f){case"checkbox":case"radio":t=r.prop("checked")?r.val():"";break;default:t=r.val()}break;case"select":case"textarea":t=r.val()}""!==t&&l.push(t)}),"checkbox"==f)if("multiple_choice"==u.eq(0).attr("data-field"))for(var p=l,c=0,m=0;m<p.length;m++)c+=p[m]<<0;else c=JSON.stringify(l);else if("radio"==f)c=l[0];else c=u.val();var _=o[d];_=_.replace("[]","");var g={value:c,field_type:f,label:u.eq(0).attr("data-label"),field_name:_};i.push(g)}return e(document).trigger("user_registration_frontend_form_data_filter",[i]),i}},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("name")?r.attr("name"):"null",o=[];e(".field-phone").each(function(){var r=e(this).find(".form-row").attr("id");e(this).find(".form-row").find("#"+r).hasClass("ur-smart-phone-field")&&o.push(e(this).find(".form-row").attr("id"))});var d="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(t.value="",s){case"input":switch(d){case"checkbox":case"radio":t.value=r.prop("checked")?r.val():"";break;default:t.value=r.val()}ur_includes(o,n)&&(t.value=r.siblings('input[type="hidden"]').val());break;case"select":t.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),t.value=r.val();break;default:t.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,t]),t.field_type="undefined"!==r.eq(0).attr("type")?r.eq(0).attr("type"):"null",r.attr("data-label")!==undefined?t.label=r.attr("data-label"):r.prev().length&&"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?(t.field_name=r.attr("name"),t.field_name=t.field_name.replace("[]","")):t.field_name="",e.inArray(t.field_name,i.join(",").trim())>=0&&a.push(t.field_name),t},show_message:function(r,t,a,i){if(a.closest(".user-registration").find(".ur-message").remove(),e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){(s=e('<div class="user-registration-'+t+'"/>')).append(r);e(".user-registration").find(".user-registration-MyAccount-navigation").length?s.insertBefore(".user-registration-MyAccount-navigation"):s.insertBefore(".ur-frontend-form")}else{var s;(s=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>')).append(r),"1"===i?a.append(s):a.prepend(s)}},separate_form_handler:function(r){return e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")?t.find(".user-registration-profile-fields").find(".ur-edit-profile-field"+r):t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"+r)},missing_attachment_handler:function(r){var t=[];if(1<=r.length){r.each(function(){var r=e(this).attr("id");-1===e.inArray(r,t)&&t.push(r)});for(var a=0;a<t.length;a++){for(var i=e("#"+t[a]).val().split(","),s=i.length;s>=0;s--)e.isNumeric(i[s])||i.splice(s,1);e("#"+t[a]).val(i)}}}},n={init:function(){this.form_submit_event(),this.edit_profile_event()},form_submit_event:function(){e(".ur-frontend-form").each(function(){e(this).find("form.register").off("submit").on("submit",function(t){t.preventDefault();var a=e(this);if(e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields,confirmpassword:user_registration_params.message_confirm_password_fields}),a.find(".user-registration-password-strength").length>0){var i=a.find(".user-registration-password-strength").attr("data-current-strength"),n=a.find(".user-registration-password-strength").attr("data-min-strength");if(parseInt(i,0)<parseInt(n,0)){if(""!=a.find("#user_pass").val()){a.find("#user_pass_error").remove();var o='<label id="user_pass_error" class="user-registration-error" for="user_pass">'+r.password_strength_error+".</label>";a.find(".user-registration-password-hint").after(o),a.find("#user_pass").attr("aria-invalid",!0),a.find("#user_pass").trigger("focus")}return!1}}var d=a.find(".ur-smart-phone-field");if("true"===d.attr("aria-invalid")){(l=d.closest("p.form-row")).find("#"+d.data("id")+"-error").remove();var u='<label id="'+d.data("id")+'-error" class="user-registration-error" for="'+d.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return l.append(u),l.find("#"+d.data("id")).attr("aria-invalid",!0),!0}var f=a.find(".urfu-file-input");s.missing_attachment_handler(f);if(1===a.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var l,p=a.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(l=a.find(".uraf-profile-picture-upload")).find("#"+p.attr("name")+"-error").remove(),l.find(".uraf-profile-picture-file-error").remove();var c='<label id="'+p.attr("name")+'-error" class="user-registration-error" for="'+p.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";l.find("button.wp_uraf_profile_picture_upload").after(c)}if(e(document).trigger("user_registration_frontend_validate_before_form_submit",[a]),!(a.find("#user_registration_stripe_gateway").find(".user-registration-error").length>0&&a.find("#user_registration_stripe_gateway").find(".user-registration-error").is(":visible"))&&a.valid()){a.find(".ur-submit-button").prop("disabled",!0);var m,_=0,g="0",h="";h="hcaptcha"===user_registration_params.recaptcha_type?a.find('[name="h-captcha-response"]').val():a.find('[name="g-recaptcha-response"]').val();try{m=JSON.stringify(s.get_form_data(a.closest(".ur-frontend-form").attr("id")))}catch(w){m=""}1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(_=e(this).closest("form").find('input[name="ur-user-form-id"]').val()),1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(g=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var v={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:m,captchaResponse:h,form_id:_,ur_frontend_form_nonce:g},b={};if(e(document).trigger("user_registration_frontend_before_form_submit",[v,a,b]),"undefined"!=typeof b.message&&""!==b.message)return s.show_message("<p>"+b.message+"</p>","error",a,"1"),void a.find(".ur-submit-button").prop("disabled",!1);a.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:v,type:"POST",async:!0,complete:function(t){var i=[];if(i.status=!0,e(document).trigger("user_registration_frontend_before_ajax_complete_success_message",[t,i,a]),i.status){a.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=a.find('input[name="ur-redirect-url"]').val(),o=e('<ul class=""/>'),d="error";try{var u=JSON.parse(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&"undefined"!=typeof u.data.paypal_redirect&&(window.location=u.data.paypal_redirect),"undefined"!=typeof u.success&&!0===u.success&&(d="message"),"message"===d?(a.find(".user-registration-password-hint").remove(),a.find(".user-registration-password-strength").remove(),"admin_approval"==u.data.form_login_option?o.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==u.data.form_login_option||"admin_approval_after_email_confirmation"==u.data.form_login_option?o.append("<li>"+r.user_email_pending+"</li>"):"payment"==u.data.form_login_option?o.append("<li>"+u.data.message+"</li>"):o.append((u.data.message,r.user_successfully_saved)),"undefined"!=typeof u.data.auto_password_generation_success_message&&o.append("<li>"+u.data.auto_password_generation_success_message+"</li>"),a[0].reset(),jQuery("#billing_country").trigger("change"),jQuery("#shipping_country").trigger("change"),"undefined"!=typeof u.data.role_based_redirect_url&&(n=u.data.role_based_redirect_url),void 0!==n&&""!==n?window.setTimeout(function(){window.location=n},1e3):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&location.reload()):"error"===d&&("object"==typeof u.data.message?e.each(u.data.message,function(e,r){o.append("<li>"+r+"</li>")}):o.append("<li>"+u.data.message+"</li>"))}catch(c){o.append("<li>"+c.message+"</li>")}var f=JSON.parse(t.responseText).data.success_message_positon;if(u.data.hasOwnProperty("message")&&u.data.message.hasOwnProperty("individual")){var l=[];e.each(a.find(".ur-field-item").find(".ur-frontend-field"),function(r){var t=e(this).attr("id");l.push(t)});var p="";e.each(u.data.message,function(e,r){if(l.includes(e)){p=e;var t='<label id="'+e+'-error" class="user-registration-error" for="'+e+'">'+r+"</label>";a.find(".ur-field-item").find("input[id='"+e+"']").closest(".form-row").append(t)}}),e(document).trigger("ur_handle_field_error_messages",[a,p])}else s.show_message(o,d,a,f);"1"===f?e(window).scrollTop(a.find(".ur-button-container").offset().top):e(window).scrollTop(a.closest(".ur-frontend-form").offset().top),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,d,a]),a.find(".ur-submit-button").prop("disabled",!1)}}})}})})},edit_profile_event:function(){e("form.user-registration-EditProfileForm").off("submit").on("submit",function(r){var t=e(this);e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields});var a=t.find(".ur-smart-phone-field");if("true"===a.attr("aria-invalid")){(n=a.closest("p.form-row")).find("#"+a.data("id")+"-error").remove();var i='<label id="'+a.data("id")+'-error" class="user-registration-error" for="'+a.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return n.append(i),n.find("#"+a.data("id")).attr("aria-invalid",!0),!0}if(1===t.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var n,o=t.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(n=t.find(".uraf-profile-picture-upload")).find("#"+o.attr("name")+"-error").remove(),n.find(".uraf-profile-picture-file-error").remove();var d='<label id="'+o.attr("name")+'-error" class="user-registration-error" for="'+o.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";n.find("button.wp_uraf_profile_picture_upload").after(d)}if(!t.valid())return!1;r.preventDefault(),t.find(".user-registration-submit-Button").prop("disabled",!0);var u=t.find(".urfu-file-input");s.missing_attachment_handler(u);var f;try{f=s.get_form_data();var l=e("#profile_pic_url").val();f.push({value:l,field_name:"user_registration_profile_pic_url"}),f=JSON.stringify(f)}catch(c){f=""}var p={action:"user_registration_update_profile_details",security:user_registration_params.user_registration_profile_details_save,form_data:f};t.find(".user-registration-submit-Button").find("span").addClass("ur-front-spinner"),e.ajax({type:"POST",url:user_registration_params.ajax_url,dataType:"JSON",data:p,complete:function(r){t.find("span.ur-front-spinner").removeClass("ur-front-spinner"),t.closest(".user-registration").find(".user-registration-error").remove(),t.closest(".user-registration").find(".user-registration-message").remove();var a=e('<ul class=""/>'),i="error";try{var n=JSON.parse(r.responseText);if("undefined"!=typeof n.success&&!0===n.success&&(i="message"),n.data.hasOwnProperty("message")&&n.data.message.hasOwnProperty("individual")){var o=[];e.each(t.find(".ur-form-row").find(".ur-field-item").find(".ur-edit-profile-field"),function(r){var t=e(this).attr("id");o.push(t)}),e.each(n.data.message,function(e,r){if(o.includes(e)){var a='<label id="'+e+'-error" class="user-registration-error" for="'+e+'">'+r+"</label>";t.find(".ur-form-row").find(".ur-field-item").find("input[id='"+e+"']").closest(".form-row").append(a)}})}else"object"==typeof n.data.message?e.each(n.data.message,function(e,r){a.append("<li>"+r+"</li>")}):a.append("<li>"+n.data.message+"</li>"),s.show_message(a,i,t,"0")}catch(d){a.append("<li>"+d.message+"</li>")}e(document).trigger("user_registration_edit_profile_after_ajax_complete"),t.find(".user-registration-submit-Button").prop("disabled",!1),e(window).scrollTop(e(".user-registration").position())}})})}};s.init(),n.init()})},e(function(){e(".ur-submit-button").on("click",function(){e(this).closest("form.register").ur_form_submission()}),e(".user-registration-submit-Button").on("click",function(){e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")&&"yes"===user_registration_params.ajax_submission_on_edit_profile&&e("form.user-registration-EditProfileForm").ur_form_submission()});var t={};e(document.body).on("click","#load_flatpickr",function(){var r=e(this).data("id"),a=t[r];if(!a){var i=e(this).closest(".ur-field-item").find("#formated_date").val();if(0<e(".ur-frontend-form").length)var s=e(".ur-frontend-form #"+r).attr("type","text").val(i);else s=e(".woocommerce-MyAccount-content #"+r).attr("type","text").val(i);e(this).attr("data-date-format",s.data("date-format")),e(this).attr("data-mode",s.data("mode")),e(this).attr("data-locale",s.data("locale")),e(this).attr("data-min-date",s.data("min-date")),e(this).attr("data-max-date",s.data("max-date")),e(this).attr("data-default-date",i),a=e(this).flatpickr({disableMobile:!0,onChange:function(t,a,i){e("#"+r).val(a)}}),t[r]=a}a&&a.open()}),e(".ur-frontend-form").each(function(){e(this).find("form.register").on("focusout","#user_pass, #password_1",function(){$this=e(this);var t=e(this).attr("name"),a=e(this).data("id"),i=$this.closest("form").attr("data-enable-strength-password");if("yes"===i||"1"===i){var s=$this.closest("form"),n=s.attr("data-minimum-password-strength"),o=[];(o="function"==typeof wp.passwordStrength.userInputDisallowedList?wp.passwordStrength.userInputDisallowedList():wp.passwordStrength.userInputBlacklist()).push(s.find('input[data-id="user_email"]').val()),o.push(s.find('input[data-id="user_login"]').val());if(wp.passwordStrength.meter($this.val(),o)<n&&""!==$this.val()){s.find("#"+a+"_error").remove();var d='<label id="'+a+'_error" class="user-registration-error" for="'+t+'">'+r.password_strength_error+".</label>";s.find(".user-registration-password-hint").after(d)}}})})}),e(function(){e(".user-registration-EditProfileForm.edit-profile .field-country").length>0&&e(".field-country").each(function(){var r=e(this).find(".ur-data-holder").data("option-value"),t=e(this).find(".ur-data-holder").data("option-html"),a=e(this).find("select");r&&t&&(0===a.find('option[value="'+r+'"]').length&&a.append("<option class='ur-remove' selected='selected' value='"+r+"'>"+t+"</option>"),e(this).on("click",function(){e(this).find(".ur-remove").remove()}))})})};e(function(){e(".input-checkbox").each(function(){var r=e(this).attr("data-id");e('input[name="'+r+'[]"]:checked').length==e('[data-id = "'+r+'" ]').length&&e('[data-check = "'+r+'" ]').prop("checked",!0)}),e('input[type="checkbox"]#checkall').on("click",function(){var r=e(this).attr("data-check");e('[data-id = "'+r+'" ]').prop("checked",e(this).prop("checked"))}),e(".input-checkbox").on("change",function(){var r=e(this).attr("data-id");!1===e(this).prop("checked")&&e('[data-check = "'+r+'" ]').prop("checked",!1),e('input[name="'+r+'[]"]:checked').length==e('[data-id = "'+r+'" ]').length&&e('[data-check = "'+r+'" ]').prop("checked",!0)})}),r(),e(window).on("load",function(){r()})}(jQuery),function(e){e(document).on("click",".password_preview",function(r){r.preventDefault();var t=user_registration_params.ursL10n,a=e(this).hasClass("dashicons-hidden")?"show":"hide",i=e(this).closest(".user-registration-form-row").find('input[name="password"]');if(0===i.length&&(i=e(this).closest(".field-user_pass").find('input[name="user_pass"]')),0===i.length&&(i=e(this).closest(".field-user_confirm_password").find('input[name="user_confirm_password"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_current"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_1"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_2"]')),i.length>0)switch(a){case"show":i.attr("type","text"),e(this).removeClass("dashicons-hidden").addClass("dashicons-visibility"),e(this).attr("title",t.hide_password_title);break;case"hide":i.attr("type","password"),e(this).removeClass("dashicons-visibility").addClass("dashicons-hidden"),e(this).attr("title",t.show_password_title)}})}(jQuery);
|
1 |
+
function ur_includes(e,r){if(Array.isArray(e))for(var t=0;t<e.length;t+=1)if(e[t]===r)return!0;return!1}!function(e){var r=function(){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(r){if(r===t.closest(".ur-frontend-form").attr("id")||e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){var a=this,i=[],n=s.separate_form_handler(""),o=new Array;e.each(n,function(){var r=e(this).attr("name");if(s.separate_form_handler('[name="'+r+'"]').length<2){var t=a.get_fieldwise_data(e(this)),n=document.querySelector(".field-invite_code");"invite_code"===t.field_name?"none"!==n.style.display&&i.push(t):i.push(t)}else e.inArray(r,o)<0&&o.push(r)});for(var d=0;d<o.length;d++){var u=s.separate_form_handler('[name="'+o[d]+'"]'),f=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),l=new Array;if(e.each(u,function(){var r=e(this),t="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(f){case"checkbox":case"radio":t=r.prop("checked")?r.val():"";break;default:t=r.val()}break;case"select":case"textarea":t=r.val()}""!==t&&l.push(t)}),"checkbox"==f)if("multiple_choice"==u.eq(0).attr("data-field"))for(var p=l,c=0,_=0;_<p.length;_++)c+=p[_]<<0;else c=JSON.stringify(l);else if("radio"==f)c=l[0];else c=u.val();var m=o[d];m=m.replace("[]","");var g={value:c,field_type:f,label:u.eq(0).attr("data-label"),field_name:m};i.push(g)}return e(document).trigger("user_registration_frontend_form_data_filter",[i]),i}},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("name")?r.attr("name"):"null",o=[];e(".field-phone").each(function(){var r=e(this).find(".form-row").attr("id");e(this).find(".form-row").find("#"+r).hasClass("ur-smart-phone-field")&&o.push(e(this).find(".form-row").attr("id"))});var d="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(t.value="",s){case"input":switch(d){case"checkbox":case"radio":t.value=r.prop("checked")?r.val():"";break;default:t.value=r.val()}ur_includes(o,n)&&(t.value=r.siblings('input[type="hidden"]').val());break;case"select":t.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),t.value=r.val();break;default:t.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,t]),t.field_type="undefined"!==r.eq(0).attr("type")?r.eq(0).attr("type"):"null",r.attr("data-label")!==undefined?t.label=r.attr("data-label"):r.prev().length&&"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?(t.field_name=r.attr("name"),t.field_name=t.field_name.replace("[]","")):t.field_name="",e.inArray(t.field_name,i.join(",").trim())>=0&&a.push(t.field_name),t},show_message:function(r,t,a,i){if(a.closest(".user-registration").find(".ur-message").remove(),e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){(s=e('<div class="user-registration-'+t+'"/>')).append(r);e(".user-registration").find(".user-registration-MyAccount-navigation").length?s.insertBefore(".user-registration-MyAccount-navigation"):s.insertBefore(".ur-frontend-form")}else{var s;(s=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>')).append(r),"1"===i?a.append(s):a.prepend(s)}},separate_form_handler:function(r){return e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")?t.find(".user-registration-profile-fields").find(".ur-edit-profile-field"+r):t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"+r)},missing_attachment_handler:function(r){var t=[];if(1<=r.length){r.each(function(){var r=e(this).attr("id");-1===e.inArray(r,t)&&t.push(r)});for(var a=0;a<t.length;a++){for(var i=e("#"+t[a]).val().split(","),s=i.length;s>=0;s--)e.isNumeric(i[s])||i.splice(s,1);e("#"+t[a]).val(i)}}}},n={init:function(){this.form_submit_event(),this.edit_profile_event()},form_submit_event:function(){e(".ur-frontend-form").each(function(){e(this).find("form.register").off("submit").on("submit",function(t){t.preventDefault();var a=e(this);if(e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields,confirmpassword:user_registration_params.message_confirm_password_fields}),a.find(".user-registration-password-strength").length>0){var i=a.find(".user-registration-password-strength").attr("data-current-strength"),n=a.find(".user-registration-password-strength").attr("data-min-strength");if(parseInt(i,0)<parseInt(n,0)){if(""!=a.find("#user_pass").val()){a.find("#user_pass_error").remove();var o='<label id="user_pass_error" class="user-registration-error" for="user_pass">'+r.password_strength_error+".</label>";a.find(".user-registration-password-hint").after(o),a.find("#user_pass").attr("aria-invalid",!0),a.find("#user_pass").trigger("focus")}return!1}}var d=a.find(".ur-smart-phone-field");if("true"===d.attr("aria-invalid")){(l=d.closest("p.form-row")).find("#"+d.data("id")+"-error").remove();var u='<label id="'+d.data("id")+'-error" class="user-registration-error" for="'+d.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return l.append(u),l.find("#"+d.data("id")).attr("aria-invalid",!0),!0}var f=a.find(".urfu-file-input");s.missing_attachment_handler(f);if(1===a.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var l,p=a.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(l=a.find(".uraf-profile-picture-upload")).find("#"+p.attr("name")+"-error").remove(),l.find(".uraf-profile-picture-file-error").remove();var c='<label id="'+p.attr("name")+'-error" class="user-registration-error" for="'+p.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";l.find("button.wp_uraf_profile_picture_upload").after(c)}if(e(document).trigger("user_registration_frontend_validate_before_form_submit",[a]),!(a.find("#user_registration_stripe_gateway").find(".user-registration-error").length>0&&a.find("#user_registration_stripe_gateway").find(".user-registration-error").is(":visible"))&&a.valid()){a.find(".ur-submit-button").prop("disabled",!0);var _,m=0,g="0",h="";h="hcaptcha"===user_registration_params.recaptcha_type?a.find('[name="h-captcha-response"]').val():a.find('[name="g-recaptcha-response"]').val();try{_=JSON.stringify(s.get_form_data(a.closest(".ur-frontend-form").attr("id")))}catch(w){_=""}1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(m=e(this).closest("form").find('input[name="ur-user-form-id"]').val()),1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(g=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var v={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:_,captchaResponse:h,form_id:m,ur_frontend_form_nonce:g},b={};if(e(document).trigger("user_registration_frontend_before_form_submit",[v,a,b]),"undefined"!=typeof b.message&&""!==b.message)return s.show_message("<p>"+b.message+"</p>","error",a,"1"),void a.find(".ur-submit-button").prop("disabled",!1);a.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:v,type:"POST",async:!0,complete:function(t){var i=[];if(i.status=!0,e(document).trigger("user_registration_frontend_before_ajax_complete_success_message",[t,i,a]),i.status){a.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=a.find('input[name="ur-redirect-url"]').val(),o=e('<ul class=""/>'),d="error";try{var u=JSON.parse(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&"undefined"!=typeof u.data.paypal_redirect&&(window.location=u.data.paypal_redirect),"undefined"!=typeof u.success&&!0===u.success&&(d="message"),"message"===d?(a.find(".user-registration-password-hint").remove(),a.find(".user-registration-password-strength").remove(),"admin_approval"==u.data.form_login_option?o.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==u.data.form_login_option||"admin_approval_after_email_confirmation"==u.data.form_login_option?o.append("<li>"+r.user_email_pending+"</li>"):"payment"==u.data.form_login_option?o.append("<li>"+u.data.message+"</li>"):o.append((u.data.message,r.user_successfully_saved)),"undefined"!=typeof u.data.auto_password_generation_success_message&&o.append("<li>"+u.data.auto_password_generation_success_message+"</li>"),a[0].reset(),jQuery("#billing_country").trigger("change"),jQuery("#shipping_country").trigger("change"),"undefined"!=typeof u.data.role_based_redirect_url&&(n=u.data.role_based_redirect_url),void 0!==n&&""!==n?(e(document).trigger("user_registration_frontend_before_redirect_url",[n]),window.setTimeout(function(){window.location=n},1e3)):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&(e(document).trigger("user_registration_frontend_before_auto_login"),location.reload())):"error"===d&&("object"==typeof u.data.message?e.each(u.data.message,function(e,r){o.append("<li>"+r+"</li>")}):o.append("<li>"+u.data.message+"</li>"))}catch(c){o.append("<li>"+c.message+"</li>")}var f=JSON.parse(t.responseText).data.success_message_positon;if(u.data.hasOwnProperty("message")&&u.data.message.hasOwnProperty("individual")){var l=[];e.each(a.find(".ur-field-item").find(".ur-frontend-field"),function(r){var t=e(this).attr("id");l.push(t)});var p="";e.each(u.data.message,function(e,r){if(l.includes(e)){p=e;var t='<label id="'+e+'-error" class="user-registration-error" for="'+e+'">'+r+"</label>";a.find(".ur-field-item").find("input[id='"+e+"']").closest(".form-row").append(t)}}),e(document).trigger("ur_handle_field_error_messages",[a,p])}else s.show_message(o,d,a,f);"1"===f?e(window).scrollTop(a.find(".ur-button-container").offset().top):e(window).scrollTop(a.closest(".ur-frontend-form").offset().top),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,d,a]),a.find(".ur-submit-button").prop("disabled",!1)}}})}})})},edit_profile_event:function(){e("form.user-registration-EditProfileForm").off("submit").on("submit",function(r){var t=e(this);e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields});var a=t.find(".ur-smart-phone-field");if("true"===a.attr("aria-invalid")){(n=a.closest("p.form-row")).find("#"+a.data("id")+"-error").remove();var i='<label id="'+a.data("id")+'-error" class="user-registration-error" for="'+a.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return n.append(i),n.find("#"+a.data("id")).attr("aria-invalid",!0),!0}if(1===t.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var n,o=t.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(n=t.find(".uraf-profile-picture-upload")).find("#"+o.attr("name")+"-error").remove(),n.find(".uraf-profile-picture-file-error").remove();var d='<label id="'+o.attr("name")+'-error" class="user-registration-error" for="'+o.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";n.find("button.wp_uraf_profile_picture_upload").after(d)}if(!t.valid())return!1;r.preventDefault(),t.find(".user-registration-submit-Button").prop("disabled",!0);var u=t.find(".urfu-file-input");s.missing_attachment_handler(u);var f;try{f=s.get_form_data();var l=e("#profile_pic_url").val();f.push({value:l,field_name:"user_registration_profile_pic_url"}),f=JSON.stringify(f)}catch(c){f=""}var p={action:"user_registration_update_profile_details",security:user_registration_params.user_registration_profile_details_save,form_data:f};t.find(".user-registration-submit-Button").find("span").addClass("ur-front-spinner"),e.ajax({type:"POST",url:user_registration_params.ajax_url,dataType:"JSON",data:p,complete:function(r){t.find("span.ur-front-spinner").removeClass("ur-front-spinner"),t.closest(".user-registration").find(".user-registration-error").remove(),t.closest(".user-registration").find(".user-registration-message").remove();var a=e('<ul class=""/>'),i="error";try{var n=JSON.parse(r.responseText);if("undefined"!=typeof n.success&&!0===n.success&&(i="message"),n.data.hasOwnProperty("message")&&n.data.message.hasOwnProperty("individual")){var o=[];e.each(t.find(".ur-form-row").find(".ur-field-item").find(".ur-edit-profile-field"),function(r){var t=e(this).attr("id");o.push(t)}),e.each(n.data.message,function(e,r){if(o.includes(e)){var a='<label id="'+e+'-error" class="user-registration-error" for="'+e+'">'+r+"</label>";t.find(".ur-form-row").find(".ur-field-item").find("input[id='"+e+"']").closest(".form-row").append(a)}})}else"object"==typeof n.data.message?e.each(n.data.message,function(e,r){a.append("<li>"+r+"</li>")}):a.append("<li>"+n.data.message+"</li>"),s.show_message(a,i,t,"0")}catch(d){a.append("<li>"+d.message+"</li>")}e(document).trigger("user_registration_edit_profile_after_ajax_complete"),t.find(".user-registration-submit-Button").prop("disabled",!1),e(window).scrollTop(e(".user-registration").position())}})})}};s.init(),n.init()})},e(function(){e(".ur-submit-button").on("click",function(){e(this).closest("form.register").ur_form_submission()}),e(".user-registration-submit-Button").on("click",function(){e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")&&"yes"===user_registration_params.ajax_submission_on_edit_profile&&e("form.user-registration-EditProfileForm").ur_form_submission()});var t={};e(document.body).on("click","#load_flatpickr",function(){var r=e(this).data("id"),a=t[r];if(!a){var i=e(this).closest(".ur-field-item").find("#formated_date").val();if(0<e(".ur-frontend-form").length)var s=e(".ur-frontend-form #"+r).attr("type","text").val(i);else s=e(".woocommerce-MyAccount-content #"+r).attr("type","text").val(i);e(this).attr("data-date-format",s.data("date-format")),e(this).attr("data-mode",s.data("mode")),e(this).attr("data-locale",s.data("locale")),e(this).attr("data-min-date",s.data("min-date")),e(this).attr("data-max-date",s.data("max-date")),e(this).attr("data-default-date",i),a=e(this).flatpickr({disableMobile:!0,onChange:function(t,a,i){e("#"+r).val(a)}}),t[r]=a}a&&a.open()}),e(".ur-frontend-form").each(function(){e(this).find("form.register").on("focusout","#user_pass, #password_1",function(){$this=e(this);var t=e(this).attr("name"),a=e(this).data("id"),i=$this.closest("form").attr("data-enable-strength-password");if("yes"===i||"1"===i){var s=$this.closest("form"),n=s.attr("data-minimum-password-strength"),o=[];(o="function"==typeof wp.passwordStrength.userInputDisallowedList?wp.passwordStrength.userInputDisallowedList():wp.passwordStrength.userInputBlacklist()).push(s.find('input[data-id="user_email"]').val()),o.push(s.find('input[data-id="user_login"]').val());if(wp.passwordStrength.meter($this.val(),o)<n&&""!==$this.val()){s.find("#"+a+"_error").remove();var d='<label id="'+a+'_error" class="user-registration-error" for="'+t+'">'+r.password_strength_error+".</label>";s.find(".user-registration-password-hint").after(d)}}})})}),e(function(){e(".user-registration-EditProfileForm.edit-profile .field-country").length>0&&e(".field-country").each(function(){var r=e(this).find(".ur-data-holder").data("option-value"),t=e(this).find(".ur-data-holder").data("option-html"),a=e(this).find("select");r&&t&&(0===a.find('option[value="'+r+'"]').length&&a.append("<option class='ur-remove' selected='selected' value='"+r+"'>"+t+"</option>"),e(this).on("click",function(){e(this).find(".ur-remove").remove()}))})})};e(function(){e(".input-checkbox").each(function(){var r=e(this).attr("data-id");e('input[name="'+r+'[]"]:checked').length==e('[data-id = "'+r+'" ]').length&&e('[data-check = "'+r+'" ]').prop("checked",!0)}),e('input[type="checkbox"]#checkall').on("click",function(){var r=e(this).attr("data-check");e('[data-id = "'+r+'" ]').prop("checked",e(this).prop("checked"))}),e(".input-checkbox").on("change",function(){var r=e(this).attr("data-id");!1===e(this).prop("checked")&&e('[data-check = "'+r+'" ]').prop("checked",!1),e('input[name="'+r+'[]"]:checked').length==e('[data-id = "'+r+'" ]').length&&e('[data-check = "'+r+'" ]').prop("checked",!0)})}),r(),e(window).on("load",function(){r()})}(jQuery),function(e){e(document).on("click",".password_preview",function(r){r.preventDefault();var t=user_registration_params.ursL10n,a=e(this).hasClass("dashicons-hidden")?"show":"hide",i=e(this).closest(".user-registration-form-row").find('input[name="password"]');if(0===i.length&&(i=e(this).closest(".field-user_pass").find('input[name="user_pass"]')),0===i.length&&(i=e(this).closest(".field-user_confirm_password").find('input[name="user_confirm_password"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_current"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_1"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_2"]')),i.length>0)switch(a){case"show":i.attr("type","text"),e(this).removeClass("dashicons-hidden").addClass("dashicons-visibility"),e(this).attr("title",t.hide_password_title);break;case"hide":i.attr("type","password"),e(this).removeClass("dashicons-visibility").addClass("dashicons-hidden"),e(this).attr("title",t.show_password_title)}})}(jQuery);
|
includes/RestApi/class-ur-rest-api.php
CHANGED
@@ -94,7 +94,12 @@ class UR_REST_API {
|
|
94 |
update_post_meta( absint( $default_form_page_id ), 'user_registration_form_setting_minimum_password_strength', $settings_to_update['user_registration_form_setting_minimum_password_strength'] );
|
95 |
}
|
96 |
if ( isset( $settings_to_update['user_registration_form_setting_default_user_role'] ) ) {
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
foreach ( $settings_to_update as $option => $value ) {
|
94 |
update_post_meta( absint( $default_form_page_id ), 'user_registration_form_setting_minimum_password_strength', $settings_to_update['user_registration_form_setting_minimum_password_strength'] );
|
95 |
}
|
96 |
if ( isset( $settings_to_update['user_registration_form_setting_default_user_role'] ) ) {
|
97 |
+
$all_roles = ur_get_default_admin_roles();
|
98 |
+
$role_to_update = $settings_to_update['user_registration_form_setting_default_user_role'];
|
99 |
+
if ( ! isset( $all_roles[ $role_to_update ] ) ) {
|
100 |
+
$role_to_update = isset( array_keys( $all_roles )[ $role_to_update ] ) ? array_keys( $all_roles )[ $role_to_update ] : 'subscriber';
|
101 |
+
}
|
102 |
+
update_post_meta( absint( $default_form_page_id ), 'user_registration_form_setting_default_user_role', $role_to_update );
|
103 |
}
|
104 |
|
105 |
foreach ( $settings_to_update as $option => $value ) {
|
includes/admin/class-ur-admin-notices.php
CHANGED
@@ -195,8 +195,8 @@ class UR_Admin_Notices {
|
|
195 |
if ( ! isset( $_REQUEST['tab'] ) || 'license' !== $_REQUEST['tab'] ) {
|
196 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
197 |
}
|
198 |
-
} else if (
|
199 |
-
|
200 |
} else {
|
201 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
202 |
}
|
195 |
if ( ! isset( $_REQUEST['tab'] ) || 'license' !== $_REQUEST['tab'] ) {
|
196 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
197 |
}
|
198 |
+
} else if ( strpos( $name, 'user_registration_' ) || strpos( $name, 'UR_Admin_Notices' ) ) {
|
199 |
+
break;
|
200 |
} else {
|
201 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
202 |
}
|
includes/admin/class-ur-admin.php
CHANGED
@@ -131,7 +131,7 @@ class UR_Admin {
|
|
131 |
sprintf(
|
132 |
/* translators: 1: User Registration 2:: five stars */
|
133 |
__( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'user-registration' ),
|
134 |
-
sprintf( '<strong>%s</strong>',
|
135 |
'<a href="https://wordpress.org/support/plugin/user-registration/reviews?rate=5#new-post" target="_blank" class="ur-rating-link" data-rated="' . esc_attr__( 'Thank You!', 'user-registration' ) . '">★★★★★</a>'
|
136 |
)
|
137 |
);
|
131 |
sprintf(
|
132 |
/* translators: 1: User Registration 2:: five stars */
|
133 |
__( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'user-registration' ),
|
134 |
+
sprintf( '<strong>%s</strong>', esc_html( 'User Registration' ) ),
|
135 |
'<a href="https://wordpress.org/support/plugin/user-registration/reviews?rate=5#new-post" target="_blank" class="ur-rating-link" data-rated="' . esc_attr__( 'Thank You!', 'user-registration' ) . '">★★★★★</a>'
|
136 |
)
|
137 |
);
|
includes/admin/functions-ur-admin.php
CHANGED
@@ -115,7 +115,7 @@ function ur_get_user_report( $form_id ) {
|
|
115 |
*/
|
116 |
function ur_get_screen_ids() {
|
117 |
|
118 |
-
$ur_screen_id = sanitize_title(
|
119 |
$screen_ids = array(
|
120 |
'toplevel_page_' . $ur_screen_id,
|
121 |
$ur_screen_id . '_page_user-registration-dashboard',
|
115 |
*/
|
116 |
function ur_get_screen_ids() {
|
117 |
|
118 |
+
$ur_screen_id = sanitize_title( 'User Registration' );
|
119 |
$screen_ids = array(
|
120 |
'toplevel_page_' . $ur_screen_id,
|
121 |
$ur_screen_id . '_page_user-registration-dashboard',
|
includes/class-ur-form-block.php
CHANGED
@@ -59,7 +59,7 @@ class UR_Form_Block {
|
|
59 |
'forms' => ur_get_all_user_registration_form(),
|
60 |
'logo_url' => UR()->plugin_url() . '/assets/images/logo.png',
|
61 |
'i18n' => array(
|
62 |
-
'title' =>
|
63 |
'description' => esc_html__( 'Select & display one of your form.', 'user-registration' ),
|
64 |
'form_select' => esc_html__( 'Select a Form', 'user-registration' ),
|
65 |
'form_settings' => esc_html__( 'Form Settings', 'user-registration' ),
|
59 |
'forms' => ur_get_all_user_registration_form(),
|
60 |
'logo_url' => UR()->plugin_url() . '/assets/images/logo.png',
|
61 |
'i18n' => array(
|
62 |
+
'title' => esc_html( 'User Registration' ),
|
63 |
'description' => esc_html__( 'Select & display one of your form.', 'user-registration' ),
|
64 |
'form_select' => esc_html__( 'Select a Form', 'user-registration' ),
|
65 |
'form_settings' => esc_html__( 'Form Settings', 'user-registration' ),
|
includes/functions-ur-core.php
CHANGED
@@ -1607,23 +1607,25 @@ function ur_get_meta_key_label( $form_id ) {
|
|
1607 |
* @return array
|
1608 |
*/
|
1609 |
function ur_get_user_extra_fields( $user_id ) {
|
1610 |
-
$name_value
|
1611 |
|
1612 |
$admin_profile = new UR_Admin_Profile();
|
1613 |
-
$extra_data
|
1614 |
-
$form_fields
|
1615 |
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
|
|
1619 |
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
|
1625 |
-
|
1626 |
|
|
|
1627 |
}
|
1628 |
|
1629 |
return apply_filters( 'user_registration_user_extra_fields', $name_value, $user_id );
|
@@ -2660,10 +2662,17 @@ if ( ! function_exists( 'ur_format_field_values' ) ) {
|
|
2660 |
if ( strpos( $field_meta_key, 'user_registration_' ) ) {
|
2661 |
$field_meta_key = substr( $field_meta_key, 0, strpos( $field_meta_key, 'user_registration_' ) );
|
2662 |
}
|
2663 |
-
|
|
|
|
|
|
|
|
|
2664 |
$field_key = isset( $field_name['field_key'] ) ? $field_name['field_key'] : '';
|
2665 |
|
2666 |
switch ( $field_key ) {
|
|
|
|
|
|
|
2667 |
case 'country':
|
2668 |
$countries = UR_Form_Field_Country::get_instance()->get_country();
|
2669 |
$field_value = isset( $countries[ $field_value ] ) ? $countries[ $field_value ] : '';
|
@@ -2781,7 +2790,7 @@ if ( ! function_exists( 'ur_get_license_plan' ) ) {
|
|
2781 |
include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
2782 |
}
|
2783 |
|
2784 |
-
if ( $license_key && is_plugin_active( 'user-registration/user-registration.php' ) ) {
|
2785 |
$license_data = get_transient( 'ur_pro_license_plan' );
|
2786 |
|
2787 |
if ( false === $license_data ) {
|
1607 |
* @return array
|
1608 |
*/
|
1609 |
function ur_get_user_extra_fields( $user_id ) {
|
1610 |
+
$name_value = array();
|
1611 |
|
1612 |
$admin_profile = new UR_Admin_Profile();
|
1613 |
+
$extra_data = $admin_profile->get_user_meta_by_form_fields( $user_id );
|
1614 |
+
$form_fields = isset( array_column( $extra_data, 'fields' )[0] ) ? array_column( $extra_data, 'fields' )[0] : array(); //phpcs:ignore
|
1615 |
|
1616 |
+
if ( ! empty( $form_fields ) ) {
|
1617 |
+
foreach ( $form_fields as $field_key => $field_data ) {
|
1618 |
+
$value = get_user_meta( $user_id, $field_key, true );
|
1619 |
+
$field_key = str_replace( 'user_registration_', '', $field_key );
|
1620 |
|
1621 |
+
if ( is_serialized( $value ) ) {
|
1622 |
+
$value = unserialize( $value );
|
1623 |
+
$value = implode( ',', $value );
|
1624 |
+
}
|
1625 |
|
1626 |
+
$name_value[ $field_key ] = $value;
|
1627 |
|
1628 |
+
}
|
1629 |
}
|
1630 |
|
1631 |
return apply_filters( 'user_registration_user_extra_fields', $name_value, $user_id );
|
2662 |
if ( strpos( $field_meta_key, 'user_registration_' ) ) {
|
2663 |
$field_meta_key = substr( $field_meta_key, 0, strpos( $field_meta_key, 'user_registration_' ) );
|
2664 |
}
|
2665 |
+
|
2666 |
+
$user_id = isset( $_GET['user'] ) ? sanitize_text_field( wp_unslash( $_GET['user'] ) ) : get_current_user_id();
|
2667 |
+
$form_id = isset( $_POST['form_id'] ) ? sanitize_text_field( wp_unslash( $_POST['form_id'] ) ) : ur_get_form_id_by_userid( $user_id ); //phpcs:ignore
|
2668 |
+
|
2669 |
+
$field_name = ur_get_field_data_by_field_name( $form_id, $field_meta_key );
|
2670 |
$field_key = isset( $field_name['field_key'] ) ? $field_name['field_key'] : '';
|
2671 |
|
2672 |
switch ( $field_key ) {
|
2673 |
+
case 'checkbox':
|
2674 |
+
$field_value = ( is_array( $field_value ) && ! empty( $field_value ) ) ? implode( ', ', $field_value ) : $field_value;
|
2675 |
+
break;
|
2676 |
case 'country':
|
2677 |
$countries = UR_Form_Field_Country::get_instance()->get_country();
|
2678 |
$field_value = isset( $countries[ $field_value ] ) ? $countries[ $field_value ] : '';
|
2790 |
include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
2791 |
}
|
2792 |
|
2793 |
+
if ( $license_key && is_plugin_active( 'user-registration-pro/user-registration.php' ) ) {
|
2794 |
$license_data = get_transient( 'ur_pro_license_plan' );
|
2795 |
|
2796 |
if ( false === $license_data ) {
|
languages/user-registration.pot
CHANGED
@@ -2,22 +2,19 @@
|
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: User Registration 2.2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-11-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.7.1\n"
|
15 |
"X-Domain: user-registration\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
-
#: includes/admin/class-ur-admin.php:134
|
19 |
-
#: includes/admin/functions-ur-admin.php:118
|
20 |
-
#: includes/class-ur-form-block.php:62
|
21 |
msgid "User Registration"
|
22 |
msgstr ""
|
23 |
|
@@ -943,7 +940,7 @@ msgstr ""
|
|
943 |
#: includes/admin/settings/class-ur-settings-general.php:27
|
944 |
#: includes/admin/settings/class-ur-settings-general.php:69
|
945 |
#: includes/admin/settings/class-ur-settings-general.php:360
|
946 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
947 |
#: src/components/App.js:59
|
948 |
msgid "General"
|
949 |
msgstr ""
|
@@ -1056,12 +1053,12 @@ msgid "Frontend Messages"
|
|
1056 |
msgstr ""
|
1057 |
|
1058 |
#: includes/admin/settings/class-ur-settings-general.php:74
|
1059 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1060 |
msgid "Prevent WP Dashboard Access"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
#: includes/admin/settings/class-ur-settings-general.php:75
|
1064 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1065 |
msgid "Selected user roles will not be able to view and access the WP Dashboard area."
|
1066 |
msgstr ""
|
1067 |
|
@@ -1095,12 +1092,12 @@ msgid "This option lets you choose the layout for the user registration my accou
|
|
1095 |
msgstr ""
|
1096 |
|
1097 |
#: includes/admin/settings/class-ur-settings-general.php:120
|
1098 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1099 |
msgid "Horizontal"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
#: includes/admin/settings/class-ur-settings-general.php:121
|
1103 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1104 |
msgid "Vertical"
|
1105 |
msgstr ""
|
1106 |
|
@@ -1117,7 +1114,7 @@ msgid "Disable Profile Picture"
|
|
1117 |
msgstr ""
|
1118 |
|
1119 |
#: includes/admin/settings/class-ur-settings-general.php:135
|
1120 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1121 |
msgid "Check to disable profile picture in edit profile page."
|
1122 |
msgstr ""
|
1123 |
|
@@ -1346,48 +1343,48 @@ msgstr ""
|
|
1346 |
|
1347 |
#: includes/admin/settings/class-ur-settings-general.php:365
|
1348 |
#: includes/functions-ur-core.php:1083
|
1349 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1350 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1351 |
msgid "Form Template"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
#: includes/admin/settings/class-ur-settings-general.php:366
|
1355 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1356 |
msgid "Choose the login form template."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
#: includes/admin/settings/class-ur-settings-general.php:373
|
1360 |
#: includes/functions-ur-core.php:1090
|
1361 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1362 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1363 |
msgid "Default"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
#: includes/admin/settings/class-ur-settings-general.php:374
|
1367 |
#: includes/functions-ur-core.php:1091
|
1368 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1369 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1370 |
msgid "Bordered"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#: includes/admin/settings/class-ur-settings-general.php:375
|
1374 |
#: includes/functions-ur-core.php:1092
|
1375 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1376 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1377 |
msgid "Flat"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
#: includes/admin/settings/class-ur-settings-general.php:376
|
1381 |
#: includes/functions-ur-core.php:1093
|
1382 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1383 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1384 |
msgid "Rounded"
|
1385 |
msgstr ""
|
1386 |
|
1387 |
#: includes/admin/settings/class-ur-settings-general.php:377
|
1388 |
#: includes/functions-ur-core.php:1094
|
1389 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1390 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1391 |
msgid "Rounded Edge"
|
1392 |
msgstr ""
|
1393 |
|
@@ -1428,7 +1425,7 @@ msgid "Enable Lost Password"
|
|
1428 |
msgstr ""
|
1429 |
|
1430 |
#: includes/admin/settings/class-ur-settings-general.php:424
|
1431 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1432 |
msgid "Check to enable/disable lost password."
|
1433 |
msgstr ""
|
1434 |
|
@@ -1526,7 +1523,7 @@ msgstr ""
|
|
1526 |
|
1527 |
#: includes/admin/settings/class-ur-settings-general.php:527
|
1528 |
#: includes/admin/settings/class-ur-settings-general.php:533
|
1529 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
1530 |
#: templates/form-login-registration.php:31
|
1531 |
#: templates/myaccount/form-login.php:42
|
1532 |
#: src/components/App.js:81
|
@@ -2661,12 +2658,12 @@ msgid "No plugin specified."
|
|
2661 |
msgstr ""
|
2662 |
|
2663 |
#: includes/class-ur-ajax.php:1228
|
2664 |
-
#: includes/functions-ur-core.php:
|
2665 |
msgid "Sorry, you are not allowed to install plugins on this site."
|
2666 |
msgstr ""
|
2667 |
|
2668 |
#: includes/class-ur-ajax.php:1292
|
2669 |
-
#: includes/functions-ur-core.php:
|
2670 |
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
2671 |
msgstr ""
|
2672 |
|
@@ -2741,7 +2738,7 @@ msgid "Email not verified! Verify your email by clicking on the link sent to you
|
|
2741 |
msgstr ""
|
2742 |
|
2743 |
#: includes/class-ur-emailer.php:643
|
2744 |
-
#: includes/functions-ur-core.php:
|
2745 |
msgid "Chosen Password"
|
2746 |
msgstr ""
|
2747 |
|
@@ -2880,25 +2877,25 @@ msgstr ""
|
|
2880 |
|
2881 |
#: includes/class-ur-frontend-scripts.php:393
|
2882 |
#: includes/functions-ur-core.php:1008
|
2883 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2884 |
msgid "Very Weak"
|
2885 |
msgstr ""
|
2886 |
|
2887 |
#: includes/class-ur-frontend-scripts.php:394
|
2888 |
#: includes/functions-ur-core.php:1009
|
2889 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2890 |
msgid "Weak"
|
2891 |
msgstr ""
|
2892 |
|
2893 |
#: includes/class-ur-frontend-scripts.php:395
|
2894 |
#: includes/functions-ur-core.php:1010
|
2895 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2896 |
msgid "Medium"
|
2897 |
msgstr ""
|
2898 |
|
2899 |
#: includes/class-ur-frontend-scripts.php:396
|
2900 |
#: includes/functions-ur-core.php:1011
|
2901 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2902 |
msgid "Strong"
|
2903 |
msgstr ""
|
2904 |
|
@@ -2911,25 +2908,25 @@ msgid "Hint: To make password stronger, use upper and lower case letters, number
|
|
2911 |
msgstr ""
|
2912 |
|
2913 |
#: includes/class-ur-install.php:313
|
2914 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2915 |
msgctxt "Page slug"
|
2916 |
msgid "my-account"
|
2917 |
msgstr ""
|
2918 |
|
2919 |
#: includes/class-ur-install.php:314
|
2920 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2921 |
msgctxt "Page title"
|
2922 |
msgid "My Account"
|
2923 |
msgstr ""
|
2924 |
|
2925 |
#: includes/class-ur-install.php:324
|
2926 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2927 |
msgctxt "Page slug"
|
2928 |
msgid "registration"
|
2929 |
msgstr ""
|
2930 |
|
2931 |
#: includes/class-ur-install.php:325
|
2932 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
2933 |
msgctxt "Page title"
|
2934 |
msgid "Registration"
|
2935 |
msgstr ""
|
@@ -3010,13 +3007,13 @@ msgstr ""
|
|
3010 |
#. translators: %1$s: Activation error message
|
3011 |
#. translators: %1$s: Activation error message
|
3012 |
#: includes/class-ur-plugin-updater.php:366
|
3013 |
-
#: includes/functions-ur-core.php:
|
3014 |
-
#: includes/functions-ur-core.php:
|
3015 |
-
#: includes/functions-ur-core.php:
|
3016 |
-
#: includes/functions-ur-core.php:
|
3017 |
-
#: includes/functions-ur-core.php:
|
3018 |
-
#: includes/functions-ur-core.php:
|
3019 |
-
#: includes/functions-ur-core.php:
|
3020 |
msgid "<strong>Activation error:</strong> %1$s"
|
3021 |
msgstr ""
|
3022 |
|
@@ -3083,7 +3080,7 @@ msgid "Registrations"
|
|
3083 |
msgstr ""
|
3084 |
|
3085 |
#: includes/class-ur-post-types.php:49
|
3086 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
3087 |
#: src/components/App.js:70
|
3088 |
msgid "Registration"
|
3089 |
msgstr ""
|
@@ -4878,12 +4875,12 @@ msgid "Options"
|
|
4878 |
msgstr ""
|
4879 |
|
4880 |
#: includes/functions-ur-core.php:953
|
4881 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4882 |
msgid "User Approval And Login Option"
|
4883 |
msgstr ""
|
4884 |
|
4885 |
#: includes/functions-ur-core.php:954
|
4886 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4887 |
msgid "This option lets you choose login option after user registration."
|
4888 |
msgstr ""
|
4889 |
|
@@ -4900,32 +4897,32 @@ msgid "Check to receive a link with token in email to approve the users directly
|
|
4900 |
msgstr ""
|
4901 |
|
4902 |
#: includes/functions-ur-core.php:976
|
4903 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4904 |
msgid "Default User Role"
|
4905 |
msgstr ""
|
4906 |
|
4907 |
#: includes/functions-ur-core.php:985
|
4908 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4909 |
msgid "Default role for the users registered through this form."
|
4910 |
msgstr ""
|
4911 |
|
4912 |
#: includes/functions-ur-core.php:989
|
4913 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4914 |
msgid "Enable Strong Password"
|
4915 |
msgstr ""
|
4916 |
|
4917 |
#: includes/functions-ur-core.php:997
|
4918 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4919 |
msgid "Make strong password compulsary."
|
4920 |
msgstr ""
|
4921 |
|
4922 |
#: includes/functions-ur-core.php:1001
|
4923 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4924 |
msgid "Minimum Password Strength"
|
4925 |
msgstr ""
|
4926 |
|
4927 |
#: includes/functions-ur-core.php:1015
|
4928 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4929 |
msgid "Set minimum required password strength."
|
4930 |
msgstr ""
|
4931 |
|
@@ -4979,7 +4976,7 @@ msgid "Enable Captcha for strong security from spams and bots."
|
|
4979 |
msgstr ""
|
4980 |
|
4981 |
#: includes/functions-ur-core.php:1098
|
4982 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
4983 |
msgid "Choose form template to use."
|
4984 |
msgstr ""
|
4985 |
|
@@ -5012,23 +5009,23 @@ msgstr ""
|
|
5012 |
msgid "The class <code>%s</code> provided by user_registration_logging_class filter must implement <code>UR_Logger_Interface</code>."
|
5013 |
msgstr ""
|
5014 |
|
5015 |
-
#: includes/functions-ur-core.php:
|
5016 |
msgid "Conditional Logic"
|
5017 |
msgstr ""
|
5018 |
|
5019 |
-
#: includes/functions-ur-core.php:
|
5020 |
msgid "Use conditional logic"
|
5021 |
msgstr ""
|
5022 |
|
5023 |
-
#: includes/functions-ur-core.php:
|
5024 |
msgid "Conditional Rules"
|
5025 |
msgstr ""
|
5026 |
|
5027 |
-
#: includes/functions-ur-core.php:
|
5028 |
msgid "Send data only if the following matches."
|
5029 |
msgstr ""
|
5030 |
|
5031 |
-
#: includes/functions-ur-core.php:
|
5032 |
msgid "Checked"
|
5033 |
msgstr ""
|
5034 |
|
@@ -5066,56 +5063,56 @@ msgstr ""
|
|
5066 |
msgid "This method should not be called before plugins_loaded."
|
5067 |
msgstr ""
|
5068 |
|
5069 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5070 |
msgid "OnBoarding completed successfully"
|
5071 |
msgstr ""
|
5072 |
|
5073 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5074 |
msgid "Pages cannot be installed"
|
5075 |
msgstr ""
|
5076 |
|
5077 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5078 |
msgid "Anyone can register"
|
5079 |
msgstr ""
|
5080 |
|
5081 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5082 |
msgid "Check to enable users to register"
|
5083 |
msgstr ""
|
5084 |
|
5085 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5086 |
msgid "Enable lost password"
|
5087 |
msgstr ""
|
5088 |
|
5089 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5090 |
msgid "Enable remember me"
|
5091 |
msgstr ""
|
5092 |
|
5093 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5094 |
msgid "Check to enable/disable remember me."
|
5095 |
msgstr ""
|
5096 |
|
5097 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5098 |
msgid "Enable hide/show password"
|
5099 |
msgstr ""
|
5100 |
|
5101 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5102 |
msgid "Check to enable hide/show password icon."
|
5103 |
msgstr ""
|
5104 |
|
5105 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5106 |
#: src/components/App.js:92
|
5107 |
msgid "My Account"
|
5108 |
msgstr ""
|
5109 |
|
5110 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5111 |
msgid "My Account Page Layout"
|
5112 |
msgstr ""
|
5113 |
|
5114 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5115 |
msgid "This option lets you choose layout for user registration my account tab."
|
5116 |
msgstr ""
|
5117 |
|
5118 |
-
#: includes/RestApi/class-ur-rest-api.php:
|
5119 |
msgid "Disable profile picture"
|
5120 |
msgstr ""
|
5121 |
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: User Registration 2.2.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-11-23T08:30:46+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.7.1\n"
|
15 |
"X-Domain: user-registration\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
|
|
|
|
|
|
18 |
msgid "User Registration"
|
19 |
msgstr ""
|
20 |
|
940 |
#: includes/admin/settings/class-ur-settings-general.php:27
|
941 |
#: includes/admin/settings/class-ur-settings-general.php:69
|
942 |
#: includes/admin/settings/class-ur-settings-general.php:360
|
943 |
+
#: includes/RestApi/class-ur-rest-api.php:194
|
944 |
#: src/components/App.js:59
|
945 |
msgid "General"
|
946 |
msgstr ""
|
1053 |
msgstr ""
|
1054 |
|
1055 |
#: includes/admin/settings/class-ur-settings-general.php:74
|
1056 |
+
#: includes/RestApi/class-ur-rest-api.php:212
|
1057 |
msgid "Prevent WP Dashboard Access"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
#: includes/admin/settings/class-ur-settings-general.php:75
|
1061 |
+
#: includes/RestApi/class-ur-rest-api.php:213
|
1062 |
msgid "Selected user roles will not be able to view and access the WP Dashboard area."
|
1063 |
msgstr ""
|
1064 |
|
1092 |
msgstr ""
|
1093 |
|
1094 |
#: includes/admin/settings/class-ur-settings-general.php:120
|
1095 |
+
#: includes/RestApi/class-ur-rest-api.php:319
|
1096 |
msgid "Horizontal"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
#: includes/admin/settings/class-ur-settings-general.php:121
|
1100 |
+
#: includes/RestApi/class-ur-rest-api.php:320
|
1101 |
msgid "Vertical"
|
1102 |
msgstr ""
|
1103 |
|
1114 |
msgstr ""
|
1115 |
|
1116 |
#: includes/admin/settings/class-ur-settings-general.php:135
|
1117 |
+
#: includes/RestApi/class-ur-rest-api.php:325
|
1118 |
msgid "Check to disable profile picture in edit profile page."
|
1119 |
msgstr ""
|
1120 |
|
1343 |
|
1344 |
#: includes/admin/settings/class-ur-settings-general.php:365
|
1345 |
#: includes/functions-ur-core.php:1083
|
1346 |
+
#: includes/RestApi/class-ur-rest-api.php:225
|
1347 |
+
#: includes/RestApi/class-ur-rest-api.php:272
|
1348 |
msgid "Form Template"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
#: includes/admin/settings/class-ur-settings-general.php:366
|
1352 |
+
#: includes/RestApi/class-ur-rest-api.php:273
|
1353 |
msgid "Choose the login form template."
|
1354 |
msgstr ""
|
1355 |
|
1356 |
#: includes/admin/settings/class-ur-settings-general.php:373
|
1357 |
#: includes/functions-ur-core.php:1090
|
1358 |
+
#: includes/RestApi/class-ur-rest-api.php:231
|
1359 |
+
#: includes/RestApi/class-ur-rest-api.php:278
|
1360 |
msgid "Default"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
#: includes/admin/settings/class-ur-settings-general.php:374
|
1364 |
#: includes/functions-ur-core.php:1091
|
1365 |
+
#: includes/RestApi/class-ur-rest-api.php:232
|
1366 |
+
#: includes/RestApi/class-ur-rest-api.php:279
|
1367 |
msgid "Bordered"
|
1368 |
msgstr ""
|
1369 |
|
1370 |
#: includes/admin/settings/class-ur-settings-general.php:375
|
1371 |
#: includes/functions-ur-core.php:1092
|
1372 |
+
#: includes/RestApi/class-ur-rest-api.php:233
|
1373 |
+
#: includes/RestApi/class-ur-rest-api.php:280
|
1374 |
msgid "Flat"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
#: includes/admin/settings/class-ur-settings-general.php:376
|
1378 |
#: includes/functions-ur-core.php:1093
|
1379 |
+
#: includes/RestApi/class-ur-rest-api.php:234
|
1380 |
+
#: includes/RestApi/class-ur-rest-api.php:281
|
1381 |
msgid "Rounded"
|
1382 |
msgstr ""
|
1383 |
|
1384 |
#: includes/admin/settings/class-ur-settings-general.php:377
|
1385 |
#: includes/functions-ur-core.php:1094
|
1386 |
+
#: includes/RestApi/class-ur-rest-api.php:235
|
1387 |
+
#: includes/RestApi/class-ur-rest-api.php:282
|
1388 |
msgid "Rounded Edge"
|
1389 |
msgstr ""
|
1390 |
|
1425 |
msgstr ""
|
1426 |
|
1427 |
#: includes/admin/settings/class-ur-settings-general.php:424
|
1428 |
+
#: includes/RestApi/class-ur-rest-api.php:287
|
1429 |
msgid "Check to enable/disable lost password."
|
1430 |
msgstr ""
|
1431 |
|
1523 |
|
1524 |
#: includes/admin/settings/class-ur-settings-general.php:527
|
1525 |
#: includes/admin/settings/class-ur-settings-general.php:533
|
1526 |
+
#: includes/RestApi/class-ur-rest-api.php:269
|
1527 |
#: templates/form-login-registration.php:31
|
1528 |
#: templates/myaccount/form-login.php:42
|
1529 |
#: src/components/App.js:81
|
2658 |
msgstr ""
|
2659 |
|
2660 |
#: includes/class-ur-ajax.php:1228
|
2661 |
+
#: includes/functions-ur-core.php:2443
|
2662 |
msgid "Sorry, you are not allowed to install plugins on this site."
|
2663 |
msgstr ""
|
2664 |
|
2665 |
#: includes/class-ur-ajax.php:1292
|
2666 |
+
#: includes/functions-ur-core.php:2523
|
2667 |
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
2668 |
msgstr ""
|
2669 |
|
2738 |
msgstr ""
|
2739 |
|
2740 |
#: includes/class-ur-emailer.php:643
|
2741 |
+
#: includes/functions-ur-core.php:2157
|
2742 |
msgid "Chosen Password"
|
2743 |
msgstr ""
|
2744 |
|
2877 |
|
2878 |
#: includes/class-ur-frontend-scripts.php:393
|
2879 |
#: includes/functions-ur-core.php:1008
|
2880 |
+
#: includes/RestApi/class-ur-rest-api.php:252
|
2881 |
msgid "Very Weak"
|
2882 |
msgstr ""
|
2883 |
|
2884 |
#: includes/class-ur-frontend-scripts.php:394
|
2885 |
#: includes/functions-ur-core.php:1009
|
2886 |
+
#: includes/RestApi/class-ur-rest-api.php:253
|
2887 |
msgid "Weak"
|
2888 |
msgstr ""
|
2889 |
|
2890 |
#: includes/class-ur-frontend-scripts.php:395
|
2891 |
#: includes/functions-ur-core.php:1010
|
2892 |
+
#: includes/RestApi/class-ur-rest-api.php:254
|
2893 |
msgid "Medium"
|
2894 |
msgstr ""
|
2895 |
|
2896 |
#: includes/class-ur-frontend-scripts.php:396
|
2897 |
#: includes/functions-ur-core.php:1011
|
2898 |
+
#: includes/RestApi/class-ur-rest-api.php:255
|
2899 |
msgid "Strong"
|
2900 |
msgstr ""
|
2901 |
|
2908 |
msgstr ""
|
2909 |
|
2910 |
#: includes/class-ur-install.php:313
|
2911 |
+
#: includes/RestApi/class-ur-rest-api.php:156
|
2912 |
msgctxt "Page slug"
|
2913 |
msgid "my-account"
|
2914 |
msgstr ""
|
2915 |
|
2916 |
#: includes/class-ur-install.php:314
|
2917 |
+
#: includes/RestApi/class-ur-rest-api.php:157
|
2918 |
msgctxt "Page title"
|
2919 |
msgid "My Account"
|
2920 |
msgstr ""
|
2921 |
|
2922 |
#: includes/class-ur-install.php:324
|
2923 |
+
#: includes/RestApi/class-ur-rest-api.php:149
|
2924 |
msgctxt "Page slug"
|
2925 |
msgid "registration"
|
2926 |
msgstr ""
|
2927 |
|
2928 |
#: includes/class-ur-install.php:325
|
2929 |
+
#: includes/RestApi/class-ur-rest-api.php:150
|
2930 |
msgctxt "Page title"
|
2931 |
msgid "Registration"
|
2932 |
msgstr ""
|
3007 |
#. translators: %1$s: Activation error message
|
3008 |
#. translators: %1$s: Activation error message
|
3009 |
#: includes/class-ur-plugin-updater.php:366
|
3010 |
+
#: includes/functions-ur-core.php:2446
|
3011 |
+
#: includes/functions-ur-core.php:2465
|
3012 |
+
#: includes/functions-ur-core.php:2488
|
3013 |
+
#: includes/functions-ur-core.php:2507
|
3014 |
+
#: includes/functions-ur-core.php:2513
|
3015 |
+
#: includes/functions-ur-core.php:2518
|
3016 |
+
#: includes/functions-ur-core.php:2531
|
3017 |
msgid "<strong>Activation error:</strong> %1$s"
|
3018 |
msgstr ""
|
3019 |
|
3080 |
msgstr ""
|
3081 |
|
3082 |
#: includes/class-ur-post-types.php:49
|
3083 |
+
#: includes/RestApi/class-ur-rest-api.php:222
|
3084 |
#: src/components/App.js:70
|
3085 |
msgid "Registration"
|
3086 |
msgstr ""
|
4875 |
msgstr ""
|
4876 |
|
4877 |
#: includes/functions-ur-core.php:953
|
4878 |
+
#: includes/RestApi/class-ur-rest-api.php:204
|
4879 |
msgid "User Approval And Login Option"
|
4880 |
msgstr ""
|
4881 |
|
4882 |
#: includes/functions-ur-core.php:954
|
4883 |
+
#: includes/RestApi/class-ur-rest-api.php:205
|
4884 |
msgid "This option lets you choose login option after user registration."
|
4885 |
msgstr ""
|
4886 |
|
4897 |
msgstr ""
|
4898 |
|
4899 |
#: includes/functions-ur-core.php:976
|
4900 |
+
#: includes/RestApi/class-ur-rest-api.php:259
|
4901 |
msgid "Default User Role"
|
4902 |
msgstr ""
|
4903 |
|
4904 |
#: includes/functions-ur-core.php:985
|
4905 |
+
#: includes/RestApi/class-ur-rest-api.php:260
|
4906 |
msgid "Default role for the users registered through this form."
|
4907 |
msgstr ""
|
4908 |
|
4909 |
#: includes/functions-ur-core.php:989
|
4910 |
+
#: includes/RestApi/class-ur-rest-api.php:239
|
4911 |
msgid "Enable Strong Password"
|
4912 |
msgstr ""
|
4913 |
|
4914 |
#: includes/functions-ur-core.php:997
|
4915 |
+
#: includes/RestApi/class-ur-rest-api.php:240
|
4916 |
msgid "Make strong password compulsary."
|
4917 |
msgstr ""
|
4918 |
|
4919 |
#: includes/functions-ur-core.php:1001
|
4920 |
+
#: includes/RestApi/class-ur-rest-api.php:246
|
4921 |
msgid "Minimum Password Strength"
|
4922 |
msgstr ""
|
4923 |
|
4924 |
#: includes/functions-ur-core.php:1015
|
4925 |
+
#: includes/RestApi/class-ur-rest-api.php:247
|
4926 |
msgid "Set minimum required password strength."
|
4927 |
msgstr ""
|
4928 |
|
4976 |
msgstr ""
|
4977 |
|
4978 |
#: includes/functions-ur-core.php:1098
|
4979 |
+
#: includes/RestApi/class-ur-rest-api.php:226
|
4980 |
msgid "Choose form template to use."
|
4981 |
msgstr ""
|
4982 |
|
5009 |
msgid "The class <code>%s</code> provided by user_registration_logging_class filter must implement <code>UR_Logger_Interface</code>."
|
5010 |
msgstr ""
|
5011 |
|
5012 |
+
#: includes/functions-ur-core.php:2272
|
5013 |
msgid "Conditional Logic"
|
5014 |
msgstr ""
|
5015 |
|
5016 |
+
#: includes/functions-ur-core.php:2281
|
5017 |
msgid "Use conditional logic"
|
5018 |
msgstr ""
|
5019 |
|
5020 |
+
#: includes/functions-ur-core.php:2285
|
5021 |
msgid "Conditional Rules"
|
5022 |
msgstr ""
|
5023 |
|
5024 |
+
#: includes/functions-ur-core.php:2286
|
5025 |
msgid "Send data only if the following matches."
|
5026 |
msgstr ""
|
5027 |
|
5028 |
+
#: includes/functions-ur-core.php:2324
|
5029 |
msgid "Checked"
|
5030 |
msgstr ""
|
5031 |
|
5063 |
msgid "This method should not be called before plugins_loaded."
|
5064 |
msgstr ""
|
5065 |
|
5066 |
+
#: includes/RestApi/class-ur-rest-api.php:116
|
5067 |
msgid "OnBoarding completed successfully"
|
5068 |
msgstr ""
|
5069 |
|
5070 |
+
#: includes/RestApi/class-ur-rest-api.php:136
|
5071 |
msgid "Pages cannot be installed"
|
5072 |
msgstr ""
|
5073 |
|
5074 |
+
#: includes/RestApi/class-ur-rest-api.php:197
|
5075 |
msgid "Anyone can register"
|
5076 |
msgstr ""
|
5077 |
|
5078 |
+
#: includes/RestApi/class-ur-rest-api.php:198
|
5079 |
msgid "Check to enable users to register"
|
5080 |
msgstr ""
|
5081 |
|
5082 |
+
#: includes/RestApi/class-ur-rest-api.php:286
|
5083 |
msgid "Enable lost password"
|
5084 |
msgstr ""
|
5085 |
|
5086 |
+
#: includes/RestApi/class-ur-rest-api.php:293
|
5087 |
msgid "Enable remember me"
|
5088 |
msgstr ""
|
5089 |
|
5090 |
+
#: includes/RestApi/class-ur-rest-api.php:294
|
5091 |
msgid "Check to enable/disable remember me."
|
5092 |
msgstr ""
|
5093 |
|
5094 |
+
#: includes/RestApi/class-ur-rest-api.php:301
|
5095 |
msgid "Enable hide/show password"
|
5096 |
msgstr ""
|
5097 |
|
5098 |
+
#: includes/RestApi/class-ur-rest-api.php:302
|
5099 |
msgid "Check to enable hide/show password icon."
|
5100 |
msgstr ""
|
5101 |
|
5102 |
+
#: includes/RestApi/class-ur-rest-api.php:310
|
5103 |
#: src/components/App.js:92
|
5104 |
msgid "My Account"
|
5105 |
msgstr ""
|
5106 |
|
5107 |
+
#: includes/RestApi/class-ur-rest-api.php:313
|
5108 |
msgid "My Account Page Layout"
|
5109 |
msgstr ""
|
5110 |
|
5111 |
+
#: includes/RestApi/class-ur-rest-api.php:314
|
5112 |
msgid "This option lets you choose layout for user registration my account tab."
|
5113 |
msgstr ""
|
5114 |
|
5115 |
+
#: includes/RestApi/class-ur-rest-api.php:324
|
5116 |
msgid "Disable profile picture"
|
5117 |
msgstr ""
|
5118 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: WPEverest
|
|
3 |
Tags: user registration, registration, user profile, registration form, login form,
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
-
Tested up to: 6.1
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -276,6 +276,16 @@ Yes, the plugin has a shortcode for the login form.
|
|
276 |
16. User Account Page - Vertical Layout
|
277 |
|
278 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
= 2.2.4.1 - 14/11/2022
|
280 |
* Fix - Security issue in profile picture upload.
|
281 |
* Tweak - Parse user extra information according to form fields order.
|
3 |
Tags: user registration, registration, user profile, registration form, login form,
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
+
Tested up to: 6.1.1
|
7 |
+
Stable tag: 2.2.5
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
276 |
16. User Account Page - Vertical Layout
|
277 |
|
278 |
== Changelog ==
|
279 |
+
|
280 |
+
= 2.2.5 - 22/11/2022
|
281 |
+
* Fix - User Registration string translation issue.
|
282 |
+
* Fix - Auto approving users even when admin approval was enabled.
|
283 |
+
* Fix - Default role set to administrator after getting started end.
|
284 |
+
* Fix - Critical error while approving or updating user details by admin.
|
285 |
+
* Fix - Replace str_contains with strpos for compatibility below php version 8.
|
286 |
+
* Fix - Upgrade plan button in extensions page even when license was activated.
|
287 |
+
* Dev - Added trigger before redirect to another page after registration in JS.
|
288 |
+
|
289 |
= 2.2.4.1 - 14/11/2022
|
290 |
* Fix - Security issue in profile picture upload.
|
291 |
* Tweak - Parse user extra information according to form fields order.
|
user-registration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
-
* Version: 2.2.
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
@@ -31,7 +31,7 @@ if ( ! class_exists( 'UserRegistration' ) ) :
|
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
-
public $version = '2.2.
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
+
* Version: 2.2.5
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
+
public $version = '2.2.5';
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|