Version Description
- 11/07/2018 =
- Feature - Gravatar on user profile
- Feature - Layout(vertical/horizontal) on user account
- Feature - Verify/Unverify user by admin in email confirmation
- Refactor - Change account details tab to change password
- Add - Necessary changes required for conditional logic
- Fix - Broken resend verification email link
- Fix - Exclude placeholder for unnecessary fields
- Fix - Single checkbox update issue from admin profile
Download this release
Release Info
Developer | wpeverest |
Plugin | User Registration – Custom Registration Form, Login Form And User Profile For WordPress |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- assets/css/my-account-layout-rtl.css +1 -0
- assets/css/my-account-layout.css +1 -0
- assets/css/my-account-layout.scss +101 -0
- assets/js/admin/admin.js +41 -5
- assets/js/admin/admin.min.js +1 -1
- assets/js/frontend/user-registration.js +9 -5
- assets/js/frontend/user-registration.min.js +1 -1
- includes/admin/class-ur-admin-assets.php +8 -12
- includes/admin/class-ur-admin-editor.php +0 -2
- includes/admin/class-ur-admin-profile.php +9 -7
- includes/admin/class-ur-admin-user-manager.php +10 -2
- includes/admin/settings/class-ur-settings-general.php +32 -15
- includes/admin/views/html-admin-page-forms.php +1 -1
- includes/class-ur-ajax.php +25 -5
- includes/class-ur-email-confirmation.php +58 -6
- includes/class-ur-form-handler.php +25 -54
- includes/class-ur-frontend-scripts.php +6 -0
- includes/class-ur-install.php +4 -0
- includes/class-ur-query.php +3 -3
- includes/class-ur-shortcodes.php +2 -2
- includes/form/views/admin/admin-checkbox.php +1 -1
- includes/form/views/admin/admin-radio.php +1 -1
- includes/form/views/admin/admin-select.php +1 -1
- includes/frontend/class-ur-frontend-form-handler.php +44 -6
- includes/frontend/class-ur-frontend.php +16 -0
- includes/functions-ur-account.php +15 -9
- includes/functions-ur-core.php +72 -67
- includes/functions-ur-deprecated.php +1 -1
- includes/functions-ur-page.php +1 -1
- includes/functions-ur-template.php +45 -22
- includes/functions-ur-update.php +16 -0
- includes/shortcodes/class-ur-shortcode-my-account.php +1 -1
- languages/user-registration.pot +252 -250
- package-lock.json +1 -1
- readme.txt +24 -30
- templates/myaccount/dashboard.php +3 -3
- templates/myaccount/form-edit-account.php +0 -78
- templates/myaccount/form-edit-password.php +75 -0
- templates/myaccount/form-edit-profile.php +4 -2
- user-registration.php +2 -2
assets/css/my-account-layout-rtl.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#user-registration.vertical{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link{border-right:1px solid #ddd;border-top:1px solid #ddd;border-bottom:none transparent;border-left:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link:last-child{border-bottom:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active{border-left:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active::before{bottom:auto;left:-1px;width:1px;height:100%;right:auto;top:auto}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:80%}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link{border-left:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link:last-child{border-bottom:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active{border-left:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active::before{display:none}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}}
|
assets/css/my-account-layout.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#user-registration.vertical{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link{border-left:1px solid #ddd;border-top:1px solid #ddd;border-bottom:none transparent;border-right:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link:last-child{border-bottom:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active{border-right:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active::before{bottom:auto;right:-1px;width:1px;height:100%;left:auto;top:auto}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:80%}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link{border-right:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link:last-child{border-bottom:none transparent}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active{border-right:1px solid #ddd}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active::before{display:none}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}}
|
assets/css/my-account-layout.scss
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#user-registration {
|
2 |
+
&.vertical {
|
3 |
+
display: flex;
|
4 |
+
flex-wrap: wrap;
|
5 |
+
|
6 |
+
.user-registration-error, .user-registration-message {
|
7 |
+
float:none;
|
8 |
+
width: 100%;
|
9 |
+
}
|
10 |
+
|
11 |
+
.user-registration-MyAccount-navigation {
|
12 |
+
width: 20%;
|
13 |
+
|
14 |
+
ul {
|
15 |
+
flex-direction: column;
|
16 |
+
flex-wrap: nowrap;
|
17 |
+
|
18 |
+
.user-registration-MyAccount-navigation-link {
|
19 |
+
border-left: 1px solid #ddd;
|
20 |
+
border-top: 1px solid #ddd;
|
21 |
+
border-bottom: none transparent;
|
22 |
+
border-right: none transparent;
|
23 |
+
|
24 |
+
&:last-child {
|
25 |
+
border-bottom: 1px solid #ddd;
|
26 |
+
}
|
27 |
+
|
28 |
+
&.is-active {
|
29 |
+
border-right: none transparent;
|
30 |
+
|
31 |
+
&::before {
|
32 |
+
bottom: auto;
|
33 |
+
right: -1px;
|
34 |
+
width: 1px;
|
35 |
+
height: 100%;
|
36 |
+
left: auto;
|
37 |
+
top: auto;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
a {
|
42 |
+
padding: 15px 20px;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
.user-registration-MyAccount-content {
|
49 |
+
width: 80%;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
@media screen and (max-width: 980px) {
|
54 |
+
#user-registration {
|
55 |
+
&.vertical {
|
56 |
+
.user-registration-MyAccount-navigation {
|
57 |
+
width: 30%;
|
58 |
+
}
|
59 |
+
|
60 |
+
.user-registration-MyAccount-content {
|
61 |
+
width: 70%;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
@media screen and (max-width: 600px) {
|
68 |
+
#user-registration {
|
69 |
+
&.vertical {
|
70 |
+
.user-registration-MyAccount-navigation {
|
71 |
+
width: 100%;
|
72 |
+
|
73 |
+
ul {
|
74 |
+
.user-registration-MyAccount-navigation-link {
|
75 |
+
border-right:1px solid #ddd;
|
76 |
+
|
77 |
+
&:last-child {
|
78 |
+
border-bottom: none transparent;
|
79 |
+
}
|
80 |
+
|
81 |
+
&.is-active {
|
82 |
+
border-right: 1px solid #ddd;
|
83 |
+
|
84 |
+
&::before {
|
85 |
+
display: none;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
a {
|
90 |
+
padding: 15px 20px;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
.user-registration-MyAccount-content {
|
97 |
+
width: 100%;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
assets/js/admin/admin.js
CHANGED
@@ -159,8 +159,11 @@ jQuery(function ( $ ) {
|
|
159 |
$(template).insertBefore(container);
|
160 |
container.remove();
|
161 |
}
|
162 |
-
|
163 |
manage_draggable_users_fields();
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
});
|
166 |
},
|
@@ -330,11 +333,15 @@ jQuery(function ( $ ) {
|
|
330 |
remove_selected_item: function () {
|
331 |
var $this = this;
|
332 |
$('body').on('click', '.ur-selected-item .ur-action-buttons .ur-trash', function () {
|
|
|
333 |
$(this).closest('.ur-selected-item ').remove();
|
334 |
$this.check_grid();
|
335 |
builder.manage_empty_grid();
|
336 |
manage_draggable_users_fields();
|
337 |
|
|
|
|
|
|
|
338 |
});
|
339 |
},
|
340 |
clone_selected_item: function () {
|
@@ -443,6 +450,7 @@ jQuery(function ( $ ) {
|
|
443 |
}
|
444 |
});
|
445 |
});
|
|
|
446 |
});
|
447 |
function show_message ( message, type ) {
|
448 |
var message_string;
|
@@ -777,9 +785,6 @@ jQuery(function ( $ ) {
|
|
777 |
function trigger_general_setting_hide_label ( $label ) {
|
778 |
var wrapper = $('.ur-selected-item.ur-item-active');
|
779 |
wrapper.find('.ur-label').find('label').find('span').remove();
|
780 |
-
if ( $label.val() === 'yes' ) {
|
781 |
-
wrapper.find('.ur-label').find('label').append('<span style="color:red">*</span>');
|
782 |
-
}
|
783 |
wrapper.find('.ur-general-setting-block').find('select[data-field="' + $label.attr('data-field') + '"]').find('option[value="' + $label.val() + '"]').attr('selected', 'selected');
|
784 |
}
|
785 |
|
@@ -809,7 +814,6 @@ jQuery(function ( $ ) {
|
|
809 |
|
810 |
function manage_draggable_users_fields () {
|
811 |
|
812 |
-
|
813 |
var single_draggable_fields = user_registration_admin_data.form_one_time_draggable_fields;
|
814 |
|
815 |
var ul_node = $('#ur-tab-registered-fields').find('ul.ur-registered-list');
|
@@ -835,6 +839,38 @@ jQuery(function ( $ ) {
|
|
835 |
});
|
836 |
}
|
837 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
function ur_math_ceil ( value ) {
|
839 |
return Math.ceil(value, 0);
|
840 |
}
|
159 |
$(template).insertBefore(container);
|
160 |
container.remove();
|
161 |
}
|
|
|
162 |
manage_draggable_users_fields();
|
163 |
+
|
164 |
+
var populated_item = template.closest('.ur-selected-item ').find( "[data-field='field_name']").val();
|
165 |
+
manage_conditional_field_options( populated_item );
|
166 |
+
|
167 |
}
|
168 |
});
|
169 |
},
|
333 |
remove_selected_item: function () {
|
334 |
var $this = this;
|
335 |
$('body').on('click', '.ur-selected-item .ur-action-buttons .ur-trash', function () {
|
336 |
+
var removed_item = $(this).closest('.ur-selected-item ').find( "[data-field='field_name']").val();
|
337 |
$(this).closest('.ur-selected-item ').remove();
|
338 |
$this.check_grid();
|
339 |
builder.manage_empty_grid();
|
340 |
manage_draggable_users_fields();
|
341 |
|
342 |
+
//remove item from conditional logic options
|
343 |
+
jQuery('[class*="urcl-settings-rules_field_"] option[value="'+ removed_item + '"]').remove();
|
344 |
+
|
345 |
});
|
346 |
},
|
347 |
clone_selected_item: function () {
|
450 |
}
|
451 |
});
|
452 |
});
|
453 |
+
|
454 |
});
|
455 |
function show_message ( message, type ) {
|
456 |
var message_string;
|
785 |
function trigger_general_setting_hide_label ( $label ) {
|
786 |
var wrapper = $('.ur-selected-item.ur-item-active');
|
787 |
wrapper.find('.ur-label').find('label').find('span').remove();
|
|
|
|
|
|
|
788 |
wrapper.find('.ur-general-setting-block').find('select[data-field="' + $label.attr('data-field') + '"]').find('option[value="' + $label.val() + '"]').attr('selected', 'selected');
|
789 |
}
|
790 |
|
814 |
|
815 |
function manage_draggable_users_fields () {
|
816 |
|
|
|
817 |
var single_draggable_fields = user_registration_admin_data.form_one_time_draggable_fields;
|
818 |
|
819 |
var ul_node = $('#ur-tab-registered-fields').find('ul.ur-registered-list');
|
839 |
});
|
840 |
}
|
841 |
|
842 |
+
function manage_conditional_field_options( populated_item ) {
|
843 |
+
|
844 |
+
jQuery('.ur-grid-lists .ur-selected-item .ur-admin-template').each( function(){
|
845 |
+
var field_label = jQuery(this).find('.ur-label label').text();
|
846 |
+
var field_key = jQuery(this).find('.ur-field').attr('data-field-key');
|
847 |
+
|
848 |
+
//strip certain fields
|
849 |
+
if( 'section_title' == field_key || 'html' == field_key || 'wysiwyg' == field_key || 'billing_address_title' == field_key || 'shipping_address_title' == field_key ) {
|
850 |
+
return;
|
851 |
+
}
|
852 |
+
|
853 |
+
var general_setting = jQuery(this).find('.ur-general-setting-block .ur-general-setting');
|
854 |
+
general_setting.each( function() {
|
855 |
+
var field_name = jQuery(this).find("[data-field='field_name']").val();
|
856 |
+
if( typeof field_name !== 'undefined') {
|
857 |
+
|
858 |
+
//check if option exist in the given select
|
859 |
+
var select_value = jQuery(".urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1 option[value='" +field_name+ "']").length > 0;
|
860 |
+
if (! select_value == true ) {
|
861 |
+
jQuery('[class*="urcl-settings-rules_field_"]').append('<option value ="'+ field_name +'" data-type="' + field_key + '">'+field_label+' </option>');
|
862 |
+
if( field_name == populated_item ) {
|
863 |
+
jQuery('.urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields option[value="'+ populated_item + '"]').remove();
|
864 |
+
}
|
865 |
+
} else {
|
866 |
+
jQuery('.urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields').append('<option value ="'+ field_name +'" data-type="'+ field_key + '">'+field_label+' </option>');
|
867 |
+
}
|
868 |
+
}
|
869 |
+
});
|
870 |
+
});
|
871 |
+
jQuery('.urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields').removeClass( 'empty-fields');
|
872 |
+
}
|
873 |
+
|
874 |
function ur_math_ceil ( value ) {
|
875 |
return Math.ceil(value, 0);
|
876 |
}
|
assets/js/admin/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(){"email_confirmation"==jQuery("#user_registration_general_setting_login_options option:selected").val()&&(jQuery("#user_registration_general_setting_disable_email").attr("checked",!1),jQuery("#user_registration_general_setting_disable_email").attr("disabled",!0)),jQuery("body").on("select2:select","#user_registration_general_setting_login_options",function(){"email_confirmation"==jQuery(this).find("option:selected").val()?(jQuery("#user_registration_general_setting_disable_email").attr("checked",!1),jQuery("#user_registration_general_setting_disable_email").attr("disabled",!0)):jQuery("#user_registration_general_setting_disable_email").attr("disabled",!1)})}),jQuery(function(e){e(document.body).on("init_tooltips",function(){var t={attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200,keepAlive:!0};e(".tips, .help_tip, .user-registration-help-tip").tipTip(t),e(".parent-tips").each(function(){e(this).closest("a, th").attr("data-tip",e(this).data("tip")).tipTip(t).css("cursor","help")})}).trigger("init_tooltips"),e("body").on("keypress","#ur-form-name",function(t){13===t.which&&e("#save_form_footer").eq(0).trigger("click")})}),function(e,t){function i(t,i){var r;r="success"===i?'<div class="updated ur-notices" style="border-color: green;"><p><strong>'+c.i18n_success+"! </strong>"+t+"</p></div>":'<div class="updated ur-notices" style="border-color: red;"><p><strong>'+c.i18n_error+"!!! </strong>"+t+"</p></div>",e(".ur-form-subcontainer").find(".ur-notices").remove(),e(".ur-form-subcontainer").prepend(r),e("html, body").animate({scrollTop:e(".ur-notices").offset().top-50},600)}function r(){var t=[],i=e(".ur-selected-inputs .ur-single-row");return e.each(i,function(){var i=e(this).find(".ur-grid-list-item"),r=[];e.each(i,function(){var t=function(t){var i=t.find(".ur-selected-item"),r=[];return e.each(i,function(){var t=e(this),i={field_key:t.find(".ur-field").attr("data-field-key"),general_setting:function(t){var i=t.find(".ur-general-setting-block").find(".ur-general-setting-field"),r={};return e.each(i,function(){r[e(this).attr("data-field")]=a(e(this))}),r}(t),advance_setting:function(t){var i=t.find(".ur-advance-setting-block").find(".ur_advance_setting"),r={};return e.each(i,function(){r[e(this).attr("data-advance-field")]=a(e(this))}),r}(t)};r.push(i)}),r}(e(this));r.push(t)}),t.push(r)}),t}function a(e){var t="";switch(e.get(0).tagName.toLowerCase()){case"input":case"select":case"textarea":t=e.val()}return t}function n(){var t=e(".ur-general-setting-field");e.each(t,function(){var t=e(this);switch(t.attr("data-field")){case"label":t.on("keyup",function(){!function(t){e(".ur-selected-item.ur-item-active").find(".ur-label").find("label").text(t.val());e(".ur-selected-item.ur-item-active").find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').attr("value",t.val())}(e(this))});break;case"field_name":t.on("change",function(){!function(t){e(".ur-selected-item.ur-item-active").find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').attr("value",t.val())}(e(this))});break;case"placeholder":t.on("keyup",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-field").find("input").attr("placeholder",t.val()),i.find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').val(t.val())}(e(this))});break;case"required":t.on("change",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-label").find("label").find("span").remove(),"yes"===t.val()&&i.find(".ur-label").find("label").append('<span style="color:red">*</span>');i.find(".ur-general-setting-block").find('select[data-field="'+t.attr("data-field")+'"]').find('option[value="'+t.val()+'"]').attr("selected","selected")}(e(this))});break;case"hide_label":t.on("change",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-label").find("label").find("span").remove(),"yes"===t.val()&&i.find(".ur-label").find("label").append('<span style="color:red">*</span>');i.find(".ur-general-setting-block").find('select[data-field="'+t.attr("data-field")+'"]').find('option[value="'+t.val()+'"]').attr("selected","selected")}(e(this))});break;case"description":t.on("keyup",function(){d(e(this))});case"html":t.on("keyup",function(){d(e(this))})}});var i=e(".ur_advance_setting");e.each(i,function(){var t=e(this),i=t.get(0).tagName.toLowerCase(),r="change";switch(i){case"input":r="keyup";break;case"select":r="change";break;case"textarea":r="keyup";break;default:r="change"}e(this).on(r,function(){s(t,i)}),e(this).on("paste",function(){s(t,i)})})}function s(t,i){var r=e(".ur-selected-item.ur-item-active"),a=t.attr("data-id"),n=r.find(".ur-advance-setting-block").find('[data-id="'+a+'"]');switch(i){case"input":n.val(t.val());break;case"select":n.find('option[value="'+t.val()+'"]').attr("selected","selected");break;case"textarea":n.val(t.val()),function(t){switch(e(".ur-selected-item.ur-item-active").find(".ur-field").attr("data-field-key")){case"select":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field").find("select");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append("<option value='"+r[a]+"'>"+r[a].trim()+"</option>")}(t);break;case"checkbox":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append('<label><input value="'+r[a].trim()+'" type="checkbox">'+r[a].trim()+"</label>")}(t);break;case"radio":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append('<label><input value="'+r[a].trim()+'" type="radio">'+r[a].trim()+"</label>")}(t)}}(t.val())}}function d(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-field").find("textarea").attr("description",t.val()),i.find(".ur-general-setting-block").find('textarea[data-field="'+t.attr("data-field")+'"]').val(t.val())}function l(){var i=t.form_one_time_draggable_fields,r=e("#ur-tab-registered-fields").find("ul.ur-registered-list");e.each(r.find("li"),function(){var t=e(this),r=e(this).attr("data-field-id").replace("user_registration_","");e.inArray(r,i)>=0&&(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r+'"]').length>0?t.draggable("disable"):t.draggable("enable"))})}function o(e){return Math.ceil(e,0)}function u(e){return parseInt(e,0)}var c=t.i18n_admin;e(function(){({init:function(){e(document.body).on("click",".column-data_link a",this.add_item).on("ur_backbone_modal_loaded",this.backbone.init).on("ur_backbone_modal_response",this.backbone.response)},add_item:function(t){return t.preventDefault(),e(this).URBackboneModal({template:"test-demo"}),!1},backbone:{init:function(e,t){},response:function(e,t){}}}).init(),e.fn.ur_form_builder=function(){var r={active_grid:t.active_grid,number_of_grid_list:t.number_of_grid,min_grid_height:70};return this.each(function(){var a=e(this),n={init:function(){this.single_row(),function(){var i=t.form_required_fields,r=e(".ur-selected-inputs");if(e.isArray(i))for(var a=0;a<i.length;a++){var n=r.find('.ur-field[data-field-key="'+i[a]+'"]');n.closest(".ur-selected-item").find('select[data-field="required"]').val("yes").trigger("change"),n.closest(".ur-selected-item").find('select[data-field="required"]').find('option[value="yes"]').attr("selected","selected"),n.closest(".ur-selected-item").find('select[data-field="required"]').attr("disabled","disabled")}var s=r.find('select[data-field="required"]').find('option[selected="selected"][value="yes"]').closest(".ur-selected-item").find(".ur-label").find("label");s.find("span").remove(),s.append('<span style="color:red">*</span>')}()},get_grid_button:function(){var t=e('<div class="ur-grid-containner"/>'),i=o(u(r.number_of_grid_list)/u(r.active_grid))+"/"+r.number_of_grid_list,a='<div class="ur-grid-navigation ur-nav-right dashicons dashicons-arrow-left-alt2"></div><div class="ur-grid-size" data-active-grid="'+r.active_grid+'">'+i+'</div><div class="ur-grid-navigation ur-nav-left dashicons dashicons-arrow-right-alt2"></div><button type="button" class="dashicons dashicons-no-alt ur-remove-row"></button>';return t.html(a),t.html()},single_row:function(){var i=e("<div class='ur-single-row'/>");i.append(e("<div class='ur-grids'/>"));var d=this.get_grid_button();i.find(".ur-grids").append(d),i.find(".ur-grids").find('span[data-id="'+r.active_grid+'"]').addClass("ur-active-grid");var o=this.get_grid_lists(r.active_grid);i.append('<div style="clear:both"></div>'),i.append(o),i.append('<div style="clear:both"></div>'),a.append(i),a.find(".ur-add-new-row").remove(),a.append('<button type="button" class="dashicons dashicons-plus-alt ur-add-new-row ui-sortable-handle"></button>'),s.render_draggable_sortable(),n.manage_empty_grid(),"1"===t.is_edit_form&&e(".ur-single-row").eq(e(".ur-single-row").length-1).remove(),"1"!==t.is_edit_form&&(e(".ur-single-row").eq(0).find(".ur-grid-lists").eq(0).find(".ur-grid-list-item").eq(0).find(".user-registration-dragged-me").remove(),e(".ur-single-row").eq(0).find(".ur-grid-lists").eq(0).find(".ur-grid-list-item").eq(0).append(t.required_form_html)),l()},get_grid_lists:function(t){for(var i=e('<div class="ur-grid-lists"/>'),a=1;a<=t;a++){var n=e("<div ur-grid-id='"+a+"' class='ur-grid-list-item'></div>"),s=Math.floor(100/t)-t;s,n.css({width:s+"%","min-height":r.min_grid_height+"px"}),i.append(n)}return i.append('<div style="clear:both"></div>'),i.find(".ur-grid-list-item").eq("0").css({}),i},populate_dropped_node:function(i,r){var a={action:"user_registration_user_input_dropped",security:t.user_input_dropped,form_field_id:r},s='<div class="ur-selected-item ajax_added"><div class="ur-action-buttons"><span title="Clone" class="dashicons dashicons-admin-page ur-clone"></span><span title="Trash" class="dashicons dashicons-trash ur-trash"></span></div>(content)</div>';i.closest(".ur-single-row").find(".user-registration-dragged-me").fadeOut(),e.ajax({url:t.ajax_url,data:a,type:"POST",beforeSend:function(){i.removeAttr("class").removeAttr("id").removeAttr("data-field-id").addClass("ur-selected-item").css({width:"auto"}),i.html('<small class="spinner is-active"></small>'),i.addClass("ur-item-dragged")},complete:function(t){if(n.manage_empty_grid(),!0===t.responseJSON.success){var r=e(s.replace("(content)",t.responseJSON.data.template));r.removeClass("ajax_added"),r.removeClass("ur-item-dragged"),i.find(".ajax_added").find(".spinner").remove(),i.find(".ajax_added").remove(),e(r).insertBefore(i),i.remove()}l()}})},manage_empty_grid:function(){var t=e(".ur-selected-inputs"),i=e('<div class="user-registration-dragged-me"/>');i.html('<div class="user-registration-dragged-me-text"><p>'+c.i18n_drag_your_first_item_here+"</p></div>"),t.find(".user-registration-dragged-me").remove(),e.each(t.find(".ur-grid-list-item"),function(){var t=e(this);0===e(this).find(".ur-selected-item").length&&t.append(i.clone())})}},s={register:function(){this.register_add_new_row(),this.register_remove_row(),this.change_ur_grids(),this.remove_selected_item(),this.clone_selected_item()},register_add_new_row:function(){var t=this;e("body").on("click",".ur-add-new-row",function(){var i=e(this).closest(".ur-selected-inputs").find(".ur-single-row").eq(0).clone();i.find(".ur-grid-lists").html(""),i.find(".ur-grids").find("span").removeClass("ur-active-grid"),i.find(".ur-grids").find('span[data-id="'+r.active_grid+'"]').addClass("ur-active-grid");var a=n.get_grid_lists(r.active_grid);i.find(".ur-grid-lists").append(a.html()),i.insertBefore(".ur-add-new-row"),t.render_draggable_sortable(),n.manage_empty_grid()})},register_remove_row:function(){var t=this;e("body").on("click",".ur-remove-row",function(){if(e(".ur-selected-inputs").find(".ur-single-row").length>1){if(window.confirm(c.i18n_are_you_sure_want_to_delete)){var i,r=e(this).prev();(i=r.hasClass("ur-add-new-row")?r.clone():e(this).clone().attr("class","dashicons-minus ur-remove-row")).hasClass("ur-add-new-row")&&e(this).closest(".ur-single-row").prev().find(".ur-remove-row").before(i),e(this).closest(".ur-single-row").remove(),t.check_grid()}}else window.alert(c.i18n_at_least_one_row_need_to_select)})},change_ur_grids:function(){var t=this;e("body").on("click",".ur-single-row .ur-nav-right",function(){var i=e(this).closest(".ur-single-row"),a=e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid");if(!(a>=r.number_of_grid_list)){a=u(a)+1;var s=o(u(r.number_of_grid_list)/u(a))+"/"+r.number_of_grid_list;e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid",a),e(this).closest(".ur-grids").find(".ur-grid-size").text(s);var d=n.get_grid_lists(a);e.each(i.find(".ur-grid-lists .ur-grid-list-item"),function(){e(this).children("*").each(function(){d.find(".ur-grid-list-item").eq(0).append(e(this).clone())})}),i.find(".ur-grid-lists").eq(0).hide(),d.clone().insertAfter(i.find(".ur-grid-lists")),i.find(".ur-grid-lists").eq(0).remove(),t.render_draggable_sortable(),n.manage_empty_grid()}}),e("body").on("click",".ur-single-row .ur-nav-left",function(){var i=e(this).closest(".ur-single-row"),a=e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid");if(!(a<=1)){a=u(a)-1;var s=o(u(r.number_of_grid_list)/u(a))+"/"+r.number_of_grid_list;e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid",a),e(this).closest(".ur-grids").find(".ur-grid-size").text(s);var d=n.get_grid_lists(a);e.each(i.find(".ur-grid-lists .ur-grid-list-item"),function(){e(this).children("*").each(function(){d.find(".ur-grid-list-item").eq(0).append(e(this).clone())})}),i.find(".ur-grid-lists").eq(0).hide(),d.clone().insertAfter(i.find(".ur-grid-lists")),i.find(".ur-grid-lists").eq(0).remove(),t.render_draggable_sortable(),n.manage_empty_grid()}})},render_draggable_sortable:function(){e(".ur-grid-list-item").sortable({containment:".ur-selected-inputs",over:function(){e(this).addClass("ur-sortable-active"),n.manage_empty_grid()},out:function(){e(this).removeClass("ur-sortable-active"),n.manage_empty_grid()},revert:!0,connectWith:".ur-grid-list-item"}).disableSelection(),e(".ur-selected-inputs").sortable({containment:".ur-selected-inputs",tolerance:"pointer",revert:"invalid",placeholder:"ur-single-row",forceHelperSize:!0,over:function(){e(this).addClass("ur-sortable-active")},out:function(){e(this).removeClass("ur-sortable-active")}}),e("#ur-draggabled li").draggable({connectToSortable:".ur-grid-list-item",containment:".ur-registered-from",helper:"clone",revert:"invalid",stop:function(r,a){if(0!==e(a.helper).closest(".ur-grid-list-item").length){var s=e.trim(e(a.helper).attr("data-field-id").replace("user_registration_","")),d=e(".ur-selected-inputs").find('.ur-field[data-field-key="'+s+'"]').length,l=e.makeArray(t.form_one_time_draggable_fields);if(d>0&&e.inArray(s,l)>=0)return i(c.i18n_user_required_field_already_there),void e(a.helper).remove();var o=e(a.helper),u=e(o).attr("data-field-id");if(void 0!==u){var f=e(a.helper).closest(".ur-grid-list-item").find('li[data-field-id="'+e(this).attr("data-field-id")+'"]');n.populate_dropped_node(f,u)}}}}).disableSelection()},remove_selected_item:function(){var t=this;e("body").on("click",".ur-selected-item .ur-action-buttons .ur-trash",function(){e(this).closest(".ur-selected-item ").remove(),t.check_grid(),n.manage_empty_grid(),l()})},clone_selected_item:function(){e("body").on("click",".ur-selected-item .ur-action-buttons .ur-clone",function(){var r=e(this).closest(".ur-selected-item ").find(".ur-field").attr("data-field-key");if(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r+'"]').length>0&&e.inArray(r,t.form_one_time_draggable_fields)>-1)i(c.i18n_user_required_field_already_there_could_not_clone);else{var a=e(this).closest(".ur-selected-item ").clone(),n=a.find('input[data-field="field_name"]'),s=n.val().match(/\d+/g),d=s.length>0?s[s.length-1]:"",l=n.val().replace(d,"");a.find('input[data-field="field_name"]').attr("value",l+(new Date).getTime()),e(this).closest(".ur-grid-list-item").append(a)}})},check_grid:function(){e(".ur-tabs").tabs({disabled:[1]}),e(".ur-tabs").find("a").eq(0).trigger("click")}};n.init(),s.register()})},e(".ur-selected-inputs").ur_form_builder(),e(".ur-tabs").find("a").click(function(){e(".ur-tabs").find("a").removeClass("active"),e(this).addClass("active")}),e(".ur-tabs").tabs(),e(".ur-tabs").find("a").eq(0).trigger("click"),e(".ur-tabs").tabs({disabled:[1]}),e("body").on("click",".ur-selected-item",function(){e(".ur-registered-inputs").find("ul li.ur-no-pointer").removeClass("ur-no-pointer"),e(".ur-selected-item").removeClass("ur-item-active"),e(this).addClass("ur-item-active"),function(t){var i=t.find(".ur-advance-setting-block").clone(),r=t.find(".ur-general-setting-block").clone(),a=e("<form id='ur-setting-form'/>");e("#ur-tab-field-options").html(""),a.append(r),a.append(i),e("#ur-tab-field-options").append(a),e("#ur-tab-field-options").find(".ur-advance-setting-block").show(),e("#ur-tab-field-options").find(".ur-general-setting-block").show(),1===e(".ur-item-active").length&&(e(".ur-tabs").tabs("enable",1),e(".ur-tabs").find("a").eq(1).trigger("click"))}(e(this)),n()}),e(".ur_save_form_action_button").on("click",function(){var a=function(){var i=e.makeArray(t.form_one_time_draggable_fields),r=e.makeArray(t.form_required_fields),a={validation_status:!0,message:""};if(0===e(".ur-selected-item").length)return a.validation_status=!1,a.message=c.i18n_at_least_one_field_need_to_select,a;if(""===e("#ur-form-name").val())return a.validation_status=!1,a.message=c.i18n_empty_form_name,a;if(e(".ur_save_form_action_button").closest(".publishing-action").find(".spinner").length>0)return a.validation_status=!1,a.message=c.i18n_previous_save_action_ongoing,a;e.each(e('.ur-selected-inputs .ur-general-setting-block input[data-field="field_name"]'),function(){var t,i=e(this),r=!1;try{var n=i.val();if(e(".ur-selected-inputs .ur-general-setting-block").find('input[data-field="field_name"][value="'+n+'"]').length>1)throw c.i18n_duplicate_field_name;if(""===i.closest(".ur-general-setting-block").find('input[data-field="label"]').val())throw i=i.closest(".ur-general-setting-block").find('input[data-field="label"]'),c.i18n_empty_field_label;var s=n.match(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/gm);if(null===s||1!==s.length||s[0]!==n)throw c.i18n_invald_field_name}catch(d){a.validation_status=!1,a.message=d.message===undefined?d:d.message,i.closest(".ur-selected-item").trigger("click"),t=i.attr("data-field"),e("#ur-setting-form").find('input[data-field="'+t+'"]').css({border:"1px solid red"}),setTimeout(function(){e("#ur-setting-form").find('input[data-field="'+t+'"]').removeAttr("style")},2e3),r=!0}if(r)return!1});for(var n=0;n<i.length;n++)if(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+i[n]+'"]').length>1){a.validation_status=!1,a.message=c.i18n_multiple_field_key+i[n];break}for(var s=0;s<r.length;s++)if(0===e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r[s]+'"]').length){a.validation_status=!1,a.message=c.i18n_at_least_one_field_is_required+r[s];break}return a}();if(!1!==a.validation_status){var n=r(),s=e("#ur_form_id").val();u(t.post_id)!==u(s)&&(s=0);var d=e("#ur-field-settings").serializeArray(),l={action:"user_registration_form_save_action",security:t.ur_form_save,data:{form_data:JSON.stringify(n),form_name:e("#ur-form-name").val(),form_id:s,form_setting_data:d}};e.ajax({url:t.ajax_url,data:l,type:"POST",beforeSend:function(){e(".ur_save_form_action_button").closest(".publishing-action").append('<span class="spinner is-active" style="float: left;margin-top: 6px;"></span>'),e(".ur-notices").remove()},complete:function(r){if(e(".ur_save_form_action_button").closest(".publishing-action").find(".spinner").remove(),!0===r.responseJSON.success){i(c.i18n_form_successfully_saved,"success");var a=t.admin_url+r.responseJSON.data.post_id;window.location=a}else{i(r.responseJSON.data.message)}}})}else i(a.message)})})}(jQuery,window.user_registration_admin_data);
|
1 |
+
jQuery(function(){"email_confirmation"==jQuery("#user_registration_general_setting_login_options option:selected").val()&&(jQuery("#user_registration_general_setting_disable_email").attr("checked",!1),jQuery("#user_registration_general_setting_disable_email").attr("disabled",!0)),jQuery("body").on("select2:select","#user_registration_general_setting_login_options",function(){"email_confirmation"==jQuery(this).find("option:selected").val()?(jQuery("#user_registration_general_setting_disable_email").attr("checked",!1),jQuery("#user_registration_general_setting_disable_email").attr("disabled",!0)):jQuery("#user_registration_general_setting_disable_email").attr("disabled",!1)})}),jQuery(function(e){e(document.body).on("init_tooltips",function(){var t={attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200,keepAlive:!0};e(".tips, .help_tip, .user-registration-help-tip").tipTip(t),e(".parent-tips").each(function(){e(this).closest("a, th").attr("data-tip",e(this).data("tip")).tipTip(t).css("cursor","help")})}).trigger("init_tooltips"),e("body").on("keypress","#ur-form-name",function(t){13===t.which&&e("#save_form_footer").eq(0).trigger("click")})}),function(e,t){function i(t,i){var r;r="success"===i?'<div class="updated ur-notices" style="border-color: green;"><p><strong>'+c.i18n_success+"! </strong>"+t+"</p></div>":'<div class="updated ur-notices" style="border-color: red;"><p><strong>'+c.i18n_error+"!!! </strong>"+t+"</p></div>",e(".ur-form-subcontainer").find(".ur-notices").remove(),e(".ur-form-subcontainer").prepend(r),e("html, body").animate({scrollTop:e(".ur-notices").offset().top-50},600)}function r(){var t=[],i=e(".ur-selected-inputs .ur-single-row");return e.each(i,function(){var i=e(this).find(".ur-grid-list-item"),r=[];e.each(i,function(){var t=function(t){var i=t.find(".ur-selected-item"),r=[];return e.each(i,function(){var t=e(this),i={field_key:t.find(".ur-field").attr("data-field-key"),general_setting:function(t){var i=t.find(".ur-general-setting-block").find(".ur-general-setting-field"),r={};return e.each(i,function(){r[e(this).attr("data-field")]=a(e(this))}),r}(t),advance_setting:function(t){var i=t.find(".ur-advance-setting-block").find(".ur_advance_setting"),r={};return e.each(i,function(){r[e(this).attr("data-advance-field")]=a(e(this))}),r}(t)};r.push(i)}),r}(e(this));r.push(t)}),t.push(r)}),t}function a(e){var t="";switch(e.get(0).tagName.toLowerCase()){case"input":case"select":case"textarea":t=e.val()}return t}function n(){var t=e(".ur-general-setting-field");e.each(t,function(){var t=e(this);switch(t.attr("data-field")){case"label":t.on("keyup",function(){!function(t){e(".ur-selected-item.ur-item-active").find(".ur-label").find("label").text(t.val());e(".ur-selected-item.ur-item-active").find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').attr("value",t.val())}(e(this))});break;case"field_name":t.on("change",function(){!function(t){e(".ur-selected-item.ur-item-active").find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').attr("value",t.val())}(e(this))});break;case"placeholder":t.on("keyup",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-field").find("input").attr("placeholder",t.val()),i.find(".ur-general-setting-block").find('input[data-field="'+t.attr("data-field")+'"]').val(t.val())}(e(this))});break;case"required":t.on("change",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-label").find("label").find("span").remove(),"yes"===t.val()&&i.find(".ur-label").find("label").append('<span style="color:red">*</span>');i.find(".ur-general-setting-block").find('select[data-field="'+t.attr("data-field")+'"]').find('option[value="'+t.val()+'"]').attr("selected","selected")}(e(this))});break;case"hide_label":t.on("change",function(){!function(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-label").find("label").find("span").remove(),i.find(".ur-general-setting-block").find('select[data-field="'+t.attr("data-field")+'"]').find('option[value="'+t.val()+'"]').attr("selected","selected")}(e(this))});break;case"description":t.on("keyup",function(){d(e(this))});case"html":t.on("keyup",function(){d(e(this))})}});var i=e(".ur_advance_setting");e.each(i,function(){var t=e(this),i=t.get(0).tagName.toLowerCase(),r="change";switch(i){case"input":r="keyup";break;case"select":r="change";break;case"textarea":r="keyup";break;default:r="change"}e(this).on(r,function(){s(t,i)}),e(this).on("paste",function(){s(t,i)})})}function s(t,i){var r=e(".ur-selected-item.ur-item-active"),a=t.attr("data-id"),n=r.find(".ur-advance-setting-block").find('[data-id="'+a+'"]');switch(i){case"input":n.val(t.val());break;case"select":n.find('option[value="'+t.val()+'"]').attr("selected","selected");break;case"textarea":n.val(t.val()),function(t){switch(e(".ur-selected-item.ur-item-active").find(".ur-field").attr("data-field-key")){case"select":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field").find("select");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append("<option value='"+r[a]+"'>"+r[a].trim()+"</option>")}(t);break;case"checkbox":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append('<label><input value="'+r[a].trim()+'" type="checkbox">'+r[a].trim()+"</label>")}(t);break;case"radio":!function(t){t=e.trim(t);var i=e(".ur-selected-item.ur-item-active").find(".ur-field");i.html("");for(var r=t.split(","),a=0;a<r.length;a++)""!==r[a]&&i.append('<label><input value="'+r[a].trim()+'" type="radio">'+r[a].trim()+"</label>")}(t)}}(t.val())}}function d(t){var i=e(".ur-selected-item.ur-item-active");i.find(".ur-field").find("textarea").attr("description",t.val()),i.find(".ur-general-setting-block").find('textarea[data-field="'+t.attr("data-field")+'"]').val(t.val())}function l(){var i=t.form_one_time_draggable_fields,r=e("#ur-tab-registered-fields").find("ul.ur-registered-list");e.each(r.find("li"),function(){var t=e(this),r=e(this).attr("data-field-id").replace("user_registration_","");e.inArray(r,i)>=0&&(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r+'"]').length>0?t.draggable("disable"):t.draggable("enable"))})}function o(e){return Math.ceil(e,0)}function u(e){return parseInt(e,0)}var c=t.i18n_admin;e(function(){({init:function(){e(document.body).on("click",".column-data_link a",this.add_item).on("ur_backbone_modal_loaded",this.backbone.init).on("ur_backbone_modal_response",this.backbone.response)},add_item:function(t){return t.preventDefault(),e(this).URBackboneModal({template:"test-demo"}),!1},backbone:{init:function(e,t){},response:function(e,t){}}}).init(),e.fn.ur_form_builder=function(){var r={active_grid:t.active_grid,number_of_grid_list:t.number_of_grid,min_grid_height:70};return this.each(function(){var a=e(this),n={init:function(){this.single_row(),function(){var i=t.form_required_fields,r=e(".ur-selected-inputs");if(e.isArray(i))for(var a=0;a<i.length;a++){var n=r.find('.ur-field[data-field-key="'+i[a]+'"]');n.closest(".ur-selected-item").find('select[data-field="required"]').val("yes").trigger("change"),n.closest(".ur-selected-item").find('select[data-field="required"]').find('option[value="yes"]').attr("selected","selected"),n.closest(".ur-selected-item").find('select[data-field="required"]').attr("disabled","disabled")}var s=r.find('select[data-field="required"]').find('option[selected="selected"][value="yes"]').closest(".ur-selected-item").find(".ur-label").find("label");s.find("span").remove(),s.append('<span style="color:red">*</span>')}()},get_grid_button:function(){var t=e('<div class="ur-grid-containner"/>'),i=o(u(r.number_of_grid_list)/u(r.active_grid))+"/"+r.number_of_grid_list,a='<div class="ur-grid-navigation ur-nav-right dashicons dashicons-arrow-left-alt2"></div><div class="ur-grid-size" data-active-grid="'+r.active_grid+'">'+i+'</div><div class="ur-grid-navigation ur-nav-left dashicons dashicons-arrow-right-alt2"></div><button type="button" class="dashicons dashicons-no-alt ur-remove-row"></button>';return t.html(a),t.html()},single_row:function(){var i=e("<div class='ur-single-row'/>");i.append(e("<div class='ur-grids'/>"));var d=this.get_grid_button();i.find(".ur-grids").append(d),i.find(".ur-grids").find('span[data-id="'+r.active_grid+'"]').addClass("ur-active-grid");var o=this.get_grid_lists(r.active_grid);i.append('<div style="clear:both"></div>'),i.append(o),i.append('<div style="clear:both"></div>'),a.append(i),a.find(".ur-add-new-row").remove(),a.append('<button type="button" class="dashicons dashicons-plus-alt ur-add-new-row ui-sortable-handle"></button>'),s.render_draggable_sortable(),n.manage_empty_grid(),"1"===t.is_edit_form&&e(".ur-single-row").eq(e(".ur-single-row").length-1).remove(),"1"!==t.is_edit_form&&(e(".ur-single-row").eq(0).find(".ur-grid-lists").eq(0).find(".ur-grid-list-item").eq(0).find(".user-registration-dragged-me").remove(),e(".ur-single-row").eq(0).find(".ur-grid-lists").eq(0).find(".ur-grid-list-item").eq(0).append(t.required_form_html)),l()},get_grid_lists:function(t){for(var i=e('<div class="ur-grid-lists"/>'),a=1;a<=t;a++){var n=e("<div ur-grid-id='"+a+"' class='ur-grid-list-item'></div>"),s=Math.floor(100/t)-t;s,n.css({width:s+"%","min-height":r.min_grid_height+"px"}),i.append(n)}return i.append('<div style="clear:both"></div>'),i.find(".ur-grid-list-item").eq("0").css({}),i},populate_dropped_node:function(i,r){var a={action:"user_registration_user_input_dropped",security:t.user_input_dropped,form_field_id:r},s='<div class="ur-selected-item ajax_added"><div class="ur-action-buttons"><span title="Clone" class="dashicons dashicons-admin-page ur-clone"></span><span title="Trash" class="dashicons dashicons-trash ur-trash"></span></div>(content)</div>';i.closest(".ur-single-row").find(".user-registration-dragged-me").fadeOut(),e.ajax({url:t.ajax_url,data:a,type:"POST",beforeSend:function(){i.removeAttr("class").removeAttr("id").removeAttr("data-field-id").addClass("ur-selected-item").css({width:"auto"}),i.html('<small class="spinner is-active"></small>'),i.addClass("ur-item-dragged")},complete:function(t){if(n.manage_empty_grid(),!0===t.responseJSON.success){var r=e(s.replace("(content)",t.responseJSON.data.template));r.removeClass("ajax_added"),r.removeClass("ur-item-dragged"),i.find(".ajax_added").find(".spinner").remove(),i.find(".ajax_added").remove(),e(r).insertBefore(i),i.remove()}l();!function(e){jQuery(".ur-grid-lists .ur-selected-item .ur-admin-template").each(function(){var t=jQuery(this).find(".ur-label label").text(),i=jQuery(this).find(".ur-field").attr("data-field-key");"section_title"!=i&&"html"!=i&&"wysiwyg"!=i&&"billing_address_title"!=i&&"shipping_address_title"!=i&&jQuery(this).find(".ur-general-setting-block .ur-general-setting").each(function(){var r=jQuery(this).find("[data-field='field_name']").val();void 0!==r&&(1==!(jQuery(".urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1 option[value='"+r+"']").length>0)?(jQuery('[class*="urcl-settings-rules_field_"]').append('<option value ="'+r+'" data-type="'+i+'">'+t+" </option>"),r==e&&jQuery('.urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields option[value="'+e+'"]').remove()):jQuery(".urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields").append('<option value ="'+r+'" data-type="'+i+'">'+t+" </option>"))})}),jQuery(".urcl-rules select.ur_advance_setting.urcl-settings-rules_field_1.empty-fields").removeClass("empty-fields")}(r.closest(".ur-selected-item ").find("[data-field='field_name']").val())}})},manage_empty_grid:function(){var t=e(".ur-selected-inputs"),i=e('<div class="user-registration-dragged-me"/>');i.html('<div class="user-registration-dragged-me-text"><p>'+c.i18n_drag_your_first_item_here+"</p></div>"),t.find(".user-registration-dragged-me").remove(),e.each(t.find(".ur-grid-list-item"),function(){var t=e(this);0===e(this).find(".ur-selected-item").length&&t.append(i.clone())})}},s={register:function(){this.register_add_new_row(),this.register_remove_row(),this.change_ur_grids(),this.remove_selected_item(),this.clone_selected_item()},register_add_new_row:function(){var t=this;e("body").on("click",".ur-add-new-row",function(){var i=e(this).closest(".ur-selected-inputs").find(".ur-single-row").eq(0).clone();i.find(".ur-grid-lists").html(""),i.find(".ur-grids").find("span").removeClass("ur-active-grid"),i.find(".ur-grids").find('span[data-id="'+r.active_grid+'"]').addClass("ur-active-grid");var a=n.get_grid_lists(r.active_grid);i.find(".ur-grid-lists").append(a.html()),i.insertBefore(".ur-add-new-row"),t.render_draggable_sortable(),n.manage_empty_grid()})},register_remove_row:function(){var t=this;e("body").on("click",".ur-remove-row",function(){if(e(".ur-selected-inputs").find(".ur-single-row").length>1){if(window.confirm(c.i18n_are_you_sure_want_to_delete)){var i,r=e(this).prev();(i=r.hasClass("ur-add-new-row")?r.clone():e(this).clone().attr("class","dashicons-minus ur-remove-row")).hasClass("ur-add-new-row")&&e(this).closest(".ur-single-row").prev().find(".ur-remove-row").before(i),e(this).closest(".ur-single-row").remove(),t.check_grid()}}else window.alert(c.i18n_at_least_one_row_need_to_select)})},change_ur_grids:function(){var t=this;e("body").on("click",".ur-single-row .ur-nav-right",function(){var i=e(this).closest(".ur-single-row"),a=e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid");if(!(a>=r.number_of_grid_list)){a=u(a)+1;var s=o(u(r.number_of_grid_list)/u(a))+"/"+r.number_of_grid_list;e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid",a),e(this).closest(".ur-grids").find(".ur-grid-size").text(s);var d=n.get_grid_lists(a);e.each(i.find(".ur-grid-lists .ur-grid-list-item"),function(){e(this).children("*").each(function(){d.find(".ur-grid-list-item").eq(0).append(e(this).clone())})}),i.find(".ur-grid-lists").eq(0).hide(),d.clone().insertAfter(i.find(".ur-grid-lists")),i.find(".ur-grid-lists").eq(0).remove(),t.render_draggable_sortable(),n.manage_empty_grid()}}),e("body").on("click",".ur-single-row .ur-nav-left",function(){var i=e(this).closest(".ur-single-row"),a=e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid");if(!(a<=1)){a=u(a)-1;var s=o(u(r.number_of_grid_list)/u(a))+"/"+r.number_of_grid_list;e(this).closest(".ur-grids").find(".ur-grid-size").attr("data-active-grid",a),e(this).closest(".ur-grids").find(".ur-grid-size").text(s);var d=n.get_grid_lists(a);e.each(i.find(".ur-grid-lists .ur-grid-list-item"),function(){e(this).children("*").each(function(){d.find(".ur-grid-list-item").eq(0).append(e(this).clone())})}),i.find(".ur-grid-lists").eq(0).hide(),d.clone().insertAfter(i.find(".ur-grid-lists")),i.find(".ur-grid-lists").eq(0).remove(),t.render_draggable_sortable(),n.manage_empty_grid()}})},render_draggable_sortable:function(){e(".ur-grid-list-item").sortable({containment:".ur-selected-inputs",over:function(){e(this).addClass("ur-sortable-active"),n.manage_empty_grid()},out:function(){e(this).removeClass("ur-sortable-active"),n.manage_empty_grid()},revert:!0,connectWith:".ur-grid-list-item"}).disableSelection(),e(".ur-selected-inputs").sortable({containment:".ur-selected-inputs",tolerance:"pointer",revert:"invalid",placeholder:"ur-single-row",forceHelperSize:!0,over:function(){e(this).addClass("ur-sortable-active")},out:function(){e(this).removeClass("ur-sortable-active")}}),e("#ur-draggabled li").draggable({connectToSortable:".ur-grid-list-item",containment:".ur-registered-from",helper:"clone",revert:"invalid",stop:function(r,a){if(0!==e(a.helper).closest(".ur-grid-list-item").length){var s=e.trim(e(a.helper).attr("data-field-id").replace("user_registration_","")),d=e(".ur-selected-inputs").find('.ur-field[data-field-key="'+s+'"]').length,l=e.makeArray(t.form_one_time_draggable_fields);if(d>0&&e.inArray(s,l)>=0)return i(c.i18n_user_required_field_already_there),void e(a.helper).remove();var o=e(a.helper),u=e(o).attr("data-field-id");if(void 0!==u){var f=e(a.helper).closest(".ur-grid-list-item").find('li[data-field-id="'+e(this).attr("data-field-id")+'"]');n.populate_dropped_node(f,u)}}}}).disableSelection()},remove_selected_item:function(){var t=this;e("body").on("click",".ur-selected-item .ur-action-buttons .ur-trash",function(){var i=e(this).closest(".ur-selected-item ").find("[data-field='field_name']").val();e(this).closest(".ur-selected-item ").remove(),t.check_grid(),n.manage_empty_grid(),l(),jQuery('[class*="urcl-settings-rules_field_"] option[value="'+i+'"]').remove()})},clone_selected_item:function(){e("body").on("click",".ur-selected-item .ur-action-buttons .ur-clone",function(){var r=e(this).closest(".ur-selected-item ").find(".ur-field").attr("data-field-key");if(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r+'"]').length>0&&e.inArray(r,t.form_one_time_draggable_fields)>-1)i(c.i18n_user_required_field_already_there_could_not_clone);else{var a=e(this).closest(".ur-selected-item ").clone(),n=a.find('input[data-field="field_name"]'),s=n.val().match(/\d+/g),d=s.length>0?s[s.length-1]:"",l=n.val().replace(d,"");a.find('input[data-field="field_name"]').attr("value",l+(new Date).getTime()),e(this).closest(".ur-grid-list-item").append(a)}})},check_grid:function(){e(".ur-tabs").tabs({disabled:[1]}),e(".ur-tabs").find("a").eq(0).trigger("click")}};n.init(),s.register()})},e(".ur-selected-inputs").ur_form_builder(),e(".ur-tabs").find("a").click(function(){e(".ur-tabs").find("a").removeClass("active"),e(this).addClass("active")}),e(".ur-tabs").tabs(),e(".ur-tabs").find("a").eq(0).trigger("click"),e(".ur-tabs").tabs({disabled:[1]}),e("body").on("click",".ur-selected-item",function(){e(".ur-registered-inputs").find("ul li.ur-no-pointer").removeClass("ur-no-pointer"),e(".ur-selected-item").removeClass("ur-item-active"),e(this).addClass("ur-item-active"),function(t){var i=t.find(".ur-advance-setting-block").clone(),r=t.find(".ur-general-setting-block").clone(),a=e("<form id='ur-setting-form'/>");e("#ur-tab-field-options").html(""),a.append(r),a.append(i),e("#ur-tab-field-options").append(a),e("#ur-tab-field-options").find(".ur-advance-setting-block").show(),e("#ur-tab-field-options").find(".ur-general-setting-block").show(),1===e(".ur-item-active").length&&(e(".ur-tabs").tabs("enable",1),e(".ur-tabs").find("a").eq(1).trigger("click"))}(e(this)),n()}),e(".ur_save_form_action_button").on("click",function(){var a=function(){var i=e.makeArray(t.form_one_time_draggable_fields),r=e.makeArray(t.form_required_fields),a={validation_status:!0,message:""};if(0===e(".ur-selected-item").length)return a.validation_status=!1,a.message=c.i18n_at_least_one_field_need_to_select,a;if(""===e("#ur-form-name").val())return a.validation_status=!1,a.message=c.i18n_empty_form_name,a;if(e(".ur_save_form_action_button").closest(".publishing-action").find(".spinner").length>0)return a.validation_status=!1,a.message=c.i18n_previous_save_action_ongoing,a;e.each(e('.ur-selected-inputs .ur-general-setting-block input[data-field="field_name"]'),function(){var t,i=e(this),r=!1;try{var n=i.val();if(e(".ur-selected-inputs .ur-general-setting-block").find('input[data-field="field_name"][value="'+n+'"]').length>1)throw c.i18n_duplicate_field_name;if(""===i.closest(".ur-general-setting-block").find('input[data-field="label"]').val())throw i=i.closest(".ur-general-setting-block").find('input[data-field="label"]'),c.i18n_empty_field_label;var s=n.match(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/gm);if(null===s||1!==s.length||s[0]!==n)throw c.i18n_invald_field_name}catch(d){a.validation_status=!1,a.message=d.message===undefined?d:d.message,i.closest(".ur-selected-item").trigger("click"),t=i.attr("data-field"),e("#ur-setting-form").find('input[data-field="'+t+'"]').css({border:"1px solid red"}),setTimeout(function(){e("#ur-setting-form").find('input[data-field="'+t+'"]').removeAttr("style")},2e3),r=!0}if(r)return!1});for(var n=0;n<i.length;n++)if(e(".ur-selected-inputs").find('.ur-field[data-field-key="'+i[n]+'"]').length>1){a.validation_status=!1,a.message=c.i18n_multiple_field_key+i[n];break}for(var s=0;s<r.length;s++)if(0===e(".ur-selected-inputs").find('.ur-field[data-field-key="'+r[s]+'"]').length){a.validation_status=!1,a.message=c.i18n_at_least_one_field_is_required+r[s];break}return a}();if(!1!==a.validation_status){var n=r(),s=e("#ur_form_id").val();u(t.post_id)!==u(s)&&(s=0);var d=e("#ur-field-settings").serializeArray(),l={action:"user_registration_form_save_action",security:t.ur_form_save,data:{form_data:JSON.stringify(n),form_name:e("#ur-form-name").val(),form_id:s,form_setting_data:d}};e.ajax({url:t.ajax_url,data:l,type:"POST",beforeSend:function(){e(".ur_save_form_action_button").closest(".publishing-action").append('<span class="spinner is-active" style="float: left;margin-top: 6px;"></span>'),e(".ur-notices").remove()},complete:function(r){if(e(".ur_save_form_action_button").closest(".publishing-action").find(".spinner").remove(),!0===r.responseJSON.success){i(c.i18n_form_successfully_saved,"success");var a=t.admin_url+r.responseJSON.data.post_id;window.location=a}else{i(r.responseJSON.data.message)}}})}else i(a.message)})})}(jQuery,window.user_registration_admin_data);
|
assets/js/frontend/user-registration.js
CHANGED
@@ -54,7 +54,11 @@
|
|
54 |
element.parent().find( 'select:last' ).after( error );
|
55 |
}
|
56 |
} else {
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
},
|
60 |
highlight: function( element, errorClass, validClass ) {
|
@@ -165,7 +169,6 @@
|
|
165 |
} else {
|
166 |
if ( $.inArray(field_name, multi_value_field) < 0 ) {
|
167 |
multi_value_field.push(field_name);
|
168 |
-
|
169 |
}
|
170 |
}
|
171 |
});
|
@@ -218,9 +221,10 @@
|
|
218 |
|
219 |
var single_form_field_name = multi_value_field[ multi_start ];
|
220 |
single_form_field_name = single_form_field_name.replace('[]', '');
|
|
|
221 |
var field_data = {
|
222 |
value: field_value_json,
|
223 |
-
field_type:
|
224 |
label: field.eq(0).attr('data-label'),
|
225 |
field_name: single_form_field_name,
|
226 |
};
|
@@ -246,7 +250,6 @@
|
|
246 |
break;
|
247 |
default:
|
248 |
formwise_data.value = field.val();
|
249 |
-
|
250 |
}
|
251 |
break;
|
252 |
case 'select':
|
@@ -266,7 +269,7 @@
|
|
266 |
}
|
267 |
|
268 |
$(document).trigger("user_registration_frontend_form_data_render", [ field, formwise_data ]);
|
269 |
-
formwise_data.field_type = field.attr('
|
270 |
if ( field.attr('data-label') !== undefined ) {
|
271 |
formwise_data.label = field.attr('data-label');
|
272 |
} else if ( field.prev().get(0).tagName.toLowerCase() === 'label' ) {
|
@@ -276,6 +279,7 @@
|
|
276 |
}
|
277 |
if ( field.attr('name') !== undefined && field.attr('name') !== '' ) {
|
278 |
formwise_data.field_name = field.attr('name');
|
|
|
279 |
} else {
|
280 |
formwise_data.field_name = '';
|
281 |
}
|
54 |
element.parent().find( 'select:last' ).after( error );
|
55 |
}
|
56 |
} else {
|
57 |
+
if( element.hasClass('urfu-file-input') ) {
|
58 |
+
error.insertAfter( element.parent().parent() );
|
59 |
+
}else {
|
60 |
+
error.insertAfter( element );
|
61 |
+
}
|
62 |
}
|
63 |
},
|
64 |
highlight: function( element, errorClass, validClass ) {
|
169 |
} else {
|
170 |
if ( $.inArray(field_name, multi_value_field) < 0 ) {
|
171 |
multi_value_field.push(field_name);
|
|
|
172 |
}
|
173 |
}
|
174 |
});
|
221 |
|
222 |
var single_form_field_name = multi_value_field[ multi_start ];
|
223 |
single_form_field_name = single_form_field_name.replace('[]', '');
|
224 |
+
|
225 |
var field_data = {
|
226 |
value: field_value_json,
|
227 |
+
field_type: field_type,
|
228 |
label: field.eq(0).attr('data-label'),
|
229 |
field_name: single_form_field_name,
|
230 |
};
|
250 |
break;
|
251 |
default:
|
252 |
formwise_data.value = field.val();
|
|
|
253 |
}
|
254 |
break;
|
255 |
case 'select':
|
269 |
}
|
270 |
|
271 |
$(document).trigger("user_registration_frontend_form_data_render", [ field, formwise_data ]);
|
272 |
+
formwise_data.field_type = 'undefined' !== field.eq(0).attr('type') ? field.eq(0).attr('type') : 'null';
|
273 |
if ( field.attr('data-label') !== undefined ) {
|
274 |
formwise_data.label = field.attr('data-label');
|
275 |
} else if ( field.prev().get(0).tagName.toLowerCase() === 'label' ) {
|
279 |
}
|
280 |
if ( field.attr('name') !== undefined && field.attr('name') !== '' ) {
|
281 |
formwise_data.field_name = field.attr('name');
|
282 |
+
formwise_data.field_name = formwise_data.field_name.replace('[]', '');
|
283 |
} else {
|
284 |
formwise_data.field_name = '';
|
285 |
}
|
assets/js/frontend/user-registration.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){({$user_registration:e(".ur-frontend-form form.register"),init:function(){this.init_datepicker(),this.load_validation(),this.init_inputMask(),this.$user_registration.on("input validate change",".input-text, select, input:checkbox input:radio",this.validate_field)},init_inputMask:function(){"undefined"!=typeof e.fn.inputmask&&e(".ur-masked-input").inputmask()},init_datepicker:function(){e(".date-picker-field, .date-picker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-15Y",maxDate:"+15Y"})},load_validation:function(){if("undefined"==typeof e.fn.validate)return!1;e.validator.methods.email=function(e,r){var a=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return this.optional(r)||a.test(e)},this.$user_registration.each(function(){e(this).validate({errorClass:"user-registration-error",validClass:"user-registration-valid",errorPlacement:function(e,r){"radio"===r.attr("type")||"checkbox"===r.attr("type")?r.parent().parent().parent().append(e):r.is("select")&&r.attr("class").match(/date-month|date-day|date-year/)?0===r.parent().find("label.user-registration-error:visible").length&&r.parent().find("select:last").after(e):e.insertAfter(r)},highlight:function(r,a,t){var i=e(r);i.closest(".form-row"),i.attr("name")},unhighlight:function(r,a,t){var i=e(r),s=i.closest(".form-row"),n=i.attr("name");"radio"===i.attr("type")||"checkbox"===i.attr("type")?s.find("input[name='"+n+"']").addClass(t).removeClass(a):i.addClass(t).removeClass(a),s.removeClass("user-registration-has-error")},submitHandler:function(e){return!1}})})},validate_field:function(r){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});var a=e(this),t=a.closest(".form-row"),i=!0,s=t.is(".validate-required"),n=t.is(".validate-email"),u=r.type;if("input"===u&&t.removeClass("user-registration-invalid user-registration-invalid-required-field user-registration-invalid-email user-registration-validated"),"validate"===u||"change"===u){if(s&&("checkbox"!==a.attr("type")||a.is(":checked")?""===a.val()&&(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-required-field"),i=!1):(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-required-field"),i=!1)),n&&a.val()){new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a.val())||(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-email"),i=!1)}i&&t.removeClass("user-registration-invalid user-registration-invalid-required-field user-registration-invalid-email").addClass("user-registration-validated")}}}).init();var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var a=e(this),t=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(){var r=this,t=[],i=a.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"),s=new Array;e.each(i,function(){var i=e(this).attr("name");if(a.closest(".ur-frontend-form").find(".ur-form-grid").find('.ur-frontend-field[name="'+i+'"]').length<2){var n=r.get_fieldwise_data(e(this));t.push(n)}else e.inArray(i,s)<0&&s.push(i)});for(var n=0;n<s.length;n++){var u=a.closest(".ur-frontend-form").find(".ur-form-grid").find('.ur-frontend-field[name="'+s[n]+'"]'),o=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),d=new Array;if(e.each(u,function(){var r=e(this),a="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(o){case"checkbox":case"radio":a=r.prop("checked")?r.val():"";break;default:a=r.val()}break;case"select":case"textarea":a=r.val()}""!==a&&d.push(a)}),"checkbox"==o)var F=JSON.stringify(d);else if("radio"==o)F=d[0];else F=u.val();var l=s[n];l=l.replace("[]","");var f={value:F,field_type:u.eq(0).attr("id").replace("ur-input-type-",""),label:u.eq(0).attr("data-label"),field_name:l};t.push(f)}return e(document).trigger("user_registration_frontend_form_data_filter",[t]),t},get_fieldwise_data:function(r){var a={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(a.value="",s){case"input":switch(n){case"checkbox":case"radio":a.value=r.prop("checked")?r.val():"";break;default:a.value=r.val()}break;case"select":a.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),a.value=r.val();break;default:a.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,a]),a.field_type=r.attr("id").replace("ur-input-type-",""),r.attr("data-label")!==undefined?a.label=r.attr("data-label"):"label"===r.prev().get(0).tagName.toLowerCase()?a.label=r.prev().text():a.label=a.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?a.field_name=r.attr("name"):a.field_name="",e.inArray(a.field_name,e.trim(i))>=0&&t.push(a.field_name),a},show_message:function(r,a,t){t.find(".ur-message").remove();var i=e('<div class="ur-message user-registration-'+a+'" id="ur-submit-message-node"/>');i.append(r),t.append(i)}},n={init:function(){this.form_submit_event()},form_submit_event:function(){e("form.register").on("submit",function(t){if(a.valid()){if(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))return!1}t.preventDefault();var u;try{u=JSON.stringify(s.get_form_data())}catch(l){u=""}var o=0;1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(o=e(this).closest("form").find('input[name="ur-user-form-id"]').val());var d="0";1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(d=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var F={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:u,form_id:o,ur_frontend_form_nonce:d};if(e(document).trigger("user_registration_frontend_before_form_submit",[F,a]),"undefined"!=typeof ur_google_recaptcha_code&&"1"===ur_google_recaptcha_code.is_captcha_enable){if(0===a.find("#g-recaptcha-response").val().length)return void s.show_message("<p>"+r.captcha_error+"</p>","error",a);grecaptcha.reset()}a.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:F,type:"POST",async:!0,beforeSend:function(){},complete:function(t){a.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var i=e('<ul class=""/>'),n="error";try{var u=e.parseJSON(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&(n="message"),"object"==typeof u.data.message&&e.each(u.data.message,function(){e("<li/>").text(this).appendTo(i)}),"message"===n&&(e(".user-registration-password-hint").remove(),e(".user-registration-password-strength").remove(),"admin_approval"==user_registration_params.login_option?i.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==user_registration_params.login_option?i.append("<li>"+r.user_email_pending+"</li>"):i.append("<li>"+r.user_successfully_saved+"</li>"),a[0].reset(),""!==user_registration_params.redirect_url?window.setTimeout(function(){window.location=user_registration_params.redirect_url},1e3):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&location.reload())}catch(o){i.append("<li>"+o.message+"</li>")}s.show_message(i,n,a),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,n,a])}})}})}};s.init(),n.init()})},e(function(){e("form.register").ur_form_submission();var r=e('.ur-frontend-form input[type="date"]');r.length>0&&r.addClass("ur-date").attr("type","text").attr("placeholder","yy-mm-dd").datepicker({dateFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,yearRange:"1901:2099"})})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){google_recaptcha_user_registration=grecaptcha.render("node_recaptcha",{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})};
|
1 |
+
!function(e){({$user_registration:e(".ur-frontend-form form.register"),init:function(){this.init_datepicker(),this.load_validation(),this.init_inputMask(),this.$user_registration.on("input validate change",".input-text, select, input:checkbox input:radio",this.validate_field)},init_inputMask:function(){"undefined"!=typeof e.fn.inputmask&&e(".ur-masked-input").inputmask()},init_datepicker:function(){e(".date-picker-field, .date-picker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-15Y",maxDate:"+15Y"})},load_validation:function(){if("undefined"==typeof e.fn.validate)return!1;e.validator.methods.email=function(e,r){var a=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return this.optional(r)||a.test(e)},this.$user_registration.each(function(){e(this).validate({errorClass:"user-registration-error",validClass:"user-registration-valid",errorPlacement:function(e,r){"radio"===r.attr("type")||"checkbox"===r.attr("type")?r.parent().parent().parent().append(e):r.is("select")&&r.attr("class").match(/date-month|date-day|date-year/)?0===r.parent().find("label.user-registration-error:visible").length&&r.parent().find("select:last").after(e):e.insertAfter(r)},highlight:function(r,a,t){var i=e(r);i.closest(".form-row"),i.attr("name")},unhighlight:function(r,a,t){var i=e(r),s=i.closest(".form-row"),n=i.attr("name");"radio"===i.attr("type")||"checkbox"===i.attr("type")?s.find("input[name='"+n+"']").addClass(t).removeClass(a):i.addClass(t).removeClass(a),s.removeClass("user-registration-has-error")},submitHandler:function(e){return!1}})})},validate_field:function(r){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});var a=e(this),t=a.closest(".form-row"),i=!0,s=t.is(".validate-required"),n=t.is(".validate-email"),u=r.type;if("input"===u&&t.removeClass("user-registration-invalid user-registration-invalid-required-field user-registration-invalid-email user-registration-validated"),"validate"===u||"change"===u){if(s&&("checkbox"!==a.attr("type")||a.is(":checked")?""===a.val()&&(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-required-field"),i=!1):(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-required-field"),i=!1)),n&&a.val()){new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a.val())||(t.removeClass("user-registration-validated").addClass("user-registration-invalid user-registration-invalid-email"),i=!1)}i&&t.removeClass("user-registration-invalid user-registration-invalid-required-field user-registration-invalid-email").addClass("user-registration-validated")}}}).init();var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var a=e(this),t=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(){var r=this,t=[],i=a.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"),s=new Array;e.each(i,function(){var i=e(this).attr("name");if(a.closest(".ur-frontend-form").find(".ur-form-grid").find('.ur-frontend-field[name="'+i+'"]').length<2){var n=r.get_fieldwise_data(e(this));t.push(n)}else e.inArray(i,s)<0&&s.push(i)});for(var n=0;n<s.length;n++){var u=a.closest(".ur-frontend-form").find(".ur-form-grid").find('.ur-frontend-field[name="'+s[n]+'"]'),o=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),d=new Array;if(e.each(u,function(){var r=e(this),a="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(o){case"checkbox":case"radio":a=r.prop("checked")?r.val():"";break;default:a=r.val()}break;case"select":case"textarea":a=r.val()}""!==a&&d.push(a)}),"checkbox"==o)var F=JSON.stringify(d);else if("radio"==o)F=d[0];else F=u.val();var l=s[n];l=l.replace("[]","");var f={value:F,field_type:o,label:u.eq(0).attr("data-label"),field_name:l};t.push(f)}return e(document).trigger("user_registration_frontend_form_data_filter",[t]),t},get_fieldwise_data:function(r){var a={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(a.value="",s){case"input":switch(n){case"checkbox":case"radio":a.value=r.prop("checked")?r.val():"";break;default:a.value=r.val()}break;case"select":a.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),a.value=r.val();break;default:a.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,a]),a.field_type="undefined"!==r.eq(0).attr("type")?r.eq(0).attr("type"):"null",r.attr("data-label")!==undefined?a.label=r.attr("data-label"):"label"===r.prev().get(0).tagName.toLowerCase()?a.label=r.prev().text():a.label=a.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?(a.field_name=r.attr("name"),a.field_name=a.field_name.replace("[]","")):a.field_name="",e.inArray(a.field_name,e.trim(i))>=0&&t.push(a.field_name),a},show_message:function(r,a,t){t.find(".ur-message").remove();var i=e('<div class="ur-message user-registration-'+a+'" id="ur-submit-message-node"/>');i.append(r),t.append(i)}},n={init:function(){this.form_submit_event()},form_submit_event:function(){e("form.register").on("submit",function(t){if(a.valid()){if(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))return!1}t.preventDefault();var u;try{u=JSON.stringify(s.get_form_data())}catch(l){u=""}var o=0;1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(o=e(this).closest("form").find('input[name="ur-user-form-id"]').val());var d="0";1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(d=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var F={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:u,form_id:o,ur_frontend_form_nonce:d};if(e(document).trigger("user_registration_frontend_before_form_submit",[F,a]),"undefined"!=typeof ur_google_recaptcha_code&&"1"===ur_google_recaptcha_code.is_captcha_enable){if(0===a.find("#g-recaptcha-response").val().length)return void s.show_message("<p>"+r.captcha_error+"</p>","error",a);grecaptcha.reset()}a.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:F,type:"POST",async:!0,beforeSend:function(){},complete:function(t){a.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var i=e('<ul class=""/>'),n="error";try{var u=e.parseJSON(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&(n="message"),"object"==typeof u.data.message&&e.each(u.data.message,function(){e("<li/>").text(this).appendTo(i)}),"message"===n&&(e(".user-registration-password-hint").remove(),e(".user-registration-password-strength").remove(),"admin_approval"==user_registration_params.login_option?i.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==user_registration_params.login_option?i.append("<li>"+r.user_email_pending+"</li>"):i.append("<li>"+r.user_successfully_saved+"</li>"),a[0].reset(),""!==user_registration_params.redirect_url?window.setTimeout(function(){window.location=user_registration_params.redirect_url},1e3):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&location.reload())}catch(o){i.append("<li>"+o.message+"</li>")}s.show_message(i,n,a),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,n,a])}})}})}};s.init(),n.init()})},e(function(){e("form.register").ur_form_submission();var r=e('.ur-frontend-form input[type="date"]');r.length>0&&r.addClass("ur-date").attr("type","text").attr("placeholder","yy-mm-dd").datepicker({dateFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,yearRange:"1901:2099"})})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){google_recaptcha_user_registration=grecaptcha.render("node_recaptcha",{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})};
|
includes/admin/class-ur-admin-assets.php
CHANGED
@@ -118,20 +118,16 @@ class UR_Admin_Assets {
|
|
118 |
'i18n_load_more' => _x( 'Loading more results…', 'enhanced select', 'user-registration' ),
|
119 |
'i18n_searching' => _x( 'Searching…', 'enhanced select', 'user-registration' ),
|
120 |
) );
|
121 |
-
if ( 'user-registration_page_user-registration-modules' === $screen_id ) {
|
122 |
|
|
|
123 |
wp_enqueue_style( 'user-registration-modules' );
|
124 |
-
|
125 |
wp_enqueue_script( 'user-registration-modules-script' );
|
126 |
-
|
127 |
-
|
128 |
wp_localize_script( 'user-registration-modules-script', 'user_registration_module_params', array(
|
129 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
130 |
'error_could_not_install' => __( 'Could not install.', 'user-registration' )
|
131 |
-
|
132 |
-
) );
|
133 |
-
|
134 |
}
|
|
|
135 |
// UserRegistration admin pages
|
136 |
if ( in_array( $screen_id, ur_get_screen_ids() ) ) {
|
137 |
wp_enqueue_script( 'user-registration-admin' );
|
@@ -202,14 +198,14 @@ class UR_Admin_Assets {
|
|
202 |
|
203 |
$i18n = array(
|
204 |
|
205 |
-
'i18n_are_you_sure_want_to_delete' => _x( 'Are you sure want to delete
|
206 |
-
'i18n_at_least_one_row_need_to_select' => _x( 'At least one row
|
207 |
-
'i18n_user_required_field_already_there' => _x( '
|
208 |
-
'i18n_user_required_field_already_there_could_not_clone' => _x( '
|
209 |
'i18n_form_successfully_saved' => _x( 'Form successfully saved.', 'user registration admin', 'user-registration' ),
|
210 |
'i18n_success' => _x( 'Success', 'user registration admin', 'user-registration' ),
|
211 |
'i18n_error' => _x( 'Error', 'user registration admin', 'user-registration' ),
|
212 |
-
'i18n_at_least_one_field_need_to_select' => _x( 'At least one field
|
213 |
'i18n_empty_form_name' => _x( 'Empty form name.', 'user registration admin', 'user-registration' ),
|
214 |
'i18n_previous_save_action_ongoing' => _x( 'Previous save action on going.', 'user registration admin', 'user-registration' ),
|
215 |
'i18n_duplicate_field_name' => _x( 'Duplicate field name.', 'user registration admin', 'user-registration' ),
|
118 |
'i18n_load_more' => _x( 'Loading more results…', 'enhanced select', 'user-registration' ),
|
119 |
'i18n_searching' => _x( 'Searching…', 'enhanced select', 'user-registration' ),
|
120 |
) );
|
|
|
121 |
|
122 |
+
if ( 'user-registration_page_user-registration-modules' === $screen_id ) {
|
123 |
wp_enqueue_style( 'user-registration-modules' );
|
|
|
124 |
wp_enqueue_script( 'user-registration-modules-script' );
|
|
|
|
|
125 |
wp_localize_script( 'user-registration-modules-script', 'user_registration_module_params', array(
|
126 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
127 |
'error_could_not_install' => __( 'Could not install.', 'user-registration' )
|
128 |
+
));
|
|
|
|
|
129 |
}
|
130 |
+
|
131 |
// UserRegistration admin pages
|
132 |
if ( in_array( $screen_id, ur_get_screen_ids() ) ) {
|
133 |
wp_enqueue_script( 'user-registration-admin' );
|
198 |
|
199 |
$i18n = array(
|
200 |
|
201 |
+
'i18n_are_you_sure_want_to_delete' => _x( 'Are you sure want to delete?', 'user registration admin', 'user-registration' ),
|
202 |
+
'i18n_at_least_one_row_need_to_select' => _x( 'At least one row needs to be selected.', 'user registration admin', 'user-registration' ),
|
203 |
+
'i18n_user_required_field_already_there' => _x( 'This field is one time draggable.', 'user registration admin', 'user-registration' ),
|
204 |
+
'i18n_user_required_field_already_there_could_not_clone' => _x( 'Could not clone this field.', 'user registration admin', 'user-registration' ),
|
205 |
'i18n_form_successfully_saved' => _x( 'Form successfully saved.', 'user registration admin', 'user-registration' ),
|
206 |
'i18n_success' => _x( 'Success', 'user registration admin', 'user-registration' ),
|
207 |
'i18n_error' => _x( 'Error', 'user registration admin', 'user-registration' ),
|
208 |
+
'i18n_at_least_one_field_need_to_select' => _x( 'At least one field needs to be selected.', 'user registration admin', 'user-registration' ),
|
209 |
'i18n_empty_form_name' => _x( 'Empty form name.', 'user registration admin', 'user-registration' ),
|
210 |
'i18n_previous_save_action_ongoing' => _x( 'Previous save action on going.', 'user registration admin', 'user-registration' ),
|
211 |
'i18n_duplicate_field_name' => _x( 'Duplicate field name.', 'user registration admin', 'user-registration' ),
|
includes/admin/class-ur-admin-editor.php
CHANGED
@@ -21,7 +21,6 @@ if ( ! class_exists( 'UR_Admin_Editor', false ) ) :
|
|
21 |
/**
|
22 |
* Primary class constructor.
|
23 |
*/
|
24 |
-
|
25 |
public function __construct() {
|
26 |
|
27 |
add_action( 'media_buttons', array( $this, 'media_button' ), 15 );
|
@@ -98,7 +97,6 @@ if ( ! class_exists( 'UR_Admin_Editor', false ) ) :
|
|
98 |
</div>
|
99 |
</form>
|
100 |
</div>
|
101 |
-
|
102 |
<?php
|
103 |
}
|
104 |
}
|
21 |
/**
|
22 |
* Primary class constructor.
|
23 |
*/
|
|
|
24 |
public function __construct() {
|
25 |
|
26 |
add_action( 'media_buttons', array( $this, 'media_button' ), 15 );
|
97 |
</div>
|
98 |
</form>
|
99 |
</div>
|
|
|
100 |
<?php
|
101 |
}
|
102 |
}
|
includes/admin/class-ur-admin-profile.php
CHANGED
@@ -169,7 +169,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
169 |
|
170 |
$value = get_user_meta( $user->ID, $key, true );
|
171 |
|
172 |
-
if (
|
173 |
foreach ( $field['choices'] as $choice ) {
|
174 |
?><label><input type="checkbox"
|
175 |
name="<?php echo esc_attr( $key ); ?>[]"
|
@@ -177,6 +177,8 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
177 |
value="<?php echo esc_attr( trim( $choice ) ); ?>"
|
178 |
class="<?php echo esc_attr( $field['class'] ); ?>" <?php if (is_array( $value ) && in_array( trim( $choice ), $value ) ) {
|
179 |
echo 'checked="checked"';
|
|
|
|
|
180 |
} ?> ><?php echo trim( $choice ); ?></label><br/>
|
181 |
<?php
|
182 |
}
|
@@ -264,10 +266,11 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
264 |
foreach ( $fieldset['fields'] as $key => $field ) {
|
265 |
if ( isset( $field['type'] ) && 'checkbox' === $field['type'] ) {
|
266 |
if ( isset( $_POST[ $key ] ) ) {
|
|
|
267 |
if( is_array( $_POST[ $key ] ) ) {
|
268 |
-
$
|
269 |
-
|
270 |
-
|
271 |
}
|
272 |
else {
|
273 |
update_user_meta( $user_id, $key, '' );
|
@@ -385,8 +388,8 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
385 |
);
|
386 |
|
387 |
} elseif ( ! in_array( $field_name, ur_get_fields_without_prefix() ) ) {
|
388 |
-
$field_index = $field_name;
|
389 |
-
$fields[ $
|
390 |
'label' => __( $field_label, 'user-registration' ),
|
391 |
'description' => __( $field_description, 'user-registration' ),
|
392 |
);
|
@@ -459,7 +462,6 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
459 |
}// End foreach().
|
460 |
}// End foreach().
|
461 |
}// End foreach().
|
462 |
-
|
463 |
return $fields;
|
464 |
}
|
465 |
}
|
169 |
|
170 |
$value = get_user_meta( $user->ID, $key, true );
|
171 |
|
172 |
+
if ( is_array( $field['choices'] ) && array_filter( $field['choices'] ) ) {
|
173 |
foreach ( $field['choices'] as $choice ) {
|
174 |
?><label><input type="checkbox"
|
175 |
name="<?php echo esc_attr( $key ); ?>[]"
|
177 |
value="<?php echo esc_attr( trim( $choice ) ); ?>"
|
178 |
class="<?php echo esc_attr( $field['class'] ); ?>" <?php if (is_array( $value ) && in_array( trim( $choice ), $value ) ) {
|
179 |
echo 'checked="checked"';
|
180 |
+
}elseif( $value == $choice ) {
|
181 |
+
echo 'checked="checked"';
|
182 |
} ?> ><?php echo trim( $choice ); ?></label><br/>
|
183 |
<?php
|
184 |
}
|
266 |
foreach ( $fieldset['fields'] as $key => $field ) {
|
267 |
if ( isset( $field['type'] ) && 'checkbox' === $field['type'] ) {
|
268 |
if ( isset( $_POST[ $key ] ) ) {
|
269 |
+
$value = $_POST[ $key ];
|
270 |
if( is_array( $_POST[ $key ] ) ) {
|
271 |
+
$value = array_map( 'sanitize_text_field', $value );
|
272 |
+
}
|
273 |
+
update_user_meta( $user_id, $key, $value );
|
274 |
}
|
275 |
else {
|
276 |
update_user_meta( $user_id, $key, '' );
|
388 |
);
|
389 |
|
390 |
} elseif ( ! in_array( $field_name, ur_get_fields_without_prefix() ) ) {
|
391 |
+
$field_index = 'user_registration_' . $field_name;
|
392 |
+
$fields[ $field_index ] = array(
|
393 |
'label' => __( $field_label, 'user-registration' ),
|
394 |
'description' => __( $field_description, 'user-registration' ),
|
395 |
);
|
462 |
}// End foreach().
|
463 |
}// End foreach().
|
464 |
}// End foreach().
|
|
|
465 |
return $fields;
|
466 |
}
|
467 |
}
|
includes/admin/class-ur-admin-user-manager.php
CHANGED
@@ -78,8 +78,16 @@ class UR_Admin_User_Manager {
|
|
78 |
do_action( 'ur_user_status_updated', $status, $this->user->ID, $alert_user );
|
79 |
|
80 |
$action_label = '';
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
if ( ! empty( $action_label ) ) {
|
85 |
do_action( 'ur_user_' . $action_label, $this->user->ID );
|
78 |
do_action( 'ur_user_status_updated', $status, $this->user->ID, $alert_user );
|
79 |
|
80 |
$action_label = '';
|
81 |
+
|
82 |
+
switch ($status) {
|
83 |
+
case UR_Admin_User_Manager::APPROVED:
|
84 |
+
$action_label = 'approved';
|
85 |
+
break;
|
86 |
+
|
87 |
+
case UR_Admin_User_Manager::DENIED:
|
88 |
+
$action_label = 'denied';
|
89 |
+
break;
|
90 |
+
}
|
91 |
|
92 |
if ( ! empty( $action_label ) ) {
|
93 |
do_action( 'ur_user_' . $action_label, $this->user->ID );
|
includes/admin/settings/class-ur-settings-general.php
CHANGED
@@ -20,7 +20,6 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
20 |
*/
|
21 |
class UR_Settings_General extends UR_Settings_Page {
|
22 |
|
23 |
-
|
24 |
/**
|
25 |
* Constructor.
|
26 |
*/
|
@@ -135,21 +134,35 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
135 |
),
|
136 |
|
137 |
array(
|
138 |
-
'title' => __( 'My account
|
139 |
'type' => 'title',
|
140 |
-
'
|
141 |
-
'id' => 'account_endpoint_options',
|
142 |
),
|
143 |
-
|
144 |
array(
|
145 |
-
'title' => __( '
|
146 |
-
'desc' => __( '
|
147 |
-
'id' => '
|
148 |
-
'
|
149 |
-
'
|
|
|
|
|
150 |
'desc_tip' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
),
|
152 |
-
|
153 |
array(
|
154 |
'title' => __( 'Edit profile', 'user-registration' ),
|
155 |
'desc' => __( 'Endpoint for the "My account → Edit profile" page.', 'user-registration' ),
|
@@ -158,7 +171,14 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
158 |
'default' => 'edit-profile',
|
159 |
'desc_tip' => true,
|
160 |
),
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
array(
|
163 |
'title' => __( 'Lost password', 'user-registration' ),
|
164 |
'desc' => __( 'Endpoint for the "My account → Lost password" page.', 'user-registration' ),
|
@@ -167,7 +187,6 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
167 |
'default' => 'lost-password',
|
168 |
'desc_tip' => true,
|
169 |
),
|
170 |
-
|
171 |
array(
|
172 |
'title' => __( 'User logout', 'user-registration' ),
|
173 |
'desc' => __( 'Endpoint for the triggering logout. You can add this to your menus via a custom link: yoursite.com/?user-logout=true', 'user-registration' ),
|
@@ -176,7 +195,6 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
176 |
'default' => 'user-logout',
|
177 |
'desc_tip' => true,
|
178 |
),
|
179 |
-
|
180 |
array(
|
181 |
'type' => 'sectionend',
|
182 |
'id' => 'account_endpoint_options',
|
@@ -313,7 +331,6 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
313 |
/**
|
314 |
* Output the settings.
|
315 |
*/
|
316 |
-
|
317 |
public function output() {
|
318 |
|
319 |
global $current_section;
|
20 |
*/
|
21 |
class UR_Settings_General extends UR_Settings_Page {
|
22 |
|
|
|
23 |
/**
|
24 |
* Constructor.
|
25 |
*/
|
134 |
),
|
135 |
|
136 |
array(
|
137 |
+
'title' => __( 'My account Section', 'user-registration' ),
|
138 |
'type' => 'title',
|
139 |
+
'id' => 'my_account_options',
|
|
|
140 |
),
|
|
|
141 |
array(
|
142 |
+
'title' => __( 'Layout', 'user-registration' ),
|
143 |
+
'desc' => __( 'This option lets you choose layout for user registration my account tab.', 'user-registration' ),
|
144 |
+
'id' => 'user_registration_my_account_layout',
|
145 |
+
'default' => 'horizontal',
|
146 |
+
'type' => 'select',
|
147 |
+
'class' => 'ur-enhanced-select',
|
148 |
+
'css' => 'min-width: 350px;',
|
149 |
'desc_tip' => true,
|
150 |
+
'options' => array(
|
151 |
+
'horizontal' => __( 'Horizontal', 'user-registration' ) ,
|
152 |
+
'vertical' => __( 'Vertical', 'user-registration' )
|
153 |
+
),
|
154 |
+
),
|
155 |
+
array(
|
156 |
+
'type' => 'sectionend',
|
157 |
+
'id' => 'my_account_options',
|
158 |
+
),
|
159 |
+
array(
|
160 |
+
'title' => __( '', 'user-registration' ),
|
161 |
+
'type' => 'title',
|
162 |
+
'desc' => '<strong>'. __( 'Endpoints: ','user-registration' ). '</strong>' . __( 'Endpoints are appended to your page URLs to handle specific actions on the accounts pages. They should be unique and can be left blank to disable the endpoint.', 'user-registration' ),
|
163 |
+
'css' => 'min-width: 250px;',
|
164 |
+
'id' => 'account_endpoint_options',
|
165 |
),
|
|
|
166 |
array(
|
167 |
'title' => __( 'Edit profile', 'user-registration' ),
|
168 |
'desc' => __( 'Endpoint for the "My account → Edit profile" page.', 'user-registration' ),
|
171 |
'default' => 'edit-profile',
|
172 |
'desc_tip' => true,
|
173 |
),
|
174 |
+
array(
|
175 |
+
'title' => __( 'Change Password', 'user-registration' ),
|
176 |
+
'desc' => __( 'Endpoint for the "My account → Change Password" page.', 'user-registration' ),
|
177 |
+
'id' => 'user_registration_myaccount_change_password_endpoint',
|
178 |
+
'type' => 'text',
|
179 |
+
'default' => 'edit-password',
|
180 |
+
'desc_tip' => true,
|
181 |
+
),
|
182 |
array(
|
183 |
'title' => __( 'Lost password', 'user-registration' ),
|
184 |
'desc' => __( 'Endpoint for the "My account → Lost password" page.', 'user-registration' ),
|
187 |
'default' => 'lost-password',
|
188 |
'desc_tip' => true,
|
189 |
),
|
|
|
190 |
array(
|
191 |
'title' => __( 'User logout', 'user-registration' ),
|
192 |
'desc' => __( 'Endpoint for the triggering logout. You can add this to your menus via a custom link: yoursite.com/?user-logout=true', 'user-registration' ),
|
195 |
'default' => 'user-logout',
|
196 |
'desc_tip' => true,
|
197 |
),
|
|
|
198 |
array(
|
199 |
'type' => 'sectionend',
|
200 |
'id' => 'account_endpoint_options',
|
331 |
/**
|
332 |
* Output the settings.
|
333 |
*/
|
|
|
334 |
public function output() {
|
335 |
|
336 |
global $current_section;
|
includes/admin/views/html-admin-page-forms.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
}
|
5 |
?>
|
6 |
<div class="wrap ur-form-container">
|
7 |
-
<h1 class="wp-heading-inline"><?php esc_html_e( 'Registration
|
8 |
<div id="menu-management-liquid" class="ur-form-subcontainer">
|
9 |
<div id="menu-management">
|
10 |
<div class="menu-edit ">
|
4 |
}
|
5 |
?>
|
6 |
<div class="wrap ur-form-container">
|
7 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'User Registration', 'user-registration' ) ?></h1>
|
8 |
<div id="menu-management-liquid" class="ur-form-subcontainer">
|
9 |
<div id="menu-management">
|
10 |
<div class="menu-edit ">
|
includes/class-ur-ajax.php
CHANGED
@@ -51,7 +51,10 @@ class UR_AJAX {
|
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
|
|
|
|
|
|
|
55 |
public static function user_form_submit() {
|
56 |
|
57 |
check_ajax_referer( 'user_registration_form_data_save_nonce', 'security' );
|
@@ -72,7 +75,7 @@ class UR_AJAX {
|
|
72 |
|
73 |
if ( ! $users_can_register ) {
|
74 |
wp_send_json_error( array(
|
75 |
-
'message' => apply_filters( 'ur_register_pre_form_message', __( 'Only
|
76 |
) );
|
77 |
}
|
78 |
} else {
|
@@ -88,7 +91,7 @@ class UR_AJAX {
|
|
88 |
$display_name = ! empty( $user->data->display_name ) ? $user->data->display_name : $user->data->user_email;
|
89 |
|
90 |
wp_send_json_error( array(
|
91 |
-
'message' => apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . sprintf( __( "You are currently logged in as %1s.
|
92 |
) );
|
93 |
}
|
94 |
}
|
@@ -138,7 +141,10 @@ class UR_AJAX {
|
|
138 |
}
|
139 |
}
|
140 |
|
141 |
-
|
|
|
|
|
|
|
142 |
public static function form_save_action() {
|
143 |
|
144 |
try {
|
@@ -233,6 +239,10 @@ class UR_AJAX {
|
|
233 |
return false;
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
236 |
public static function sweep_array( &$array ) {
|
237 |
|
238 |
foreach ( $array as $key => &$value ) {
|
@@ -257,7 +267,17 @@ class UR_AJAX {
|
|
257 |
array_push( self::$field_key_aray, $value );
|
258 |
}
|
259 |
if( $key === 'description' ) {
|
260 |
-
$value = str_replace('"', "'", $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
} elseif( $key == 'html') {
|
263 |
|
51 |
}
|
52 |
}
|
53 |
|
54 |
+
/**
|
55 |
+
* Get Post data on frontend form submit
|
56 |
+
* @return void
|
57 |
+
*/
|
58 |
public static function user_form_submit() {
|
59 |
|
60 |
check_ajax_referer( 'user_registration_form_data_save_nonce', 'security' );
|
75 |
|
76 |
if ( ! $users_can_register ) {
|
77 |
wp_send_json_error( array(
|
78 |
+
'message' => apply_filters( 'ur_register_pre_form_message', __( 'Only administrators can add new users.', 'user-registration' ) )
|
79 |
) );
|
80 |
}
|
81 |
} else {
|
91 |
$display_name = ! empty( $user->data->display_name ) ? $user->data->display_name : $user->data->user_email;
|
92 |
|
93 |
wp_send_json_error( array(
|
94 |
+
'message' => apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . sprintf( __( "You are currently logged in as %1s. %2s", 'user-registration' ), '<a href="#" title="' . $display_name . '">' . $display_name . '</a>', '<a href="' . wp_logout_url( $current_url ) . '" title="' . __( 'Log out of this account.', 'user-registration' ) . '">' . __( 'Logout', 'user-registration' ) . ' »</a>' ) . '</p>', $user_ID )
|
95 |
) );
|
96 |
}
|
97 |
}
|
141 |
}
|
142 |
}
|
143 |
|
144 |
+
/**
|
145 |
+
* Form save form backend
|
146 |
+
* @return void
|
147 |
+
*/
|
148 |
public static function form_save_action() {
|
149 |
|
150 |
try {
|
239 |
return false;
|
240 |
}
|
241 |
|
242 |
+
/**
|
243 |
+
* Sanitize values of form field in backend
|
244 |
+
* @param array &$array
|
245 |
+
*/
|
246 |
public static function sweep_array( &$array ) {
|
247 |
|
248 |
foreach ( $array as $key => &$value ) {
|
267 |
array_push( self::$field_key_aray, $value );
|
268 |
}
|
269 |
if( $key === 'description' ) {
|
270 |
+
$value = str_replace('"', "'", $value);
|
271 |
+
$value = wp_kses( $value, array(
|
272 |
+
'a' => array(
|
273 |
+
'href' => array(),
|
274 |
+
'title' => array()
|
275 |
+
),
|
276 |
+
'br' => array(),
|
277 |
+
'em' => array(),
|
278 |
+
'strong' => array(),
|
279 |
+
)
|
280 |
+
);
|
281 |
|
282 |
} elseif( $key == 'html') {
|
283 |
|
includes/class-ur-email-confirmation.php
CHANGED
@@ -28,6 +28,8 @@ class UR_Email_Confirmation {
|
|
28 |
add_filter( 'manage_users_columns', array( $this, 'add_column_head' ) );
|
29 |
add_filter( 'manage_users_custom_column', array( $this, 'add_column_cell' ), 10, 3 );
|
30 |
add_filter( 'user_row_actions', array( $this, 'ceate_quick_links' ), 10, 2 );
|
|
|
|
|
31 |
add_filter( 'wp_authenticate_user', array( $this, 'check_email_status' ),10,2);
|
32 |
add_filter( 'allow_password_reset', array( $this, 'allow_password_reset' ), 10, 2 );
|
33 |
add_action( 'user_registration_after_register_user_action', array( $this, 'set_email_status' ), 9, 3 );
|
@@ -44,13 +46,64 @@ class UR_Email_Confirmation {
|
|
44 |
* @return array
|
45 |
*/
|
46 |
public function ceate_quick_links( $actions, $user ) {
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
return $actions;
|
53 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
/**
|
56 |
* Add the column header for the email status column
|
@@ -242,7 +295,7 @@ class UR_Email_Confirmation {
|
|
242 |
do_action( 'ur_user_before_check_email_status_on_login', $email_status, $user );
|
243 |
|
244 |
if( $email_status === '0' ) {
|
245 |
-
$message = '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong> ' . sprintf( __( 'Your account is still pending approval. Verifiy your email by clicking on the link sent to your email. %s', 'user-registration' ), '<a id="resend-email" href="
|
246 |
|
247 |
return new WP_Error( 'user_email_not_verified', $message );
|
248 |
}
|
@@ -258,7 +311,6 @@ class UR_Email_Confirmation {
|
|
258 |
*
|
259 |
* @return \WP_Error
|
260 |
*/
|
261 |
-
|
262 |
public function allow_password_reset( $result, $user_id ) {
|
263 |
|
264 |
$email_status = get_user_meta($user_id, 'ur_confirm_email', true);
|
28 |
add_filter( 'manage_users_columns', array( $this, 'add_column_head' ) );
|
29 |
add_filter( 'manage_users_custom_column', array( $this, 'add_column_cell' ), 10, 3 );
|
30 |
add_filter( 'user_row_actions', array( $this, 'ceate_quick_links' ), 10, 2 );
|
31 |
+
add_action( 'load-users.php', array( $this, 'trigger_query_actions' ) );
|
32 |
+
|
33 |
add_filter( 'wp_authenticate_user', array( $this, 'check_email_status' ),10,2);
|
34 |
add_filter( 'allow_password_reset', array( $this, 'allow_password_reset' ), 10, 2 );
|
35 |
add_action( 'user_registration_after_register_user_action', array( $this, 'set_email_status' ), 9, 3 );
|
46 |
* @return array
|
47 |
*/
|
48 |
public function ceate_quick_links( $actions, $user ) {
|
49 |
+
|
50 |
+
$verify_link = add_query_arg( array( 'action' => 'verify', 'user' => $user->ID ) );
|
51 |
+
$verify_link = remove_query_arg( array( 'new_role' ), $verify_link );
|
52 |
+
$verify_link = wp_nonce_url( $verify_link, 'ur_user_change_email_status' );
|
53 |
|
54 |
+
$unverify_link = add_query_arg( array( 'action' => 'unverify', 'user' => $user->ID ) );
|
55 |
+
$unverify_link = remove_query_arg( array( 'new_role' ), $unverify_link );
|
56 |
+
$unverify_link = wp_nonce_url( $unverify_link, 'ur_user_change_email_status' );
|
57 |
+
|
58 |
+
$verify_action = '<a style="color:#086512" href="' . esc_url( $verify_link ) . '">' . _x( 'Verify', 'The action on users list page', 'user-registration' ) . '</a>';
|
59 |
+
$unverify_action = '<a style="color:#e20707" href="' . esc_url( $unverify_link ) . '">' . _x( 'Unverify', 'The action on users list page', 'user-registration' ) . '</a>';
|
60 |
+
|
61 |
+
if ( current_user_can( 'edit_user' ) ) {
|
62 |
+
$get_user_status = get_user_meta( $user->ID, 'ur_confirm_email', true );
|
63 |
+
|
64 |
+
if( '0' === $get_user_status ) {
|
65 |
+
$actions['ur_user_verify_action'] = $verify_action;
|
66 |
+
} elseif( '1' === $get_user_status ) {
|
67 |
+
$actions['ur_user_unverify_action'] = $unverify_action;
|
68 |
+
}
|
69 |
+
}
|
70 |
return $actions;
|
71 |
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Trigger the action query and check if some users have been verified or unverified
|
75 |
+
*/
|
76 |
+
public function trigger_query_actions() {
|
77 |
+
|
78 |
+
$action = isset( $_REQUEST['action'] ) ? sanitize_key( $_REQUEST['action'] ) : false;
|
79 |
+
$mode = isset( $_POST['mode'] ) ? $_POST['mode'] : false;
|
80 |
+
|
81 |
+
// If this is a multisite, bulk request, stop now!
|
82 |
+
if ( 'list' == $mode ) {
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( ! empty( $action ) && in_array( $action, array( 'verify', 'unverify' ) ) && !isset( $_GET['new_role'] ) ) {
|
87 |
+
|
88 |
+
check_admin_referer( 'ur_user_change_email_status' );
|
89 |
+
|
90 |
+
$redirect = admin_url( 'users.php' );
|
91 |
+
$status = $action;
|
92 |
+
$user_id = absint( $_GET['user'] );
|
93 |
+
|
94 |
+
if ( $status == 'verify' ) {
|
95 |
+
update_user_meta( $user_id, 'ur_confirm_email', '1' );
|
96 |
+
$redirect = add_query_arg( array( 'verified' => 1 ), $redirect );
|
97 |
+
} else {
|
98 |
+
update_user_meta( $user_id, 'ur_confirm_email', '0' );
|
99 |
+
$redirect = add_query_arg( array( 'unverified' => 1 ), $redirect );
|
100 |
+
}
|
101 |
+
|
102 |
+
wp_redirect( $redirect );
|
103 |
+
exit;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
|
108 |
/**
|
109 |
* Add the column header for the email status column
|
295 |
do_action( 'ur_user_before_check_email_status_on_login', $email_status, $user );
|
296 |
|
297 |
if( $email_status === '0' ) {
|
298 |
+
$message = '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong> ' . sprintf( __( 'Your account is still pending approval. Verifiy your email by clicking on the link sent to your email. %s', 'user-registration' ), '<a id="resend-email" href="?ur_resend_id='. $this->crypt_the_string( $user->ID, 'e' ) .'&ur_resend_token=true">'. __( 'Resend Verification Link', 'user-registration' ). '</a>' );
|
299 |
|
300 |
return new WP_Error( 'user_email_not_verified', $message );
|
301 |
}
|
311 |
*
|
312 |
* @return \WP_Error
|
313 |
*/
|
|
|
314 |
public function allow_password_reset( $result, $user_id ) {
|
315 |
|
316 |
$email_status = get_user_meta($user_id, 'ur_confirm_email', true);
|
includes/class-ur-form-handler.php
CHANGED
@@ -21,7 +21,7 @@ class UR_Form_Handler {
|
|
21 |
public static function init() {
|
22 |
add_action( 'template_redirect', array( __CLASS__, 'redirect_reset_password_link' ) );
|
23 |
add_action( 'template_redirect', array( __CLASS__, 'save_profile_details' ) );
|
24 |
-
add_action( 'template_redirect', array( __CLASS__, '
|
25 |
add_action( 'wp_loaded', array( __CLASS__, 'process_login' ), 20 );
|
26 |
add_action( 'wp_loaded', array( __CLASS__, 'process_lost_password' ), 20 );
|
27 |
add_action( 'wp_loaded', array( __CLASS__, 'process_reset_password' ), 20 );
|
@@ -60,31 +60,27 @@ class UR_Form_Handler {
|
|
60 |
}
|
61 |
|
62 |
$form_id_array = get_user_meta( $user_id, 'ur_form_id' );
|
63 |
-
|
64 |
$form_id = 0;
|
65 |
|
66 |
-
|
67 |
if ( isset( $form_id_array[0] ) ) {
|
68 |
-
|
69 |
$form_id = $form_id_array[0];
|
70 |
}
|
|
|
71 |
$profile = user_registration_form_data( $user_id, $form_id );
|
72 |
|
73 |
foreach ( $profile as $key => $field ) {
|
74 |
-
|
75 |
if ( ! isset( $field['type'] ) ) {
|
76 |
$field['type'] = 'text';
|
77 |
}
|
78 |
// Get Value.
|
79 |
switch ( $field['type'] ) {
|
80 |
case 'checkbox' :
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
}
|
88 |
break;
|
89 |
default :
|
90 |
$_POST[ $key ] = isset( $_POST[ $key ] ) ? ur_clean( $_POST[ $key ] ) : '';
|
@@ -131,7 +127,6 @@ class UR_Form_Handler {
|
|
131 |
if ( in_array( $new_key, ur_get_user_table_fields() ) ) {
|
132 |
|
133 |
if ( $new_key === 'display_name' ) {
|
134 |
-
|
135 |
$user_data['display_name'] = $_POST[ $key ];
|
136 |
} else {
|
137 |
$user_data[ $new_key ] = $_POST[ $key ];
|
@@ -152,7 +147,6 @@ class UR_Form_Handler {
|
|
152 |
|
153 |
if ( count( $user_data ) > 0 ) {
|
154 |
|
155 |
-
|
156 |
$user_data["ID"] = get_current_user_id();
|
157 |
|
158 |
wp_update_user( $user_data );
|
@@ -167,16 +161,25 @@ class UR_Form_Handler {
|
|
167 |
}
|
168 |
}
|
169 |
|
|
|
170 |
/**
|
171 |
-
*
|
|
|
|
|
172 |
*/
|
173 |
-
public
|
|
|
|
|
174 |
|
|
|
|
|
|
|
|
|
175 |
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
176 |
return;
|
177 |
}
|
178 |
|
179 |
-
if ( empty( $_POST['action'] ) || '
|
180 |
return;
|
181 |
}
|
182 |
|
@@ -190,44 +193,12 @@ class UR_Form_Handler {
|
|
190 |
return;
|
191 |
}
|
192 |
|
193 |
-
$account_first_name = ! empty( $_POST['account_first_name'] ) ? ur_clean( $_POST['account_first_name'] ) : '';
|
194 |
-
$account_last_name = ! empty( $_POST['account_last_name'] ) ? ur_clean( $_POST['account_last_name'] ) : '';
|
195 |
-
$account_email = ! empty( $_POST['account_email'] ) ? ur_clean( $_POST['account_email'] ) : '';
|
196 |
$pass_cur = ! empty( $_POST['password_current'] ) ? $_POST['password_current'] : '';
|
197 |
$pass1 = ! empty( $_POST['password_1'] ) ? $_POST['password_1'] : '';
|
198 |
$pass2 = ! empty( $_POST['password_2'] ) ? $_POST['password_2'] : '';
|
199 |
$save_pass = true;
|
200 |
|
201 |
-
$
|
202 |
-
$user->last_name = $account_last_name;
|
203 |
-
|
204 |
-
// Prevent emails being displayed, or leave alone.
|
205 |
-
$user->display_name = is_email( $current_user->display_name ) ? $user->first_name : $current_user->display_name;
|
206 |
-
|
207 |
-
// Handle required fields
|
208 |
-
$required_fields = apply_filters( 'user_registration_save_account_details_required_fields', array(
|
209 |
-
'account_first_name' => __( 'First name', 'user-registration' ),
|
210 |
-
'account_last_name' => __( 'Last name', 'user-registration' ),
|
211 |
-
'account_email' => __( 'Email address', 'user-registration' ),
|
212 |
-
) );
|
213 |
-
|
214 |
-
foreach ( $required_fields as $field_key => $field_name ) {
|
215 |
-
if ( empty( $_POST[ $field_key ] ) ) {
|
216 |
-
ur_add_notice( sprintf( __( '%s is a required field.', 'user-registration' ), '<strong>' . esc_html( $field_name ) . '</strong>' ), 'error' );
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
if ( $account_email ) {
|
221 |
-
$account_email = sanitize_email( $account_email );
|
222 |
-
if ( ! is_email( $account_email ) ) {
|
223 |
-
ur_add_notice( __( 'Please provide a valid email address.', 'user-registration' ), 'error' );
|
224 |
-
} elseif ( email_exists( $account_email ) && $account_email !== $current_user->user_email ) {
|
225 |
-
ur_add_notice( __( 'This email address is already registered.', 'user-registration' ), 'error' );
|
226 |
-
}
|
227 |
-
$user->user_email = $account_email;
|
228 |
-
}
|
229 |
-
|
230 |
-
if ( ! empty( $pass_cur ) && empty( $pass1 ) && empty( $pass2 ) ) {
|
231 |
ur_add_notice( __( 'Please fill out all password fields.', 'user-registration' ), 'error' );
|
232 |
$save_pass = false;
|
233 |
} elseif ( ! empty( $pass1 ) && empty( $pass_cur ) ) {
|
@@ -261,7 +232,7 @@ class UR_Form_Handler {
|
|
261 |
|
262 |
wp_update_user( $user );
|
263 |
|
264 |
-
ur_add_notice( __( '
|
265 |
|
266 |
do_action( 'user_registration_save_account_details', $user->ID );
|
267 |
|
@@ -291,11 +262,11 @@ class UR_Form_Handler {
|
|
291 |
$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
|
292 |
|
293 |
if ( $validation_error->get_error_code() ) {
|
294 |
-
throw new Exception( '<strong>' . __( '
|
295 |
}
|
296 |
|
297 |
if ( empty( $username ) ) {
|
298 |
-
throw new Exception( '<strong>' . __( '
|
299 |
}
|
300 |
|
301 |
if ( is_email( $username ) && apply_filters( 'user_registration_get_username_from_email', true ) ) {
|
@@ -304,7 +275,7 @@ class UR_Form_Handler {
|
|
304 |
if ( isset( $user->user_login ) ) {
|
305 |
$creds['user_login'] = $user->user_login;
|
306 |
} else {
|
307 |
-
throw new Exception( '<strong>' . __( '
|
308 |
}
|
309 |
} else {
|
310 |
$creds['user_login'] = $username;
|
21 |
public static function init() {
|
22 |
add_action( 'template_redirect', array( __CLASS__, 'redirect_reset_password_link' ) );
|
23 |
add_action( 'template_redirect', array( __CLASS__, 'save_profile_details' ) );
|
24 |
+
add_action( 'template_redirect', array( __CLASS__, 'save_change_password' ) );
|
25 |
add_action( 'wp_loaded', array( __CLASS__, 'process_login' ), 20 );
|
26 |
add_action( 'wp_loaded', array( __CLASS__, 'process_lost_password' ), 20 );
|
27 |
add_action( 'wp_loaded', array( __CLASS__, 'process_reset_password' ), 20 );
|
60 |
}
|
61 |
|
62 |
$form_id_array = get_user_meta( $user_id, 'ur_form_id' );
|
|
|
63 |
$form_id = 0;
|
64 |
|
|
|
65 |
if ( isset( $form_id_array[0] ) ) {
|
|
|
66 |
$form_id = $form_id_array[0];
|
67 |
}
|
68 |
+
|
69 |
$profile = user_registration_form_data( $user_id, $form_id );
|
70 |
|
71 |
foreach ( $profile as $key => $field ) {
|
|
|
72 |
if ( ! isset( $field['type'] ) ) {
|
73 |
$field['type'] = 'text';
|
74 |
}
|
75 |
// Get Value.
|
76 |
switch ( $field['type'] ) {
|
77 |
case 'checkbox' :
|
78 |
+
if( isset( $_POST[$key] ) && is_array( $_POST[$key] ) ) {
|
79 |
+
$_POST[$key] = $_POST[$key];
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$_POST[ $key ] = (int) isset( $_POST[ $key ] );
|
83 |
+
}
|
|
|
84 |
break;
|
85 |
default :
|
86 |
$_POST[ $key ] = isset( $_POST[ $key ] ) ? ur_clean( $_POST[ $key ] ) : '';
|
127 |
if ( in_array( $new_key, ur_get_user_table_fields() ) ) {
|
128 |
|
129 |
if ( $new_key === 'display_name' ) {
|
|
|
130 |
$user_data['display_name'] = $_POST[ $key ];
|
131 |
} else {
|
132 |
$user_data[ $new_key ] = $_POST[ $key ];
|
147 |
|
148 |
if ( count( $user_data ) > 0 ) {
|
149 |
|
|
|
150 |
$user_data["ID"] = get_current_user_id();
|
151 |
|
152 |
wp_update_user( $user_data );
|
161 |
}
|
162 |
}
|
163 |
|
164 |
+
|
165 |
/**
|
166 |
+
* @deprecated 1.4.1
|
167 |
+
* @param $user_id
|
168 |
+
* @return void
|
169 |
*/
|
170 |
+
public function save_account_details( $user_id ) {
|
171 |
+
ur_deprecated_function( 'UR_Form_Handler::save_account_details', '1.4.1', 'UR_Form_Handler::save_change_password' );
|
172 |
+
}
|
173 |
|
174 |
+
/**
|
175 |
+
* Save the password and redirect back to the my account page.
|
176 |
+
*/
|
177 |
+
public static function save_change_password() {
|
178 |
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
179 |
return;
|
180 |
}
|
181 |
|
182 |
+
if ( empty( $_POST['action'] ) || 'save_change_password' !== $_POST['action'] || empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'save_change_password' ) ) {
|
183 |
return;
|
184 |
}
|
185 |
|
193 |
return;
|
194 |
}
|
195 |
|
|
|
|
|
|
|
196 |
$pass_cur = ! empty( $_POST['password_current'] ) ? $_POST['password_current'] : '';
|
197 |
$pass1 = ! empty( $_POST['password_1'] ) ? $_POST['password_1'] : '';
|
198 |
$pass2 = ! empty( $_POST['password_2'] ) ? $_POST['password_2'] : '';
|
199 |
$save_pass = true;
|
200 |
|
201 |
+
if ( ( ! empty( $pass_cur ) || empty( $pass_cur ) ) && empty( $pass1 ) && empty( $pass2 ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
ur_add_notice( __( 'Please fill out all password fields.', 'user-registration' ), 'error' );
|
203 |
$save_pass = false;
|
204 |
} elseif ( ! empty( $pass1 ) && empty( $pass_cur ) ) {
|
232 |
|
233 |
wp_update_user( $user );
|
234 |
|
235 |
+
ur_add_notice( __( 'Password changed successfully.', 'user-registration' ) );
|
236 |
|
237 |
do_action( 'user_registration_save_account_details', $user->ID );
|
238 |
|
262 |
$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
|
263 |
|
264 |
if ( $validation_error->get_error_code() ) {
|
265 |
+
throw new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong> ' . $validation_error->get_error_message() );
|
266 |
}
|
267 |
|
268 |
if ( empty( $username ) ) {
|
269 |
+
throw new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong> ' . __( 'Username is required.', 'user-registration' ) );
|
270 |
}
|
271 |
|
272 |
if ( is_email( $username ) && apply_filters( 'user_registration_get_username_from_email', true ) ) {
|
275 |
if ( isset( $user->user_login ) ) {
|
276 |
$creds['user_login'] = $user->user_login;
|
277 |
} else {
|
278 |
+
throw new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong> ' . __( 'A user could not be found with this email address.', 'user-registration' ) );
|
279 |
}
|
280 |
} else {
|
281 |
$creds['user_login'] = $username;
|
includes/class-ur-frontend-scripts.php
CHANGED
@@ -76,6 +76,12 @@ class UR_Frontend_Scripts {
|
|
76 |
'media' => 'only screen and (max-width: ' . apply_filters( 'user_registration_style_smallscreen_breakpoint', $breakpoint = '768px' ) . ')',
|
77 |
'has_rtl' => true,
|
78 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
) );
|
80 |
}
|
81 |
|
76 |
'media' => 'only screen and (max-width: ' . apply_filters( 'user_registration_style_smallscreen_breakpoint', $breakpoint = '768px' ) . ')',
|
77 |
'has_rtl' => true,
|
78 |
),
|
79 |
+
'user-registration-my-account-layout' => array(
|
80 |
+
'src' => self::get_asset_url( 'assets/css/my-account-layout.css' ),
|
81 |
+
'deps' => '',
|
82 |
+
'version' => UR_VERSION,
|
83 |
+
'media' => 'all',
|
84 |
+
)
|
85 |
) );
|
86 |
}
|
87 |
|
includes/class-ur-install.php
CHANGED
@@ -33,6 +33,10 @@ class UR_Install {
|
|
33 |
'1.4.0' => array(
|
34 |
'ur_update_140_db_version',
|
35 |
'ur_update_140_option',
|
|
|
|
|
|
|
|
|
36 |
)
|
37 |
);
|
38 |
|
33 |
'1.4.0' => array(
|
34 |
'ur_update_140_db_version',
|
35 |
'ur_update_140_option',
|
36 |
+
),
|
37 |
+
'1.4.2' => array(
|
38 |
+
'ur_update_142_db_version',
|
39 |
+
'ur_update_142_option',
|
40 |
)
|
41 |
);
|
42 |
|
includes/class-ur-query.php
CHANGED
@@ -52,7 +52,7 @@ class UR_Query {
|
|
52 |
// Query vars to add to WP.
|
53 |
$this->query_vars = array(
|
54 |
// My account actions.
|
55 |
-
'edit-
|
56 |
'edit-profile' => get_option( 'user_registration_myaccount_edit_profile_endpoint', 'edit-profile' ),
|
57 |
'lost-password' => get_option( 'user_registration_myaccount_lost_password_endpoint', 'lost-password' ),
|
58 |
'user-logout' => get_option( 'user_registration_logout_endpoint', 'user-logout' ),
|
@@ -69,8 +69,8 @@ class UR_Query {
|
|
69 |
global $wp;
|
70 |
|
71 |
switch ( $endpoint ) {
|
72 |
-
case 'edit-
|
73 |
-
$title = __( '
|
74 |
break;
|
75 |
case 'edit-profile' :
|
76 |
$title = __( 'Profile Details', 'user-registration' );
|
52 |
// Query vars to add to WP.
|
53 |
$this->query_vars = array(
|
54 |
// My account actions.
|
55 |
+
'edit-password' => get_option( 'user_registration_myaccount_change_password_endpoint', 'edit-password' ),
|
56 |
'edit-profile' => get_option( 'user_registration_myaccount_edit_profile_endpoint', 'edit-profile' ),
|
57 |
'lost-password' => get_option( 'user_registration_myaccount_lost_password_endpoint', 'lost-password' ),
|
58 |
'user-logout' => get_option( 'user_registration_logout_endpoint', 'user-logout' ),
|
69 |
global $wp;
|
70 |
|
71 |
switch ( $endpoint ) {
|
72 |
+
case 'edit-password' :
|
73 |
+
$title = __( 'Change Password', 'user-registration' );
|
74 |
break;
|
75 |
case 'edit-profile' :
|
76 |
$title = __( 'Profile Details', 'user-registration' );
|
includes/class-ur-shortcodes.php
CHANGED
@@ -103,7 +103,7 @@ class UR_Shortcodes {
|
|
103 |
|
104 |
if ( ! is_user_logged_in() ) {
|
105 |
if ( ! $users_can_register ) {
|
106 |
-
return apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . __( 'Only
|
107 |
}
|
108 |
} else {
|
109 |
|
@@ -121,7 +121,7 @@ class UR_Shortcodes {
|
|
121 |
|
122 |
$display_name = ! empty( $user->data->display_name ) ? $user->data->display_name : $user->data->user_email;
|
123 |
|
124 |
-
return apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . sprintf( __( "You are currently logged in as %1s.
|
125 |
}
|
126 |
}
|
127 |
|
103 |
|
104 |
if ( ! is_user_logged_in() ) {
|
105 |
if ( ! $users_can_register ) {
|
106 |
+
return apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . __( 'Only administrators can add new users.', 'user-registration' ) . '</p>' );
|
107 |
}
|
108 |
} else {
|
109 |
|
121 |
|
122 |
$display_name = ! empty( $user->data->display_name ) ? $user->data->display_name : $user->data->user_email;
|
123 |
|
124 |
+
return apply_filters( 'ur_register_pre_form_message', '<p class="alert" id="ur_register_pre_form_message">' . sprintf( __( "You are currently logged in as %1s. %2s", 'user-registration' ), '<a href="#" title="' . $display_name . '">' . $display_name . '</a>', '<a href="' . wp_logout_url( $current_url ) . '" title="' . __( 'Log out of this account.', 'user-registration' ) . '">' . __( 'Logout', 'user-registration' ) . ' »</a>' ) . '</p>', $user_ID );
|
125 |
}
|
126 |
}
|
127 |
|
includes/form/views/admin/admin-checkbox.php
CHANGED
@@ -23,7 +23,7 @@ $choices = isset( $this->admin_data->advance_setting->choices ) ? explode( ',',
|
|
23 |
echo "<input type = 'checkbox' value='1'/>";
|
24 |
}
|
25 |
foreach ( $choices as $choice ) {
|
26 |
-
echo "<input type = 'checkbox' value='" . esc_attr( $choice ) . "'/>" . esc_html( trim( $choice ) ) . '<br>';
|
27 |
|
28 |
}
|
29 |
?>
|
23 |
echo "<input type = 'checkbox' value='1'/>";
|
24 |
}
|
25 |
foreach ( $choices as $choice ) {
|
26 |
+
echo "<input type = 'checkbox' value='" . esc_attr( trim( $choice ) ) . "'/>" . esc_html( trim( $choice ) ) . '<br>';
|
27 |
|
28 |
}
|
29 |
?>
|
includes/form/views/admin/admin-radio.php
CHANGED
@@ -23,7 +23,7 @@ $options = isset( $this->admin_data->advance_setting->options ) ? explode( ',',
|
|
23 |
echo "<input type = 'radio' value='1'/>";
|
24 |
}
|
25 |
foreach ( $options as $option ) {
|
26 |
-
echo "<input type = 'radio' value='" . esc_attr( $option ) . "'/>" . esc_html( trim( $option ) ) . '<br>';
|
27 |
}
|
28 |
?>
|
29 |
</div>
|
23 |
echo "<input type = 'radio' value='1'/>";
|
24 |
}
|
25 |
foreach ( $options as $option ) {
|
26 |
+
echo "<input type = 'radio' value='" . esc_attr( trim( $option ) ) . "'/>" . esc_html( trim( $option ) ) . '<br>';
|
27 |
}
|
28 |
?>
|
29 |
</div>
|
includes/form/views/admin/admin-select.php
CHANGED
@@ -23,7 +23,7 @@ $options = isset( $this->admin_data->advance_setting->options ) ? explode( ',',
|
|
23 |
<?php
|
24 |
foreach ( $options as $option ) {
|
25 |
|
26 |
-
echo "<option value='" . esc_attr($option) . "'>" . esc_html( trim( $option ) ) . '</option>';
|
27 |
}
|
28 |
?>
|
29 |
</select>
|
23 |
<?php
|
24 |
foreach ( $options as $option ) {
|
25 |
|
26 |
+
echo "<option value='" . esc_attr( trim( $option ) ) . "'>" . esc_html( trim( $option ) ) . '</option>';
|
27 |
}
|
28 |
?>
|
29 |
</select>
|
includes/frontend/class-ur-frontend-form-handler.php
CHANGED
@@ -15,10 +15,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
* UR_Frontend_Form_Handler Class
|
16 |
*/
|
17 |
class UR_Frontend_Form_Handler {
|
|
|
18 |
public static $form_id = 0;
|
19 |
public static $response_array = array();
|
20 |
private static $valid_form_data = array();
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public static function handle_form( $form_data, $form_id ) {
|
23 |
|
24 |
self::$form_id = $form_id;
|
@@ -48,7 +55,6 @@ class UR_Frontend_Form_Handler {
|
|
48 |
);
|
49 |
|
50 |
self::$valid_form_data = apply_filters( 'user_registration_before_register_user_filter', self::$valid_form_data, $form_id );
|
51 |
-
|
52 |
do_action( 'user_registration_before_register_user_action', self::$valid_form_data, $form_id );
|
53 |
|
54 |
if( empty( $userdata['user_login'] ) ) {
|
@@ -57,9 +63,9 @@ class UR_Frontend_Form_Handler {
|
|
57 |
$userdata['user_login'] = $username;
|
58 |
}
|
59 |
|
60 |
-
$user_id = wp_insert_user( $userdata );
|
61 |
|
62 |
-
self::ur_update_user_meta( $user_id, self::$valid_form_data, $form_id );
|
63 |
do_action( 'user_registration_after_register_user_action', self::$valid_form_data, $form_id, $user_id );
|
64 |
if ( $user_id > 0 ) {
|
65 |
$login_option = get_option( 'user_registration_general_setting_login_options', 'default' );
|
@@ -83,6 +89,12 @@ class UR_Frontend_Form_Handler {
|
|
83 |
) );
|
84 |
}// End if().
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
private static function get_form_field_data( $post_content_array ) {
|
87 |
$form_field_data_array = array();
|
88 |
foreach ( $post_content_array as $row_index => $row ) {
|
@@ -96,6 +108,12 @@ class UR_Frontend_Form_Handler {
|
|
96 |
}
|
97 |
return ( $form_field_data_array );
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
private static function get_post_content( $form_id ) {
|
100 |
$args = array(
|
101 |
'post_type' => 'user_registration',
|
@@ -109,6 +127,13 @@ class UR_Frontend_Form_Handler {
|
|
109 |
return '';
|
110 |
}
|
111 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
private static function validate_form_data( $form_field_data = array(), $form_data = array() ) {
|
113 |
$form_data_field = wp_list_pluck( $form_data, 'field_name' );
|
114 |
$form_key_list = wp_list_pluck( wp_list_pluck( $form_field_data, 'general_setting' ), 'field_name' );
|
@@ -122,8 +147,8 @@ class UR_Frontend_Form_Handler {
|
|
122 |
if ( false === $containsSearch ) {
|
123 |
array_push( self::$response_array, __( 'Required form field not found.', 'user-registration' ) );
|
124 |
}
|
125 |
-
foreach ( $form_data as $data ) {
|
126 |
|
|
|
127 |
if ( in_array( $data->field_name, $form_key_list ) ) {
|
128 |
$form_data_index = array_search( $data->field_name, $form_key_list );
|
129 |
$single_form_field = $form_field_data[ $form_data_index ];
|
@@ -169,7 +194,7 @@ class UR_Frontend_Form_Handler {
|
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
-
* Sanitize
|
173 |
* @param obj &$form_data
|
174 |
* @return object
|
175 |
*/
|
@@ -218,6 +243,13 @@ class UR_Frontend_Form_Handler {
|
|
218 |
return apply_filters( 'user_registration_sanitize_field', $form_data, $field_key );
|
219 |
}
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
private static function ur_update_user_meta( $user_id, $valid_form_data, $form_id ) {
|
222 |
|
223 |
foreach ( $valid_form_data as $data ) {
|
@@ -231,13 +263,19 @@ class UR_Frontend_Form_Handler {
|
|
231 |
}
|
232 |
|
233 |
if( isset( $data->extra_params['field_key'] ) && $data->extra_params['field_key'] === 'checkbox' ) {
|
234 |
-
$data->value = json_decode( $data->value );
|
235 |
}
|
236 |
update_user_meta( $user_id, $field_name, $data->value );
|
237 |
}
|
238 |
update_user_meta( $user_id, 'ur_form_id', $form_id );
|
239 |
}
|
240 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
private static function match_password( &$form_data ) {
|
242 |
$confirm_password = '';
|
243 |
$has_confirm_password = false;
|
15 |
* UR_Frontend_Form_Handler Class
|
16 |
*/
|
17 |
class UR_Frontend_Form_Handler {
|
18 |
+
|
19 |
public static $form_id = 0;
|
20 |
public static $response_array = array();
|
21 |
private static $valid_form_data = array();
|
22 |
|
23 |
+
/**
|
24 |
+
* Handle frontend form POST data
|
25 |
+
* @param array $form_data Submitted form data
|
26 |
+
* @param int $form_id ID of the form
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
public static function handle_form( $form_data, $form_id ) {
|
30 |
|
31 |
self::$form_id = $form_id;
|
55 |
);
|
56 |
|
57 |
self::$valid_form_data = apply_filters( 'user_registration_before_register_user_filter', self::$valid_form_data, $form_id );
|
|
|
58 |
do_action( 'user_registration_before_register_user_action', self::$valid_form_data, $form_id );
|
59 |
|
60 |
if( empty( $userdata['user_login'] ) ) {
|
63 |
$userdata['user_login'] = $username;
|
64 |
}
|
65 |
|
66 |
+
$user_id = wp_insert_user( $userdata ); //Insert user data in users table.
|
67 |
|
68 |
+
self::ur_update_user_meta( $user_id, self::$valid_form_data, $form_id ); //Insert user data in usermeta table.
|
69 |
do_action( 'user_registration_after_register_user_action', self::$valid_form_data, $form_id, $user_id );
|
70 |
if ( $user_id > 0 ) {
|
71 |
$login_option = get_option( 'user_registration_general_setting_login_options', 'default' );
|
89 |
) );
|
90 |
}// End if().
|
91 |
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get form field data by post_content array passed
|
95 |
+
* @param array $post_content_array
|
96 |
+
* @return array
|
97 |
+
*/
|
98 |
private static function get_form_field_data( $post_content_array ) {
|
99 |
$form_field_data_array = array();
|
100 |
foreach ( $post_content_array as $row_index => $row ) {
|
108 |
}
|
109 |
return ( $form_field_data_array );
|
110 |
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Get post content by form id
|
114 |
+
* @param int $form_id form id
|
115 |
+
* @return mixed
|
116 |
+
*/
|
117 |
private static function get_post_content( $form_id ) {
|
118 |
$args = array(
|
119 |
'post_type' => 'user_registration',
|
127 |
return '';
|
128 |
}
|
129 |
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Validation from each field's class validation() method.
|
133 |
+
* Sanitization from get_sanitize_value().
|
134 |
+
* @param array $form_field_data
|
135 |
+
* @param array $form_data Form data to validate
|
136 |
+
*/
|
137 |
private static function validate_form_data( $form_field_data = array(), $form_data = array() ) {
|
138 |
$form_data_field = wp_list_pluck( $form_data, 'field_name' );
|
139 |
$form_key_list = wp_list_pluck( wp_list_pluck( $form_field_data, 'general_setting' ), 'field_name' );
|
147 |
if ( false === $containsSearch ) {
|
148 |
array_push( self::$response_array, __( 'Required form field not found.', 'user-registration' ) );
|
149 |
}
|
|
|
150 |
|
151 |
+
foreach ( $form_data as $data ) {
|
152 |
if ( in_array( $data->field_name, $form_key_list ) ) {
|
153 |
$form_data_index = array_search( $data->field_name, $form_key_list );
|
154 |
$single_form_field = $form_field_data[ $form_data_index ];
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
+
* Sanitize form data
|
198 |
* @param obj &$form_data
|
199 |
* @return object
|
200 |
*/
|
243 |
return apply_filters( 'user_registration_sanitize_field', $form_data, $field_key );
|
244 |
}
|
245 |
|
246 |
+
/**
|
247 |
+
* Update form data to usermeta table.
|
248 |
+
* @param int $user_id
|
249 |
+
* @param array $valid_form_data All valid form data.
|
250 |
+
* @param int $form_id
|
251 |
+
* @return void
|
252 |
+
*/
|
253 |
private static function ur_update_user_meta( $user_id, $valid_form_data, $form_id ) {
|
254 |
|
255 |
foreach ( $valid_form_data as $data ) {
|
263 |
}
|
264 |
|
265 |
if( isset( $data->extra_params['field_key'] ) && $data->extra_params['field_key'] === 'checkbox' ) {
|
266 |
+
$data->value = ( json_decode( $data->value ) !== NULL ) ? json_decode( $data->value ) : $data->value;
|
267 |
}
|
268 |
update_user_meta( $user_id, $field_name, $data->value );
|
269 |
}
|
270 |
update_user_meta( $user_id, 'ur_form_id', $form_id );
|
271 |
}
|
272 |
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Match password and confirm password field
|
276 |
+
* @param obj &$form_data Form data submitted
|
277 |
+
* @return obj $form_data
|
278 |
+
*/
|
279 |
private static function match_password( &$form_data ) {
|
280 |
$confirm_password = '';
|
281 |
$has_confirm_password = false;
|
includes/frontend/class-ur-frontend.php
CHANGED
@@ -25,6 +25,7 @@ class UR_Frontend {
|
|
25 |
|
26 |
public function __construct() {
|
27 |
add_action( 'init', array( $this, 'includes' ) );
|
|
|
28 |
}
|
29 |
|
30 |
public static function instance() {
|
@@ -60,6 +61,21 @@ class UR_Frontend {
|
|
60 |
$instance->frontend_includes( $setting, $form_id, $field_type, $field_object->field_key );
|
61 |
}
|
62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
return new UR_Frontend();
|
25 |
|
26 |
public function __construct() {
|
27 |
add_action( 'init', array( $this, 'includes' ) );
|
28 |
+
add_filter( 'user_registration_my_account_shortcode', array( $this, 'user_registration_my_account_layout' ) );
|
29 |
}
|
30 |
|
31 |
public static function instance() {
|
61 |
$instance->frontend_includes( $setting, $form_id, $field_type, $field_object->field_key );
|
62 |
}
|
63 |
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* My Account layouts(vertical/horizontal) by adding class.
|
67 |
+
* @param $attributes
|
68 |
+
* @since 1.4.2
|
69 |
+
* @return $attributes
|
70 |
+
*/
|
71 |
+
public function user_registration_my_account_layout( $attributes ) {
|
72 |
+
|
73 |
+
if ( is_user_logged_in() ) {
|
74 |
+
$layout = get_option( 'user_registration_my_account_layout', 'horizontal' );
|
75 |
+
$attributes['class'] = $attributes['class'] . ' ' . $layout;
|
76 |
+
}
|
77 |
+
return $attributes;
|
78 |
+
}
|
79 |
}
|
80 |
|
81 |
return new UR_Frontend();
|
includes/functions-ur-account.php
CHANGED
@@ -14,23 +14,29 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
exit;
|
15 |
}
|
16 |
|
17 |
-
add_filter( 'login_errors', '
|
18 |
-
|
19 |
-
//Modify error message on invalid username or password
|
20 |
-
function login_error_message( $error ) {
|
21 |
|
|
|
|
|
22 |
// Don't change login error messages on admin site.
|
23 |
if ( isset( $_POST['redirect_to'] ) && false !== strpos( $_POST['redirect_to'], network_admin_url() ) ) {
|
24 |
return $error;
|
25 |
}
|
26 |
|
27 |
-
//
|
28 |
$pos = strpos( $error, 'incorrect' );
|
29 |
|
|
|
|
|
|
|
|
|
30 |
if ( is_int( $pos ) && isset( $_POST['redirect'] ) && isset( $_POST['username'] ) ) {
|
31 |
-
//its the correct username with incorrect password
|
32 |
$error = sprintf( __( 'The password you entered for username %1s is incorrect. %2s' , 'user-registration' ), $_POST['username'], "<a href='". $_POST['redirect'] . get_option( 'user_registration_myaccount_lost_password_endpoint', 'lost-password' ) ."'>".__('Lost Your Password?','user-registration').'</a>' );
|
33 |
-
}
|
|
|
|
|
|
|
|
|
34 |
return $error;
|
35 |
}
|
36 |
|
@@ -69,14 +75,14 @@ add_filter( 'lostpassword_url', 'ur_lostpassword_url', 20, 1 );
|
|
69 |
function ur_get_account_menu_items() {
|
70 |
$endpoints = array(
|
71 |
'edit-profile' => get_option( 'user_registration_myaccount_edit_profile_endpoint', 'edit-profile' ),
|
72 |
-
'edit-
|
73 |
'user-logout' => get_option( 'user_registration_logout_endpoint', 'user-logout' ),
|
74 |
);
|
75 |
|
76 |
$items = array(
|
77 |
'dashboard' => __( 'Dashboard', 'user-registration' ),
|
78 |
'edit-profile' => __( 'Profile Details', 'user-registration' ),
|
79 |
-
'edit-
|
80 |
'user-logout' => __( 'Logout', 'user-registration' ),
|
81 |
);
|
82 |
|
14 |
exit;
|
15 |
}
|
16 |
|
17 |
+
add_filter( 'login_errors', 'ur_login_error_message' );
|
|
|
|
|
|
|
18 |
|
19 |
+
// Modify error message on invalid username or password.
|
20 |
+
function ur_login_error_message( $error ) {
|
21 |
// Don't change login error messages on admin site.
|
22 |
if ( isset( $_POST['redirect_to'] ) && false !== strpos( $_POST['redirect_to'], network_admin_url() ) ) {
|
23 |
return $error;
|
24 |
}
|
25 |
|
26 |
+
//Check if the error contains incorrect string.
|
27 |
$pos = strpos( $error, 'incorrect' );
|
28 |
|
29 |
+
//Check if the error contains Invalid string.
|
30 |
+
$pos2 = strpos( $error, 'Invalid' );
|
31 |
+
|
32 |
+
//Its the correct username with incorrect password.
|
33 |
if ( is_int( $pos ) && isset( $_POST['redirect'] ) && isset( $_POST['username'] ) ) {
|
|
|
34 |
$error = sprintf( __( 'The password you entered for username %1s is incorrect. %2s' , 'user-registration' ), $_POST['username'], "<a href='". $_POST['redirect'] . get_option( 'user_registration_myaccount_lost_password_endpoint', 'lost-password' ) ."'>".__('Lost Your Password?','user-registration').'</a>' );
|
35 |
+
} // It's invalid username.
|
36 |
+
elseif( is_int( $pos2 ) && isset( $_POST['redirect'] ) && isset( $_POST['username'] ) ) {
|
37 |
+
$error = sprintf( __( 'Invalid username. %1s' , 'user-registration' ), "<a href='". $_POST['redirect'] . get_option( 'user_registration_myaccount_lost_password_endpoint', 'lost-password' ) ."'>".__('Lost Your Password?','user-registration').'</a>' );
|
38 |
+
}
|
39 |
+
|
40 |
return $error;
|
41 |
}
|
42 |
|
75 |
function ur_get_account_menu_items() {
|
76 |
$endpoints = array(
|
77 |
'edit-profile' => get_option( 'user_registration_myaccount_edit_profile_endpoint', 'edit-profile' ),
|
78 |
+
'edit-password' => get_option( 'user_registration_myaccount_change_password_endpoint', 'edit-password' ),
|
79 |
'user-logout' => get_option( 'user_registration_logout_endpoint', 'user-logout' ),
|
80 |
);
|
81 |
|
82 |
$items = array(
|
83 |
'dashboard' => __( 'Dashboard', 'user-registration' ),
|
84 |
'edit-profile' => __( 'Profile Details', 'user-registration' ),
|
85 |
+
'edit-password' => __( 'Change Password', 'user-registration' ),
|
86 |
'user-logout' => __( 'Logout', 'user-registration' ),
|
87 |
);
|
88 |
|
includes/functions-ur-core.php
CHANGED
@@ -84,7 +84,7 @@ if ( ! function_exists( 'is_ur_edit_account_page' ) ) {
|
|
84 |
function is_ur_edit_account_page() {
|
85 |
global $wp;
|
86 |
|
87 |
-
return ( is_ur_account_page() && isset( $wp->query_vars['edit-
|
88 |
}
|
89 |
}
|
90 |
|
@@ -303,6 +303,11 @@ function ur_enable_ur_plugin_headers( $headers ) {
|
|
303 |
|
304 |
add_filter( 'extra_plugin_headers', 'ur_enable_ur_plugin_headers' );
|
305 |
|
|
|
|
|
|
|
|
|
|
|
306 |
function ur_get_field_type( $field_key ) {
|
307 |
|
308 |
$fields = ur_get_registered_form_fields();
|
@@ -397,36 +402,38 @@ function ur_get_required_fields() {
|
|
397 |
* @return array
|
398 |
*/
|
399 |
function ur_get_one_time_draggable_fields() {
|
400 |
-
|
401 |
$form_fields = ur_get_user_field_only();
|
402 |
return apply_filters( 'user_registration_one_time_draggable_form_fields', $form_fields );
|
403 |
}
|
404 |
|
405 |
/**
|
406 |
-
* Get
|
407 |
*
|
408 |
* @return array
|
409 |
*/
|
410 |
-
function
|
411 |
-
|
412 |
-
return apply_filters( 'user_registration_registered_account_fields', array(
|
413 |
-
'user_email',
|
414 |
'user_pass',
|
415 |
'user_confirm_password',
|
416 |
-
'
|
417 |
-
'first_name',
|
418 |
-
'last_name',
|
419 |
) );
|
420 |
}
|
421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
/**
|
423 |
* Get all fields appearing in profile tab.
|
424 |
*
|
425 |
* @return array
|
426 |
*/
|
427 |
function ur_get_user_profile_field_only() {
|
428 |
-
|
429 |
-
$user_fields = array_diff( ur_get_registered_form_fields(), ur_get_account_details_fields() );
|
430 |
return apply_filters( 'user_registration_user_profile_field_only', $user_fields );
|
431 |
}
|
432 |
|
@@ -460,7 +467,6 @@ function ur_get_user_field_only() {
|
|
460 |
) );
|
461 |
}
|
462 |
|
463 |
-
|
464 |
/**
|
465 |
* Get all extra form fields
|
466 |
*
|
@@ -474,7 +480,6 @@ function ur_get_other_form_fields() {
|
|
474 |
return apply_filters( 'user_registration_other_form_fields', $result );
|
475 |
}
|
476 |
|
477 |
-
|
478 |
/**
|
479 |
* All default fields storing in usermeta table
|
480 |
* @return mixed|array
|
@@ -519,9 +524,12 @@ function ur_get_registered_form_fields() {
|
|
519 |
}
|
520 |
|
521 |
/**
|
|
|
|
|
522 |
* @return mixed|array
|
523 |
*/
|
524 |
function ur_get_general_settings( $id ) {
|
|
|
525 |
$general_settings = array(
|
526 |
'label' => array(
|
527 |
'type' => 'text',
|
@@ -576,6 +584,18 @@ function ur_get_general_settings( $id ) {
|
|
576 |
),
|
577 |
);
|
578 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
579 |
return apply_filters( 'user_registration_field_options_general_settings', $general_settings, $id );
|
580 |
}
|
581 |
|
@@ -602,7 +622,8 @@ function ur_load_form_field_class( $class_key ) {
|
|
602 |
}
|
603 |
|
604 |
/**
|
605 |
-
*
|
|
|
606 |
*/
|
607 |
function ur_get_default_admin_roles() {
|
608 |
global $wp_roles;
|
@@ -611,36 +632,33 @@ function ur_get_default_admin_roles() {
|
|
611 |
return;
|
612 |
}
|
613 |
|
614 |
-
$roles = array();
|
615 |
if ( ! isset( $wp_roles ) ) {
|
616 |
$wp_roles = new WP_Roles();
|
617 |
}
|
618 |
-
$roles = $wp_roles->roles;
|
619 |
|
|
|
620 |
$all_roles = array();
|
621 |
|
622 |
foreach ( $roles as $role_key => $role ) {
|
623 |
-
|
624 |
$all_roles[ $role_key ] = $role['name'];
|
625 |
}
|
626 |
|
627 |
return apply_filters( 'user_registration_user_default_roles', $all_roles );
|
628 |
-
|
629 |
}
|
630 |
|
631 |
|
632 |
/**
|
|
|
633 |
* @return int
|
634 |
*/
|
635 |
function ur_get_random_number() {
|
636 |
-
|
637 |
$time = time();
|
638 |
|
639 |
return $time;
|
640 |
-
|
641 |
}
|
642 |
|
643 |
/**
|
|
|
644 |
* @param $form_id
|
645 |
*
|
646 |
* @since 1.0.1
|
@@ -706,7 +724,6 @@ function ur_admin_form_settings_fields( $form_id ) {
|
|
706 |
'custom_attributes' => array(),
|
707 |
'default' => ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_recaptcha_support', 'no' ),
|
708 |
),
|
709 |
-
|
710 |
array(
|
711 |
'type' => 'select',
|
712 |
'label' => __( 'Template', 'user-registration' ),
|
@@ -746,19 +763,18 @@ function ur_admin_form_settings_fields( $form_id ) {
|
|
746 |
}
|
747 |
|
748 |
/**
|
|
|
749 |
* @return mixed
|
750 |
*/
|
751 |
function ur_login_option() {
|
752 |
|
753 |
return apply_filters( 'user_registration_login_options', array(
|
754 |
-
|
755 |
'default' => __( 'Manual login after registration', 'user-registration' ),
|
756 |
'email_confirmation' => __('Email confirmation to login', 'user-registration'),
|
757 |
'auto_login' => __( 'Auto login after registration', 'user-registration' ),
|
758 |
'admin_approval' => __( 'Admin approval after registration', 'user-registration' )
|
759 |
)
|
760 |
);
|
761 |
-
|
762 |
}
|
763 |
|
764 |
/**
|
@@ -775,7 +791,6 @@ function ur_get_single_post_meta( $post_id, $meta_key, $default = null ) {
|
|
775 |
$post_meta = get_post_meta( $post_id, $meta_key );
|
776 |
|
777 |
if ( isset( $post_meta[0] ) ) {
|
778 |
-
|
779 |
return $post_meta[0];
|
780 |
}
|
781 |
|
@@ -791,27 +806,23 @@ function ur_get_single_post_meta( $post_id, $meta_key, $default = null ) {
|
|
791 |
function ur_get_form_setting_by_key( $form_id, $meta_key, $default = '' ) {
|
792 |
|
793 |
$fields = ur_admin_form_settings_fields( $form_id );
|
794 |
-
|
795 |
$value = '';
|
796 |
|
797 |
foreach ( $fields as $field ) {
|
798 |
|
799 |
if ( isset( $field['id'] ) && $meta_key == $field['id'] ) {
|
800 |
-
|
801 |
$value = isset( $field['default'] ) ? $field['default'] : $default;
|
802 |
-
|
803 |
break;
|
804 |
}
|
805 |
-
|
806 |
}
|
807 |
|
808 |
return $value;
|
809 |
}
|
810 |
|
811 |
/**
|
|
|
812 |
* @param $user_id
|
813 |
-
*
|
814 |
-
*
|
815 |
*/
|
816 |
function ur_get_user_approval_status( $user_id ) {
|
817 |
|
@@ -822,19 +833,9 @@ function ur_get_user_approval_status( $user_id ) {
|
|
822 |
if ( 'admin_approval' === $login_option ) {
|
823 |
|
824 |
$user_status = get_user_meta( $user_id, 'ur_user_status', true );
|
825 |
-
|
826 |
-
if ( $user_status == 0 || $user_status == - 1 ) {
|
827 |
-
|
828 |
-
return $user_status;
|
829 |
-
}
|
830 |
-
|
831 |
-
return $user_status;
|
832 |
-
|
833 |
-
|
834 |
}
|
835 |
|
836 |
return $user_status;
|
837 |
-
|
838 |
}
|
839 |
|
840 |
/**
|
@@ -853,48 +854,31 @@ function ur_get_form_data_by_key( $form_data, $key = null ) {
|
|
853 |
$field_key = isset( $field_data->field_key ) && $field_data->field_key !== null ? $field_data->field_key : '';
|
854 |
|
855 |
if ( ! empty( $field_key ) ) {
|
856 |
-
|
857 |
-
|
858 |
$field_name = isset( $field_data->general_setting->field_name ) && $field_data->general_setting->field_name !== null ? $field_data->general_setting->field_name : '';
|
859 |
|
860 |
if ( $key === null ) {
|
861 |
|
862 |
if ( ! empty( $field_name ) ) {
|
863 |
-
|
864 |
$form_data_array[ $field_name ] = $field_data;
|
865 |
-
|
866 |
} else {
|
867 |
-
|
868 |
$form_data_array[] = $field_data;
|
869 |
-
|
870 |
}
|
871 |
} else {
|
872 |
|
873 |
if ( $field_key === $key ) {
|
874 |
|
875 |
if ( ! empty( $field_name ) ) {
|
876 |
-
|
877 |
$form_data_array[ $field_name ] = $field_data;
|
878 |
-
|
879 |
} else {
|
880 |
-
|
881 |
$form_data_array[] = $field_data;
|
882 |
-
|
883 |
}
|
884 |
-
|
885 |
}
|
886 |
-
|
887 |
}
|
888 |
-
|
889 |
}
|
890 |
-
|
891 |
}
|
892 |
-
|
893 |
}
|
894 |
-
|
895 |
}
|
896 |
return $form_data_array;
|
897 |
-
|
898 |
}
|
899 |
|
900 |
/**
|
@@ -1000,28 +984,27 @@ function ur_addon_updater( $file, $item_id, $addon_version, $beta= false ) {
|
|
1000 |
|
1001 |
}
|
1002 |
|
1003 |
-
|
|
|
|
|
|
|
|
|
|
|
1004 |
function check_username( $username ) {
|
1005 |
|
1006 |
if( username_exists( $username ) ) {
|
1007 |
-
|
1008 |
$last_char = substr( $username, -1 );
|
1009 |
|
1010 |
if( is_numeric( $last_char ) ) {
|
1011 |
-
|
1012 |
$strip_last_char = substr( $username, 0, -1 );
|
1013 |
-
|
1014 |
$last_char = $last_char+1;
|
1015 |
-
|
1016 |
$username = $strip_last_char.$last_char;
|
1017 |
-
|
1018 |
$username = check_username( $username );
|
1019 |
|
1020 |
return $username;
|
1021 |
}
|
1022 |
else {
|
1023 |
$username = $username.'_1';
|
1024 |
-
|
1025 |
$username = check_username( $username );
|
1026 |
|
1027 |
return $username;
|
@@ -1029,9 +1012,12 @@ function check_username( $username ) {
|
|
1029 |
}
|
1030 |
|
1031 |
return $username;
|
1032 |
-
|
1033 |
}
|
1034 |
|
|
|
|
|
|
|
|
|
1035 |
function ur_get_all_user_registration_form() {
|
1036 |
|
1037 |
$args = array(
|
@@ -1040,15 +1026,18 @@ function ur_get_all_user_registration_form() {
|
|
1040 |
);
|
1041 |
|
1042 |
$posts_array = get_posts( $args );
|
|
|
1043 |
|
1044 |
foreach ( $posts_array as $post ) {
|
1045 |
-
|
1046 |
$all_forms[ $post->ID ] = $post->post_title;
|
1047 |
}
|
1048 |
|
1049 |
return $all_forms;
|
1050 |
}
|
1051 |
|
|
|
|
|
|
|
1052 |
function ur_get_user_login_option() {
|
1053 |
if( 'email_confirmation' !== get_option( 'user_registration_general_setting_login_options' ) ) {
|
1054 |
return array(
|
@@ -1065,6 +1054,11 @@ function ur_get_user_login_option() {
|
|
1065 |
}
|
1066 |
}
|
1067 |
|
|
|
|
|
|
|
|
|
|
|
1068 |
function ur_back_link( $label, $url ) {
|
1069 |
echo '<small class="ur-admin-breadcrumb"><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '">⤴</a></small>';
|
1070 |
}
|
@@ -1079,6 +1073,17 @@ if ( ! function_exists( 'wp_doing_ajax' ) ) {
|
|
1079 |
}
|
1080 |
}
|
1081 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1082 |
/**
|
1083 |
* @since 1.1.2
|
1084 |
* Output any queued javascript code in the footer.
|
84 |
function is_ur_edit_account_page() {
|
85 |
global $wp;
|
86 |
|
87 |
+
return ( is_ur_account_page() && isset( $wp->query_vars['edit-password'] ) );
|
88 |
}
|
89 |
}
|
90 |
|
303 |
|
304 |
add_filter( 'extra_plugin_headers', 'ur_enable_ur_plugin_headers' );
|
305 |
|
306 |
+
/**
|
307 |
+
* Set field type for all registrered field keys
|
308 |
+
* @param string $field_key field's field key
|
309 |
+
* @return string $field_type
|
310 |
+
*/
|
311 |
function ur_get_field_type( $field_key ) {
|
312 |
|
313 |
$fields = ur_get_registered_form_fields();
|
402 |
* @return array
|
403 |
*/
|
404 |
function ur_get_one_time_draggable_fields() {
|
|
|
405 |
$form_fields = ur_get_user_field_only();
|
406 |
return apply_filters( 'user_registration_one_time_draggable_form_fields', $form_fields );
|
407 |
}
|
408 |
|
409 |
/**
|
410 |
+
* Get fields excluding in profile tab
|
411 |
*
|
412 |
* @return array
|
413 |
*/
|
414 |
+
function ur_exclude_profile_details_fields() {
|
415 |
+
return apply_filters( 'user_registration_exclude_profile_fields', array(
|
|
|
|
|
416 |
'user_pass',
|
417 |
'user_confirm_password',
|
418 |
+
'privacy_policy'
|
|
|
|
|
419 |
) );
|
420 |
}
|
421 |
|
422 |
+
/**
|
423 |
+
* @deprecated 1.4.1
|
424 |
+
* @return void
|
425 |
+
*/
|
426 |
+
function ur_get_account_details_fields() {
|
427 |
+
ur_deprecated_function( 'ur_get_account_details_fields', '1.4.1', 'ur_exclude_profile_details_fields' );
|
428 |
+
}
|
429 |
+
|
430 |
/**
|
431 |
* Get all fields appearing in profile tab.
|
432 |
*
|
433 |
* @return array
|
434 |
*/
|
435 |
function ur_get_user_profile_field_only() {
|
436 |
+
$user_fields = array_diff( ur_get_registered_form_fields(), ur_exclude_profile_details_fields() );
|
|
|
437 |
return apply_filters( 'user_registration_user_profile_field_only', $user_fields );
|
438 |
}
|
439 |
|
467 |
) );
|
468 |
}
|
469 |
|
|
|
470 |
/**
|
471 |
* Get all extra form fields
|
472 |
*
|
480 |
return apply_filters( 'user_registration_other_form_fields', $result );
|
481 |
}
|
482 |
|
|
|
483 |
/**
|
484 |
* All default fields storing in usermeta table
|
485 |
* @return mixed|array
|
524 |
}
|
525 |
|
526 |
/**
|
527 |
+
* General settings for each fields
|
528 |
+
* @param string $id id for each field
|
529 |
* @return mixed|array
|
530 |
*/
|
531 |
function ur_get_general_settings( $id ) {
|
532 |
+
|
533 |
$general_settings = array(
|
534 |
'label' => array(
|
535 |
'type' => 'text',
|
584 |
),
|
585 |
);
|
586 |
|
587 |
+
$exclude_placeholder = array(
|
588 |
+
'user_registration_checkbox',
|
589 |
+
'user_registration_country',
|
590 |
+
'user_registration_date',
|
591 |
+
'user_registration_privacy_policy',
|
592 |
+
'user_registration_radio',
|
593 |
+
'user_registration_select'
|
594 |
+
);
|
595 |
+
|
596 |
+
if( in_array( $id, $exclude_placeholder ) ) {
|
597 |
+
unset( $general_settings['placeholder'] );
|
598 |
+
}
|
599 |
return apply_filters( 'user_registration_field_options_general_settings', $general_settings, $id );
|
600 |
}
|
601 |
|
622 |
}
|
623 |
|
624 |
/**
|
625 |
+
* List of all roles
|
626 |
+
* @return array $all_roles
|
627 |
*/
|
628 |
function ur_get_default_admin_roles() {
|
629 |
global $wp_roles;
|
632 |
return;
|
633 |
}
|
634 |
|
|
|
635 |
if ( ! isset( $wp_roles ) ) {
|
636 |
$wp_roles = new WP_Roles();
|
637 |
}
|
|
|
638 |
|
639 |
+
$roles = isset( $wp_roles->roles ) ? $wp_roles->roles : array();
|
640 |
$all_roles = array();
|
641 |
|
642 |
foreach ( $roles as $role_key => $role ) {
|
|
|
643 |
$all_roles[ $role_key ] = $role['name'];
|
644 |
}
|
645 |
|
646 |
return apply_filters( 'user_registration_user_default_roles', $all_roles );
|
|
|
647 |
}
|
648 |
|
649 |
|
650 |
/**
|
651 |
+
* Random number generated by time()
|
652 |
* @return int
|
653 |
*/
|
654 |
function ur_get_random_number() {
|
|
|
655 |
$time = time();
|
656 |
|
657 |
return $time;
|
|
|
658 |
}
|
659 |
|
660 |
/**
|
661 |
+
* Form settings
|
662 |
* @param $form_id
|
663 |
*
|
664 |
* @since 1.0.1
|
724 |
'custom_attributes' => array(),
|
725 |
'default' => ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_recaptcha_support', 'no' ),
|
726 |
),
|
|
|
727 |
array(
|
728 |
'type' => 'select',
|
729 |
'label' => __( 'Template', 'user-registration' ),
|
763 |
}
|
764 |
|
765 |
/**
|
766 |
+
* User Login Option
|
767 |
* @return mixed
|
768 |
*/
|
769 |
function ur_login_option() {
|
770 |
|
771 |
return apply_filters( 'user_registration_login_options', array(
|
|
|
772 |
'default' => __( 'Manual login after registration', 'user-registration' ),
|
773 |
'email_confirmation' => __('Email confirmation to login', 'user-registration'),
|
774 |
'auto_login' => __( 'Auto login after registration', 'user-registration' ),
|
775 |
'admin_approval' => __( 'Admin approval after registration', 'user-registration' )
|
776 |
)
|
777 |
);
|
|
|
778 |
}
|
779 |
|
780 |
/**
|
791 |
$post_meta = get_post_meta( $post_id, $meta_key );
|
792 |
|
793 |
if ( isset( $post_meta[0] ) ) {
|
|
|
794 |
return $post_meta[0];
|
795 |
}
|
796 |
|
806 |
function ur_get_form_setting_by_key( $form_id, $meta_key, $default = '' ) {
|
807 |
|
808 |
$fields = ur_admin_form_settings_fields( $form_id );
|
|
|
809 |
$value = '';
|
810 |
|
811 |
foreach ( $fields as $field ) {
|
812 |
|
813 |
if ( isset( $field['id'] ) && $meta_key == $field['id'] ) {
|
|
|
814 |
$value = isset( $field['default'] ) ? $field['default'] : $default;
|
|
|
815 |
break;
|
816 |
}
|
|
|
817 |
}
|
818 |
|
819 |
return $value;
|
820 |
}
|
821 |
|
822 |
/**
|
823 |
+
* Get user status in case of admin approval login option
|
824 |
* @param $user_id
|
825 |
+
* @return int $user_status
|
|
|
826 |
*/
|
827 |
function ur_get_user_approval_status( $user_id ) {
|
828 |
|
833 |
if ( 'admin_approval' === $login_option ) {
|
834 |
|
835 |
$user_status = get_user_meta( $user_id, 'ur_user_status', true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
836 |
}
|
837 |
|
838 |
return $user_status;
|
|
|
839 |
}
|
840 |
|
841 |
/**
|
854 |
$field_key = isset( $field_data->field_key ) && $field_data->field_key !== null ? $field_data->field_key : '';
|
855 |
|
856 |
if ( ! empty( $field_key ) ) {
|
|
|
|
|
857 |
$field_name = isset( $field_data->general_setting->field_name ) && $field_data->general_setting->field_name !== null ? $field_data->general_setting->field_name : '';
|
858 |
|
859 |
if ( $key === null ) {
|
860 |
|
861 |
if ( ! empty( $field_name ) ) {
|
|
|
862 |
$form_data_array[ $field_name ] = $field_data;
|
|
|
863 |
} else {
|
|
|
864 |
$form_data_array[] = $field_data;
|
|
|
865 |
}
|
866 |
} else {
|
867 |
|
868 |
if ( $field_key === $key ) {
|
869 |
|
870 |
if ( ! empty( $field_name ) ) {
|
|
|
871 |
$form_data_array[ $field_name ] = $field_data;
|
|
|
872 |
} else {
|
|
|
873 |
$form_data_array[] = $field_data;
|
|
|
874 |
}
|
|
|
875 |
}
|
|
|
876 |
}
|
|
|
877 |
}
|
|
|
878 |
}
|
|
|
879 |
}
|
|
|
880 |
}
|
881 |
return $form_data_array;
|
|
|
882 |
}
|
883 |
|
884 |
/**
|
984 |
|
985 |
}
|
986 |
|
987 |
+
/**
|
988 |
+
* Check if username already exists in case of optional username
|
989 |
+
* And while stripping through email address and incremet last number by 1.
|
990 |
+
* @param string $username
|
991 |
+
* @return string $username Modified username
|
992 |
+
*/
|
993 |
function check_username( $username ) {
|
994 |
|
995 |
if( username_exists( $username ) ) {
|
|
|
996 |
$last_char = substr( $username, -1 );
|
997 |
|
998 |
if( is_numeric( $last_char ) ) {
|
|
|
999 |
$strip_last_char = substr( $username, 0, -1 );
|
|
|
1000 |
$last_char = $last_char+1;
|
|
|
1001 |
$username = $strip_last_char.$last_char;
|
|
|
1002 |
$username = check_username( $username );
|
1003 |
|
1004 |
return $username;
|
1005 |
}
|
1006 |
else {
|
1007 |
$username = $username.'_1';
|
|
|
1008 |
$username = check_username( $username );
|
1009 |
|
1010 |
return $username;
|
1012 |
}
|
1013 |
|
1014 |
return $username;
|
|
|
1015 |
}
|
1016 |
|
1017 |
+
/**
|
1018 |
+
* Get all user registration forms title with respective id.
|
1019 |
+
* @return array $all_forms form id as key and form title as value.
|
1020 |
+
*/
|
1021 |
function ur_get_all_user_registration_form() {
|
1022 |
|
1023 |
$args = array(
|
1026 |
);
|
1027 |
|
1028 |
$posts_array = get_posts( $args );
|
1029 |
+
$all_forms = array();
|
1030 |
|
1031 |
foreach ( $posts_array as $post ) {
|
|
|
1032 |
$all_forms[ $post->ID ] = $post->post_title;
|
1033 |
}
|
1034 |
|
1035 |
return $all_forms;
|
1036 |
}
|
1037 |
|
1038 |
+
/**
|
1039 |
+
* Check user login option, if not email confirmation force not disable emails.
|
1040 |
+
*/
|
1041 |
function ur_get_user_login_option() {
|
1042 |
if( 'email_confirmation' !== get_option( 'user_registration_general_setting_login_options' ) ) {
|
1043 |
return array(
|
1054 |
}
|
1055 |
}
|
1056 |
|
1057 |
+
/**
|
1058 |
+
* Get link for back button used on email settings.
|
1059 |
+
* @param string $label
|
1060 |
+
* @param string $url ]
|
1061 |
+
*/
|
1062 |
function ur_back_link( $label, $url ) {
|
1063 |
echo '<small class="ur-admin-breadcrumb"><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '">⤴</a></small>';
|
1064 |
}
|
1073 |
}
|
1074 |
}
|
1075 |
|
1076 |
+
/**
|
1077 |
+
* Checks if the string is json or not
|
1078 |
+
* @param string $str
|
1079 |
+
* @since 1.4.2
|
1080 |
+
* @return mixed
|
1081 |
+
*/
|
1082 |
+
function ur_is_json( $str ) {
|
1083 |
+
$json = json_decode( $str );
|
1084 |
+
return $json && $str != $json;
|
1085 |
+
}
|
1086 |
+
|
1087 |
/**
|
1088 |
* @since 1.1.2
|
1089 |
* Output any queued javascript code in the footer.
|
includes/functions-ur-deprecated.php
CHANGED
@@ -55,7 +55,7 @@ function ur_deprecated_function( $function, $version, $replacement = null ) {
|
|
55 |
*
|
56 |
* @since 1.0.0
|
57 |
* @param string $hook The hook that was used.
|
58 |
-
* @param string $version The version of
|
59 |
* @param string $replacement The hook that should have been used.
|
60 |
* @param string $message A message regarding the change.
|
61 |
*/
|
55 |
*
|
56 |
* @since 1.0.0
|
57 |
* @param string $hook The hook that was used.
|
58 |
+
* @param string $version The version of User Registration that deprecated the hook.
|
59 |
* @param string $replacement The hook that should have been used.
|
60 |
* @param string $message A message regarding the change.
|
61 |
*/
|
includes/functions-ur-page.php
CHANGED
@@ -22,7 +22,7 @@ add_filter( 'body_class', 'ur_body_class' );
|
|
22 |
add_action( 'user_registration_account_navigation', 'user_registration_account_navigation' );
|
23 |
add_action( 'user_registration_account_content', 'user_registration_account_content' );
|
24 |
add_action( 'user_registration_account_edit-profile_endpoint', 'user_registration_account_edit_profile' );
|
25 |
-
add_action( 'user_registration_account_edit-
|
26 |
|
27 |
/**
|
28 |
* Replace a page title with the endpoint title.
|
22 |
add_action( 'user_registration_account_navigation', 'user_registration_account_navigation' );
|
23 |
add_action( 'user_registration_account_content', 'user_registration_account_content' );
|
24 |
add_action( 'user_registration_account_edit-profile_endpoint', 'user_registration_account_edit_profile' );
|
25 |
+
add_action( 'user_registration_account_edit-password_endpoint', 'user_registration_account_edit_account' );
|
26 |
|
27 |
/**
|
28 |
* Replace a page title with the endpoint title.
|
includes/functions-ur-template.php
CHANGED
@@ -14,7 +14,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
exit; // Exit if accessed directly
|
15 |
}
|
16 |
|
|
|
|
|
|
|
17 |
/**
|
|
|
18 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
19 |
*/
|
20 |
function ur_template_redirect() {
|
@@ -31,19 +35,19 @@ function ur_template_redirect() {
|
|
31 |
}
|
32 |
}
|
33 |
|
34 |
-
add_action( 'template_redirect', 'ur_template_redirect' );
|
35 |
-
add_action( 'template_redirect', 'ur_login_template_redirect' );
|
36 |
-
|
37 |
/**
|
|
|
38 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
39 |
*/
|
40 |
function ur_login_template_redirect() {
|
41 |
global $post;
|
|
|
42 |
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
|
|
43 |
if ( has_shortcode( $post_content, 'user_registration_login' ) && is_user_logged_in() ) {
|
44 |
preg_match( '/' . get_shortcode_regex() . '/s', $post_content, $matches );
|
45 |
-
$attributes = shortcode_parse_atts( $matches[3] );
|
46 |
|
|
|
47 |
$redirect_url = isset( $attributes['redirect_url'] ) ? $attributes['redirect_url'] : '';
|
48 |
$redirect_url = trim( $redirect_url, ']' );
|
49 |
$redirect_url = trim( $redirect_url, '"' );
|
@@ -79,12 +83,10 @@ function ur_body_class( $classes ) {
|
|
79 |
}
|
80 |
|
81 |
|
82 |
-
/** Forms */
|
83 |
-
|
84 |
if ( ! function_exists( 'user_registration_form_field' ) ) {
|
85 |
|
86 |
/**
|
87 |
-
* Outputs a
|
88 |
*
|
89 |
* @param string $key
|
90 |
* @param mixed $args
|
@@ -93,6 +95,24 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
93 |
* @return string
|
94 |
*/
|
95 |
function user_registration_form_field( $key, $args, $value = null ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
$defaults = array(
|
97 |
'type' => 'text',
|
98 |
'label' => '',
|
@@ -166,7 +186,7 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
166 |
switch ( $args['type'] ) {
|
167 |
|
168 |
case 'textarea' :
|
169 |
-
$field .= '<textarea data-id=""' . esc_attr( $key ) . '"" name="' . esc_attr( $key ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . ( empty( $args['custom_attributes']['rows'] ) ? ' rows="2"' : '' ) . ( empty( $args['custom_attributes']['cols'] ) ? ' cols="5"' : '' ) . implode( ' ', $custom_attributes ) . '>' . esc_textarea( $value ) . '</textarea>';
|
170 |
break;
|
171 |
|
172 |
case 'checkbox' :
|
@@ -174,10 +194,12 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
174 |
if( 'privacy_policy' == $field_key ) {
|
175 |
break;
|
176 |
}
|
|
|
|
|
177 |
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
|
182 |
$choices = isset( $args['choices'] ) ? $args['choices'] : array();
|
183 |
|
@@ -190,18 +212,20 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
190 |
foreach ( $choices as $choice_index => $choice ) {
|
191 |
|
192 |
$value = '';
|
193 |
-
if ( in_array(trim($choice), $default) ) {
|
|
|
|
|
194 |
$value = 'checked="checked"';
|
195 |
}
|
196 |
|
197 |
$field .= '<label>';
|
198 |
-
$field .= ' <input data-id="' . esc_attr( $key ) . '" ' . implode( ' ', $custom_attributes ) . ' data-value="' . $choice_index . '" type="' . esc_attr( $args['type'] ) . '" class="input-checkbox ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '[]" id="' . esc_attr( $args['id'] ) . '_' . esc_attr( $choice_index ) . '" value="'.trim($choice).'"' . $value . ' /> ';
|
199 |
$field .= trim( $choice ) . ' </label>';
|
200 |
$checkbox_start++;
|
201 |
}
|
202 |
} else {
|
203 |
$field = '<label class="checkbox ' . implode( ' ', $custom_attributes ) . '">
|
204 |
-
<input data-id="' . esc_attr( $key ) . '" ' . implode( ' ', $custom_attributes ) . ' data-value="' . $value . '" type="' . esc_attr( $args['type'] ) . '" class="input-checkbox ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="1" ' . checked( $value, 1, false ) . ' /> '
|
205 |
. $args['label'] . $required . '</label>';
|
206 |
if ( $args['description'] ) {
|
207 |
$field .= '<span class="description">' . $args['description'] . '</span>';
|
@@ -222,10 +246,10 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
222 |
$extra_params = json_decode( get_user_meta( get_current_user_id(), $extra_params_key, true ) );
|
223 |
|
224 |
if ( empty( $extra_params ) ) {
|
225 |
-
$field .= '<input data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text input-' . esc_attr( $args['type'] ) ." " .esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
226 |
}
|
227 |
else {
|
228 |
-
$field .= '<input data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
229 |
}
|
230 |
break;
|
231 |
|
@@ -244,7 +268,7 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
244 |
$options .= '<option value="' . esc_attr( trim( $option_key ) ) . '" ' . selected( $value, trim( $option_key ), false ) . '>' . esc_attr( trim( $option_text ) ) . '</option>';
|
245 |
}
|
246 |
|
247 |
-
$field .= '<select data-id="' . esc_attr( $key ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">
|
248 |
' . $options . '
|
249 |
</select>';
|
250 |
}
|
@@ -257,7 +281,7 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
257 |
|
258 |
$field .= '<label for="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_key ) . '" class="radio">';
|
259 |
|
260 |
-
$field .= '<input data-id="' . esc_attr( $key ) . '" type="radio" class="input-radio ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" value="' . esc_attr( trim ( $option_key ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_key ) . '" ' . implode( ' ', $custom_attributes ) . ' / ' . checked( $value, trim( $option_key ), false ) . ' />' . wp_kses( trim( $option_text ), array(
|
261 |
'a' => array(
|
262 |
'href' => array(),
|
263 |
'title' => array()
|
@@ -302,7 +326,7 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
302 |
if ( ! function_exists( 'user_registration_form_data' ) ) {
|
303 |
|
304 |
/**
|
305 |
-
* Get
|
306 |
*
|
307 |
* @param string $user_id
|
308 |
* @param string $form_id
|
@@ -338,7 +362,7 @@ if ( ! function_exists( 'user_registration_form_data' ) ) {
|
|
338 |
$field_description = isset( $field->general_setting->description ) ? $field->general_setting->description : '';
|
339 |
$field_key = isset( $field->field_key ) ? ( $field->field_key ) : '';
|
340 |
$field_type = isset( $field->field_key ) ? ur_get_field_type( $field_key ) : '';
|
341 |
-
$required = isset( $general_setting->required ) ? $general_setting->required :'';
|
342 |
$required = 'yes' == $required ? true : false;
|
343 |
|
344 |
if ( empty( $field_label ) ) {
|
@@ -384,7 +408,7 @@ if ( ! function_exists( 'user_registration_form_data' ) ) {
|
|
384 |
'field_key' => $field_key,
|
385 |
'required' => $required,
|
386 |
);
|
387 |
-
} elseif ( in_array( $
|
388 |
$fields[ 'user_registration_' . $field_name ] = array(
|
389 |
'label' => __( $field_label, 'user-registration' ),
|
390 |
'description' => __( $field_description, 'user-registration' ),
|
@@ -411,7 +435,6 @@ if ( ! function_exists( 'user_registration_form_data' ) ) {
|
|
411 |
}// End foreach().
|
412 |
}// End foreach().
|
413 |
}// End foreach().
|
414 |
-
|
415 |
return $fields;
|
416 |
}
|
417 |
}// End if().
|
14 |
exit; // Exit if accessed directly
|
15 |
}
|
16 |
|
17 |
+
add_action( 'template_redirect', 'ur_template_redirect' );
|
18 |
+
add_action( 'template_redirect', 'ur_login_template_redirect' );
|
19 |
+
|
20 |
/**
|
21 |
+
* Redirect after logout.
|
22 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
23 |
*/
|
24 |
function ur_template_redirect() {
|
35 |
}
|
36 |
}
|
37 |
|
|
|
|
|
|
|
38 |
/**
|
39 |
+
* Check for login shortcode in the page and redirect to the url passed with login shortcode parameter redirect_url
|
40 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
41 |
*/
|
42 |
function ur_login_template_redirect() {
|
43 |
global $post;
|
44 |
+
|
45 |
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
46 |
+
|
47 |
if ( has_shortcode( $post_content, 'user_registration_login' ) && is_user_logged_in() ) {
|
48 |
preg_match( '/' . get_shortcode_regex() . '/s', $post_content, $matches );
|
|
|
49 |
|
50 |
+
$attributes = shortcode_parse_atts( $matches[3] );
|
51 |
$redirect_url = isset( $attributes['redirect_url'] ) ? $attributes['redirect_url'] : '';
|
52 |
$redirect_url = trim( $redirect_url, ']' );
|
53 |
$redirect_url = trim( $redirect_url, '"' );
|
83 |
}
|
84 |
|
85 |
|
|
|
|
|
86 |
if ( ! function_exists( 'user_registration_form_field' ) ) {
|
87 |
|
88 |
/**
|
89 |
+
* Outputs a form fields on frontend.
|
90 |
*
|
91 |
* @param string $key
|
92 |
* @param mixed $args
|
95 |
* @return string
|
96 |
*/
|
97 |
function user_registration_form_field( $key, $args, $value = null ) {
|
98 |
+
|
99 |
+
/* Conditional Logic codes */
|
100 |
+
$rules = array();
|
101 |
+
$rules['conditional_rules'] = isset ( $args['conditional_rules'] ) ? $args['conditional_rules'] : '';
|
102 |
+
$rules['logic_gate'] = isset( $args['logic_gate'] ) ? $args['logic_gate'] : '';
|
103 |
+
$rules['rules'] = isset( $args['rules'] ) ? $args['rules'] : array();
|
104 |
+
$rules['required'] = isset( $args['required'] ) ? $args['required'] : '';
|
105 |
+
|
106 |
+
foreach( $rules['rules'] as $rules_key => $rule ) {
|
107 |
+
if( empty( $rule['field'] ) ) {
|
108 |
+
unset( $rules['rules'][ $rules_key ] );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
$rules['rules'] = array_values( $rules['rules'] );
|
112 |
+
|
113 |
+
$rules = ( ! empty( $rules['rules'] ) && isset( $args['enable_conditional_logic'] ) ) ? wp_json_encode( $rules ) : "''";
|
114 |
+
/*Conditonal Logic codes end*/
|
115 |
+
|
116 |
$defaults = array(
|
117 |
'type' => 'text',
|
118 |
'label' => '',
|
186 |
switch ( $args['type'] ) {
|
187 |
|
188 |
case 'textarea' :
|
189 |
+
$field .= '<textarea data-rules=' . $rules . ' data-id=""' . esc_attr( $key ) . '"" name="' . esc_attr( $key ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . ( empty( $args['custom_attributes']['rows'] ) ? ' rows="2"' : '' ) . ( empty( $args['custom_attributes']['cols'] ) ? ' cols="5"' : '' ) . implode( ' ', $custom_attributes ) . '>' . esc_textarea( $value ) . '</textarea>';
|
190 |
break;
|
191 |
|
192 |
case 'checkbox' :
|
194 |
if( 'privacy_policy' == $field_key ) {
|
195 |
break;
|
196 |
}
|
197 |
+
$default = $args['default'];
|
198 |
+
if( isset( $args['choices'] ) && array_filter( $args['choices'] ) ) {
|
199 |
|
200 |
+
if( ! empty( $default ) ) {
|
201 |
+
$default = ( is_serialized( $default ) ) ? unserialize( $default ) : $default;
|
202 |
+
}
|
203 |
|
204 |
$choices = isset( $args['choices'] ) ? $args['choices'] : array();
|
205 |
|
212 |
foreach ( $choices as $choice_index => $choice ) {
|
213 |
|
214 |
$value = '';
|
215 |
+
if ( is_array( $default ) && in_array( trim( $choice ), $default ) ) {
|
216 |
+
$value = 'checked="checked"';
|
217 |
+
} elseif( $default === $choice ) {
|
218 |
$value = 'checked="checked"';
|
219 |
}
|
220 |
|
221 |
$field .= '<label>';
|
222 |
+
$field .= ' <input data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" ' . implode( ' ', $custom_attributes ) . ' data-value="' . $choice_index . '" type="' . esc_attr( $args['type'] ) . '" class="input-checkbox ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '[]" id="' . esc_attr( $args['id'] ) . '_' . esc_attr( $choice_index ) . '" value="'.trim($choice).'"' . $value . ' /> ';
|
223 |
$field .= trim( $choice ) . ' </label>';
|
224 |
$checkbox_start++;
|
225 |
}
|
226 |
} else {
|
227 |
$field = '<label class="checkbox ' . implode( ' ', $custom_attributes ) . '">
|
228 |
+
<input data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" ' . implode( ' ', $custom_attributes ) . ' data-value="' . $value . '" type="' . esc_attr( $args['type'] ) . '" class="input-checkbox ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="1" ' . checked( $value, 1, false ) . ' /> '
|
229 |
. $args['label'] . $required . '</label>';
|
230 |
if ( $args['description'] ) {
|
231 |
$field .= '<span class="description">' . $args['description'] . '</span>';
|
246 |
$extra_params = json_decode( get_user_meta( get_current_user_id(), $extra_params_key, true ) );
|
247 |
|
248 |
if ( empty( $extra_params ) ) {
|
249 |
+
$field .= '<input data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text input-' . esc_attr( $args['type'] ) ." " .esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
250 |
}
|
251 |
else {
|
252 |
+
$field .= '<input data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
253 |
}
|
254 |
break;
|
255 |
|
268 |
$options .= '<option value="' . esc_attr( trim( $option_key ) ) . '" ' . selected( $value, trim( $option_key ), false ) . '>' . esc_attr( trim( $option_text ) ) . '</option>';
|
269 |
}
|
270 |
|
271 |
+
$field .= '<select data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">
|
272 |
' . $options . '
|
273 |
</select>';
|
274 |
}
|
281 |
|
282 |
$field .= '<label for="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_key ) . '" class="radio">';
|
283 |
|
284 |
+
$field .= '<input data-rules=' . $rules . ' data-id="' . esc_attr( $key ) . '" type="radio" class="input-radio ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" value="' . esc_attr( trim ( $option_key ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_key ) . '" ' . implode( ' ', $custom_attributes ) . ' / ' . checked( $value, trim( $option_key ), false ) . ' />' . wp_kses( trim( $option_text ), array(
|
285 |
'a' => array(
|
286 |
'href' => array(),
|
287 |
'title' => array()
|
326 |
if ( ! function_exists( 'user_registration_form_data' ) ) {
|
327 |
|
328 |
/**
|
329 |
+
* Get form fields to display on profile tab
|
330 |
*
|
331 |
* @param string $user_id
|
332 |
* @param string $form_id
|
362 |
$field_description = isset( $field->general_setting->description ) ? $field->general_setting->description : '';
|
363 |
$field_key = isset( $field->field_key ) ? ( $field->field_key ) : '';
|
364 |
$field_type = isset( $field->field_key ) ? ur_get_field_type( $field_key ) : '';
|
365 |
+
$required = isset( $field->general_setting->required ) ? $field->general_setting->required :'';
|
366 |
$required = 'yes' == $required ? true : false;
|
367 |
|
368 |
if ( empty( $field_label ) ) {
|
408 |
'field_key' => $field_key,
|
409 |
'required' => $required,
|
410 |
);
|
411 |
+
} elseif ( in_array( $field_key, ur_get_user_profile_field_only() ) ) {
|
412 |
$fields[ 'user_registration_' . $field_name ] = array(
|
413 |
'label' => __( $field_label, 'user-registration' ),
|
414 |
'description' => __( $field_description, 'user-registration' ),
|
435 |
}// End foreach().
|
436 |
}// End foreach().
|
437 |
}// End foreach().
|
|
|
438 |
return $fields;
|
439 |
}
|
440 |
}// End if().
|
includes/functions-ur-update.php
CHANGED
@@ -209,3 +209,19 @@ function ur_update_140_option() {
|
|
209 |
delete_option( $unused_option );
|
210 |
}
|
211 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
delete_option( $unused_option );
|
210 |
}
|
211 |
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Update DB Version.
|
215 |
+
*/
|
216 |
+
function ur_update_142_db_version() {
|
217 |
+
UR_Install::update_db_version( '1.4.2' );
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Replace option name user_registration_myaccount_edit_account_endpoint to user_registration_myaccount_change_password_endpoint.
|
222 |
+
*/
|
223 |
+
function ur_update_142_option() {
|
224 |
+
$value = get_option( 'user_registration_myaccount_edit_account_endpoint' );
|
225 |
+
update_option( 'user_registration_myaccount_change_password_endpoint', $value );
|
226 |
+
delete_option( 'user_registration_myaccount_edit_account_endpoint' );
|
227 |
+
}
|
includes/shortcodes/class-ur-shortcode-my-account.php
CHANGED
@@ -136,7 +136,7 @@ class UR_Shortcode_My_Account {
|
|
136 |
* Edit account details page.
|
137 |
*/
|
138 |
public static function edit_account() {
|
139 |
-
ur_get_template( 'myaccount/form-edit-
|
140 |
'user' => get_user_by( 'id', get_current_user_id() ),
|
141 |
) );
|
142 |
}
|
136 |
* Edit account details page.
|
137 |
*/
|
138 |
public static function edit_account() {
|
139 |
+
ur_get_template( 'myaccount/form-edit-password.php', array(
|
140 |
'user' => get_user_by( 'id', get_current_user_id() ),
|
141 |
) );
|
142 |
}
|
languages/user-registration.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the User Registration package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: User Registration 1.4.
|
6 |
"Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
|
7 |
-
"POT-Creation-Date: 2018-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -21,44 +21,44 @@ msgstr ""
|
|
21 |
msgid "Advance Settings"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: includes/admin/class-ur-admin-assets.php:
|
25 |
msgid "Could not install."
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: includes/admin/class-ur-admin-assets.php:
|
29 |
msgid "Clone"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: includes/admin/class-ur-admin-assets.php:
|
33 |
#: includes/admin/class-ur-admin-registrations-table-list.php:112
|
34 |
msgid "Trash"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/admin/class-ur-admin-editor.php:
|
38 |
msgid "Add User Registration Form"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/admin/class-ur-admin-editor.php:
|
42 |
msgid "Add Registration Form"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/admin/class-ur-admin-editor.php:
|
46 |
msgid "Insert Form"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/admin/class-ur-admin-editor.php:
|
50 |
msgid "Close"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/admin/class-ur-admin-editor.php:
|
54 |
msgid "Select a form below to insert"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/admin/class-ur-admin-editor.php:
|
58 |
msgid "Cancel"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/admin/class-ur-admin-editor.php:
|
62 |
msgid "Add Form"
|
63 |
msgstr ""
|
64 |
|
@@ -90,7 +90,7 @@ msgid "User Registration settings"
|
|
90 |
msgstr ""
|
91 |
|
92 |
#: includes/admin/class-ur-admin-menus.php:303
|
93 |
-
#: includes/class-ur-install.php:
|
94 |
msgid "Settings"
|
95 |
msgstr ""
|
96 |
|
@@ -100,7 +100,7 @@ msgstr ""
|
|
100 |
|
101 |
#: includes/admin/class-ur-admin-menus.php:313
|
102 |
#: includes/admin/class-ur-admin-user-list-manager.php:180
|
103 |
-
#: includes/class-ur-email-confirmation.php:
|
104 |
msgid "Status"
|
105 |
msgstr ""
|
106 |
|
@@ -134,7 +134,7 @@ msgid "User Registration endpoints"
|
|
134 |
msgstr ""
|
135 |
|
136 |
#: includes/admin/class-ur-admin-menus.php:445
|
137 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
138 |
#: includes/class-ur-query.php:79
|
139 |
msgid "Lost password"
|
140 |
msgstr ""
|
@@ -336,15 +336,15 @@ msgstr ""
|
|
336 |
msgid "Impossible to create an UR_Admin_User_Manager object. Unkwon data type."
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: includes/admin/class-ur-admin-user-manager.php:
|
340 |
msgid "approved"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/admin/class-ur-admin-user-manager.php:
|
344 |
msgid "pending"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: includes/admin/class-ur-admin-user-manager.php:
|
348 |
msgid "denied"
|
349 |
msgstr ""
|
350 |
|
@@ -409,7 +409,7 @@ msgid "How the sender email appears in outgoing user registration emails."
|
|
409 |
msgstr ""
|
410 |
|
411 |
#: includes/admin/settings/class-ur-settings-email.php:149
|
412 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
413 |
msgid "Email"
|
414 |
msgstr ""
|
415 |
|
@@ -422,248 +422,269 @@ msgstr ""
|
|
422 |
msgid "Smart Tags Used"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
426 |
msgid "General"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
430 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
431 |
msgid "General Options"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
435 |
msgid "Frontend Messages"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
439 |
msgid "User login option"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
443 |
msgid "This option lets you choose login option after user registration."
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
447 |
msgid "Redirect URL"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
451 |
msgid "This option lets you enter redirect path after successful user registration."
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
455 |
msgid "Registration URL"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
459 |
msgid "This option lets you enter the registration page url in login form."
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
463 |
msgid "Registration URL label"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
467 |
msgid "This option lets you enter the label to registration url in login form."
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
471 |
#: templates/myaccount/form-login.php:71
|
472 |
msgid "Not a member yet? Register now."
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
476 |
msgid "Prevent dashboard access"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
480 |
msgid ""
|
481 |
"This option lets you limit which roles you are willing to prevent dashboard "
|
482 |
"access."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
486 |
msgid "My account page"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
490 |
msgid "Page contents: [%s]"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
494 |
-
msgid "My account
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
498 |
msgid ""
|
499 |
"Endpoints are appended to your page URLs to handle specific actions on the "
|
500 |
"accounts pages. They should be unique and can be left blank to disable the "
|
501 |
"endpoint."
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
505 |
-
msgid "Edit
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
509 |
-
msgid "Endpoint for the \"My account → Edit
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
513 |
-
|
|
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
517 |
-
msgid "Endpoint for the \"My account →
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
521 |
msgid "Endpoint for the \"My account → Lost password\" page."
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
525 |
msgid "User logout"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
529 |
msgid ""
|
530 |
"Endpoint for the triggering logout. You can add this to your menus via a "
|
531 |
"custom link: yoursite.com/?user-logout=true"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
535 |
msgid "Success Messages"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
539 |
-
#: includes/functions-ur-core.php:
|
540 |
msgid "Manual login after registration"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
544 |
msgid ""
|
545 |
"Enter the text message after successful form submission on manual login "
|
546 |
"after registration."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
550 |
-
#: includes/class-ur-frontend-scripts.php:
|
551 |
msgid "User successfully registered."
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
555 |
-
#: includes/functions-ur-core.php:
|
556 |
msgid "Email confirmation to login"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
560 |
msgid ""
|
561 |
"Enter the text message after successful form submission on email "
|
562 |
"confirmation to login."
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
566 |
-
#: includes/class-ur-frontend-scripts.php:
|
567 |
msgid ""
|
568 |
"User registered. Verify your email by clicking on the link sent to your "
|
569 |
"email."
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
573 |
-
#: includes/functions-ur-core.php:
|
574 |
msgid "Admin approval after registration"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
578 |
msgid ""
|
579 |
"Enter the text message after successful form submission on admin approval "
|
580 |
"after registration."
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
584 |
-
#: includes/class-ur-frontend-scripts.php:
|
585 |
msgid "User registered. Wait until admin approves your registration."
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
589 |
msgid "Error Messages"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
593 |
-
#: includes/functions-ur-core.php:
|
594 |
msgid "Required"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
598 |
msgid "Enter the error message in form submission on required fields."
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
602 |
-
#: includes/class-ur-frontend-scripts.php:
|
603 |
msgid "This field is required."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
607 |
msgid "Enter the error message in form submission on Email."
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
611 |
-
#: includes/class-ur-frontend-scripts.php:
|
612 |
msgid "Please enter a valid email address."
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
616 |
msgid "Website URL"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
620 |
msgid "Enter the error message in form submission on website/URL."
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
624 |
-
#: includes/class-ur-frontend-scripts.php:
|
625 |
msgid "Please enter a valid URL."
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
629 |
#: includes/form/class-ur-form-field-number.php:44
|
630 |
#: includes/form/class-ur-form-field-number.php:51
|
631 |
msgid "Number"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
635 |
msgid "Enter the error message in form submission on Number."
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
639 |
-
#: includes/class-ur-frontend-scripts.php:
|
640 |
msgid "Please enter a valid number."
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
644 |
#: includes/form/class-ur-form-field-user-confirm-password.php:50
|
645 |
msgid "Confirm Password"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
649 |
msgid "Enter the error message in form submission on Confim Password."
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
653 |
-
#: includes/class-ur-frontend-scripts.php:
|
654 |
msgid "Password and confirm password not matched."
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
658 |
msgid "Google reCaptcha"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
662 |
msgid "Enter the error message in form submission on google recaptcha."
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: includes/admin/settings/class-ur-settings-general.php:
|
666 |
-
#: includes/class-ur-frontend-scripts.php:
|
667 |
msgid "Captcha code error, please try again."
|
668 |
msgstr ""
|
669 |
|
@@ -1048,10 +1069,6 @@ msgid ""
|
|
1048 |
"here: <a href=\"%s\">User Registration Extensions Catalog</a>"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: includes/admin/views/html-admin-page-forms.php:7
|
1052 |
-
msgid "Registration forms"
|
1053 |
-
msgstr ""
|
1054 |
-
|
1055 |
#: includes/admin/views/html-admin-page-forms.php:16
|
1056 |
msgid "Form Name"
|
1057 |
msgstr ""
|
@@ -1178,76 +1195,79 @@ msgstr ""
|
|
1178 |
msgid "Taking a while? Click here to run it now."
|
1179 |
msgstr ""
|
1180 |
|
1181 |
-
#: includes/class-ur-ajax.php:
|
1182 |
msgid "Nonce error, please reload."
|
1183 |
msgstr ""
|
1184 |
|
1185 |
-
#: includes/class-ur-ajax.php:
|
1186 |
-
msgid "Only
|
1187 |
msgstr ""
|
1188 |
|
1189 |
-
#: includes/class-ur-ajax.php:
|
1190 |
-
msgid "You are currently logged in as %1s.
|
1191 |
msgstr ""
|
1192 |
|
1193 |
-
#: includes/class-ur-ajax.php:
|
1194 |
msgid "Log out of this account."
|
1195 |
msgstr ""
|
1196 |
|
1197 |
-
#: includes/class-ur-ajax.php:
|
1198 |
-
#: includes/functions-ur-account.php:
|
1199 |
msgid "Logout"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: includes/class-ur-ajax.php:
|
1203 |
msgid "post data not set"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: includes/class-ur-ajax.php:
|
1207 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: includes/class-ur-email-confirmation.php:
|
1211 |
msgid "Verified"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
-
#: includes/class-ur-email-confirmation.php:
|
1215 |
msgid "Pending"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: includes/class-ur-email-confirmation.php:
|
1219 |
msgid "User successfully registered. Login to continue."
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: includes/class-ur-email-confirmation.php:
|
1223 |
msgid "Token Mismatch!"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: includes/class-ur-email-confirmation.php:
|
1227 |
msgid "Verification Email Sent!"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: includes/class-ur-email-confirmation.php:
|
1231 |
msgid "User doesnot exist!"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: includes/class-ur-email-confirmation.php:
|
|
|
|
|
|
|
1235 |
#: includes/class-ur-user-approval.php:183
|
1236 |
#: includes/class-ur-user-approval.php:188
|
1237 |
msgid "ERROR:"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
-
#: includes/class-ur-email-confirmation.php:
|
1241 |
msgid ""
|
1242 |
"Your account is still pending approval. Verifiy your email by clicking on "
|
1243 |
"the link sent to your email. %s"
|
1244 |
msgstr ""
|
1245 |
|
1246 |
-
#: includes/class-ur-email-confirmation.php:
|
1247 |
msgid "Resend Verification Link"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: includes/class-ur-email-confirmation.php:
|
1251 |
msgid ""
|
1252 |
"Email not verified! Verifiy your email by clicking on the link sent to your "
|
1253 |
"email."
|
@@ -1257,139 +1277,110 @@ msgstr ""
|
|
1257 |
msgid "Chosen Password"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: includes/class-ur-form-handler.php:
|
1261 |
msgid "%s is a required field."
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#: includes/class-ur-form-handler.php:
|
1265 |
msgid "%s is not a valid email address."
|
1266 |
msgstr ""
|
1267 |
|
1268 |
-
#: includes/class-ur-form-handler.php:
|
1269 |
msgid "User profile updated successfully."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: includes/class-ur-form-handler.php:
|
1273 |
-
#: templates/myaccount/form-edit-account.php:32
|
1274 |
-
msgid "First name"
|
1275 |
-
msgstr ""
|
1276 |
-
|
1277 |
-
#: includes/class-ur-form-handler.php:210
|
1278 |
-
#: templates/myaccount/form-edit-account.php:36
|
1279 |
-
msgid "Last name"
|
1280 |
-
msgstr ""
|
1281 |
-
|
1282 |
-
#: includes/class-ur-form-handler.php:211
|
1283 |
-
#: templates/myaccount/form-edit-account.php:42
|
1284 |
-
msgid "Email address"
|
1285 |
-
msgstr ""
|
1286 |
-
|
1287 |
-
#: includes/class-ur-form-handler.php:223
|
1288 |
-
msgid "Please provide a valid email address."
|
1289 |
-
msgstr ""
|
1290 |
-
|
1291 |
-
#: includes/class-ur-form-handler.php:225
|
1292 |
-
msgid "This email address is already registered."
|
1293 |
-
msgstr ""
|
1294 |
-
|
1295 |
-
#: includes/class-ur-form-handler.php:231
|
1296 |
msgid "Please fill out all password fields."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: includes/class-ur-form-handler.php:
|
1300 |
msgid "Please enter your current password."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: includes/class-ur-form-handler.php:
|
1304 |
msgid "Please re-enter your password."
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: includes/class-ur-form-handler.php:
|
1308 |
msgid "New passwords do not match."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#: includes/class-ur-form-handler.php:
|
1312 |
msgid "Your current password is incorrect."
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: includes/class-ur-form-handler.php:
|
1316 |
-
msgid "
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: includes/class-ur-form-handler.php:
|
1320 |
-
#: includes/class-ur-form-handler.php:298
|
1321 |
-
#: includes/class-ur-form-handler.php:307
|
1322 |
-
msgid "Error:"
|
1323 |
-
msgstr ""
|
1324 |
-
|
1325 |
-
#: includes/class-ur-form-handler.php:298
|
1326 |
msgid "Username is required."
|
1327 |
msgstr ""
|
1328 |
|
1329 |
-
#: includes/class-ur-form-handler.php:
|
1330 |
msgid "A user could not be found with this email address."
|
1331 |
msgstr ""
|
1332 |
|
1333 |
-
#: includes/class-ur-form-handler.php:
|
1334 |
msgid "Please enter your password."
|
1335 |
msgstr ""
|
1336 |
|
1337 |
-
#: includes/class-ur-form-handler.php:
|
1338 |
msgid "Passwords do not match."
|
1339 |
msgstr ""
|
1340 |
|
1341 |
-
#: includes/class-ur-frontend-scripts.php:
|
1342 |
msgid "Confirm password"
|
1343 |
msgstr ""
|
1344 |
|
1345 |
-
#: includes/class-ur-frontend-scripts.php:
|
1346 |
msgid "Too short password"
|
1347 |
msgstr ""
|
1348 |
|
1349 |
-
#: includes/class-ur-frontend-scripts.php:
|
1350 |
msgid "Bad password"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
-
#: includes/class-ur-frontend-scripts.php:
|
1354 |
msgid "Good password"
|
1355 |
msgstr ""
|
1356 |
|
1357 |
-
#: includes/class-ur-frontend-scripts.php:
|
1358 |
msgid "Strong password"
|
1359 |
msgstr ""
|
1360 |
|
1361 |
-
#: includes/class-ur-frontend-scripts.php:
|
1362 |
msgid "Password with confirm password not matched."
|
1363 |
msgstr ""
|
1364 |
|
1365 |
-
#: includes/class-ur-frontend-scripts.php:
|
1366 |
msgid ""
|
1367 |
"Hint: The password should be at least seven characters long. To make it "
|
1368 |
"stronger, use upper and lower case letters, numbers and symbols such as ! * "
|
1369 |
"? $ % ^ & )."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: includes/class-ur-install.php:
|
1373 |
msgid "Default form"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
-
#: includes/class-ur-install.php:
|
1377 |
msgid "View User Registration settings"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
-
#: includes/class-ur-install.php:
|
1381 |
msgid "View User Registration documentation"
|
1382 |
msgstr ""
|
1383 |
|
1384 |
-
#: includes/class-ur-install.php:
|
1385 |
msgid "Docs"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
-
#: includes/class-ur-install.php:
|
1389 |
msgid "Visit free customer support"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
-
#: includes/class-ur-install.php:
|
1393 |
msgid "Free support"
|
1394 |
msgstr ""
|
1395 |
|
@@ -1510,11 +1501,7 @@ msgstr ""
|
|
1510 |
msgid "Parent registration"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
-
#: includes/class-ur-query.php:
|
1514 |
-
msgid "Account details"
|
1515 |
-
msgstr ""
|
1516 |
-
|
1517 |
-
#: includes/class-ur-query.php:76 includes/functions-ur-account.php:78
|
1518 |
msgid "Profile Details"
|
1519 |
msgstr ""
|
1520 |
|
@@ -2710,127 +2697,131 @@ msgstr ""
|
|
2710 |
msgid "Default Value"
|
2711 |
msgstr ""
|
2712 |
|
2713 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2714 |
msgid "Something went wrong! please try again"
|
2715 |
msgstr ""
|
2716 |
|
2717 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2718 |
msgid "Duplicate field key in form, please contact site administrator."
|
2719 |
msgstr ""
|
2720 |
|
2721 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2722 |
msgid "Required form field not found."
|
2723 |
msgstr ""
|
2724 |
|
2725 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2726 |
msgid "Empty confirm password"
|
2727 |
msgstr ""
|
2728 |
|
2729 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2730 |
msgid "Password and confirm password not matched"
|
2731 |
msgstr ""
|
2732 |
|
2733 |
-
#: includes/functions-ur-account.php:
|
2734 |
msgid "The password you entered for username %1s is incorrect. %2s"
|
2735 |
msgstr ""
|
2736 |
|
2737 |
-
#: includes/functions-ur-account.php:
|
2738 |
msgid "Lost Your Password?"
|
2739 |
msgstr ""
|
2740 |
|
2741 |
-
#: includes/functions-ur-account.php:
|
|
|
|
|
|
|
|
|
2742 |
msgid "Dashboard"
|
2743 |
msgstr ""
|
2744 |
|
2745 |
-
#: includes/functions-ur-core.php:
|
2746 |
msgid "Label"
|
2747 |
msgstr ""
|
2748 |
|
2749 |
-
#: includes/functions-ur-core.php:
|
2750 |
msgid "Description"
|
2751 |
msgstr ""
|
2752 |
|
2753 |
-
#: includes/functions-ur-core.php:
|
2754 |
msgid "Field Name"
|
2755 |
msgstr ""
|
2756 |
|
2757 |
-
#: includes/functions-ur-core.php:
|
2758 |
msgid "Placeholder"
|
2759 |
msgstr ""
|
2760 |
|
2761 |
-
#: includes/functions-ur-core.php:
|
2762 |
-
#: includes/functions-ur-core.php:
|
2763 |
msgid "No"
|
2764 |
msgstr ""
|
2765 |
|
2766 |
-
#: includes/functions-ur-core.php:
|
2767 |
-
#: includes/functions-ur-core.php:
|
2768 |
msgid "Yes"
|
2769 |
msgstr ""
|
2770 |
|
2771 |
-
#: includes/functions-ur-core.php:
|
2772 |
msgid "Hide Label"
|
2773 |
msgstr ""
|
2774 |
|
2775 |
-
#: includes/functions-ur-core.php:
|
2776 |
msgid "Default user role"
|
2777 |
msgstr ""
|
2778 |
|
2779 |
-
#: includes/functions-ur-core.php:
|
2780 |
msgid "Enable strong password"
|
2781 |
msgstr ""
|
2782 |
|
2783 |
-
#: includes/functions-ur-core.php:
|
2784 |
msgid "Form submit button label"
|
2785 |
msgstr ""
|
2786 |
|
2787 |
-
#: includes/functions-ur-core.php:
|
2788 |
msgid "Enable %1$s %2$s reCaptcha %3$s support"
|
2789 |
msgstr ""
|
2790 |
|
2791 |
-
#: includes/functions-ur-core.php:
|
2792 |
msgid "Template"
|
2793 |
msgstr ""
|
2794 |
|
2795 |
-
#: includes/functions-ur-core.php:
|
2796 |
msgid "Default"
|
2797 |
msgstr ""
|
2798 |
|
2799 |
-
#: includes/functions-ur-core.php:
|
2800 |
msgid "Bordered"
|
2801 |
msgstr ""
|
2802 |
|
2803 |
-
#: includes/functions-ur-core.php:
|
2804 |
msgid "Flat"
|
2805 |
msgstr ""
|
2806 |
|
2807 |
-
#: includes/functions-ur-core.php:
|
2808 |
msgid "Rounded"
|
2809 |
msgstr ""
|
2810 |
|
2811 |
-
#: includes/functions-ur-core.php:
|
2812 |
msgid "Rounded Edge"
|
2813 |
msgstr ""
|
2814 |
|
2815 |
-
#: includes/functions-ur-core.php:
|
2816 |
msgid "Custom CSS class"
|
2817 |
msgstr ""
|
2818 |
|
2819 |
-
#: includes/functions-ur-core.php:
|
2820 |
msgid "Auto login after registration"
|
2821 |
msgstr ""
|
2822 |
|
2823 |
-
#: includes/functions-ur-core.php:
|
2824 |
msgid ""
|
2825 |
"The class <code>%s</code> provided by user_registration_logging_class "
|
2826 |
"filter must implement <code>UR_Logger_Interface</code>."
|
2827 |
msgstr ""
|
2828 |
|
2829 |
-
#: includes/functions-ur-core.php:
|
2830 |
msgid "Disable emails"
|
2831 |
msgstr ""
|
2832 |
|
2833 |
-
#: includes/functions-ur-core.php:
|
2834 |
msgid "Disable all emails sent after registration."
|
2835 |
msgstr ""
|
2836 |
|
@@ -2841,11 +2832,11 @@ msgstr ""
|
|
2841 |
msgid "This function should not be called before user_registration_init."
|
2842 |
msgstr ""
|
2843 |
|
2844 |
-
#: includes/functions-ur-template.php:
|
2845 |
msgid "required"
|
2846 |
msgstr ""
|
2847 |
|
2848 |
-
#: includes/functions-ur-template.php:
|
2849 |
msgid "Choose an option"
|
2850 |
msgstr ""
|
2851 |
|
@@ -2892,33 +2883,38 @@ msgid "Hello %1$s (not %1$s? <a href=\"%2$s\">Sign out</a>)"
|
|
2892 |
msgstr ""
|
2893 |
|
2894 |
#: templates/myaccount/dashboard.php:39
|
2895 |
-
#. translators:
|
2896 |
msgid ""
|
2897 |
-
"From your account dashboard you can
|
2898 |
-
"href=\"%
|
2899 |
msgstr ""
|
2900 |
|
2901 |
-
#: templates/myaccount/form-edit-
|
2902 |
msgid "Password change"
|
2903 |
msgstr ""
|
2904 |
|
2905 |
-
#: templates/myaccount/form-edit-
|
2906 |
-
msgid "Current password
|
2907 |
msgstr ""
|
2908 |
|
2909 |
-
#: templates/myaccount/form-edit-
|
2910 |
-
|
|
|
2911 |
msgstr ""
|
2912 |
|
2913 |
-
#: templates/myaccount/form-edit-
|
2914 |
msgid "Confirm new password"
|
2915 |
msgstr ""
|
2916 |
|
2917 |
-
#: templates/myaccount/form-edit-
|
2918 |
-
#: templates/myaccount/form-edit-profile.php:
|
2919 |
msgid "Save changes"
|
2920 |
msgstr ""
|
2921 |
|
|
|
|
|
|
|
|
|
2922 |
#: templates/myaccount/form-login.php:38
|
2923 |
msgid "Username or email address"
|
2924 |
msgstr ""
|
@@ -2957,10 +2953,6 @@ msgstr ""
|
|
2957 |
msgid "Enter a new password below."
|
2958 |
msgstr ""
|
2959 |
|
2960 |
-
#: templates/myaccount/form-reset-password.php:32
|
2961 |
-
msgid "New password"
|
2962 |
-
msgstr ""
|
2963 |
-
|
2964 |
#: templates/myaccount/form-reset-password.php:36
|
2965 |
msgid "Re-enter new password"
|
2966 |
msgstr ""
|
@@ -3046,84 +3038,84 @@ msgctxt "enhanced select"
|
|
3046 |
msgid "Searching…"
|
3047 |
msgstr ""
|
3048 |
|
3049 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3050 |
msgctxt "user registration admin"
|
3051 |
-
msgid "Are you sure want to delete
|
3052 |
msgstr ""
|
3053 |
|
3054 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3055 |
msgctxt "user registration admin"
|
3056 |
-
msgid "At least one row
|
3057 |
msgstr ""
|
3058 |
|
3059 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3060 |
msgctxt "user registration admin"
|
3061 |
-
msgid "
|
3062 |
msgstr ""
|
3063 |
|
3064 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3065 |
msgctxt "user registration admin"
|
3066 |
-
msgid "
|
3067 |
msgstr ""
|
3068 |
|
3069 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3070 |
msgctxt "user registration admin"
|
3071 |
msgid "Form successfully saved."
|
3072 |
msgstr ""
|
3073 |
|
3074 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3075 |
msgctxt "user registration admin"
|
3076 |
msgid "Success"
|
3077 |
msgstr ""
|
3078 |
|
3079 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3080 |
msgctxt "user registration admin"
|
3081 |
msgid "Error"
|
3082 |
msgstr ""
|
3083 |
|
3084 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3085 |
msgctxt "user registration admin"
|
3086 |
-
msgid "At least one field
|
3087 |
msgstr ""
|
3088 |
|
3089 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3090 |
msgctxt "user registration admin"
|
3091 |
msgid "Empty form name."
|
3092 |
msgstr ""
|
3093 |
|
3094 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3095 |
msgctxt "user registration admin"
|
3096 |
msgid "Previous save action on going."
|
3097 |
msgstr ""
|
3098 |
|
3099 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3100 |
msgctxt "user registration admin"
|
3101 |
msgid "Duplicate field name."
|
3102 |
msgstr ""
|
3103 |
|
3104 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3105 |
msgctxt "user registration admin"
|
3106 |
msgid "Empty field label."
|
3107 |
msgstr ""
|
3108 |
|
3109 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3110 |
msgctxt "user registration admin"
|
3111 |
msgid ""
|
3112 |
"Invalid field name. Please do not use space, empty or special character, "
|
3113 |
"you can use underscore."
|
3114 |
msgstr ""
|
3115 |
|
3116 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3117 |
msgctxt "user registration admin"
|
3118 |
msgid "Multiple field key "
|
3119 |
msgstr ""
|
3120 |
|
3121 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3122 |
msgctxt "user registration admin"
|
3123 |
msgid "At least one field is required, field "
|
3124 |
msgstr ""
|
3125 |
|
3126 |
-
#: includes/admin/class-ur-admin-assets.php:
|
3127 |
msgctxt "user registration admin"
|
3128 |
msgid "Drag your first form item here."
|
3129 |
msgstr ""
|
@@ -3146,22 +3138,32 @@ msgctxt "The action on users list page"
|
|
3146 |
msgid "Deny"
|
3147 |
msgstr ""
|
3148 |
|
3149 |
-
#: includes/class-ur-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3150 |
msgctxt "Page slug"
|
3151 |
msgid "my-account"
|
3152 |
msgstr ""
|
3153 |
|
3154 |
-
#: includes/class-ur-install.php:
|
3155 |
msgctxt "Page slug"
|
3156 |
msgid "registration"
|
3157 |
msgstr ""
|
3158 |
|
3159 |
-
#: includes/class-ur-install.php:
|
3160 |
msgctxt "Page title"
|
3161 |
msgid "My Account"
|
3162 |
msgstr ""
|
3163 |
|
3164 |
-
#: includes/class-ur-install.php:
|
3165 |
msgctxt "Page title"
|
3166 |
msgid "Registration"
|
3167 |
msgstr ""
|
2 |
# This file is distributed under the same license as the User Registration package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: User Registration 1.4.2\n"
|
6 |
"Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
|
7 |
+
"POT-Creation-Date: 2018-07-11 05:23:45+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
21 |
msgid "Advance Settings"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: includes/admin/class-ur-admin-assets.php:127
|
25 |
msgid "Could not install."
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: includes/admin/class-ur-admin-assets.php:180
|
29 |
msgid "Clone"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: includes/admin/class-ur-admin-assets.php:180
|
33 |
#: includes/admin/class-ur-admin-registrations-table-list.php:112
|
34 |
msgid "Trash"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/admin/class-ur-admin-editor.php:49
|
38 |
msgid "Add User Registration Form"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/admin/class-ur-admin-editor.php:51
|
42 |
msgid "Add Registration Form"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/admin/class-ur-admin-editor.php:64
|
46 |
msgid "Insert Form"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: includes/admin/class-ur-admin-editor.php:65
|
50 |
msgid "Close"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/admin/class-ur-admin-editor.php:73
|
54 |
msgid "Select a form below to insert"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/admin/class-ur-admin-editor.php:90
|
58 |
msgid "Cancel"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/admin/class-ur-admin-editor.php:94
|
62 |
msgid "Add Form"
|
63 |
msgstr ""
|
64 |
|
90 |
msgstr ""
|
91 |
|
92 |
#: includes/admin/class-ur-admin-menus.php:303
|
93 |
+
#: includes/class-ur-install.php:608
|
94 |
msgid "Settings"
|
95 |
msgstr ""
|
96 |
|
100 |
|
101 |
#: includes/admin/class-ur-admin-menus.php:313
|
102 |
#: includes/admin/class-ur-admin-user-list-manager.php:180
|
103 |
+
#: includes/class-ur-email-confirmation.php:120
|
104 |
msgid "Status"
|
105 |
msgstr ""
|
106 |
|
134 |
msgstr ""
|
135 |
|
136 |
#: includes/admin/class-ur-admin-menus.php:445
|
137 |
+
#: includes/admin/settings/class-ur-settings-general.php:183
|
138 |
#: includes/class-ur-query.php:79
|
139 |
msgid "Lost password"
|
140 |
msgstr ""
|
336 |
msgid "Impossible to create an UR_Admin_User_Manager object. Unkwon data type."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: includes/admin/class-ur-admin-user-manager.php:320
|
340 |
msgid "approved"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: includes/admin/class-ur-admin-user-manager.php:323
|
344 |
msgid "pending"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: includes/admin/class-ur-admin-user-manager.php:326
|
348 |
msgid "denied"
|
349 |
msgstr ""
|
350 |
|
409 |
msgstr ""
|
410 |
|
411 |
#: includes/admin/settings/class-ur-settings-email.php:149
|
412 |
+
#: includes/admin/settings/class-ur-settings-general.php:273
|
413 |
msgid "Email"
|
414 |
msgstr ""
|
415 |
|
422 |
msgid "Smart Tags Used"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: includes/admin/settings/class-ur-settings-general.php:29
|
426 |
msgid "General"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: includes/admin/settings/class-ur-settings-general.php:44
|
430 |
+
#: includes/admin/settings/class-ur-settings-general.php:68
|
431 |
msgid "General Options"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: includes/admin/settings/class-ur-settings-general.php:45
|
435 |
msgid "Frontend Messages"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: includes/admin/settings/class-ur-settings-general.php:74
|
439 |
msgid "User login option"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: includes/admin/settings/class-ur-settings-general.php:75
|
443 |
msgid "This option lets you choose login option after user registration."
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: includes/admin/settings/class-ur-settings-general.php:85
|
447 |
msgid "Redirect URL"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: includes/admin/settings/class-ur-settings-general.php:86
|
451 |
msgid "This option lets you enter redirect path after successful user registration."
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: includes/admin/settings/class-ur-settings-general.php:93
|
455 |
msgid "Registration URL"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: includes/admin/settings/class-ur-settings-general.php:94
|
459 |
msgid "This option lets you enter the registration page url in login form."
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: includes/admin/settings/class-ur-settings-general.php:101
|
463 |
msgid "Registration URL label"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: includes/admin/settings/class-ur-settings-general.php:102
|
467 |
msgid "This option lets you enter the label to registration url in login form."
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: includes/admin/settings/class-ur-settings-general.php:107
|
471 |
#: templates/myaccount/form-login.php:71
|
472 |
msgid "Not a member yet? Register now."
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: includes/admin/settings/class-ur-settings-general.php:110
|
476 |
msgid "Prevent dashboard access"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: includes/admin/settings/class-ur-settings-general.php:111
|
480 |
msgid ""
|
481 |
"This option lets you limit which roles you are willing to prevent dashboard "
|
482 |
"access."
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: includes/admin/settings/class-ur-settings-general.php:121
|
486 |
msgid "My account page"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: includes/admin/settings/class-ur-settings-general.php:122
|
490 |
msgid "Page contents: [%s]"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: includes/admin/settings/class-ur-settings-general.php:137
|
494 |
+
msgid "My account Section"
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#: includes/admin/settings/class-ur-settings-general.php:142
|
498 |
+
msgid "Layout"
|
499 |
+
msgstr ""
|
500 |
+
|
501 |
+
#: includes/admin/settings/class-ur-settings-general.php:143
|
502 |
+
msgid "This option lets you choose layout for user registration my account tab."
|
503 |
+
msgstr ""
|
504 |
+
|
505 |
+
#: includes/admin/settings/class-ur-settings-general.php:151
|
506 |
+
msgid "Horizontal"
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: includes/admin/settings/class-ur-settings-general.php:152
|
510 |
+
msgid "Vertical"
|
511 |
+
msgstr ""
|
512 |
+
|
513 |
+
#: includes/admin/settings/class-ur-settings-general.php:162
|
514 |
+
msgid "Endpoints: "
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: includes/admin/settings/class-ur-settings-general.php:162
|
518 |
msgid ""
|
519 |
"Endpoints are appended to your page URLs to handle specific actions on the "
|
520 |
"accounts pages. They should be unique and can be left blank to disable the "
|
521 |
"endpoint."
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: includes/admin/settings/class-ur-settings-general.php:167
|
525 |
+
msgid "Edit profile"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/admin/settings/class-ur-settings-general.php:168
|
529 |
+
msgid "Endpoint for the \"My account → Edit profile\" page."
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/admin/settings/class-ur-settings-general.php:175
|
533 |
+
#: includes/class-ur-query.php:73 includes/functions-ur-account.php:85
|
534 |
+
msgid "Change Password"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: includes/admin/settings/class-ur-settings-general.php:176
|
538 |
+
msgid "Endpoint for the \"My account → Change Password\" page."
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/admin/settings/class-ur-settings-general.php:184
|
542 |
msgid "Endpoint for the \"My account → Lost password\" page."
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/admin/settings/class-ur-settings-general.php:191
|
546 |
msgid "User logout"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: includes/admin/settings/class-ur-settings-general.php:192
|
550 |
msgid ""
|
551 |
"Endpoint for the triggering logout. You can add this to your menus via a "
|
552 |
"custom link: yoursite.com/?user-logout=true"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: includes/admin/settings/class-ur-settings-general.php:214
|
556 |
msgid "Success Messages"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: includes/admin/settings/class-ur-settings-general.php:221
|
560 |
+
#: includes/functions-ur-core.php:772
|
561 |
msgid "Manual login after registration"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: includes/admin/settings/class-ur-settings-general.php:222
|
565 |
msgid ""
|
566 |
"Enter the text message after successful form submission on manual login "
|
567 |
"after registration."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: includes/admin/settings/class-ur-settings-general.php:227
|
571 |
+
#: includes/class-ur-frontend-scripts.php:318
|
572 |
msgid "User successfully registered."
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/admin/settings/class-ur-settings-general.php:231
|
576 |
+
#: includes/functions-ur-core.php:773
|
577 |
msgid "Email confirmation to login"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: includes/admin/settings/class-ur-settings-general.php:232
|
581 |
msgid ""
|
582 |
"Enter the text message after successful form submission on email "
|
583 |
"confirmation to login."
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: includes/admin/settings/class-ur-settings-general.php:237
|
587 |
+
#: includes/class-ur-frontend-scripts.php:320
|
588 |
msgid ""
|
589 |
"User registered. Verify your email by clicking on the link sent to your "
|
590 |
"email."
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: includes/admin/settings/class-ur-settings-general.php:241
|
594 |
+
#: includes/functions-ur-core.php:775
|
595 |
msgid "Admin approval after registration"
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: includes/admin/settings/class-ur-settings-general.php:242
|
599 |
msgid ""
|
600 |
"Enter the text message after successful form submission on admin approval "
|
601 |
"after registration."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: includes/admin/settings/class-ur-settings-general.php:247
|
605 |
+
#: includes/class-ur-frontend-scripts.php:319
|
606 |
msgid "User registered. Wait until admin approves your registration."
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: includes/admin/settings/class-ur-settings-general.php:256
|
610 |
msgid "Error Messages"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: includes/admin/settings/class-ur-settings-general.php:263
|
614 |
+
#: includes/functions-ur-core.php:565
|
615 |
msgid "Required"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: includes/admin/settings/class-ur-settings-general.php:264
|
619 |
msgid "Enter the error message in form submission on required fields."
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: includes/admin/settings/class-ur-settings-general.php:269
|
623 |
+
#: includes/class-ur-frontend-scripts.php:312
|
624 |
msgid "This field is required."
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: includes/admin/settings/class-ur-settings-general.php:274
|
628 |
msgid "Enter the error message in form submission on Email."
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: includes/admin/settings/class-ur-settings-general.php:279
|
632 |
+
#: includes/class-ur-frontend-scripts.php:313
|
633 |
msgid "Please enter a valid email address."
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: includes/admin/settings/class-ur-settings-general.php:283
|
637 |
msgid "Website URL"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: includes/admin/settings/class-ur-settings-general.php:284
|
641 |
msgid "Enter the error message in form submission on website/URL."
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: includes/admin/settings/class-ur-settings-general.php:289
|
645 |
+
#: includes/class-ur-frontend-scripts.php:314
|
646 |
msgid "Please enter a valid URL."
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: includes/admin/settings/class-ur-settings-general.php:293
|
650 |
#: includes/form/class-ur-form-field-number.php:44
|
651 |
#: includes/form/class-ur-form-field-number.php:51
|
652 |
msgid "Number"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: includes/admin/settings/class-ur-settings-general.php:294
|
656 |
msgid "Enter the error message in form submission on Number."
|
657 |
msgstr ""
|
658 |
|
659 |
+
#: includes/admin/settings/class-ur-settings-general.php:299
|
660 |
+
#: includes/class-ur-frontend-scripts.php:315
|
661 |
msgid "Please enter a valid number."
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: includes/admin/settings/class-ur-settings-general.php:303
|
665 |
#: includes/form/class-ur-form-field-user-confirm-password.php:50
|
666 |
msgid "Confirm Password"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: includes/admin/settings/class-ur-settings-general.php:304
|
670 |
msgid "Enter the error message in form submission on Confim Password."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/admin/settings/class-ur-settings-general.php:309
|
674 |
+
#: includes/class-ur-frontend-scripts.php:316
|
675 |
msgid "Password and confirm password not matched."
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/admin/settings/class-ur-settings-general.php:313
|
679 |
msgid "Google reCaptcha"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: includes/admin/settings/class-ur-settings-general.php:314
|
683 |
msgid "Enter the error message in form submission on google recaptcha."
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/admin/settings/class-ur-settings-general.php:319
|
687 |
+
#: includes/class-ur-frontend-scripts.php:321
|
688 |
msgid "Captcha code error, please try again."
|
689 |
msgstr ""
|
690 |
|
1069 |
"here: <a href=\"%s\">User Registration Extensions Catalog</a>"
|
1070 |
msgstr ""
|
1071 |
|
|
|
|
|
|
|
|
|
1072 |
#: includes/admin/views/html-admin-page-forms.php:16
|
1073 |
msgid "Form Name"
|
1074 |
msgstr ""
|
1195 |
msgid "Taking a while? Click here to run it now."
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: includes/class-ur-ajax.php:68
|
1199 |
msgid "Nonce error, please reload."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: includes/class-ur-ajax.php:78 includes/class-ur-shortcodes.php:106
|
1203 |
+
msgid "Only administrators can add new users."
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: includes/class-ur-ajax.php:94 includes/class-ur-shortcodes.php:124
|
1207 |
+
msgid "You are currently logged in as %1s. %2s"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: includes/class-ur-ajax.php:94 includes/class-ur-shortcodes.php:124
|
1211 |
msgid "Log out of this account."
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: includes/class-ur-ajax.php:94 includes/class-ur-shortcodes.php:124
|
1215 |
+
#: includes/functions-ur-account.php:86
|
1216 |
msgid "Logout"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: includes/class-ur-ajax.php:155 includes/class-ur-ajax.php:161
|
1220 |
msgid "post data not set"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: includes/class-ur-ajax.php:176
|
1224 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: includes/class-ur-email-confirmation.php:148
|
1228 |
msgid "Verified"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/class-ur-email-confirmation.php:150
|
1232 |
msgid "Pending"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: includes/class-ur-email-confirmation.php:169
|
1236 |
msgid "User successfully registered. Login to continue."
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: includes/class-ur-email-confirmation.php:173
|
1240 |
msgid "Token Mismatch!"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: includes/class-ur-email-confirmation.php:177
|
1244 |
msgid "Verification Email Sent!"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: includes/class-ur-email-confirmation.php:181
|
1248 |
msgid "User doesnot exist!"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: includes/class-ur-email-confirmation.php:298
|
1252 |
+
#: includes/class-ur-form-handler.php:265
|
1253 |
+
#: includes/class-ur-form-handler.php:269
|
1254 |
+
#: includes/class-ur-form-handler.php:278
|
1255 |
#: includes/class-ur-user-approval.php:183
|
1256 |
#: includes/class-ur-user-approval.php:188
|
1257 |
msgid "ERROR:"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
+
#: includes/class-ur-email-confirmation.php:298
|
1261 |
msgid ""
|
1262 |
"Your account is still pending approval. Verifiy your email by clicking on "
|
1263 |
"the link sent to your email. %s"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: includes/class-ur-email-confirmation.php:298
|
1267 |
msgid "Resend Verification Link"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
+
#: includes/class-ur-email-confirmation.php:319
|
1271 |
msgid ""
|
1272 |
"Email not verified! Verifiy your email by clicking on the link sent to your "
|
1273 |
"email."
|
1277 |
msgid "Chosen Password"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: includes/class-ur-form-handler.php:95
|
1281 |
msgid "%s is a required field."
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: includes/class-ur-form-handler.php:108
|
1285 |
msgid "%s is not a valid email address."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: includes/class-ur-form-handler.php:155
|
1289 |
msgid "User profile updated successfully."
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: includes/class-ur-form-handler.php:202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1293 |
msgid "Please fill out all password fields."
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: includes/class-ur-form-handler.php:205
|
1297 |
msgid "Please enter your current password."
|
1298 |
msgstr ""
|
1299 |
|
1300 |
+
#: includes/class-ur-form-handler.php:208
|
1301 |
msgid "Please re-enter your password."
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: includes/class-ur-form-handler.php:211
|
1305 |
msgid "New passwords do not match."
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: includes/class-ur-form-handler.php:214
|
1309 |
msgid "Your current password is incorrect."
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: includes/class-ur-form-handler.php:235
|
1313 |
+
msgid "Password changed successfully."
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: includes/class-ur-form-handler.php:269
|
|
|
|
|
|
|
|
|
|
|
|
|
1317 |
msgid "Username is required."
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: includes/class-ur-form-handler.php:278
|
1321 |
msgid "A user could not be found with this email address."
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: includes/class-ur-form-handler.php:368
|
1325 |
msgid "Please enter your password."
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: includes/class-ur-form-handler.php:372
|
1329 |
msgid "Passwords do not match."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: includes/class-ur-frontend-scripts.php:331
|
1333 |
msgid "Confirm password"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: includes/class-ur-frontend-scripts.php:333
|
1337 |
msgid "Too short password"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: includes/class-ur-frontend-scripts.php:334
|
1341 |
msgid "Bad password"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: includes/class-ur-frontend-scripts.php:335
|
1345 |
msgid "Good password"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: includes/class-ur-frontend-scripts.php:336
|
1349 |
msgid "Strong password"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: includes/class-ur-frontend-scripts.php:337
|
1353 |
msgid "Password with confirm password not matched."
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: includes/class-ur-frontend-scripts.php:340
|
1357 |
msgid ""
|
1358 |
"Hint: The password should be at least seven characters long. To make it "
|
1359 |
"stronger, use upper and lower case letters, numbers and symbols such as ! * "
|
1360 |
"? $ % ^ & )."
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: includes/class-ur-install.php:339
|
1364 |
msgid "Default form"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: includes/class-ur-install.php:608
|
1368 |
msgid "View User Registration settings"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: includes/class-ur-install.php:624
|
1372 |
msgid "View User Registration documentation"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
+
#: includes/class-ur-install.php:624
|
1376 |
msgid "Docs"
|
1377 |
msgstr ""
|
1378 |
|
1379 |
+
#: includes/class-ur-install.php:625
|
1380 |
msgid "Visit free customer support"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
+
#: includes/class-ur-install.php:625
|
1384 |
msgid "Free support"
|
1385 |
msgstr ""
|
1386 |
|
1501 |
msgid "Parent registration"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: includes/class-ur-query.php:76 includes/functions-ur-account.php:84
|
|
|
|
|
|
|
|
|
1505 |
msgid "Profile Details"
|
1506 |
msgstr ""
|
1507 |
|
2697 |
msgid "Default Value"
|
2698 |
msgstr ""
|
2699 |
|
2700 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:84
|
2701 |
msgid "Something went wrong! please try again"
|
2702 |
msgstr ""
|
2703 |
|
2704 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:142
|
2705 |
msgid "Duplicate field key in form, please contact site administrator."
|
2706 |
msgstr ""
|
2707 |
|
2708 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:148
|
2709 |
msgid "Required form field not found."
|
2710 |
msgstr ""
|
2711 |
|
2712 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:295
|
2713 |
msgid "Empty confirm password"
|
2714 |
msgstr ""
|
2715 |
|
2716 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:297
|
2717 |
msgid "Password and confirm password not matched"
|
2718 |
msgstr ""
|
2719 |
|
2720 |
+
#: includes/functions-ur-account.php:34
|
2721 |
msgid "The password you entered for username %1s is incorrect. %2s"
|
2722 |
msgstr ""
|
2723 |
|
2724 |
+
#: includes/functions-ur-account.php:34 includes/functions-ur-account.php:37
|
2725 |
msgid "Lost Your Password?"
|
2726 |
msgstr ""
|
2727 |
|
2728 |
+
#: includes/functions-ur-account.php:37
|
2729 |
+
msgid "Invalid username. %1s"
|
2730 |
+
msgstr ""
|
2731 |
+
|
2732 |
+
#: includes/functions-ur-account.php:83
|
2733 |
msgid "Dashboard"
|
2734 |
msgstr ""
|
2735 |
|
2736 |
+
#: includes/functions-ur-core.php:536 includes/functions-ur-core.php:538
|
2737 |
msgid "Label"
|
2738 |
msgstr ""
|
2739 |
|
2740 |
+
#: includes/functions-ur-core.php:543 includes/functions-ur-core.php:545
|
2741 |
msgid "Description"
|
2742 |
msgstr ""
|
2743 |
|
2744 |
+
#: includes/functions-ur-core.php:550 includes/functions-ur-core.php:552
|
2745 |
msgid "Field Name"
|
2746 |
msgstr ""
|
2747 |
|
2748 |
+
#: includes/functions-ur-core.php:558 includes/functions-ur-core.php:560
|
2749 |
msgid "Placeholder"
|
2750 |
msgstr ""
|
2751 |
|
2752 |
+
#: includes/functions-ur-core.php:570 includes/functions-ur-core.php:581
|
2753 |
+
#: includes/functions-ur-core.php:696 includes/functions-ur-core.php:722
|
2754 |
msgid "No"
|
2755 |
msgstr ""
|
2756 |
|
2757 |
+
#: includes/functions-ur-core.php:571 includes/functions-ur-core.php:582
|
2758 |
+
#: includes/functions-ur-core.php:695 includes/functions-ur-core.php:721
|
2759 |
msgid "Yes"
|
2760 |
msgstr ""
|
2761 |
|
2762 |
+
#: includes/functions-ur-core.php:576
|
2763 |
msgid "Hide Label"
|
2764 |
msgstr ""
|
2765 |
|
2766 |
+
#: includes/functions-ur-core.php:676
|
2767 |
msgid "Default user role"
|
2768 |
msgstr ""
|
2769 |
|
2770 |
+
#: includes/functions-ur-core.php:688
|
2771 |
msgid "Enable strong password"
|
2772 |
msgstr ""
|
2773 |
|
2774 |
+
#: includes/functions-ur-core.php:703
|
2775 |
msgid "Form submit button label"
|
2776 |
msgstr ""
|
2777 |
|
2778 |
+
#: includes/functions-ur-core.php:714
|
2779 |
msgid "Enable %1$s %2$s reCaptcha %3$s support"
|
2780 |
msgstr ""
|
2781 |
|
2782 |
+
#: includes/functions-ur-core.php:729
|
2783 |
msgid "Template"
|
2784 |
msgstr ""
|
2785 |
|
2786 |
+
#: includes/functions-ur-core.php:736
|
2787 |
msgid "Default"
|
2788 |
msgstr ""
|
2789 |
|
2790 |
+
#: includes/functions-ur-core.php:737
|
2791 |
msgid "Bordered"
|
2792 |
msgstr ""
|
2793 |
|
2794 |
+
#: includes/functions-ur-core.php:738
|
2795 |
msgid "Flat"
|
2796 |
msgstr ""
|
2797 |
|
2798 |
+
#: includes/functions-ur-core.php:739
|
2799 |
msgid "Rounded"
|
2800 |
msgstr ""
|
2801 |
|
2802 |
+
#: includes/functions-ur-core.php:740
|
2803 |
msgid "Rounded Edge"
|
2804 |
msgstr ""
|
2805 |
|
2806 |
+
#: includes/functions-ur-core.php:747
|
2807 |
msgid "Custom CSS class"
|
2808 |
msgstr ""
|
2809 |
|
2810 |
+
#: includes/functions-ur-core.php:774
|
2811 |
msgid "Auto login after registration"
|
2812 |
msgstr ""
|
2813 |
|
2814 |
+
#: includes/functions-ur-core.php:950
|
2815 |
msgid ""
|
2816 |
"The class <code>%s</code> provided by user_registration_logging_class "
|
2817 |
"filter must implement <code>UR_Logger_Interface</code>."
|
2818 |
msgstr ""
|
2819 |
|
2820 |
+
#: includes/functions-ur-core.php:1044
|
2821 |
msgid "Disable emails"
|
2822 |
msgstr ""
|
2823 |
|
2824 |
+
#: includes/functions-ur-core.php:1045
|
2825 |
msgid "Disable all emails sent after registration."
|
2826 |
msgstr ""
|
2827 |
|
2832 |
msgid "This function should not be called before user_registration_init."
|
2833 |
msgstr ""
|
2834 |
|
2835 |
+
#: includes/functions-ur-template.php:141
|
2836 |
msgid "required"
|
2837 |
msgstr ""
|
2838 |
|
2839 |
+
#: includes/functions-ur-template.php:264
|
2840 |
msgid "Choose an option"
|
2841 |
msgstr ""
|
2842 |
|
2883 |
msgstr ""
|
2884 |
|
2885 |
#: templates/myaccount/dashboard.php:39
|
2886 |
+
#. translators: 1 profile details url, 2: change password url
|
2887 |
msgid ""
|
2888 |
+
"From your account dashboard you can edit your <a href=\"%1$s\"> profile "
|
2889 |
+
"details</a> and <a href=\"%2$s\">edit your password</a>."
|
2890 |
msgstr ""
|
2891 |
|
2892 |
+
#: templates/myaccount/form-edit-password.php:35
|
2893 |
msgid "Password change"
|
2894 |
msgstr ""
|
2895 |
|
2896 |
+
#: templates/myaccount/form-edit-password.php:38
|
2897 |
+
msgid "Current password"
|
2898 |
msgstr ""
|
2899 |
|
2900 |
+
#: templates/myaccount/form-edit-password.php:42
|
2901 |
+
#: templates/myaccount/form-reset-password.php:32
|
2902 |
+
msgid "New password"
|
2903 |
msgstr ""
|
2904 |
|
2905 |
+
#: templates/myaccount/form-edit-password.php:46
|
2906 |
msgid "Confirm new password"
|
2907 |
msgstr ""
|
2908 |
|
2909 |
+
#: templates/myaccount/form-edit-password.php:59
|
2910 |
+
#: templates/myaccount/form-edit-profile.php:43
|
2911 |
msgid "Save changes"
|
2912 |
msgstr ""
|
2913 |
|
2914 |
+
#: templates/myaccount/form-edit-profile.php:32
|
2915 |
+
msgid "Gravatar"
|
2916 |
+
msgstr ""
|
2917 |
+
|
2918 |
#: templates/myaccount/form-login.php:38
|
2919 |
msgid "Username or email address"
|
2920 |
msgstr ""
|
2953 |
msgid "Enter a new password below."
|
2954 |
msgstr ""
|
2955 |
|
|
|
|
|
|
|
|
|
2956 |
#: templates/myaccount/form-reset-password.php:36
|
2957 |
msgid "Re-enter new password"
|
2958 |
msgstr ""
|
3038 |
msgid "Searching…"
|
3039 |
msgstr ""
|
3040 |
|
3041 |
+
#: includes/admin/class-ur-admin-assets.php:201
|
3042 |
msgctxt "user registration admin"
|
3043 |
+
msgid "Are you sure want to delete?"
|
3044 |
msgstr ""
|
3045 |
|
3046 |
+
#: includes/admin/class-ur-admin-assets.php:202
|
3047 |
msgctxt "user registration admin"
|
3048 |
+
msgid "At least one row needs to be selected."
|
3049 |
msgstr ""
|
3050 |
|
3051 |
+
#: includes/admin/class-ur-admin-assets.php:203
|
3052 |
msgctxt "user registration admin"
|
3053 |
+
msgid "This field is one time draggable."
|
3054 |
msgstr ""
|
3055 |
|
3056 |
+
#: includes/admin/class-ur-admin-assets.php:204
|
3057 |
msgctxt "user registration admin"
|
3058 |
+
msgid "Could not clone this field."
|
3059 |
msgstr ""
|
3060 |
|
3061 |
+
#: includes/admin/class-ur-admin-assets.php:205
|
3062 |
msgctxt "user registration admin"
|
3063 |
msgid "Form successfully saved."
|
3064 |
msgstr ""
|
3065 |
|
3066 |
+
#: includes/admin/class-ur-admin-assets.php:206
|
3067 |
msgctxt "user registration admin"
|
3068 |
msgid "Success"
|
3069 |
msgstr ""
|
3070 |
|
3071 |
+
#: includes/admin/class-ur-admin-assets.php:207
|
3072 |
msgctxt "user registration admin"
|
3073 |
msgid "Error"
|
3074 |
msgstr ""
|
3075 |
|
3076 |
+
#: includes/admin/class-ur-admin-assets.php:208
|
3077 |
msgctxt "user registration admin"
|
3078 |
+
msgid "At least one field needs to be selected."
|
3079 |
msgstr ""
|
3080 |
|
3081 |
+
#: includes/admin/class-ur-admin-assets.php:209
|
3082 |
msgctxt "user registration admin"
|
3083 |
msgid "Empty form name."
|
3084 |
msgstr ""
|
3085 |
|
3086 |
+
#: includes/admin/class-ur-admin-assets.php:210
|
3087 |
msgctxt "user registration admin"
|
3088 |
msgid "Previous save action on going."
|
3089 |
msgstr ""
|
3090 |
|
3091 |
+
#: includes/admin/class-ur-admin-assets.php:211
|
3092 |
msgctxt "user registration admin"
|
3093 |
msgid "Duplicate field name."
|
3094 |
msgstr ""
|
3095 |
|
3096 |
+
#: includes/admin/class-ur-admin-assets.php:212
|
3097 |
msgctxt "user registration admin"
|
3098 |
msgid "Empty field label."
|
3099 |
msgstr ""
|
3100 |
|
3101 |
+
#: includes/admin/class-ur-admin-assets.php:213
|
3102 |
msgctxt "user registration admin"
|
3103 |
msgid ""
|
3104 |
"Invalid field name. Please do not use space, empty or special character, "
|
3105 |
"you can use underscore."
|
3106 |
msgstr ""
|
3107 |
|
3108 |
+
#: includes/admin/class-ur-admin-assets.php:214
|
3109 |
msgctxt "user registration admin"
|
3110 |
msgid "Multiple field key "
|
3111 |
msgstr ""
|
3112 |
|
3113 |
+
#: includes/admin/class-ur-admin-assets.php:215
|
3114 |
msgctxt "user registration admin"
|
3115 |
msgid "At least one field is required, field "
|
3116 |
msgstr ""
|
3117 |
|
3118 |
+
#: includes/admin/class-ur-admin-assets.php:216
|
3119 |
msgctxt "user registration admin"
|
3120 |
msgid "Drag your first form item here."
|
3121 |
msgstr ""
|
3138 |
msgid "Deny"
|
3139 |
msgstr ""
|
3140 |
|
3141 |
+
#: includes/class-ur-email-confirmation.php:58
|
3142 |
+
msgctxt "The action on users list page"
|
3143 |
+
msgid "Verify"
|
3144 |
+
msgstr ""
|
3145 |
+
|
3146 |
+
#: includes/class-ur-email-confirmation.php:59
|
3147 |
+
msgctxt "The action on users list page"
|
3148 |
+
msgid "Unverify"
|
3149 |
+
msgstr ""
|
3150 |
+
|
3151 |
+
#: includes/class-ur-install.php:279
|
3152 |
msgctxt "Page slug"
|
3153 |
msgid "my-account"
|
3154 |
msgstr ""
|
3155 |
|
3156 |
+
#: includes/class-ur-install.php:288
|
3157 |
msgctxt "Page slug"
|
3158 |
msgid "registration"
|
3159 |
msgstr ""
|
3160 |
|
3161 |
+
#: includes/class-ur-install.php:280
|
3162 |
msgctxt "Page title"
|
3163 |
msgid "My Account"
|
3164 |
msgstr ""
|
3165 |
|
3166 |
+
#: includes/class-ur-install.php:289
|
3167 |
msgctxt "Page title"
|
3168 |
msgid "Registration"
|
3169 |
msgstr ""
|
package-lock.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "user-registration",
|
3 |
-
"version": "1.4.
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
6 |
"dependencies": {
|
1 |
{
|
2 |
"name": "user-registration",
|
3 |
+
"version": "1.4.2",
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
6 |
"dependencies": {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: WPEverest
|
|
3 |
Tags: user registration, registration, profile-builder, user profile, form, registration form, login form, user login, membership
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -53,13 +53,17 @@ User Registration can be easily extended with some premium addons.
|
|
53 |
|
54 |
* [Social Connect](https://wpeverest.com/wordpress-plugins/user-registration/social-connect/) - Allows users to register/login to your site with social platforms like Facebook, Twitter, Google+ or LinkedIn.
|
55 |
|
56 |
-
* [Content Restriction](https://wpeverest.com/wordpress-plugins/user-registration/content-restriction/) -
|
57 |
|
58 |
-
* [File Upload](https://wpeverest.com/wordpress-plugins/user-registration/file-upload/) -
|
59 |
|
60 |
* [WooCommerce Integration](https://wpeverest.com/wordpress-plugins/user-registration/woocommerce-integration/) - Integrate and syncs WooCommerce related information to user registration account page like orders, customer details, Billings.
|
61 |
|
62 |
-
* [MailChimp](https://wpeverest.com/wordpress-plugins/user-registration/
|
|
|
|
|
|
|
|
|
63 |
|
64 |
== Installation ==
|
65 |
|
@@ -93,6 +97,22 @@ Yes, the plugin is designed to work with any themes that have been coded followi
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= 1.4.0 - 12/06/2018 =
|
97 |
* Refactor - Form fields
|
98 |
* Remove - Repeated settings from global
|
@@ -117,32 +137,6 @@ Yes, the plugin is designed to work with any themes that have been coded followi
|
|
117 |
* Fix - Redirect via template_redirect hook removing js redirection
|
118 |
* Add - Filter hooks for every email classes
|
119 |
|
120 |
-
= 1.2.5.1 - 27/04/2018 =
|
121 |
-
* Tweak - Text color of paragraph in myaccount section
|
122 |
-
* Fix - Use template_redirect hook instead to check verification token
|
123 |
-
|
124 |
-
= 1.2.5 - 19/04/2018 =
|
125 |
-
* Fix - Default meta keys issue
|
126 |
-
* Refactor - Default user meta keys migration
|
127 |
-
|
128 |
-
= 1.2.4 - 12/04/2018 =
|
129 |
-
* Feature - Introduce jquery validate for client side validation
|
130 |
-
* Feature - Allow user to resend email verification link
|
131 |
-
* Fix - Manually created user requiring verification issue
|
132 |
-
* Fix - Get form data by key issue
|
133 |
-
* Fix - Console errors in the backend
|
134 |
-
|
135 |
-
= 1.2.3 - 06/04/2018 =
|
136 |
-
* Fix - undefined index error in frontend
|
137 |
-
|
138 |
-
= 1.2.2 - 06/04/2018 =
|
139 |
-
* Feature - Registration without username option
|
140 |
-
* Feature - Customizable form submission messages
|
141 |
-
* Feature - Hide label option in each field
|
142 |
-
* Feature - Description box for each field
|
143 |
-
* Fix - Date rendering issue
|
144 |
-
* Tweak - Remove login header from login shortcode
|
145 |
-
|
146 |
[See changelog for all versions](https://raw.githubusercontent.com/wpeverest/user-registration/master/CHANGELOG.txt).
|
147 |
|
148 |
== Upgrade Notice ==
|
3 |
Tags: user registration, registration, profile-builder, user profile, form, registration form, login form, user login, membership
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 1.4.2
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
53 |
|
54 |
* [Social Connect](https://wpeverest.com/wordpress-plugins/user-registration/social-connect/) - Allows users to register/login to your site with social platforms like Facebook, Twitter, Google+ or LinkedIn.
|
55 |
|
56 |
+
* [Content Restriction](https://wpeverest.com/wordpress-plugins/user-registration/content-restriction/) - Allows you to restrict full or partial content from page, post to only logged in users or logged in users with specific roles.
|
57 |
|
58 |
+
* [File Upload](https://wpeverest.com/wordpress-plugins/user-registration/file-upload/) - Allows you to add upload field in registration form so that users can upload documents, images and more.
|
59 |
|
60 |
* [WooCommerce Integration](https://wpeverest.com/wordpress-plugins/user-registration/woocommerce-integration/) - Integrate and syncs WooCommerce related information to user registration account page like orders, customer details, Billings.
|
61 |
|
62 |
+
* [MailChimp](https://wpeverest.com/wordpress-plugins/user-registration/mailchimp/) - Lets you sync your registered users with MailChimp list. Automatically add users to your selected MailChimp list upon registration.
|
63 |
+
|
64 |
+
* [Advanced Fields](https://wpeverest.com/wordpress-plugins/user-registration/advanced-fields/) - Let you add advanced extra fields such as WYSIWYG, Time picker, Phone Number, HTML, Section title in form.
|
65 |
+
|
66 |
+
* [Conditional Logic](https://wpeverest.com/wordpress-plugins/user-registration/conditional-logic/) - Lets you apply conditions to your fields. Conditional Logic allows you to show or hide certain fields based upon other field’s value.
|
67 |
|
68 |
== Installation ==
|
69 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 1.4.2 - 11/07/2018 =
|
101 |
+
* Feature - Gravatar on user profile
|
102 |
+
* Feature - Layout(vertical/horizontal) on user account
|
103 |
+
* Feature - Verify/Unverify user by admin in email confirmation
|
104 |
+
* Refactor - Change account details tab to change password
|
105 |
+
* Add - Necessary changes required for conditional logic
|
106 |
+
* Fix - Broken resend verification email link
|
107 |
+
* Fix - Exclude placeholder for unnecessary fields
|
108 |
+
* Fix - Single checkbox update issue from admin profile
|
109 |
+
|
110 |
+
= 1.4.1 - 20/06/2018 =
|
111 |
+
* Fix - Privacy policy field issue
|
112 |
+
* Fix - Translation ready texts
|
113 |
+
* Fix - Lost password url
|
114 |
+
* Add - Scroll bar for overflow form fields
|
115 |
+
|
116 |
= 1.4.0 - 12/06/2018 =
|
117 |
* Refactor - Form fields
|
118 |
* Remove - Repeated settings from global
|
137 |
* Fix - Redirect via template_redirect hook removing js redirection
|
138 |
* Add - Filter hooks for every email classes
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
[See changelog for all versions](https://raw.githubusercontent.com/wpeverest/user-registration/master/CHANGELOG.txt).
|
141 |
|
142 |
== Upgrade Notice ==
|
templates/myaccount/dashboard.php
CHANGED
@@ -34,10 +34,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
34 |
?></p>
|
35 |
|
36 |
<p><?php
|
37 |
-
/* translators:
|
38 |
printf(
|
39 |
-
__( 'From your account dashboard you can
|
40 |
-
esc_url( ur_get_endpoint_url( 'edit-
|
41 |
);
|
42 |
?></p>
|
43 |
|
34 |
?></p>
|
35 |
|
36 |
<p><?php
|
37 |
+
/* translators: 1 profile details url, 2: change password url */
|
38 |
printf(
|
39 |
+
__( 'From your account dashboard you can edit your <a href="%1$s"> profile details</a> and <a href="%2$s">edit your password</a>.', 'user-registration' ), esc_url( ur_get_endpoint_url('edit-profile') ),
|
40 |
+
esc_url( ur_get_endpoint_url( 'edit-password' ) )
|
41 |
);
|
42 |
?></p>
|
43 |
|
templates/myaccount/form-edit-account.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Edit account form
|
4 |
-
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/user-registration/myaccount/form-edit-account.php.
|
6 |
-
*
|
7 |
-
* HOWEVER, on occasion UserRegistration will need to update template files and you
|
8 |
-
* (the theme developer) will need to copy the new files to your theme to
|
9 |
-
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
-
* happen. When this occurs the version of the template file will be bumped and
|
11 |
-
* the readme will list any important changes.
|
12 |
-
*
|
13 |
-
* @see https://docs.wpeverest.com/user-registration/template-structure/
|
14 |
-
* @author WPEverest
|
15 |
-
* @package UserRegistration/Templates
|
16 |
-
* @version 1.0.0
|
17 |
-
*/
|
18 |
-
|
19 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
-
exit;
|
21 |
-
}
|
22 |
-
|
23 |
-
do_action( 'user_registration_before_edit_account_form' ); ?>
|
24 |
-
|
25 |
-
<div class="ur-frontend-form login" id="ur-frontend-form">
|
26 |
-
<form class="user-registration-EditAccountForm edit-account" action="" method="post">
|
27 |
-
<div class="ur-form-row">
|
28 |
-
<div class="ur-form-grid">
|
29 |
-
<?php do_action( 'user_registration_edit_account_form_start' ); ?>
|
30 |
-
|
31 |
-
<p class="user-registration-form-row user-registration-form-row--first form-row form-row-first">
|
32 |
-
<label for="account_first_name"><?php _e( 'First name', 'user-registration' ); ?> <span class="required">*</span></label>
|
33 |
-
<input type="text" class="user-registration-Input user-registration-Input--text input-text" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
|
34 |
-
</p>
|
35 |
-
<p class="user-registration-form-row user-registration-form-row--last form-row form-row-last">
|
36 |
-
<label for="account_last_name"><?php _e( 'Last name', 'user-registration' ); ?> <span class="required">*</span></label>
|
37 |
-
<input type="text" class="user-registration-Input user-registration-Input--text input-text" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
|
38 |
-
</p>
|
39 |
-
<div class="clear"></div>
|
40 |
-
|
41 |
-
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
42 |
-
<label for="account_email"><?php _e( 'Email address', 'user-registration' ); ?> <span class="required">*</span></label>
|
43 |
-
<input type="email" class="user-registration-Input user-registration-Input--email input-text" name="account_email" id="account_email" value="<?php echo esc_attr( $user->user_email ); ?>" />
|
44 |
-
</p>
|
45 |
-
|
46 |
-
<fieldset>
|
47 |
-
<legend><?php _e( 'Password change', 'user-registration' ); ?></legend>
|
48 |
-
|
49 |
-
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
50 |
-
<label for="password_current"><?php _e( 'Current password (leave blank to leave unchanged)', 'user-registration' ); ?></label>
|
51 |
-
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_current" id="password_current" />
|
52 |
-
</p>
|
53 |
-
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
54 |
-
<label for="password_1"><?php _e( 'New password (leave blank to leave unchanged)', 'user-registration' ); ?></label>
|
55 |
-
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_1" id="password_1" />
|
56 |
-
</p>
|
57 |
-
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
58 |
-
<label for="password_2"><?php _e( 'Confirm new password', 'user-registration' ); ?></label>
|
59 |
-
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_2" id="password_2" />
|
60 |
-
</p>
|
61 |
-
</fieldset>
|
62 |
-
<div class="clear"></div>
|
63 |
-
|
64 |
-
<?php do_action( 'user_registration_edit_account_form' ); ?>
|
65 |
-
|
66 |
-
<p>
|
67 |
-
<?php wp_nonce_field( 'save_account_details' ); ?>
|
68 |
-
<input type="submit" class="user-registration-Button button" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'user-registration' ); ?>" />
|
69 |
-
<input type="hidden" name="action" value="save_account_details" />
|
70 |
-
</p>
|
71 |
-
|
72 |
-
<?php do_action( 'user_registration_edit_account_form_end' ); ?>
|
73 |
-
</div>
|
74 |
-
</div>
|
75 |
-
</form>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
<?php do_action( 'user_registration_after_edit_account_form' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/myaccount/form-edit-password.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Edit account form
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/user-registration/myaccount/form-edit-password.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion UserRegistration will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen. When this occurs the version of the template file will be bumped and
|
11 |
+
* the readme will list any important changes.
|
12 |
+
*
|
13 |
+
* @see https://docs.wpeverest.com/user-registration/template-structure/
|
14 |
+
* @author WPEverest
|
15 |
+
* @package UserRegistration/Templates
|
16 |
+
* @version 1.0.0
|
17 |
+
*/
|
18 |
+
|
19 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
|
23 |
+
ur_do_deprecated_action( 'user_registration_before_edit_account_form', array(), '1.4.2', 'user_registration_before_change_password_form' );
|
24 |
+
do_action( 'user_registration_before_change_password_form' );
|
25 |
+
?>
|
26 |
+
<div class="ur-frontend-form login" id="ur-frontend-form">
|
27 |
+
<form class="user-registration-EditAccountForm edit-password" action="" method="post">
|
28 |
+
<div class="ur-form-row">
|
29 |
+
<div class="ur-form-grid">
|
30 |
+
<?php
|
31 |
+
ur_do_deprecated_action( 'user_registration_edit_account_form_start', array(), '1.4.2', 'user_registration_change_password_form_start' );
|
32 |
+
do_action( 'user_registration_change_password_form_start' );
|
33 |
+
?>
|
34 |
+
<fieldset>
|
35 |
+
<legend><?php _e( 'Password change', 'user-registration' ); ?></legend>
|
36 |
+
|
37 |
+
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
38 |
+
<label for="password_current"><?php _e( 'Current password', 'user-registration' ); ?></label>
|
39 |
+
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_current" id="password_current" />
|
40 |
+
</p>
|
41 |
+
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
42 |
+
<label for="password_1"><?php _e( 'New password', 'user-registration' ); ?></label>
|
43 |
+
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_1" id="password_1" />
|
44 |
+
</p>
|
45 |
+
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
46 |
+
<label for="password_2"><?php _e( 'Confirm new password', 'user-registration' ); ?></label>
|
47 |
+
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_2" id="password_2" />
|
48 |
+
</p>
|
49 |
+
</fieldset>
|
50 |
+
<div class="clear"></div>
|
51 |
+
|
52 |
+
<?php
|
53 |
+
ur_do_deprecated_action( 'user_registration_edit_account_form', array(), '1.4.2', 'user_registration_change_password_form' );
|
54 |
+
do_action( 'user_registration_change_password_form' );
|
55 |
+
?>
|
56 |
+
|
57 |
+
<p>
|
58 |
+
<?php wp_nonce_field( 'save_change_password' ); ?>
|
59 |
+
<input type="submit" class="user-registration-Button button" name="save_change_password" value="<?php esc_attr_e( 'Save changes', 'user-registration' ); ?>" />
|
60 |
+
<input type="hidden" name="action" value="save_change_password" />
|
61 |
+
</p>
|
62 |
+
|
63 |
+
<?php
|
64 |
+
ur_do_deprecated_action( 'user_registration_edit_account_form_end', array(), '1.4.2', 'user_registration_change_password_form_end' );
|
65 |
+
do_action( 'user_registration_change_password_form_end' );
|
66 |
+
?>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</form>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<?php
|
73 |
+
ur_do_deprecated_action( 'user_registration_after_edit_account_form', array(), '1.4.1', 'user_registration_after_change_password_form' );
|
74 |
+
do_action( 'user_registration_after_edit_account_form' );
|
75 |
+
?>
|
templates/myaccount/form-edit-profile.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Edit account form
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/user-registration/myaccount/form-edit-
|
6 |
*
|
7 |
* HOWEVER, on occasion UserRegistration will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -27,7 +27,9 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
<div class="user-registration-profile-fields">
|
30 |
-
|
|
|
|
|
31 |
<?php do_action( 'user_registration_edit_profile_form_start' ); ?>
|
32 |
<div class="user-registration-profile-fields__field-wrapper">
|
33 |
|
2 |
/**
|
3 |
* Edit account form
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/user-registration/myaccount/form-edit-password.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion UserRegistration will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
<div class="user-registration-profile-fields">
|
30 |
+
<?php $image = get_avatar_url( get_current_user_id(), $args = NULL );?>
|
31 |
+
<img alt="profile-picture" src="<?php echo $image;?>"><br/>
|
32 |
+
<span><i>You can change your profile picture on <a href="https://en.gravatar.com/"><?php _e( 'Gravatar','user-registration' );?></a></i></span>
|
33 |
<?php do_action( 'user_registration_edit_profile_form_start' ); ?>
|
34 |
<div class="user-registration-profile-fields__field-wrapper">
|
35 |
|
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 and login form builder.
|
6 |
-
* Version: 1.4.
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
@@ -30,7 +30,7 @@ final class UserRegistration {
|
|
30 |
* Plugin version.
|
31 |
* @var string
|
32 |
*/
|
33 |
-
public $version = '1.4.
|
34 |
|
35 |
/**
|
36 |
* Session instance.
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration and login form builder.
|
6 |
+
* Version: 1.4.2
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
30 |
* Plugin version.
|
31 |
* @var string
|
32 |
*/
|
33 |
+
public $version = '1.4.2';
|
34 |
|
35 |
/**
|
36 |
* Session instance.
|