Version Description
- 31/12/2021
- Fix - Sanitization and escaping issues.
- Tweak - Images/JSON files locally added.
Download this release
Release Info
Developer | wpeverestdev |
Plugin | User Registration – Custom Registration Form, Login Form And User Profile For WordPress |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0.1 to 2.1.1
- assets/extensions-json/addon-section.json +6 -0
- assets/extensions-json/sections/all_extensions.json +124 -0
- assets/extensions-json/sections/images/advanced-fields.png +0 -0
- assets/extensions-json/sections/images/conditional-logic.jpg +0 -0
- assets/extensions-json/sections/images/content-restriction.png +0 -0
- assets/extensions-json/sections/images/customize-my-account.png +0 -0
- assets/extensions-json/sections/images/extras.png +0 -0
- assets/extensions-json/sections/images/field-visibility.png +0 -0
- assets/extensions-json/sections/images/file.png +0 -0
- assets/extensions-json/sections/images/geolocation.jpg +0 -0
- assets/extensions-json/sections/images/import-users.png +0 -0
- assets/extensions-json/sections/images/invite-codes.png +0 -0
- assets/extensions-json/sections/images/learndash.png +0 -0
- assets/extensions-json/sections/images/mailchimp.png +0 -0
- assets/extensions-json/sections/images/multi-part.png +0 -0
- assets/extensions-json/sections/images/payment-paypal.png +0 -0
- assets/extensions-json/sections/images/pdf-form-submission.png +0 -0
- assets/extensions-json/sections/images/profile-connect.png +0 -0
- assets/extensions-json/sections/images/social.png +0 -0
- assets/extensions-json/sections/images/stripe.png +0 -0
- assets/extensions-json/sections/images/style-customizer.png +0 -0
- assets/extensions-json/sections/images/woo-extension.png +0 -0
- includes/abstracts/abstract-ur-meta-boxes.php +4 -4
- includes/admin/class-ur-admin-addons.php +27 -7
- includes/admin/class-ur-admin-assets.php +69 -57
- includes/admin/class-ur-admin-export-users.php +21 -21
- includes/admin/class-ur-admin-form-modal.php +20 -17
- includes/admin/class-ur-admin-import-export-forms.php +5 -6
- includes/admin/class-ur-admin-menus.php +91 -34
- includes/admin/class-ur-admin-notices.php +15 -18
- includes/admin/class-ur-admin-profile.php +15 -16
- includes/admin/class-ur-admin-registrations-table-list.php +11 -11
- includes/admin/class-ur-admin-settings.php +88 -88
- includes/admin/class-ur-admin-user-list-manager.php +29 -29
- includes/admin/class-ur-admin-user-manager.php +4 -4
- includes/admin/class-ur-admin.php +23 -23
- includes/admin/functions-ur-admin.php +7 -7
- includes/admin/settings/class-ur-settings-email.php +43 -33
- includes/admin/settings/class-ur-settings-general.php +39 -39
- includes/admin/settings/class-ur-settings-integration.php +6 -8
- includes/admin/settings/class-ur-settings-license.php +16 -15
- includes/admin/settings/class-ur-settings-page.php +2 -4
- includes/admin/settings/emails/class-ur-settings-admin-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-awaiting-admin-approval-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-email-confirmation.php +6 -6
- includes/admin/settings/emails/class-ur-settings-profile-details-changed-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-registration-approved-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-registration-denied-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-registration-pending-email.php +6 -7
- includes/admin/settings/emails/class-ur-settings-reset-password-email.php +6 -6
- includes/admin/settings/emails/class-ur-settings-successfully-registered-email.php +6 -7
- includes/admin/updater/class-ur-addon-updater.php +91 -45
- includes/admin/updater/class-ur-plugin-updater-api.php +19 -9
- includes/admin/updater/class-ur-plugin-updates.php +1 -3
- includes/admin/views/html-admin-page-addons.php +20 -9
- includes/admin/views/html-admin-page-export-users.php +8 -5
- includes/admin/views/html-admin-page-forms.php +21 -15
- includes/admin/views/html-admin-page-import-export-forms.php +8 -9
- includes/admin/views/html-admin-page-status-logs.php +7 -5
- includes/admin/views/html-admin-page-status.php +10 -8
- includes/admin/views/html-admin-settings.php +4 -2
- includes/admin/views/html-license-form.php +6 -4
- includes/admin/views/html-notice-custom.php +3 -1
- includes/admin/views/html-notice-deactivation.php +1 -3
- includes/admin/views/html-notice-error.php +2 -0
- includes/admin/views/html-notice-install.php +4 -2
- includes/admin/views/html-notice-key-activated.php +3 -1
- includes/admin/views/html-notice-key-deactivated.php +3 -1
- includes/admin/views/html-notice-key-unvalidated.php +4 -2
- includes/admin/views/html-notice-registration.php +4 -3
- includes/admin/views/html-notice-update.php +4 -2
- includes/admin/views/html-notice-updated.php +4 -2
- includes/admin/views/html-notice-updating.php +3 -1
- includes/class-ur-ajax.php +47 -48
- includes/class-ur-email-confirmation.php +10 -10
- includes/class-ur-emailer.php +4 -4
- includes/class-ur-form-handler.php +14 -14
- includes/class-ur-frontend-scripts.php +25 -25
- includes/class-ur-install.php +3 -3
- includes/class-ur-plugin-updater.php +92 -49
- includes/class-ur-preview.php +3 -3
- includes/class-ur-shortcodes.php +15 -12
- includes/form/class-ur-form-field-checkbox.php +7 -7
- includes/form/class-ur-form-field-country.php +4 -4
- includes/form/class-ur-form-field-date.php +2 -2
- includes/form/class-ur-form-field-description.php +2 -2
- includes/form/class-ur-form-field-display-name.php +1 -1
- includes/form/class-ur-form-field-email.php +1 -1
- includes/form/class-ur-form-field-first-name.php +1 -1
- includes/form/class-ur-form-field-last-name.php +1 -1
- includes/form/class-ur-form-field-nickname.php +1 -1
- includes/form/class-ur-form-field-number.php +1 -1
- includes/form/class-ur-form-field-password.php +1 -1
- includes/form/class-ur-form-field-privacy-policy.php +1 -1
- includes/form/views/admin/admin-checkbox.php +1 -2
- includes/form/views/admin/admin-radio.php +1 -2
- includes/form/views/admin/admin-select.php +31 -32
- includes/frontend/class-ur-frontend-form-handler.php +8 -9
- includes/functions-ur-core.php +57 -59
- includes/functions-ur-template.php +298 -312
- includes/shortcodes/class-ur-shortcode-login.php +4 -2
- includes/shortcodes/class-ur-shortcode-my-account.php +1 -1
- languages/user-registration.pot +358 -340
- readme.txt +5 -1
- templates/form-login-registration.php +2 -2
- templates/form-registration.php +7 -7
- templates/myaccount/dashboard.php +2 -2
- templates/myaccount/form-edit-password.php +5 -5
- templates/myaccount/form-edit-profile.php +76 -78
- templates/myaccount/form-login.php +23 -19
- templates/myaccount/form-lost-password.php +2 -2
- templates/myaccount/form-reset-password.php +10 -10
- templates/myaccount/lost-password-confirmation.php +1 -1
- user-registration.php +2 -3
assets/extensions-json/addon-section.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"all_extensions": {
|
3 |
+
"title": "All Extensions",
|
4 |
+
"endpoint": "extensions-json/sections/all_extensions.json"
|
5 |
+
}
|
6 |
+
}
|
assets/extensions-json/sections/all_extensions.json
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"products": [
|
3 |
+
{
|
4 |
+
"title": "Style Customizer",
|
5 |
+
"image": "extensions-json/sections/images/style-customizer.png",
|
6 |
+
"excerpt": "Gone are the days when registration forms used to look dull and boring. Easily style your registration forms according to your needs by changing various design components such as Font size, Font color, background color, background image, Border, padding, margin, alignment and more.",
|
7 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/style-customizer/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=style-customizer"
|
8 |
+
},
|
9 |
+
{
|
10 |
+
"title": "Multi Step Forms",
|
11 |
+
"image": "extensions-json/sections/images/multi-part.png",
|
12 |
+
"excerpt": "Lengthy forms are time-consuming and boring. Form fillers easily get distracted and quit halfway through these types of forms. But, there’s no need to worry! Our User Registration Multi-Part Add-on allows you to divide your registration forms into multiple parts according to your requirements without any hassle.",
|
13 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/multi-part/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=multi-part"
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"title": "File Upload",
|
17 |
+
"image": "extensions-json/sections/images/file.png",
|
18 |
+
"excerpt": "File Upload addon for User Registration plugin allows you to create upload field in your registration form. You can use this field on your registration forms allowing your users to upload important files, documents, images and more.",
|
19 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/file-upload/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=file-upload"
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"title": "Social Connect",
|
23 |
+
"image": "extensions-json/sections/images/social.png",
|
24 |
+
"excerpt": "Signing up made easier and faster! With this addon you can make your users register to your site with social platforms like Facebook, Twitter, Google+, LinkedIn or others. Users details will be automatically pulled from their social profiles.",
|
25 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/social-connect/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=social-connect"
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"title": "MailChimp",
|
29 |
+
"image": "extensions-json/sections/images/mailchimp.png",
|
30 |
+
"excerpt": "MailChimp add-on of User Registration plugin synchronizes your mailChimp account with User Registration plugin and automatically subscribes your site users to your mailchimp mailing list on registration.",
|
31 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/mailchimp/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=mailchimp"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"title": "WooCommerce Integration",
|
35 |
+
"image": "extensions-json/sections/images/woo-extension.png",
|
36 |
+
"excerpt": "Integrates WooCommerce plugin with your user-registration and allows you to manage user billing, shipping, orders via user registration account page",
|
37 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/woocommerce/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=woocommerce-integration"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"title": "Content Restriction",
|
41 |
+
"image": "extensions-json/sections/images/content-restriction.png",
|
42 |
+
"excerpt": "Content Restriction addon allows you to restrict full or partial content from page, post to only logged in users or logged in users with specific roles.",
|
43 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/content-restriction/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=content-restriction"
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"title": "Advanced Fields",
|
47 |
+
"image": "extensions-json/sections/images/advanced-fields.png",
|
48 |
+
"excerpt": "Advanced Fields provides you with additional advanced fields like Section Title, Custom HTML, Phone, Time Picker and WYSIWYG Fields. These fields will allow you to create more complex registration forms with ease.",
|
49 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/advanced-fields/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=advanced-fields"
|
50 |
+
},
|
51 |
+
{
|
52 |
+
"title": "Conditional Logic",
|
53 |
+
"image": "extensions-json/sections/images/conditional-logic.jpg",
|
54 |
+
"excerpt": "Conditional Logic allows you to create more dynamic forms based on user input. You can now show or hide specific fields based on the users other input in the form. A field hide or show based on on multiple conditions fulfilled.",
|
55 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/conditional-logic/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=conditional-logic"
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"title": "Profile Connect",
|
59 |
+
"image": "extensions-json/sections/images/profile-connect.png",
|
60 |
+
"excerpt": "Connect your old users i.e users created via some other plugins, default WordPress registration form to user registration forms. Allows both individual as well as bulk connection of users to any particular form.",
|
61 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/profile-connect/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=profile-connect"
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"title": "PDF Form Submission",
|
65 |
+
"image": "extensions-json/sections/images/pdf-form-submission.png",
|
66 |
+
"excerpt": "PDF Form Submission addon allows to export registration form data in pdf form. PDF are great way to record, print and share with your team members. Automatically attachs the pdf to emails send to your users and admin.",
|
67 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/pdf-form-submission/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=pdf-form-submission"
|
68 |
+
},
|
69 |
+
{
|
70 |
+
"title": "PayPal Payment",
|
71 |
+
"image": "extensions-json/sections/images/payment-paypal.png",
|
72 |
+
"excerpt": "Integrates PayPal into your forms for registration fee payments, donations, and more. set either predefined, user defined or hidden amount on the form as per the requirement.",
|
73 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/payments/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=paypal-payment"
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"title": "Stripe",
|
77 |
+
"image": "extensions-json/sections/images/stripe.png",
|
78 |
+
"excerpt": "Stripe Addon allows you to accept payments on your forms for donation, product sale, and other services. Stripe is one of the most popular ways to accept credit card payments right on your site without much hassle. Also, support subscription payments.",
|
79 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/stripe/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=stripe"
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"title": "Geolocation",
|
83 |
+
"image": "extensions-json/sections/images/geolocation.jpg",
|
84 |
+
"excerpt": "Allows you to collect geo location data from users who registered on your site. Information like Country, City, Zip Code, Latitude/Longitude and location map for the user will accessible.",
|
85 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/geolocation/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=geolocation"
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"title": "LearnDash",
|
89 |
+
"image": "extensions-json/sections/images/learndash.png",
|
90 |
+
"excerpt": "Allows you to view user’s registered learndash courses, automatically enroll users to specified learndash courses and more.",
|
91 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/learndash/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=learndash"
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"title": "Customize My Account",
|
95 |
+
"image": "extensions-json/sections/images/customize-my-account.png",
|
96 |
+
"excerpt": "User Registration Customize My Account add-on allows you to create, edit and delete additional tabs on the account page along with custom content for that tab. Also supports drag and drop sorting of account tabs",
|
97 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/customize-my-account/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=customize-my-account"
|
98 |
+
},
|
99 |
+
{
|
100 |
+
"title": "Field Visibility",
|
101 |
+
"image": "extensions-json/sections/images/field-visibility.png",
|
102 |
+
"excerpt": "User Registration Field Visibility add-on allows user registration fields to be hidden in the frontend form or your account profile page as per your choice. Also, allows you to make a field read only in registration form or profile page or both.",
|
103 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/field-visibility/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=field-visibility"
|
104 |
+
},
|
105 |
+
{
|
106 |
+
"title": "Invite Codes",
|
107 |
+
"image": "extensions-json/sections/images/invite-codes.png",
|
108 |
+
"excerpt": " Allows you to restrict the registration on your site to users with invite Codes only. You can create a single or multiple invitation code, set expiry date, usage limit per invitation code and more.",
|
109 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/invite-codes/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=invite-codes"
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"title": "Extras",
|
113 |
+
"image": "extensions-json/sections/images/extras.png",
|
114 |
+
"excerpt": "This addon packs a lot of smaller features. Allows popup login form and registration forms, registration analytics, whitelisting email domains, auto password generation, and more",
|
115 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/extras/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=extras"
|
116 |
+
},
|
117 |
+
{
|
118 |
+
"title": "Import Users",
|
119 |
+
"image": "extensions-json/sections/images/import-users.png",
|
120 |
+
"excerpt": "You can easily import users on your WordPress site. Just select the form to map user details, choose a user data file in CSV format, map the fields, and import your users.",
|
121 |
+
"link": "https://wpeverest.com/wordpress-plugins/user-registration/import-users/?utm_source=addons-page&utm_medium=banner&utm_campaign=ur-upgrade-to-pro&utm_content=import-users"
|
122 |
+
}
|
123 |
+
]
|
124 |
+
}
|
assets/extensions-json/sections/images/advanced-fields.png
ADDED
Binary file
|
assets/extensions-json/sections/images/conditional-logic.jpg
ADDED
Binary file
|
assets/extensions-json/sections/images/content-restriction.png
ADDED
Binary file
|
assets/extensions-json/sections/images/customize-my-account.png
ADDED
Binary file
|
assets/extensions-json/sections/images/extras.png
ADDED
Binary file
|
assets/extensions-json/sections/images/field-visibility.png
ADDED
Binary file
|
assets/extensions-json/sections/images/file.png
ADDED
Binary file
|
assets/extensions-json/sections/images/geolocation.jpg
ADDED
Binary file
|
assets/extensions-json/sections/images/import-users.png
ADDED
Binary file
|
assets/extensions-json/sections/images/invite-codes.png
ADDED
Binary file
|
assets/extensions-json/sections/images/learndash.png
ADDED
Binary file
|
assets/extensions-json/sections/images/mailchimp.png
ADDED
Binary file
|
assets/extensions-json/sections/images/multi-part.png
ADDED
Binary file
|
assets/extensions-json/sections/images/payment-paypal.png
ADDED
Binary file
|
assets/extensions-json/sections/images/pdf-form-submission.png
ADDED
Binary file
|
assets/extensions-json/sections/images/profile-connect.png
ADDED
Binary file
|
assets/extensions-json/sections/images/social.png
ADDED
Binary file
|
assets/extensions-json/sections/images/stripe.png
ADDED
Binary file
|
assets/extensions-json/sections/images/style-customizer.png
ADDED
Binary file
|
assets/extensions-json/sections/images/woo-extension.png
ADDED
Binary file
|
includes/abstracts/abstract-ur-meta-boxes.php
CHANGED
@@ -44,9 +44,9 @@ abstract class UR_Meta_Boxes {
|
|
44 |
$checked = '<input type="checkbox" id="' . esc_attr( $field['id'] ) . '" name="' . esc_attr( $field['name'] ) . '" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" checked>';
|
45 |
|
46 |
if ( 'on' === $get_meta_data ) {
|
47 |
-
echo $checked;
|
48 |
} else {
|
49 |
-
echo $non_checked;
|
50 |
}
|
51 |
|
52 |
echo '</div>';
|
@@ -61,7 +61,7 @@ abstract class UR_Meta_Boxes {
|
|
61 |
*/
|
62 |
public function ur_metabox_select( $field ) {
|
63 |
|
64 |
-
|
65 |
|
66 |
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
67 |
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'select';
|
@@ -102,7 +102,7 @@ abstract class UR_Meta_Boxes {
|
|
102 |
echo '</div>';
|
103 |
echo '</div>';
|
104 |
echo '</div>';
|
105 |
-
|
106 |
|
107 |
/**
|
108 |
* Renders the Multiple Select field in metabox.
|
44 |
$checked = '<input type="checkbox" id="' . esc_attr( $field['id'] ) . '" name="' . esc_attr( $field['name'] ) . '" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" checked>';
|
45 |
|
46 |
if ( 'on' === $get_meta_data ) {
|
47 |
+
echo esc_html( $checked );
|
48 |
} else {
|
49 |
+
echo esc_html( $non_checked );
|
50 |
}
|
51 |
|
52 |
echo '</div>';
|
61 |
*/
|
62 |
public function ur_metabox_select( $field ) {
|
63 |
|
64 |
+
global $thepostid, $post;
|
65 |
|
66 |
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
67 |
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'select';
|
102 |
echo '</div>';
|
103 |
echo '</div>';
|
104 |
echo '</div>';
|
105 |
+
}
|
106 |
|
107 |
/**
|
108 |
* Renders the Multiple Select field in metabox.
|
includes/admin/class-ur-admin-addons.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
/**
|
3 |
* Addons Page
|
4 |
*
|
5 |
-
* @author WPEverest
|
6 |
-
* @category Admin
|
7 |
* @package UserRegistration/Admin
|
8 |
* @version 1.1.0
|
9 |
*/
|
@@ -23,8 +21,10 @@ class UR_Admin_Addons {
|
|
23 |
* @return array of objects
|
24 |
*/
|
25 |
public static function get_sections() {
|
|
|
26 |
if ( false === ( $sections = get_transient( 'ur_addons_sections' ) ) ) {
|
27 |
-
$raw_sections = wp_safe_remote_get( '
|
|
|
28 |
if ( ! is_wp_error( $raw_sections ) ) {
|
29 |
$sections = json_decode( wp_remote_retrieve_body( $raw_sections ) );
|
30 |
|
@@ -53,7 +53,7 @@ class UR_Admin_Addons {
|
|
53 |
/**
|
54 |
* Get section for the addons screen.
|
55 |
*
|
56 |
-
* @param string $section_id
|
57 |
*
|
58 |
* @return object|bool
|
59 |
*/
|
@@ -69,7 +69,7 @@ class UR_Admin_Addons {
|
|
69 |
/**
|
70 |
* Get section content for the addons screen.
|
71 |
*
|
72 |
-
* @param string $section_id
|
73 |
*
|
74 |
* @return array
|
75 |
*/
|
@@ -78,8 +78,9 @@ class UR_Admin_Addons {
|
|
78 |
$section_data = '';
|
79 |
|
80 |
if ( ! empty( $section->endpoint ) ) {
|
|
|
81 |
if ( false === ( $section_data = get_transient( 'ur_addons_section_' . $section_id ) ) ) {
|
82 |
-
$raw_section = wp_safe_remote_get(
|
83 |
|
84 |
if ( ! is_wp_error( $raw_section ) ) {
|
85 |
$section_data = json_decode( wp_remote_retrieve_body( $raw_section ) );
|
@@ -101,7 +102,26 @@ class UR_Admin_Addons {
|
|
101 |
$sections = self::get_sections();
|
102 |
$theme = wp_get_theme();
|
103 |
$section_keys = array_keys( $sections );
|
104 |
-
$current_section = isset( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : current( $section_keys );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
include_once dirname( __FILE__ ) . '/views/html-admin-page-addons.php';
|
106 |
}
|
107 |
}
|
2 |
/**
|
3 |
* Addons Page
|
4 |
*
|
|
|
|
|
5 |
* @package UserRegistration/Admin
|
6 |
* @version 1.1.0
|
7 |
*/
|
21 |
* @return array of objects
|
22 |
*/
|
23 |
public static function get_sections() {
|
24 |
+
|
25 |
if ( false === ( $sections = get_transient( 'ur_addons_sections' ) ) ) {
|
26 |
+
$raw_sections = wp_safe_remote_get( UR()->plugin_url() . '/assets/extensions-json/addon-section.json', array( 'user-agent' => 'UserRegistration Addons Page' ) );
|
27 |
+
|
28 |
if ( ! is_wp_error( $raw_sections ) ) {
|
29 |
$sections = json_decode( wp_remote_retrieve_body( $raw_sections ) );
|
30 |
|
53 |
/**
|
54 |
* Get section for the addons screen.
|
55 |
*
|
56 |
+
* @param string $section_id Section Id.
|
57 |
*
|
58 |
* @return object|bool
|
59 |
*/
|
69 |
/**
|
70 |
* Get section content for the addons screen.
|
71 |
*
|
72 |
+
* @param string $section_id Section Id.
|
73 |
*
|
74 |
* @return array
|
75 |
*/
|
78 |
$section_data = '';
|
79 |
|
80 |
if ( ! empty( $section->endpoint ) ) {
|
81 |
+
|
82 |
if ( false === ( $section_data = get_transient( 'ur_addons_section_' . $section_id ) ) ) {
|
83 |
+
$raw_section = wp_safe_remote_get( UR()->plugin_url() . '/assets/' . $section->endpoint, array( 'user-agent' => 'UserRegistration Addons Page' ) );
|
84 |
|
85 |
if ( ! is_wp_error( $raw_section ) ) {
|
86 |
$section_data = json_decode( wp_remote_retrieve_body( $raw_section ) );
|
102 |
$sections = self::get_sections();
|
103 |
$theme = wp_get_theme();
|
104 |
$section_keys = array_keys( $sections );
|
105 |
+
$current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : current( $section_keys );
|
106 |
+
|
107 |
+
$refresh_url = add_query_arg(
|
108 |
+
array(
|
109 |
+
'page' => 'user-registration-addons',
|
110 |
+
'action' => 'user-registration-addons-refresh',
|
111 |
+
'user-registration-addons-nonce' => wp_create_nonce( 'refresh' ),
|
112 |
+
),
|
113 |
+
admin_url( 'admin.php' )
|
114 |
+
);
|
115 |
+
|
116 |
+
if ( isset( $_GET['action'] ) && 'user-registration-addons-refresh' === $_GET['action'] ) {
|
117 |
+
if ( empty( $_GET['user-registration-addons-nonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['user-registration-addons-nonce'] ) ), 'refresh' ) ) {
|
118 |
+
wp_die( esc_html_e( 'Could not verify nonce', 'user-registration' ) );
|
119 |
+
}
|
120 |
+
|
121 |
+
delete_transient( 'ur_addons_sections' );
|
122 |
+
delete_transient( 'ur_addons_section_' . $current_section );
|
123 |
+
}
|
124 |
+
|
125 |
include_once dirname( __FILE__ ) . '/views/html-admin-page-addons.php';
|
126 |
}
|
127 |
}
|
includes/admin/class-ur-admin-assets.php
CHANGED
@@ -7,8 +7,6 @@
|
|
7 |
* @class UR_Admin_Assets
|
8 |
* @version 1.0.0
|
9 |
* @package UserRegistration/Admin
|
10 |
-
* @category Admin
|
11 |
-
* @author WPEverest
|
12 |
*/
|
13 |
|
14 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -65,9 +63,8 @@ class UR_Admin_Assets {
|
|
65 |
wp_enqueue_style( 'select2', UR()->plugin_url() . '/assets/css/select2/select2.css', array(), '4.0.6' );
|
66 |
wp_enqueue_style( 'ur-notice' );
|
67 |
|
68 |
-
|
69 |
// Admin styles for UR pages only.
|
70 |
-
if ( in_array( $screen_id, ur_get_screen_ids() ) ) {
|
71 |
wp_enqueue_style( 'user-registration-admin' );
|
72 |
wp_enqueue_style( 'jquery-ui-style' );
|
73 |
wp_enqueue_style( 'wp-color-picker' );
|
@@ -116,27 +113,34 @@ class UR_Admin_Assets {
|
|
116 |
'sweetalert2',
|
117 |
'user-registration-scroll-ui-js',
|
118 |
),
|
119 |
-
UR_VERSION
|
|
|
120 |
);
|
121 |
|
122 |
-
wp_register_script(
|
123 |
-
'
|
124 |
-
'
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
wp_register_script( 'jquery-blockui', UR()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
|
141 |
wp_register_script( 'jquery-tiptip', UR()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), UR_VERSION, true );
|
142 |
wp_register_script(
|
@@ -147,19 +151,21 @@ class UR_Admin_Assets {
|
|
147 |
'backbone',
|
148 |
'wp-util',
|
149 |
),
|
150 |
-
UR_VERSION
|
|
|
151 |
);
|
152 |
|
153 |
-
wp_register_script( 'user-registration-scroll-ui-js', UR()->plugin_url() . '/assets/js/ur-components/scroll-ui.js', 'jquery' );
|
154 |
|
155 |
-
wp_register_script( 'user-registration-form-modal-js', UR()->plugin_url() . '/assets/js/admin/form-modal' . $suffix . '.js', 'jquery' );
|
156 |
-
wp_register_script( 'user-registration-dashboard-widget-js', UR()->plugin_url() . '/assets/js/admin/dashboard-widget' . $suffix . '.js', 'jquery' );
|
157 |
-
wp_register_script( 'selectWoo', UR()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '5.0.0' );
|
158 |
wp_register_script(
|
159 |
'wp-color-picker-alpha',
|
160 |
UR()->plugin_url() . '/assets/js/wp-color-picker/wp-color-picker-alpha' . $suffix . '.js',
|
161 |
array( 'wp-color-picker' ),
|
162 |
-
'2.1.4'
|
|
|
163 |
);
|
164 |
wp_register_script(
|
165 |
'ur-enhanced-select',
|
@@ -168,15 +174,16 @@ class UR_Admin_Assets {
|
|
168 |
'jquery',
|
169 |
'selectWoo',
|
170 |
),
|
171 |
-
UR_VERSION
|
|
|
172 |
);
|
173 |
|
174 |
-
wp_register_script( 'flatpickr', UR()->plugin_url() . '/assets/js/flatpickr/flatpickr.min.js', array( 'jquery' ), '4.6.9' );
|
175 |
-
wp_register_script( 'perfect-scrollbar', UR()->plugin_url() . '/assets/js/perfect-scrollbar/perfect-scrollbar.min.js', array( 'jquery' ), '1.5.0' );
|
176 |
-
wp_register_script( 'chartjs', UR()->plugin_url() . '/assets/js/chartjs/Chart.min.js', array( 'jquery' ), '3.2.1' );
|
177 |
-
wp_register_script( 'sweetalert2', UR()->plugin_url() . '/assets/js/sweetalert2/sweetalert2.min.js', array( 'jquery' ), '10.16.7' );
|
178 |
-
wp_register_script( 'ur-copy', UR()->plugin_url() . '/assets/js/admin/ur-copy' . $suffix . '.js', 'jquery' );
|
179 |
-
wp_register_script( 'ur-my-account', UR()->plugin_url() . '/assets/js/frontend/my-account' . $suffix . '.js', array( 'jquery' ), UR_VERSION );
|
180 |
wp_localize_script(
|
181 |
'ur-my-account',
|
182 |
'ur_my_account_params',
|
@@ -187,11 +194,10 @@ class UR_Admin_Assets {
|
|
187 |
)
|
188 |
);
|
189 |
|
190 |
-
|
191 |
wp_enqueue_script( 'user-registration-form-modal-js' );
|
192 |
wp_enqueue_script( 'ur-enhanced-select' );
|
193 |
|
194 |
-
wp_enqueue_script( 'ur-notice', UR()->plugin_url() . '/assets/js/admin/ur-notice' . $suffix . '.js', array(), UR_VERSION );
|
195 |
wp_localize_script(
|
196 |
'ur-notice',
|
197 |
'ur_notice_params',
|
@@ -233,7 +239,7 @@ class UR_Admin_Assets {
|
|
233 |
}
|
234 |
|
235 |
// UserRegistration admin pages.
|
236 |
-
if ( in_array( $screen_id, ur_get_screen_ids() ) ) {
|
237 |
wp_enqueue_script( 'user-registration-admin' );
|
238 |
wp_enqueue_script( 'user-registration-form-builder' );
|
239 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
@@ -254,15 +260,18 @@ class UR_Admin_Assets {
|
|
254 |
'form_required_fields' => ur_get_required_fields(),
|
255 |
'form_one_time_draggable_fields' => ur_get_one_time_draggable_fields(),
|
256 |
'i18n_admin' => self::get_i18n_admin_data(),
|
257 |
-
'add_new' =>
|
258 |
);
|
259 |
|
260 |
-
wp_localize_script(
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
266 |
wp_localize_script( 'user-registration-form-builder', 'user_registration_form_builder_data', $params );
|
267 |
|
268 |
wp_register_script( 'ur-components', UR()->plugin_url() . '/assets/js/ur-components/ur-components' . $suffix . '.js', array( 'jquery' ), 'UR_VERSION', true );
|
@@ -289,8 +298,8 @@ class UR_Admin_Assets {
|
|
289 |
wp_enqueue_script( 'chartjs' );
|
290 |
}
|
291 |
// Plugins page.
|
292 |
-
if ( in_array( $screen_id, array( 'plugins' ) ) ) {
|
293 |
-
wp_register_script( 'ur-plugins', UR()->plugin_url() . '/assets/js/admin/plugins' . $suffix . '.js', array( 'jquery' ), UR_VERSION );
|
294 |
wp_enqueue_script( 'ur-plugins' );
|
295 |
wp_localize_script(
|
296 |
'ur-plugins',
|
@@ -301,24 +310,26 @@ class UR_Admin_Assets {
|
|
301 |
)
|
302 |
);
|
303 |
}
|
304 |
-
//send test email
|
305 |
-
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : '';
|
306 |
if ( 'user-registration_page_user-registration-settings' === $screen_id && 'email' === $current_tab ) {
|
307 |
wp_localize_script(
|
308 |
'user-registration-admin',
|
309 |
'user_registration_send_email',
|
310 |
array(
|
311 |
-
'ajax_url' => admin_url( 'admin-ajax.php' )
|
312 |
-
|
313 |
);
|
314 |
}
|
315 |
|
316 |
-
wp_register_script( 'ur-live-user-notice', UR()->plugin_url() . '/assets/js/admin/live-user-notice' . $suffix . '.js', array( 'jquery', 'heartbeat' ), UR_VERSION );
|
317 |
wp_enqueue_script( 'ur-live-user-notice' );
|
318 |
|
319 |
}
|
320 |
|
321 |
/**
|
|
|
|
|
322 |
* @return string
|
323 |
*/
|
324 |
public static function get_form_required_html() {
|
@@ -337,7 +348,7 @@ class UR_Admin_Assets {
|
|
337 |
$class_name = ur_load_form_field_class( $field );
|
338 |
$template_data = $class_name::get_instance()->get_admin_template(); // @codingStandardsIgnoreLine
|
339 |
|
340 |
-
if (
|
341 |
|
342 |
$template = '<div class="ur-selected-item">';
|
343 |
|
@@ -355,7 +366,8 @@ class UR_Admin_Assets {
|
|
355 |
}
|
356 |
|
357 |
/**
|
358 |
-
*
|
|
|
359 |
* @return array
|
360 |
*/
|
361 |
public static function get_i18n_admin_data() {
|
@@ -387,8 +399,8 @@ class UR_Admin_Assets {
|
|
387 |
'i18n_field_is_required' => _x( 'field is required.', 'user registration admin', 'user-registration' ),
|
388 |
'i18n_drag_your_first_item_here' => _x( 'Drag your first form item here.', 'user registration admin', 'user-registration' ),
|
389 |
'i18n_select_countries' => _x( 'Please select at least one country.', 'user registration admin', 'user-registration' ),
|
390 |
-
'i18n_input_size'
|
391 |
-
'i18n_min_max_input'
|
392 |
|
393 |
);
|
394 |
|
7 |
* @class UR_Admin_Assets
|
8 |
* @version 1.0.0
|
9 |
* @package UserRegistration/Admin
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
63 |
wp_enqueue_style( 'select2', UR()->plugin_url() . '/assets/css/select2/select2.css', array(), '4.0.6' );
|
64 |
wp_enqueue_style( 'ur-notice' );
|
65 |
|
|
|
66 |
// Admin styles for UR pages only.
|
67 |
+
if ( in_array( $screen_id, ur_get_screen_ids(), true ) ) {
|
68 |
wp_enqueue_style( 'user-registration-admin' );
|
69 |
wp_enqueue_style( 'jquery-ui-style' );
|
70 |
wp_enqueue_style( 'wp-color-picker' );
|
113 |
'sweetalert2',
|
114 |
'user-registration-scroll-ui-js',
|
115 |
),
|
116 |
+
UR_VERSION,
|
117 |
+
false
|
118 |
);
|
119 |
|
120 |
+
wp_register_script(
|
121 |
+
'user-registration-form-builder',
|
122 |
+
UR()->plugin_url() . '/assets/js/admin/form-builder' . $suffix . '.js',
|
123 |
+
array(
|
124 |
+
'jquery',
|
125 |
+
'selectWoo',
|
126 |
+
'wp-color-picker',
|
127 |
+
'jquery-blockui',
|
128 |
+
'jquery-tiptip',
|
129 |
+
'jquery-ui-sortable',
|
130 |
+
'jquery-ui-widget',
|
131 |
+
'jquery-ui-core',
|
132 |
+
'jquery-ui-tabs',
|
133 |
+
'jquery-ui-draggable',
|
134 |
+
'jquery-ui-droppable',
|
135 |
+
'ur-backbone-modal',
|
136 |
+
'ur-enhanced-select',
|
137 |
+
'perfect-scrollbar',
|
138 |
+
'sweetalert2',
|
139 |
+
'user-registration-scroll-ui-js',
|
140 |
+
),
|
141 |
+
UR_VERSION,
|
142 |
+
false
|
143 |
+
);
|
144 |
wp_register_script( 'jquery-blockui', UR()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
|
145 |
wp_register_script( 'jquery-tiptip', UR()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), UR_VERSION, true );
|
146 |
wp_register_script(
|
151 |
'backbone',
|
152 |
'wp-util',
|
153 |
),
|
154 |
+
UR_VERSION,
|
155 |
+
false
|
156 |
);
|
157 |
|
158 |
+
wp_register_script( 'user-registration-scroll-ui-js', UR()->plugin_url() . '/assets/js/ur-components/scroll-ui.js', 'jquery', UR_VERSION, false );
|
159 |
|
160 |
+
wp_register_script( 'user-registration-form-modal-js', UR()->plugin_url() . '/assets/js/admin/form-modal' . $suffix . '.js', 'jquery', UR_VERSION, false );
|
161 |
+
wp_register_script( 'user-registration-dashboard-widget-js', UR()->plugin_url() . '/assets/js/admin/dashboard-widget' . $suffix . '.js', 'jquery', UR_VERSION, false );
|
162 |
+
wp_register_script( 'selectWoo', UR()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '5.0.0', false );
|
163 |
wp_register_script(
|
164 |
'wp-color-picker-alpha',
|
165 |
UR()->plugin_url() . '/assets/js/wp-color-picker/wp-color-picker-alpha' . $suffix . '.js',
|
166 |
array( 'wp-color-picker' ),
|
167 |
+
'2.1.4',
|
168 |
+
false
|
169 |
);
|
170 |
wp_register_script(
|
171 |
'ur-enhanced-select',
|
174 |
'jquery',
|
175 |
'selectWoo',
|
176 |
),
|
177 |
+
UR_VERSION,
|
178 |
+
false
|
179 |
);
|
180 |
|
181 |
+
wp_register_script( 'flatpickr', UR()->plugin_url() . '/assets/js/flatpickr/flatpickr.min.js', array( 'jquery' ), '4.6.9', false );
|
182 |
+
wp_register_script( 'perfect-scrollbar', UR()->plugin_url() . '/assets/js/perfect-scrollbar/perfect-scrollbar.min.js', array( 'jquery' ), '1.5.0', false );
|
183 |
+
wp_register_script( 'chartjs', UR()->plugin_url() . '/assets/js/chartjs/Chart.min.js', array( 'jquery' ), '3.2.1', false );
|
184 |
+
wp_register_script( 'sweetalert2', UR()->plugin_url() . '/assets/js/sweetalert2/sweetalert2.min.js', array( 'jquery' ), '10.16.7', false );
|
185 |
+
wp_register_script( 'ur-copy', UR()->plugin_url() . '/assets/js/admin/ur-copy' . $suffix . '.js', 'jquery', UR_VERSION, false );
|
186 |
+
wp_register_script( 'ur-my-account', UR()->plugin_url() . '/assets/js/frontend/my-account' . $suffix . '.js', array( 'jquery' ), UR_VERSION, false );
|
187 |
wp_localize_script(
|
188 |
'ur-my-account',
|
189 |
'ur_my_account_params',
|
194 |
)
|
195 |
);
|
196 |
|
|
|
197 |
wp_enqueue_script( 'user-registration-form-modal-js' );
|
198 |
wp_enqueue_script( 'ur-enhanced-select' );
|
199 |
|
200 |
+
wp_enqueue_script( 'ur-notice', UR()->plugin_url() . '/assets/js/admin/ur-notice' . $suffix . '.js', array(), UR_VERSION, false );
|
201 |
wp_localize_script(
|
202 |
'ur-notice',
|
203 |
'ur_notice_params',
|
239 |
}
|
240 |
|
241 |
// UserRegistration admin pages.
|
242 |
+
if ( in_array( $screen_id, ur_get_screen_ids(), true ) ) {
|
243 |
wp_enqueue_script( 'user-registration-admin' );
|
244 |
wp_enqueue_script( 'user-registration-form-builder' );
|
245 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
260 |
'form_required_fields' => ur_get_required_fields(),
|
261 |
'form_one_time_draggable_fields' => ur_get_one_time_draggable_fields(),
|
262 |
'i18n_admin' => self::get_i18n_admin_data(),
|
263 |
+
'add_new' => esc_html__( 'Add New', 'user-registration' ),
|
264 |
);
|
265 |
|
266 |
+
wp_localize_script(
|
267 |
+
'user-registration-admin',
|
268 |
+
'user_registration_admin_data',
|
269 |
+
array(
|
270 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
271 |
+
'ur_import_form_save' => wp_create_nonce( 'ur_import_form_save_nonce' ),
|
272 |
+
'no_file_selected' => esc_html__( 'No file selected.', 'user-registration' ),
|
273 |
+
)
|
274 |
+
);
|
275 |
wp_localize_script( 'user-registration-form-builder', 'user_registration_form_builder_data', $params );
|
276 |
|
277 |
wp_register_script( 'ur-components', UR()->plugin_url() . '/assets/js/ur-components/ur-components' . $suffix . '.js', array( 'jquery' ), 'UR_VERSION', true );
|
298 |
wp_enqueue_script( 'chartjs' );
|
299 |
}
|
300 |
// Plugins page.
|
301 |
+
if ( in_array( $screen_id, array( 'plugins' ), true ) ) {
|
302 |
+
wp_register_script( 'ur-plugins', UR()->plugin_url() . '/assets/js/admin/plugins' . $suffix . '.js', array( 'jquery' ), UR_VERSION, false );
|
303 |
wp_enqueue_script( 'ur-plugins' );
|
304 |
wp_localize_script(
|
305 |
'ur-plugins',
|
310 |
)
|
311 |
);
|
312 |
}
|
313 |
+
// send test email.
|
314 |
+
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : '';
|
315 |
if ( 'user-registration_page_user-registration-settings' === $screen_id && 'email' === $current_tab ) {
|
316 |
wp_localize_script(
|
317 |
'user-registration-admin',
|
318 |
'user_registration_send_email',
|
319 |
array(
|
320 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
321 |
+
)
|
322 |
);
|
323 |
}
|
324 |
|
325 |
+
wp_register_script( 'ur-live-user-notice', UR()->plugin_url() . '/assets/js/admin/live-user-notice' . $suffix . '.js', array( 'jquery', 'heartbeat' ), UR_VERSION, false );
|
326 |
wp_enqueue_script( 'ur-live-user-notice' );
|
327 |
|
328 |
}
|
329 |
|
330 |
/**
|
331 |
+
* Get Form Required HTML.
|
332 |
+
*
|
333 |
* @return string
|
334 |
*/
|
335 |
public static function get_form_required_html() {
|
348 |
$class_name = ur_load_form_field_class( $field );
|
349 |
$template_data = $class_name::get_instance()->get_admin_template(); // @codingStandardsIgnoreLine
|
350 |
|
351 |
+
if ( null !== $class_name ) {
|
352 |
|
353 |
$template = '<div class="ur-selected-item">';
|
354 |
|
366 |
}
|
367 |
|
368 |
/**
|
369 |
+
* Localize admin data.
|
370 |
+
*
|
371 |
* @return array
|
372 |
*/
|
373 |
public static function get_i18n_admin_data() {
|
399 |
'i18n_field_is_required' => _x( 'field is required.', 'user registration admin', 'user-registration' ),
|
400 |
'i18n_drag_your_first_item_here' => _x( 'Drag your first form item here.', 'user registration admin', 'user-registration' ),
|
401 |
'i18n_select_countries' => _x( 'Please select at least one country.', 'user registration admin', 'user-registration' ),
|
402 |
+
'i18n_input_size' => _x( 'input size must be greater than zero.', 'user registration admin', 'user-registration' ),
|
403 |
+
'i18n_min_max_input' => _x( 'input of min value must be less than max value.', 'user registration admin', 'user-registration' ),
|
404 |
|
405 |
);
|
406 |
|
includes/admin/class-ur-admin-export-users.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
/**
|
3 |
* Export Users
|
4 |
*
|
5 |
-
* @author WPEverest
|
6 |
-
* @category Admin
|
7 |
* @package UserRegistration/Admin
|
8 |
* @since 1.5.0
|
9 |
*/
|
@@ -38,6 +36,7 @@ class UR_Admin_Export_Users {
|
|
38 |
/**
|
39 |
* Exports users data along with extra information in CSV format.
|
40 |
*
|
|
|
41 |
* @return void
|
42 |
*/
|
43 |
public function export_csv( $form_id ) {
|
@@ -48,11 +47,11 @@ class UR_Admin_Export_Users {
|
|
48 |
}
|
49 |
|
50 |
// Nonce check.
|
51 |
-
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'user-registration-settings' ) ) {
|
52 |
-
die(
|
53 |
}
|
54 |
|
55 |
-
$form_id = isset( $_POST['export_users'] ) ? $_POST['export_users'] : 0;
|
56 |
|
57 |
// Return if form id is not set and current user doesnot have export capability.
|
58 |
if ( ! isset( $form_id ) || ! current_user_can( 'export' ) ) {
|
@@ -66,7 +65,7 @@ class UR_Admin_Export_Users {
|
|
66 |
);
|
67 |
|
68 |
if ( count( $users ) === 0 ) {
|
69 |
-
echo '<div id="message" class="updated inline notice notice-error"><p><strong>' .
|
70 |
return;
|
71 |
}
|
72 |
|
@@ -75,31 +74,31 @@ class UR_Admin_Export_Users {
|
|
75 |
|
76 |
$form_name = str_replace( ' – ', '-', get_the_title( $form_id ) );
|
77 |
$form_name = str_replace( '–', '-', $form_name );
|
78 |
-
$form_name = strtolower( str_replace( ' ', '-', $form_name) );
|
79 |
$file_name = $form_name . '-' . current_time( 'Y-m-d_H:i:s' ) . '.csv';
|
80 |
|
81 |
if ( ob_get_contents() ) {
|
82 |
ob_clean();
|
83 |
}
|
84 |
|
85 |
-
// Force download
|
86 |
header( 'Content-Type: application/force-download' );
|
87 |
header( 'Content-Type: application/octet-stream' );
|
88 |
header( 'Content-Type: application/download' );
|
89 |
|
90 |
-
// Disposition / Encoding on response body
|
91 |
header( "Content-Disposition: attachment;filename={$file_name}" );
|
92 |
header( 'Content-Transfer-Encoding: binary' );
|
93 |
|
94 |
$handle = fopen( 'php://output', 'w' );
|
95 |
|
96 |
-
// Handle UTF-8 chars conversion for CSV
|
97 |
fprintf( $handle, chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) );
|
98 |
|
99 |
-
// Put the column headers
|
100 |
fputcsv( $handle, array_values( $columns ) );
|
101 |
|
102 |
-
// Put the row values
|
103 |
foreach ( $rows as $row ) {
|
104 |
fputcsv( $handle, $row );
|
105 |
}
|
@@ -159,7 +158,8 @@ class UR_Admin_Export_Users {
|
|
159 |
/**
|
160 |
* Generate rows for CSV export
|
161 |
*
|
162 |
-
* @param obj $users Users Data
|
|
|
163 |
* @return array $rows CSV export rows.
|
164 |
*/
|
165 |
public function generate_rows( $users, $form_id ) {
|
@@ -172,10 +172,10 @@ class UR_Admin_Export_Users {
|
|
172 |
continue;
|
173 |
}
|
174 |
|
175 |
-
$user_form_id
|
176 |
-
$user_status
|
177 |
$user_email_status = get_user_meta( $user->data->ID, 'ur_confirm_email', true );
|
178 |
-
$status
|
179 |
// If the user is not submitted by selected registration form.
|
180 |
if ( $user_form_id !== $form_id ) {
|
181 |
continue;
|
@@ -193,17 +193,17 @@ class UR_Admin_Export_Users {
|
|
193 |
unset( $user_extra_row[ $user_extra_data_key ] );
|
194 |
}
|
195 |
|
196 |
-
$field_data = ur_get_field_data_by_field_name($form_id
|
197 |
if ( isset( $field_data['field_key'] ) && 'file' === $field_data['field_key'] ) {
|
198 |
$attachment_ids = explode( ',', $user_extra_data );
|
199 |
-
$file_link
|
200 |
foreach ( $attachment_ids as $attachment_id ) {
|
201 |
$file_path = wp_get_attachment_url( $attachment_id );
|
202 |
if ( $file_path ) {
|
203 |
-
$file_link .= esc_url($file_path) . ' ; ';
|
204 |
}
|
205 |
}
|
206 |
-
$user_extra_row[$user_extra_data_key]
|
207 |
}
|
208 |
}
|
209 |
|
@@ -237,7 +237,7 @@ class UR_Admin_Export_Users {
|
|
237 |
// Get user default row.
|
238 |
$user_default_row = array(
|
239 |
'user_role' => is_array( $user->roles ) ? implode( ',', $user->roles ) : $user->roles,
|
240 |
-
'ur_user_status' => is_array( $status) ? implode( ',', $status ) : $status,
|
241 |
'date_created' => $user->data->user_registered,
|
242 |
'date_created_gmt' => get_gmt_from_date( $user->data->user_registered ),
|
243 |
);
|
2 |
/**
|
3 |
* Export Users
|
4 |
*
|
|
|
|
|
5 |
* @package UserRegistration/Admin
|
6 |
* @since 1.5.0
|
7 |
*/
|
36 |
/**
|
37 |
* Exports users data along with extra information in CSV format.
|
38 |
*
|
39 |
+
* @param int $form_id Form ID.
|
40 |
* @return void
|
41 |
*/
|
42 |
public function export_csv( $form_id ) {
|
47 |
}
|
48 |
|
49 |
// Nonce check.
|
50 |
+
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'user-registration-settings' ) ) {
|
51 |
+
die( esc_html__( 'Action failed. Please refresh the page and retry.', 'user-registration' ) );
|
52 |
}
|
53 |
|
54 |
+
$form_id = isset( $_POST['export_users'] ) ? wp_unslash( $_POST['export_users'] ) : 0;
|
55 |
|
56 |
// Return if form id is not set and current user doesnot have export capability.
|
57 |
if ( ! isset( $form_id ) || ! current_user_can( 'export' ) ) {
|
65 |
);
|
66 |
|
67 |
if ( count( $users ) === 0 ) {
|
68 |
+
echo '<div id="message" class="updated inline notice notice-error"><p><strong>' . esc_html__( 'No users found with this form id.', 'user-registration' ) . '</strong></p></div>';
|
69 |
return;
|
70 |
}
|
71 |
|
74 |
|
75 |
$form_name = str_replace( ' – ', '-', get_the_title( $form_id ) );
|
76 |
$form_name = str_replace( '–', '-', $form_name );
|
77 |
+
$form_name = strtolower( str_replace( ' ', '-', $form_name ) );
|
78 |
$file_name = $form_name . '-' . current_time( 'Y-m-d_H:i:s' ) . '.csv';
|
79 |
|
80 |
if ( ob_get_contents() ) {
|
81 |
ob_clean();
|
82 |
}
|
83 |
|
84 |
+
// Force download.
|
85 |
header( 'Content-Type: application/force-download' );
|
86 |
header( 'Content-Type: application/octet-stream' );
|
87 |
header( 'Content-Type: application/download' );
|
88 |
|
89 |
+
// Disposition / Encoding on response body.
|
90 |
header( "Content-Disposition: attachment;filename={$file_name}" );
|
91 |
header( 'Content-Transfer-Encoding: binary' );
|
92 |
|
93 |
$handle = fopen( 'php://output', 'w' );
|
94 |
|
95 |
+
// Handle UTF-8 chars conversion for CSV.
|
96 |
fprintf( $handle, chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) );
|
97 |
|
98 |
+
// Put the column headers.
|
99 |
fputcsv( $handle, array_values( $columns ) );
|
100 |
|
101 |
+
// Put the row values.
|
102 |
foreach ( $rows as $row ) {
|
103 |
fputcsv( $handle, $row );
|
104 |
}
|
158 |
/**
|
159 |
* Generate rows for CSV export
|
160 |
*
|
161 |
+
* @param obj $users Users Data.
|
162 |
+
* @param int $form_id Form ID.
|
163 |
* @return array $rows CSV export rows.
|
164 |
*/
|
165 |
public function generate_rows( $users, $form_id ) {
|
172 |
continue;
|
173 |
}
|
174 |
|
175 |
+
$user_form_id = get_user_meta( $user->data->ID, 'ur_form_id', true );
|
176 |
+
$user_status = get_user_meta( $user->data->ID, 'ur_user_status', true );
|
177 |
$user_email_status = get_user_meta( $user->data->ID, 'ur_confirm_email', true );
|
178 |
+
$status = ur_get_user_status( $user_status, $user_email_status );
|
179 |
// If the user is not submitted by selected registration form.
|
180 |
if ( $user_form_id !== $form_id ) {
|
181 |
continue;
|
193 |
unset( $user_extra_row[ $user_extra_data_key ] );
|
194 |
}
|
195 |
|
196 |
+
$field_data = ur_get_field_data_by_field_name( $form_id, $user_extra_data_key );
|
197 |
if ( isset( $field_data['field_key'] ) && 'file' === $field_data['field_key'] ) {
|
198 |
$attachment_ids = explode( ',', $user_extra_data );
|
199 |
+
$file_link = '';
|
200 |
foreach ( $attachment_ids as $attachment_id ) {
|
201 |
$file_path = wp_get_attachment_url( $attachment_id );
|
202 |
if ( $file_path ) {
|
203 |
+
$file_link .= esc_url( $file_path ) . ' ; ';
|
204 |
}
|
205 |
}
|
206 |
+
$user_extra_row[ $user_extra_data_key ] = $file_link;
|
207 |
}
|
208 |
}
|
209 |
|
237 |
// Get user default row.
|
238 |
$user_default_row = array(
|
239 |
'user_role' => is_array( $user->roles ) ? implode( ',', $user->roles ) : $user->roles,
|
240 |
+
'ur_user_status' => is_array( $status ) ? implode( ',', $status ) : $status,
|
241 |
'date_created' => $user->data->user_registered,
|
242 |
'date_created_gmt' => get_gmt_from_date( $user->data->user_registered ),
|
243 |
);
|
includes/admin/class-ur-admin-form-modal.php
CHANGED
@@ -1,13 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Functionality related to the admin TinyMCE editor.
|
5 |
*
|
6 |
* @class UR_Admin_Form_Modal
|
7 |
* @version 1.0.0
|
8 |
* @package UserRegistration/Admin
|
9 |
-
* @category Admin
|
10 |
-
* @author WPEverest
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -16,6 +13,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
|
17 |
if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
18 |
|
|
|
|
|
|
|
19 |
class UR_Admin_Form_Modal {
|
20 |
|
21 |
/**
|
@@ -31,15 +31,15 @@ if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
|
31 |
*
|
32 |
* @since 1.0.0
|
33 |
*
|
34 |
-
* @param string $editor_id
|
35 |
*/
|
36 |
-
function media_button( $editor_id ) {
|
37 |
|
38 |
if ( ! apply_filters( 'ur_display_media_button', is_admin(), $editor_id ) ) {
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
-
// Setup the icon - currently using a dashicon
|
43 |
$icon = '<span class="dashicons dashicons-list-view" style="line-height:25px; font-size:16px"></span>';
|
44 |
$login_icon = '<span class="dashicons dashicons-migrate" style="line-height:25px; font-size:16px"></span>';
|
45 |
|
@@ -47,22 +47,25 @@ if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
|
47 |
'<a href="#" class="button ur-insert-form-button" data-editor="%s" title="%s">%s %s</a>',
|
48 |
esc_attr( $editor_id ),
|
49 |
esc_attr__( 'Add User Registration Form', 'user-registration' ),
|
50 |
-
$icon,
|
51 |
-
|
52 |
);
|
53 |
|
54 |
add_action( 'admin_footer', array( $this, 'shortcode_modal' ) );
|
55 |
}
|
56 |
|
57 |
-
|
|
|
|
|
|
|
58 |
|
59 |
?>
|
60 |
-
|
61 |
<div id="ur-modal-wrap" style="display: none">
|
62 |
<form id="ur-modal" tabindex="-1">
|
63 |
<div id="ur-modal-title">
|
64 |
-
<?php
|
65 |
-
<button type="button" id="ur-modal-close"><span class="screen-reader-text"><?php
|
66 |
</div>
|
67 |
<div id="ur-modal-inner">
|
68 |
<div id="ur-modal-options">
|
@@ -70,16 +73,16 @@ if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
|
70 |
$forms = ur_get_all_user_registration_form();
|
71 |
|
72 |
if ( ! empty( $forms ) ) {
|
73 |
-
printf( '<p><label for="ur-modal-select-form">%s</label></p>',
|
74 |
echo '<select id="ur-modal-select-form">';
|
75 |
foreach ( $forms as $form => $form_value ) {
|
76 |
-
printf( '<option value="%d">%s</option>', $form, esc_html( $form_value ) );
|
77 |
}
|
78 |
echo '</select>';
|
79 |
|
80 |
} else {
|
81 |
echo '<p>';
|
82 |
-
|
83 |
echo '</p>';
|
84 |
}
|
85 |
?>
|
@@ -87,11 +90,11 @@ if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
|
87 |
</div>
|
88 |
<div class="submitbox">
|
89 |
<div id="ur-modal-cancel">
|
90 |
-
<a class="submitdelete deletion" href="#"><?php
|
91 |
</div>
|
92 |
<?php if ( ! empty( $forms ) ) : ?>
|
93 |
<div id="ur-modal-update">
|
94 |
-
<button class="button button-primary" id="ur-modal-submit"><?php
|
95 |
</div>
|
96 |
<?php endif; ?>
|
97 |
</div>
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Functionality related to the admin TinyMCE editor.
|
4 |
*
|
5 |
* @class UR_Admin_Form_Modal
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
|
14 |
if ( ! class_exists( 'UR_Admin_Form_Modal', false ) ) :
|
15 |
|
16 |
+
/**
|
17 |
+
* UR_Admin_Form_Modal Class.
|
18 |
+
*/
|
19 |
class UR_Admin_Form_Modal {
|
20 |
|
21 |
/**
|
31 |
*
|
32 |
* @since 1.0.0
|
33 |
*
|
34 |
+
* @param string $editor_id Editor ID.
|
35 |
*/
|
36 |
+
public function media_button( $editor_id ) {
|
37 |
|
38 |
if ( ! apply_filters( 'ur_display_media_button', is_admin(), $editor_id ) ) {
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
+
// Setup the icon - currently using a dashicon.
|
43 |
$icon = '<span class="dashicons dashicons-list-view" style="line-height:25px; font-size:16px"></span>';
|
44 |
$login_icon = '<span class="dashicons dashicons-migrate" style="line-height:25px; font-size:16px"></span>';
|
45 |
|
47 |
'<a href="#" class="button ur-insert-form-button" data-editor="%s" title="%s">%s %s</a>',
|
48 |
esc_attr( $editor_id ),
|
49 |
esc_attr__( 'Add User Registration Form', 'user-registration' ),
|
50 |
+
esc_html( $icon ),
|
51 |
+
esc_html__( 'Add Registration Form', 'user-registration' )
|
52 |
);
|
53 |
|
54 |
add_action( 'admin_footer', array( $this, 'shortcode_modal' ) );
|
55 |
}
|
56 |
|
57 |
+
/**
|
58 |
+
* Shortcode Modal
|
59 |
+
*/
|
60 |
+
public function shortcode_modal() {
|
61 |
|
62 |
?>
|
63 |
+
<div id="ur-modal-backdrop" style="display: none"></div>
|
64 |
<div id="ur-modal-wrap" style="display: none">
|
65 |
<form id="ur-modal" tabindex="-1">
|
66 |
<div id="ur-modal-title">
|
67 |
+
<?php esc_html_e( 'Insert Form', 'user-registration' ); ?>
|
68 |
+
<button type="button" id="ur-modal-close"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'user-registration' ); ?></span></button>
|
69 |
</div>
|
70 |
<div id="ur-modal-inner">
|
71 |
<div id="ur-modal-options">
|
73 |
$forms = ur_get_all_user_registration_form();
|
74 |
|
75 |
if ( ! empty( $forms ) ) {
|
76 |
+
printf( '<p><label for="ur-modal-select-form">%s</label></p>', esc_html__( 'Select a form below to insert', 'user-registration' ) );
|
77 |
echo '<select id="ur-modal-select-form">';
|
78 |
foreach ( $forms as $form => $form_value ) {
|
79 |
+
printf( '<option value="%d">%s</option>', esc_attr( $form ), esc_html( $form_value ) );
|
80 |
}
|
81 |
echo '</select>';
|
82 |
|
83 |
} else {
|
84 |
echo '<p>';
|
85 |
+
echo esc_html__( 'Whoops, you haven\'t created a form yet.', 'user-registration' );
|
86 |
echo '</p>';
|
87 |
}
|
88 |
?>
|
90 |
</div>
|
91 |
<div class="submitbox">
|
92 |
<div id="ur-modal-cancel">
|
93 |
+
<a class="submitdelete deletion" href="#"><?php esc_html_e( 'Cancel', 'user-registration' ); ?></a>
|
94 |
</div>
|
95 |
<?php if ( ! empty( $forms ) ) : ?>
|
96 |
<div id="ur-modal-update">
|
97 |
+
<button class="button button-primary" id="ur-modal-submit"><?php esc_html_e( 'Add Form', 'user-registration' ); ?></button>
|
98 |
</div>
|
99 |
<?php endif; ?>
|
100 |
</div>
|
includes/admin/class-ur-admin-import-export-forms.php
CHANGED
@@ -47,11 +47,11 @@ class UR_Admin_Import_Export_Forms {
|
|
47 |
}
|
48 |
|
49 |
// Nonce check.
|
50 |
-
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'user-registration-settings' ) ) {
|
51 |
-
die(
|
52 |
}
|
53 |
|
54 |
-
$form_id = isset( $_POST['formid'] ) ? $_POST['formid'] : 0;
|
55 |
|
56 |
// Return if form id is not set and current user doesnot have export capability.
|
57 |
if ( ! isset( $form_id ) || ! current_user_can( 'export' ) ) {
|
@@ -82,7 +82,6 @@ class UR_Admin_Import_Export_Forms {
|
|
82 |
ob_clean();
|
83 |
}
|
84 |
|
85 |
-
$export_json = wp_json_encode( $export_data );
|
86 |
// Force download.
|
87 |
header( 'Content-Type: application/force-download' );
|
88 |
|
@@ -90,7 +89,7 @@ class UR_Admin_Import_Export_Forms {
|
|
90 |
header( "Content-Disposition: attachment;filename={$file_name}" );
|
91 |
header( 'Content-type: application/json' );
|
92 |
|
93 |
-
echo $
|
94 |
exit();
|
95 |
}
|
96 |
|
@@ -132,7 +131,7 @@ class UR_Admin_Import_Export_Forms {
|
|
132 |
// Check for $_FILES set or not.
|
133 |
if ( isset( $_FILES['jsonfile'] ) ) {
|
134 |
|
135 |
-
$filename = esc_html( sanitize_text_field( $_FILES['jsonfile']['name'] ) ); // Get file name.
|
136 |
$ext = pathinfo( $filename, PATHINFO_EXTENSION ); // Get file extention.
|
137 |
|
138 |
// Check for file format.
|
47 |
}
|
48 |
|
49 |
// Nonce check.
|
50 |
+
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'user-registration-settings' ) ) {
|
51 |
+
die( esc_html__( 'Action failed. Please refresh the page and retry.', 'user-registration' ) );
|
52 |
}
|
53 |
|
54 |
+
$form_id = isset( $_POST['formid'] ) ? absint( $_POST['formid'] ) : 0;
|
55 |
|
56 |
// Return if form id is not set and current user doesnot have export capability.
|
57 |
if ( ! isset( $form_id ) || ! current_user_can( 'export' ) ) {
|
82 |
ob_clean();
|
83 |
}
|
84 |
|
|
|
85 |
// Force download.
|
86 |
header( 'Content-Type: application/force-download' );
|
87 |
|
89 |
header( "Content-Disposition: attachment;filename={$file_name}" );
|
90 |
header( 'Content-type: application/json' );
|
91 |
|
92 |
+
echo wp_json_encode( $export_data );
|
93 |
exit();
|
94 |
}
|
95 |
|
131 |
// Check for $_FILES set or not.
|
132 |
if ( isset( $_FILES['jsonfile'] ) ) {
|
133 |
|
134 |
+
$filename = isset( $_FILES['jsonfile']['name'] ) ? esc_html( sanitize_text_field( wp_unslash( $_FILES['jsonfile']['name'] ) ) ) : ''; // Get file name.
|
135 |
$ext = pathinfo( $filename, PATHINFO_EXTENSION ); // Get file extention.
|
136 |
|
137 |
// Check for file format.
|
includes/admin/class-ur-admin-menus.php
CHANGED
@@ -5,8 +5,6 @@
|
|
5 |
* @class UR_Admin_Menus
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
8 |
-
* @category Admin
|
9 |
-
* @author WPEverest
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -35,7 +33,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
35 |
add_action( 'admin_menu', array( $this, 'addons_menu' ), 70 );
|
36 |
}
|
37 |
|
38 |
-
// Set screens
|
39 |
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
|
40 |
|
41 |
// Add endpoints custom URLs in Appearance > Menus > Pages.
|
@@ -46,6 +44,9 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
46 |
add_action( 'user_registration_extra_fields', array( $this, 'add_upgradable_extra_fields' ) );
|
47 |
}
|
48 |
|
|
|
|
|
|
|
49 |
public function add_upgradable_other_fields() {
|
50 |
$fields = array(
|
51 |
array(
|
@@ -78,6 +79,9 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
78 |
}
|
79 |
}
|
80 |
|
|
|
|
|
|
|
81 |
public function add_upgradable_extra_fields() {
|
82 |
$field_sections = array(
|
83 |
array(
|
@@ -292,7 +296,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
292 |
$fields[ $i ]['plan'] = $plan;
|
293 |
}
|
294 |
|
295 |
-
echo '<h2 class="ur-toggle-heading">' .
|
296 |
echo '<ul id = "ur-upgradables" class="ur-registered-list" > ';
|
297 |
$this->render_upgradable_fields( $fields );
|
298 |
echo '</ul >';
|
@@ -302,6 +306,8 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
302 |
|
303 |
/**
|
304 |
* Render multiple upgradable fields.
|
|
|
|
|
305 |
*/
|
306 |
public function render_upgradable_fields( $fields ) {
|
307 |
foreach ( $fields as $field ) {
|
@@ -311,6 +317,8 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
311 |
|
312 |
/**
|
313 |
* Render an upgradable field.
|
|
|
|
|
314 |
*/
|
315 |
public function render_upgradable_field( $args ) {
|
316 |
$id = $args['id'];
|
@@ -318,7 +326,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
318 |
$label = $args['label'];
|
319 |
$plan = isset( $args['plan'] ) ? $args['plan'] : '';
|
320 |
|
321 |
-
echo '<li id="' . $id . '_list " class="ur-registered-item ur-upgradable-field ui-draggable-disabled" data-field-id="' . $id . '" data-plan="' . $plan . '"><span class="' . $icon . '"></span>' . $label . '</li>';
|
322 |
}
|
323 |
|
324 |
/**
|
@@ -341,7 +349,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
341 |
* Add menu items.
|
342 |
*/
|
343 |
public function admin_menu() {
|
344 |
-
$registration_page = add_menu_page(
|
345 |
|
346 |
add_action( 'load-' . $registration_page, array( $this, 'registration_page_init' ) );
|
347 |
}
|
@@ -352,7 +360,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
352 |
public function registration_page_init() {
|
353 |
global $registration_table_list;
|
354 |
|
355 |
-
if ( ! isset( $_GET['add-new-registration'] ) ) {
|
356 |
$registration_table_list = new UR_Admin_Registrations_Table_List();
|
357 |
$registration_table_list->process_actions();
|
358 |
|
@@ -437,6 +445,10 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
437 |
|
438 |
/**
|
439 |
* Validate screen options on update.
|
|
|
|
|
|
|
|
|
440 |
*/
|
441 |
public function set_screen_option( $status, $option, $value ) {
|
442 |
if ( in_array( $option, array( 'user_registration_per_page' ), true ) ) {
|
@@ -473,7 +485,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
473 |
);
|
474 |
}
|
475 |
|
476 |
-
// Forms view
|
477 |
include_once dirname( __FILE__ ) . '/views/html-admin-page-forms.php';
|
478 |
}
|
479 |
|
@@ -546,19 +558,19 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
546 |
<li>
|
547 |
<label class="menu-item-title">
|
548 |
<input type="checkbox" class="menu-item-checkbox"
|
549 |
-
|
550 |
-
|
551 |
</label>
|
552 |
<input type="hidden" class="menu-item-type"
|
553 |
-
|
554 |
<input type="hidden" class="menu-item-title"
|
555 |
-
|
556 |
-
|
557 |
<input type="hidden" class="menu-item-url"
|
558 |
-
|
559 |
-
|
560 |
<input type="hidden" class="menu-item-classes"
|
561 |
-
|
562 |
</li>
|
563 |
<?php
|
564 |
$i --;
|
@@ -568,13 +580,13 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
568 |
</div>
|
569 |
<p class="button-controls">
|
570 |
<span class="list-controls">
|
571 |
-
<a href="<?php echo admin_url( 'nav-menus.php?page-tab=all&selectall=1#posttype-user-registration-endpoints' ); ?>"
|
572 |
-
|
573 |
</span>
|
574 |
<span class="add-to-menu">
|
575 |
<input type="submit" class="button-secondary submit-add-to-menu right"
|
576 |
-
|
577 |
-
|
578 |
<span class="spinner"></span>
|
579 |
</span>
|
580 |
</p>
|
@@ -582,6 +594,13 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
582 |
<?php
|
583 |
}
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
private function get_edit_form_field( $form_data ) {
|
586 |
|
587 |
if ( ! empty( $form_data ) ) {
|
@@ -644,18 +663,36 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
644 |
$grid_two = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M17,4H2V28H30V4ZM4,26V6H15V26Zm24,0H17V6H28Z"/></svg>';
|
645 |
$grid_three = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M22,4H2V28H30V4ZM4,26V6h6V26Zm8,0V6h8V26Zm16,0H22V6h6Z"/></svg>';
|
646 |
|
647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
?>
|
649 |
|
650 |
<div class="ur-grids">
|
651 |
<button type="button" class="ur-edit-grid">
|
652 |
<?php
|
653 |
if ( 1 === $grid_count ) {
|
654 |
-
echo $grid_one
|
655 |
} elseif ( 2 === $grid_count ) {
|
656 |
-
echo $grid_two
|
657 |
} elseif ( 3 === $grid_count ) {
|
658 |
-
echo $grid_three
|
659 |
}
|
660 |
?>
|
661 |
</button>
|
@@ -663,13 +700,16 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
663 |
<div class="ur-toggle-grid-content" style="display:none">
|
664 |
<small>Select the grid column.</small>
|
665 |
<div class="ur-grid-selector" data-grid = "1">
|
666 |
-
<?php
|
|
|
|
|
|
|
667 |
</div>
|
668 |
<div class="ur-grid-selector" data-grid = "2">
|
669 |
-
<?php echo $grid_two
|
670 |
</div>
|
671 |
<div class="ur-grid-selector" data-grid = "3">
|
672 |
-
<?php echo $grid_three
|
673 |
</div>
|
674 |
</div>
|
675 |
</div>
|
@@ -683,7 +723,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
683 |
|
684 |
$grid_id ++;
|
685 |
|
686 |
-
echo '<div ur-grid-id="' . $grid_id . '" class="ur-grid-list-item ui-sortable" style="width: 48%; min-height: 70px;">';
|
687 |
|
688 |
foreach ( $grid_lists as $single_field ) {
|
689 |
|
@@ -702,7 +742,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
702 |
|
703 |
if ( count( $grid_lists ) == 0 ) {
|
704 |
echo '<div class="user-registration-dragged-me">
|
705 |
-
<div class="user-registration-dragged-me-text"><p>' .
|
706 |
</div>';
|
707 |
}
|
708 |
|
@@ -712,17 +752,23 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
712 |
echo '</div>';
|
713 |
echo '</div>';
|
714 |
|
715 |
-
}
|
716 |
-
echo '<button type="button" class="button button-primary dashicons dashicons-plus-alt ur-add-new-row" data-total-rows="' . $last_id . '">' .
|
717 |
echo '</div>';
|
718 |
echo '</div>';
|
719 |
echo '</div>';
|
720 |
}
|
721 |
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
public static function get_admin_field( $single_field ) {
|
723 |
|
724 |
if ( empty( $single_field->field_key ) ) {
|
725 |
-
throw new Exception(
|
726 |
}
|
727 |
|
728 |
$class_name = 'UR_Form_Field_' . ucwords( $single_field->field_key );
|
@@ -739,6 +785,9 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
739 |
/* Backward compat end */
|
740 |
}
|
741 |
|
|
|
|
|
|
|
742 |
private function get_registered_user_form_fields() {
|
743 |
|
744 |
$registered_form_fields = ur_get_user_field_only();
|
@@ -752,6 +801,9 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
752 |
echo ' </ul > ';
|
753 |
}
|
754 |
|
|
|
|
|
|
|
755 |
private function get_registered_other_form_fields() {
|
756 |
|
757 |
$registered_form_fields = ur_get_other_form_fields();
|
@@ -767,12 +819,17 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
767 |
echo ' </ul > ';
|
768 |
}
|
769 |
|
|
|
|
|
|
|
|
|
|
|
770 |
public function ur_get_list( $field ) {
|
771 |
|
772 |
$class_name = ur_load_form_field_class( $field );
|
773 |
|
774 |
-
if (
|
775 |
-
echo $class_name::get_instance()->get_registered_admin_fields();
|
776 |
}
|
777 |
|
778 |
}
|
5 |
* @class UR_Admin_Menus
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
33 |
add_action( 'admin_menu', array( $this, 'addons_menu' ), 70 );
|
34 |
}
|
35 |
|
36 |
+
// Set screens.
|
37 |
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
|
38 |
|
39 |
// Add endpoints custom URLs in Appearance > Menus > Pages.
|
44 |
add_action( 'user_registration_extra_fields', array( $this, 'add_upgradable_extra_fields' ) );
|
45 |
}
|
46 |
|
47 |
+
/**
|
48 |
+
* Add Upgradable other fields.
|
49 |
+
*/
|
50 |
public function add_upgradable_other_fields() {
|
51 |
$fields = array(
|
52 |
array(
|
79 |
}
|
80 |
}
|
81 |
|
82 |
+
/**
|
83 |
+
* Add Upgradable extra fields.
|
84 |
+
*/
|
85 |
public function add_upgradable_extra_fields() {
|
86 |
$field_sections = array(
|
87 |
array(
|
296 |
$fields[ $i ]['plan'] = $plan;
|
297 |
}
|
298 |
|
299 |
+
echo '<h2 class="ur-toggle-heading">' . esc_html( $section['section_title'] ) . '</h2><hr/>';
|
300 |
echo '<ul id = "ur-upgradables" class="ur-registered-list" > ';
|
301 |
$this->render_upgradable_fields( $fields );
|
302 |
echo '</ul >';
|
306 |
|
307 |
/**
|
308 |
* Render multiple upgradable fields.
|
309 |
+
*
|
310 |
+
* @param array $fields Field.
|
311 |
*/
|
312 |
public function render_upgradable_fields( $fields ) {
|
313 |
foreach ( $fields as $field ) {
|
317 |
|
318 |
/**
|
319 |
* Render an upgradable field.
|
320 |
+
*
|
321 |
+
* @param array $args Args Data.
|
322 |
*/
|
323 |
public function render_upgradable_field( $args ) {
|
324 |
$id = $args['id'];
|
326 |
$label = $args['label'];
|
327 |
$plan = isset( $args['plan'] ) ? $args['plan'] : '';
|
328 |
|
329 |
+
echo '<li id="' . esc_attr( $id ) . '_list " class="ur-registered-item ur-upgradable-field ui-draggable-disabled" data-field-id="' . esc_attr( $id ) . '" data-plan="' . esc_attr( $plan ) . '"><span class="' . esc_attr( $icon ) . '"></span>' . esc_html( $label ) . '</li>';
|
330 |
}
|
331 |
|
332 |
/**
|
349 |
* Add menu items.
|
350 |
*/
|
351 |
public function admin_menu() {
|
352 |
+
$registration_page = add_menu_page( 'User Registration', 'User Registration', 'manage_user_registration', 'user-registration', array( $this, 'registration_page' ), $this->get_icon_svg(), '55.8' );
|
353 |
|
354 |
add_action( 'load-' . $registration_page, array( $this, 'registration_page_init' ) );
|
355 |
}
|
360 |
public function registration_page_init() {
|
361 |
global $registration_table_list;
|
362 |
|
363 |
+
if ( ! isset( $_GET['add-new-registration'] ) ) {
|
364 |
$registration_table_list = new UR_Admin_Registrations_Table_List();
|
365 |
$registration_table_list->process_actions();
|
366 |
|
445 |
|
446 |
/**
|
447 |
* Validate screen options on update.
|
448 |
+
*
|
449 |
+
* @param mixed $status Status.
|
450 |
+
* @param mixed $option Option.
|
451 |
+
* @param mixed $value Value.
|
452 |
*/
|
453 |
public function set_screen_option( $status, $option, $value ) {
|
454 |
if ( in_array( $option, array( 'user_registration_per_page' ), true ) ) {
|
485 |
);
|
486 |
}
|
487 |
|
488 |
+
// Forms view.
|
489 |
include_once dirname( __FILE__ ) . '/views/html-admin-page-forms.php';
|
490 |
}
|
491 |
|
558 |
<li>
|
559 |
<label class="menu-item-title">
|
560 |
<input type="checkbox" class="menu-item-checkbox"
|
561 |
+
name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-object-id]"
|
562 |
+
value="<?php echo esc_attr( $i ); ?>"/> <?php echo esc_html( $value ); ?>
|
563 |
</label>
|
564 |
<input type="hidden" class="menu-item-type"
|
565 |
+
name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-type]" value="custom"/>
|
566 |
<input type="hidden" class="menu-item-title"
|
567 |
+
name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-title]"
|
568 |
+
value="<?php echo esc_html( $value ); ?>"/>
|
569 |
<input type="hidden" class="menu-item-url"
|
570 |
+
name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-url]"
|
571 |
+
value="<?php echo esc_url( ur_get_account_endpoint_url( $key ) ); ?>"/>
|
572 |
<input type="hidden" class="menu-item-classes"
|
573 |
+
name="menu-item[<?php echo esc_attr( $i ); ?>][menu-item-classes]"/>
|
574 |
</li>
|
575 |
<?php
|
576 |
$i --;
|
580 |
</div>
|
581 |
<p class="button-controls">
|
582 |
<span class="list-controls">
|
583 |
+
<a href="<?php echo esc_url( admin_url( 'nav-menus.php?page-tab=all&selectall=1#posttype-user-registration-endpoints' ) ); ?>"
|
584 |
+
class="select-all"><?php esc_html_e( 'Select all', 'user-registration' ); ?></a>
|
585 |
</span>
|
586 |
<span class="add-to-menu">
|
587 |
<input type="submit" class="button-secondary submit-add-to-menu right"
|
588 |
+
value="<?php esc_attr_e( 'Add to menu', 'user-registration' ); ?>"
|
589 |
+
name="add-post-type-menu-item" id="submit-posttype-user-registration-endpoints">
|
590 |
<span class="spinner"></span>
|
591 |
</span>
|
592 |
</p>
|
594 |
<?php
|
595 |
}
|
596 |
|
597 |
+
/**
|
598 |
+
* Get Edit Form Field.
|
599 |
+
*
|
600 |
+
* @param object $form_data Form Data.
|
601 |
+
*
|
602 |
+
* @throws Exception Throws exception if error in json.
|
603 |
+
*/
|
604 |
private function get_edit_form_field( $form_data ) {
|
605 |
|
606 |
if ( ! empty( $form_data ) ) {
|
663 |
$grid_two = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M17,4H2V28H30V4ZM4,26V6H15V26Zm24,0H17V6H28Z"/></svg>';
|
664 |
$grid_three = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M22,4H2V28H30V4ZM4,26V6h6V26Zm8,0V6h8V26Zm16,0H22V6h6Z"/></svg>';
|
665 |
|
666 |
+
$svg_args = array(
|
667 |
+
'svg' => array(
|
668 |
+
'class' => true,
|
669 |
+
'aria-hidden' => true,
|
670 |
+
'aria-labelledby' => true,
|
671 |
+
'role' => true,
|
672 |
+
'xmlns' => true,
|
673 |
+
'width' => true,
|
674 |
+
'height' => true,
|
675 |
+
'viewbox' => true, // <= Must be lower case!
|
676 |
+
),
|
677 |
+
'g' => array( 'fill' => true ),
|
678 |
+
'title' => array( 'title' => true ),
|
679 |
+
'path' => array(
|
680 |
+
'd' => true,
|
681 |
+
'fill' => true,
|
682 |
+
),
|
683 |
+
);
|
684 |
+
echo '<div class="ur-single-row" data-row-id="' . esc_attr( absint( $row_id ) ) . '">';
|
685 |
?>
|
686 |
|
687 |
<div class="ur-grids">
|
688 |
<button type="button" class="ur-edit-grid">
|
689 |
<?php
|
690 |
if ( 1 === $grid_count ) {
|
691 |
+
echo wp_kses( $grid_one, $svg_args );
|
692 |
} elseif ( 2 === $grid_count ) {
|
693 |
+
echo wp_kses( $grid_two, $svg_args );
|
694 |
} elseif ( 3 === $grid_count ) {
|
695 |
+
echo wp_kses( $grid_three, $svg_args );
|
696 |
}
|
697 |
?>
|
698 |
</button>
|
700 |
<div class="ur-toggle-grid-content" style="display:none">
|
701 |
<small>Select the grid column.</small>
|
702 |
<div class="ur-grid-selector" data-grid = "1">
|
703 |
+
<?php
|
704 |
+
|
705 |
+
echo wp_kses( $grid_one, $svg_args );
|
706 |
+
?>
|
707 |
</div>
|
708 |
<div class="ur-grid-selector" data-grid = "2">
|
709 |
+
<?php echo wp_kses( $grid_two, $svg_args ); ?>
|
710 |
</div>
|
711 |
<div class="ur-grid-selector" data-grid = "3">
|
712 |
+
<?php echo wp_kses( $grid_three, $svg_args ); ?>
|
713 |
</div>
|
714 |
</div>
|
715 |
</div>
|
723 |
|
724 |
$grid_id ++;
|
725 |
|
726 |
+
echo '<div ur-grid-id="' . esc_attr( $grid_id ) . '" class="ur-grid-list-item ui-sortable" style="width: 48%; min-height: 70px;">';
|
727 |
|
728 |
foreach ( $grid_lists as $single_field ) {
|
729 |
|
742 |
|
743 |
if ( count( $grid_lists ) == 0 ) {
|
744 |
echo '<div class="user-registration-dragged-me">
|
745 |
+
<div class="user-registration-dragged-me-text"><p>' . esc_html__( 'Drag your first form item here.', 'user-registration' ) . '</p></div>
|
746 |
</div>';
|
747 |
}
|
748 |
|
752 |
echo '</div>';
|
753 |
echo '</div>';
|
754 |
|
755 |
+
}
|
756 |
+
echo '<button type="button" class="button button-primary dashicons dashicons-plus-alt ur-add-new-row" data-total-rows="' . esc_attr( $last_id ) . '">' . esc_html__( 'Add New', 'user-registration' ) . '</button>';
|
757 |
echo '</div>';
|
758 |
echo '</div>';
|
759 |
echo '</div>';
|
760 |
}
|
761 |
|
762 |
+
/**
|
763 |
+
* Get admin field.
|
764 |
+
*
|
765 |
+
* @param object $single_field Single field.
|
766 |
+
* @throws Exception Throw exception if empty form data.
|
767 |
+
*/
|
768 |
public static function get_admin_field( $single_field ) {
|
769 |
|
770 |
if ( empty( $single_field->field_key ) ) {
|
771 |
+
throw new Exception( esc_html__( 'Empty form data', 'user-registration' ) );
|
772 |
}
|
773 |
|
774 |
$class_name = 'UR_Form_Field_' . ucwords( $single_field->field_key );
|
785 |
/* Backward compat end */
|
786 |
}
|
787 |
|
788 |
+
/**
|
789 |
+
* Get registered user form fields.
|
790 |
+
*/
|
791 |
private function get_registered_user_form_fields() {
|
792 |
|
793 |
$registered_form_fields = ur_get_user_field_only();
|
801 |
echo ' </ul > ';
|
802 |
}
|
803 |
|
804 |
+
/**
|
805 |
+
* Get Registered other form field.
|
806 |
+
*/
|
807 |
private function get_registered_other_form_fields() {
|
808 |
|
809 |
$registered_form_fields = ur_get_other_form_fields();
|
819 |
echo ' </ul > ';
|
820 |
}
|
821 |
|
822 |
+
/**
|
823 |
+
* Get Admin field List.
|
824 |
+
*
|
825 |
+
* @param mixed $field Fields.
|
826 |
+
*/
|
827 |
public function ur_get_list( $field ) {
|
828 |
|
829 |
$class_name = ur_load_form_field_class( $field );
|
830 |
|
831 |
+
if ( null !== $class_name ) {
|
832 |
+
echo wp_kses_post( $class_name::get_instance()->get_registered_admin_fields() );
|
833 |
}
|
834 |
|
835 |
}
|
includes/admin/class-ur-admin-notices.php
CHANGED
@@ -5,8 +5,6 @@
|
|
5 |
* @class UR_Admin_Notices
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
8 |
-
* @category Admin
|
9 |
-
* @author WPEverest
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -86,7 +84,7 @@ class UR_Admin_Notices {
|
|
86 |
/**
|
87 |
* Show a notice.
|
88 |
*
|
89 |
-
* @param string $name
|
90 |
*/
|
91 |
public static function add_notice( $name ) {
|
92 |
self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) );
|
@@ -95,7 +93,7 @@ class UR_Admin_Notices {
|
|
95 |
/**
|
96 |
* Remove a notice from being displayed.
|
97 |
*
|
98 |
-
* @param string $name
|
99 |
*/
|
100 |
public static function remove_notice( $name ) {
|
101 |
self::$notices = array_diff( self::get_notices(), array( $name ) );
|
@@ -105,11 +103,11 @@ class UR_Admin_Notices {
|
|
105 |
/**
|
106 |
* See if a notice is being shown.
|
107 |
*
|
108 |
-
* @param string $name
|
109 |
* @return boolean
|
110 |
*/
|
111 |
public static function has_notice( $name ) {
|
112 |
-
return in_array( $name, self::get_notices() );
|
113 |
}
|
114 |
|
115 |
/**
|
@@ -117,15 +115,15 @@ class UR_Admin_Notices {
|
|
117 |
*/
|
118 |
public static function hide_notices() {
|
119 |
if ( isset( $_GET['ur-hide-notice'] ) && isset( $_GET['_ur_notice_nonce'] ) ) {
|
120 |
-
if ( ! wp_verify_nonce( $_GET['_ur_notice_nonce'], 'user_registration_hide_notices_nonce' ) ) {
|
121 |
-
wp_die(
|
122 |
}
|
123 |
|
124 |
if ( ! current_user_can( 'manage_options' ) ) {
|
125 |
-
wp_die(
|
126 |
}
|
127 |
|
128 |
-
$hide_notice = sanitize_text_field( $_GET['ur-hide-notice'] );
|
129 |
self::remove_notice( $hide_notice );
|
130 |
do_action( 'user_registration_hide_' . $hide_notice . '_notice' );
|
131 |
}
|
@@ -140,7 +138,7 @@ class UR_Admin_Notices {
|
|
140 |
if ( $notices ) {
|
141 |
wp_enqueue_style( 'user-registration-activation', UR()->plugin_url() . '/assets/css/activation.css', array(), UR_VERSION );
|
142 |
|
143 |
-
// Add RTL support
|
144 |
wp_style_add_data( 'user-registration-activation', 'rtl', 'replace' );
|
145 |
|
146 |
foreach ( $notices as $notice ) {
|
@@ -166,7 +164,7 @@ class UR_Admin_Notices {
|
|
166 |
'add-new-registration',
|
167 |
'user-registration-settings',
|
168 |
'user-registration-email-templates',
|
169 |
-
'user-registration-mailchimp'
|
170 |
);
|
171 |
|
172 |
// Return on other than user registraion builder page.
|
@@ -186,13 +184,12 @@ class UR_Admin_Notices {
|
|
186 |
// Remove all notices except user registration plugins notices.
|
187 |
if ( ! strstr( $name, 'user_registration_' ) ) {
|
188 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
189 |
-
}
|
190 |
|
191 |
-
if( ! isset( $_REQUEST['tab'] ) || 'license' !== $_REQUEST['tab'] ) {
|
192 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
193 |
}
|
194 |
}
|
195 |
-
|
196 |
}
|
197 |
}
|
198 |
}
|
@@ -203,12 +200,12 @@ class UR_Admin_Notices {
|
|
203 |
/**
|
204 |
* Add a custom notice.
|
205 |
*
|
206 |
-
* @param string $name
|
207 |
-
* @param string $notice_html
|
208 |
*/
|
209 |
public static function add_custom_notice( $name, $notice_html ) {
|
210 |
self::add_notice( $name );
|
211 |
-
update_option( 'user_registration_admin_notice_' . $name, wp_kses_post( $notice_html ) );
|
212 |
}
|
213 |
|
214 |
/**
|
5 |
* @class UR_Admin_Notices
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
84 |
/**
|
85 |
* Show a notice.
|
86 |
*
|
87 |
+
* @param string $name Name.
|
88 |
*/
|
89 |
public static function add_notice( $name ) {
|
90 |
self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) );
|
93 |
/**
|
94 |
* Remove a notice from being displayed.
|
95 |
*
|
96 |
+
* @param string $name Name.
|
97 |
*/
|
98 |
public static function remove_notice( $name ) {
|
99 |
self::$notices = array_diff( self::get_notices(), array( $name ) );
|
103 |
/**
|
104 |
* See if a notice is being shown.
|
105 |
*
|
106 |
+
* @param string $name Name.
|
107 |
* @return boolean
|
108 |
*/
|
109 |
public static function has_notice( $name ) {
|
110 |
+
return in_array( $name, self::get_notices(), true );
|
111 |
}
|
112 |
|
113 |
/**
|
115 |
*/
|
116 |
public static function hide_notices() {
|
117 |
if ( isset( $_GET['ur-hide-notice'] ) && isset( $_GET['_ur_notice_nonce'] ) ) {
|
118 |
+
if ( ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_ur_notice_nonce'] ) ), 'user_registration_hide_notices_nonce' ) ) {
|
119 |
+
wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'user-registration' ) );
|
120 |
}
|
121 |
|
122 |
if ( ! current_user_can( 'manage_options' ) ) {
|
123 |
+
wp_die( esc_html__( 'Cheatin’ huh?', 'user-registration' ) );
|
124 |
}
|
125 |
|
126 |
+
$hide_notice = sanitize_text_field( wp_unslash( $_GET['ur-hide-notice'] ) );
|
127 |
self::remove_notice( $hide_notice );
|
128 |
do_action( 'user_registration_hide_' . $hide_notice . '_notice' );
|
129 |
}
|
138 |
if ( $notices ) {
|
139 |
wp_enqueue_style( 'user-registration-activation', UR()->plugin_url() . '/assets/css/activation.css', array(), UR_VERSION );
|
140 |
|
141 |
+
// Add RTL support.
|
142 |
wp_style_add_data( 'user-registration-activation', 'rtl', 'replace' );
|
143 |
|
144 |
foreach ( $notices as $notice ) {
|
164 |
'add-new-registration',
|
165 |
'user-registration-settings',
|
166 |
'user-registration-email-templates',
|
167 |
+
'user-registration-mailchimp',
|
168 |
);
|
169 |
|
170 |
// Return on other than user registraion builder page.
|
184 |
// Remove all notices except user registration plugins notices.
|
185 |
if ( ! strstr( $name, 'user_registration_' ) ) {
|
186 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
187 |
+
} elseif ( strstr( $name, 'user_registration_error_notices' ) ) {
|
188 |
|
189 |
+
if ( ! isset( $_REQUEST['tab'] ) || 'license' !== $_REQUEST['tab'] ) {
|
190 |
unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
|
191 |
}
|
192 |
}
|
|
|
193 |
}
|
194 |
}
|
195 |
}
|
200 |
/**
|
201 |
* Add a custom notice.
|
202 |
*
|
203 |
+
* @param string $name Name.
|
204 |
+
* @param string $notice_html Notice.
|
205 |
*/
|
206 |
public static function add_custom_notice( $name, $notice_html ) {
|
207 |
self::add_notice( $name );
|
208 |
+
update_option( 'user_registration_admin_notice_' . sanitize_text_field( $name ), wp_kses_post( $notice_html ) );
|
209 |
}
|
210 |
|
211 |
/**
|
includes/admin/class-ur-admin-profile.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
/**
|
3 |
* Add extra profile fields for users in admin
|
4 |
*
|
5 |
-
* @author WPEverest
|
6 |
-
* @category Admin
|
7 |
* @package UserRegistration/Admin
|
8 |
* @version 1.0.0
|
9 |
*/
|
@@ -53,7 +51,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
53 |
'user_registration_profile_meta_fields',
|
54 |
array(
|
55 |
'user_registration' => array(
|
56 |
-
'title' => sprintf(
|
57 |
'fields' => $form_fields,
|
58 |
),
|
59 |
)
|
@@ -83,7 +81,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
83 |
$show_fields = $this->get_user_meta_by_form_fields( $user->ID );
|
84 |
foreach ( $show_fields as $fieldset_key => $fieldset ) :
|
85 |
?>
|
86 |
-
<h2><?php echo $fieldset['title']; ?></h2>
|
87 |
<table class="form-table" id="<?php echo esc_attr( 'fieldset-' . $fieldset_key ); ?>">
|
88 |
|
89 |
<?php
|
@@ -138,25 +136,25 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
138 |
<?php if ( ! empty( $field['type'] ) && 'select' === $field['type'] ) : ?>
|
139 |
<select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
|
140 |
class="<?php echo esc_attr( $field['class'] ); ?>" style="width: 25em;">
|
141 |
-
<option><?php
|
142 |
<?php
|
143 |
$selected = get_user_meta( $user->ID, $key, true );
|
144 |
foreach ( $field['options'] as $option_key => $option_value ) :
|
145 |
?>
|
146 |
-
<option value="<?php echo esc_attr( trim( $option_key ) ); ?>" <?php selected( $selected, trim( $option_key ), true ); ?>><?php echo
|
147 |
<?php endforeach; ?>
|
148 |
</select>
|
149 |
|
150 |
<?php elseif ( ! empty( $field['type'] ) && 'country' === $field['type'] ) : ?>
|
151 |
<select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
|
152 |
class="<?php echo esc_attr( $field['class'] ); ?>" style="width: 25em;">
|
153 |
-
<option><?php
|
154 |
<?php
|
155 |
$selected = esc_attr( get_user_meta( $user->ID, $key, true ) );
|
156 |
foreach ( $field['options'] as $option_key => $option_value ) :
|
157 |
?>
|
158 |
<option
|
159 |
-
value="<?php echo esc_attr( trim( $option_key ) ); ?>" <?php selected( $selected, $option_key, true ); ?>><?php echo esc_attr( trim( $option_value ) ); ?></option>
|
160 |
<?php endforeach; ?>
|
161 |
</select>
|
162 |
|
@@ -170,7 +168,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
170 |
name="<?php echo esc_attr( $key ); ?>"
|
171 |
id="<?php echo esc_attr( $key ); ?>"
|
172 |
value="<?php echo esc_attr( trim( $option_key ) ); ?>"
|
173 |
-
class="<?php echo esc_attr( $field['class'] ); ?>" <?php checked( $db_value, trim( $option_value ), true ); ?> ><?php echo trim( $option_value ); ?>
|
174 |
</label><br/>
|
175 |
<?php
|
176 |
}
|
@@ -197,7 +195,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
197 |
echo 'checked="checked"';
|
198 |
}
|
199 |
?>
|
200 |
-
><?php echo trim( $choice ); ?></label><br/>
|
201 |
<?php
|
202 |
}
|
203 |
} else {
|
@@ -251,7 +249,7 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
251 |
value="<?php echo esc_attr( $value ); ?>"
|
252 |
class="<?php echo( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>"
|
253 |
style="display:none"
|
254 |
-
<?php echo $attribute_string; ?>
|
255 |
/>
|
256 |
|
257 |
<?php
|
@@ -326,16 +324,17 @@ if ( ! class_exists( 'UR_Admin_Profile', false ) ) :
|
|
326 |
foreach ( $fieldset['fields'] as $key => $field ) {
|
327 |
if ( isset( $field['type'] ) && ( 'checkbox' === $field['type'] || 'multi_select2' === $field['type'] || 'wysiwyg' === $field['type'] ) ) {
|
328 |
if ( isset( $_POST[ $key ] ) ) {
|
329 |
-
$value = $_POST[ $key ];
|
330 |
if ( is_array( $_POST[ $key ] ) ) {
|
331 |
-
$value = array_map( 'sanitize_text_field', $
|
|
|
|
|
332 |
}
|
333 |
-
update_user_meta( $user_id, $key, $value );
|
334 |
} else {
|
335 |
-
update_user_meta( $user_id, $key, '' );
|
336 |
}
|
337 |
} elseif ( isset( $_POST[ $key ] ) ) {
|
338 |
-
update_user_meta( $user_id, $key, sanitize_text_field( $_POST[ $key ] ) );
|
339 |
}
|
340 |
}
|
341 |
}
|
2 |
/**
|
3 |
* Add extra profile fields for users in admin
|
4 |
*
|
|
|
|
|
5 |
* @package UserRegistration/Admin
|
6 |
* @version 1.0.0
|
7 |
*/
|
51 |
'user_registration_profile_meta_fields',
|
52 |
array(
|
53 |
'user_registration' => array(
|
54 |
+
'title' => sprintf( esc_html__( 'User Extra Information %s', 'user-registration' ), '' ),
|
55 |
'fields' => $form_fields,
|
56 |
),
|
57 |
)
|
81 |
$show_fields = $this->get_user_meta_by_form_fields( $user->ID );
|
82 |
foreach ( $show_fields as $fieldset_key => $fieldset ) :
|
83 |
?>
|
84 |
+
<h2><?php echo esc_html( $fieldset['title'] ); ?></h2>
|
85 |
<table class="form-table" id="<?php echo esc_attr( 'fieldset-' . $fieldset_key ); ?>">
|
86 |
|
87 |
<?php
|
136 |
<?php if ( ! empty( $field['type'] ) && 'select' === $field['type'] ) : ?>
|
137 |
<select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
|
138 |
class="<?php echo esc_attr( $field['class'] ); ?>" style="width: 25em;">
|
139 |
+
<option><?php esc_html_e( 'Select', 'user-registration' ); ?></option>
|
140 |
<?php
|
141 |
$selected = get_user_meta( $user->ID, $key, true );
|
142 |
foreach ( $field['options'] as $option_key => $option_value ) :
|
143 |
?>
|
144 |
+
<option value="<?php echo esc_attr( trim( $option_key ) ); ?>" <?php esc_attr( selected( $selected, trim( $option_key ), true ) ); ?>><?php echo esc_html( trim( $option_value ) ); ?></option>
|
145 |
<?php endforeach; ?>
|
146 |
</select>
|
147 |
|
148 |
<?php elseif ( ! empty( $field['type'] ) && 'country' === $field['type'] ) : ?>
|
149 |
<select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
|
150 |
class="<?php echo esc_attr( $field['class'] ); ?>" style="width: 25em;">
|
151 |
+
<option><?php esc_html_e( 'Select', 'user-registration' ); ?></option>
|
152 |
<?php
|
153 |
$selected = esc_attr( get_user_meta( $user->ID, $key, true ) );
|
154 |
foreach ( $field['options'] as $option_key => $option_value ) :
|
155 |
?>
|
156 |
<option
|
157 |
+
value="<?php echo esc_attr( trim( $option_key ) ); ?>" <?php esc_attr( selected( $selected, $option_key, true ) ); ?>><?php echo esc_attr( trim( $option_value ) ); ?></option>
|
158 |
<?php endforeach; ?>
|
159 |
</select>
|
160 |
|
168 |
name="<?php echo esc_attr( $key ); ?>"
|
169 |
id="<?php echo esc_attr( $key ); ?>"
|
170 |
value="<?php echo esc_attr( trim( $option_key ) ); ?>"
|
171 |
+
class="<?php echo esc_attr( $field['class'] ); ?>" <?php esc_attr( checked( $db_value, trim( $option_value ), true ) ); ?> ><?php echo trim( $option_value ); ?>
|
172 |
</label><br/>
|
173 |
<?php
|
174 |
}
|
195 |
echo 'checked="checked"';
|
196 |
}
|
197 |
?>
|
198 |
+
><?php echo esc_html(trim( $choice ) ); ?></label><br/>
|
199 |
<?php
|
200 |
}
|
201 |
} else {
|
249 |
value="<?php echo esc_attr( $value ); ?>"
|
250 |
class="<?php echo( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>"
|
251 |
style="display:none"
|
252 |
+
<?php echo esc_attr( $attribute_string ); ?>
|
253 |
/>
|
254 |
|
255 |
<?php
|
324 |
foreach ( $fieldset['fields'] as $key => $field ) {
|
325 |
if ( isset( $field['type'] ) && ( 'checkbox' === $field['type'] || 'multi_select2' === $field['type'] || 'wysiwyg' === $field['type'] ) ) {
|
326 |
if ( isset( $_POST[ $key ] ) ) {
|
|
|
327 |
if ( is_array( $_POST[ $key ] ) ) {
|
328 |
+
$value = array_map( 'sanitize_text_field', $_POST[ $key ] );
|
329 |
+
}else{
|
330 |
+
$value = sanitize_text_field( $_POST[ $key ] );
|
331 |
}
|
332 |
+
update_user_meta( absint( $user_id ), sanitize_text_field( $key ), $value );
|
333 |
} else {
|
334 |
+
update_user_meta( absint( $user_id ), sanitize_text_field( $key ), '' );
|
335 |
}
|
336 |
} elseif ( isset( $_POST[ $key ] ) ) {
|
337 |
+
update_user_meta( absint( $user_id ), sanitize_text_field( $key ), sanitize_text_field( $_POST[ $key ] ) );
|
338 |
}
|
339 |
}
|
340 |
}
|
includes/admin/class-ur-admin-registrations-table-list.php
CHANGED
@@ -48,10 +48,10 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
48 |
public function get_columns() {
|
49 |
return array(
|
50 |
'cb' => '<input type="checkbox" />',
|
51 |
-
'title' =>
|
52 |
-
'shortcode' =>
|
53 |
-
'author' =>
|
54 |
-
'date' =>
|
55 |
);
|
56 |
}
|
57 |
|
@@ -75,7 +75,7 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
75 |
* @return string
|
76 |
*/
|
77 |
public function get_duplicate_link( $post_id ) {
|
78 |
-
return admin_url( 'admin.php?page=add-new-registration&edit-registration=' . $post_id
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -93,10 +93,10 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
93 |
|
94 |
// Get actions.
|
95 |
$actions = array(
|
96 |
-
'id' => sprintf(
|
97 |
);
|
98 |
|
99 |
-
if ( current_user_can( $post_type_object->cap->edit_post, $row->ID ) &&
|
100 |
$actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit', 'user-registration' ) . '</a>';
|
101 |
}
|
102 |
|
@@ -123,11 +123,11 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
123 |
$duplicate_link = admin_url( 'admin.php?page=user-registration&action=duplicate&nonce=' . $duplicate_nonce . '&post-id=' . $row->ID );
|
124 |
|
125 |
if ( 'trash' !== $post_status ) {
|
126 |
-
$actions['view'] = '<a href="' . esc_url( $preview_link ) . '" rel="bookmark" target="_blank">' .
|
127 |
}
|
128 |
|
129 |
if ( 'publish' === $post_status ) {
|
130 |
-
$actions['duplicate'] = '<a href="' . esc_url( $duplicate_link ) . '">' .
|
131 |
}
|
132 |
}
|
133 |
return $actions;
|
@@ -142,7 +142,7 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
142 |
*/
|
143 |
public function column_shortcode( $registration ) {
|
144 |
$shortcode = '[user_registration_form id="' . $registration->ID . '"]';
|
145 |
-
echo sprintf( '<input type="text" onfocus="this.select();" readonly="readonly" value=\'%s\' class="widefat code"></span>', $shortcode );
|
146 |
?>
|
147 |
<button id="copy-shortcode" class="button ur-copy-shortcode " href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode ! ', 'user-registration' ); ?>" data-copied="<?php esc_attr_e( 'Copied ! ', 'user-registration' ); ?>">
|
148 |
<span class="dashicons dashicons-admin-page"></span>
|
@@ -165,7 +165,7 @@ class UR_Admin_Registrations_Table_List extends UR_List_Table {
|
|
165 |
<input type="hidden" name="page" value="user-registration" />
|
166 |
<?php
|
167 |
$this->views();
|
168 |
-
$this->search_box(
|
169 |
$this->display();
|
170 |
|
171 |
wp_nonce_field( 'save', 'user_registration_nonce' );
|
48 |
public function get_columns() {
|
49 |
return array(
|
50 |
'cb' => '<input type="checkbox" />',
|
51 |
+
'title' => esc_html__( 'Title', 'user-registration' ),
|
52 |
+
'shortcode' => esc_html__( 'Shortcode', 'user-registration' ),
|
53 |
+
'author' => esc_html__( 'Author', 'user-registration' ),
|
54 |
+
'date' => esc_html__( 'Date', 'user-registration' ),
|
55 |
);
|
56 |
}
|
57 |
|
75 |
* @return string
|
76 |
*/
|
77 |
public function get_duplicate_link( $post_id ) {
|
78 |
+
return admin_url( 'admin.php?page=add-new-registration&edit-registration=' . $post_id );
|
79 |
}
|
80 |
|
81 |
/**
|
93 |
|
94 |
// Get actions.
|
95 |
$actions = array(
|
96 |
+
'id' => sprintf( esc_html__( 'ID: %d', 'user-registration' ), $row->ID ),
|
97 |
);
|
98 |
|
99 |
+
if ( current_user_can( $post_type_object->cap->edit_post, $row->ID ) && ! $current_status_trash ) {
|
100 |
$actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit', 'user-registration' ) . '</a>';
|
101 |
}
|
102 |
|
123 |
$duplicate_link = admin_url( 'admin.php?page=user-registration&action=duplicate&nonce=' . $duplicate_nonce . '&post-id=' . $row->ID );
|
124 |
|
125 |
if ( 'trash' !== $post_status ) {
|
126 |
+
$actions['view'] = '<a href="' . esc_url( $preview_link ) . '" rel="bookmark" target="_blank">' . esc_html__( 'Preview', 'user-registration' ) . '</a>';
|
127 |
}
|
128 |
|
129 |
if ( 'publish' === $post_status ) {
|
130 |
+
$actions['duplicate'] = '<a href="' . esc_url( $duplicate_link ) . '">' . esc_html__( 'Duplicate', 'user-registration' ) . '</a>';
|
131 |
}
|
132 |
}
|
133 |
return $actions;
|
142 |
*/
|
143 |
public function column_shortcode( $registration ) {
|
144 |
$shortcode = '[user_registration_form id="' . $registration->ID . '"]';
|
145 |
+
echo sprintf( '<input type="text" onfocus="this.select();" readonly="readonly" value=\'%s\' class="widefat code"></span>', esc_attr( $shortcode ) );
|
146 |
?>
|
147 |
<button id="copy-shortcode" class="button ur-copy-shortcode " href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode ! ', 'user-registration' ); ?>" data-copied="<?php esc_attr_e( 'Copied ! ', 'user-registration' ); ?>">
|
148 |
<span class="dashicons dashicons-admin-page"></span>
|
165 |
<input type="hidden" name="page" value="user-registration" />
|
166 |
<?php
|
167 |
$this->views();
|
168 |
+
$this->search_box( esc_html__( 'Search Registration', 'user-registration' ), 'registration' );
|
169 |
$this->display();
|
170 |
|
171 |
wp_nonce_field( 'save', 'user_registration_nonce' );
|
includes/admin/class-ur-admin-settings.php
CHANGED
@@ -77,7 +77,7 @@ class UR_Admin_Settings {
|
|
77 |
$flag = apply_filters( 'show_user_registration_setting_message', true );
|
78 |
|
79 |
if ( $flag ) {
|
80 |
-
self::add_message(
|
81 |
}
|
82 |
|
83 |
// Flush rules.
|
@@ -139,7 +139,7 @@ class UR_Admin_Settings {
|
|
139 |
'user-registration-settings',
|
140 |
'user_registration_settings_params',
|
141 |
array(
|
142 |
-
'i18n_nav_warning' =>
|
143 |
)
|
144 |
);
|
145 |
|
@@ -235,17 +235,17 @@ class UR_Admin_Settings {
|
|
235 |
public static function output_fields( $options ) {
|
236 |
$settings = '';
|
237 |
|
238 |
-
if( is_array( $options ) && !empty( $options ) ){
|
239 |
|
240 |
$settings .= '<h3 class="ur-settings-section-header main_header">' . esc_html( ucwords( $options['title'] ) );
|
241 |
-
$back_link = isset( $options['back_link'] ) ? $options['back_link'] : '';
|
242 |
-
$back_link_text = isset( $options['back_link_text'] ) ? $options['back_link_text'] : '';
|
243 |
|
244 |
-
if( isset( $options['back_link'] ) ) {
|
245 |
-
$settings .= '<a href="' . $back_link . '" class="page-title-action">';
|
246 |
|
247 |
-
if( isset( $options['back_link_text'] ) ) {
|
248 |
-
$settings .= $back_link_text;
|
249 |
}
|
250 |
|
251 |
$settings .= '</a>';
|
@@ -257,15 +257,15 @@ class UR_Admin_Settings {
|
|
257 |
continue;
|
258 |
}
|
259 |
|
260 |
-
if( 'card' === $section['type'] ) {
|
261 |
$settings .= '<div class="user-registration-card ur-mt-4 ur-border-0">';
|
262 |
-
$settings .=
|
263 |
|
264 |
if ( ! empty( $section['title'] ) ) {
|
265 |
$settings .= '<h3 class="user-registration-card__title">' . esc_html( strtoupper( $section['title'] ) );
|
266 |
|
267 |
-
if( isset( $section['back_link'] ) ) {
|
268 |
-
$settings .= $section['back_link'];
|
269 |
}
|
270 |
|
271 |
$settings .= '</h3>';
|
@@ -273,17 +273,17 @@ class UR_Admin_Settings {
|
|
273 |
$settings .= '</div>';
|
274 |
|
275 |
if ( ! empty( $section['desc'] ) ) {
|
276 |
-
$settings .= '<p class="ur-p-tag">' .
|
277 |
}
|
278 |
$settings .= '<div class="user-registration-card__body pt-0 pb-0">';
|
279 |
-
$settings .=
|
280 |
|
281 |
if ( ! empty( $id ) ) {
|
282 |
do_action( 'user_registration_settings_' . sanitize_title( $id ) );
|
283 |
}
|
284 |
}
|
285 |
|
286 |
-
foreach( $section['settings'] as $key => $value ) {
|
287 |
|
288 |
if ( ! isset( $value['type'] ) ) {
|
289 |
continue;
|
@@ -352,17 +352,17 @@ class UR_Admin_Settings {
|
|
352 |
|
353 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
354 |
$settings .= '<th scope="row" class="titledesc">';
|
355 |
-
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>'. $tooltip_html . '</th>';
|
356 |
-
$settings .= '<td class="forminp forminp-' . sanitize_title( $value['type'] ) . '">';
|
357 |
$settings .= '<input
|
358 |
name="' . esc_attr( $value['id'] ) . '"
|
359 |
-
id="'. esc_attr( $value['id'] ) . '"
|
360 |
type="' . esc_attr( $value['type'] ) . '"
|
361 |
style="' . esc_attr( $value['css'] ) . '"
|
362 |
value="' . esc_attr( $option_value ) . '"
|
363 |
class="' . esc_attr( $value['class'] ) . '"
|
364 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
365 |
-
' . implode( ' ', $custom_attributes ) .' ' . $description . '</td></tr>';
|
366 |
break;
|
367 |
|
368 |
// Color picker.
|
@@ -370,11 +370,11 @@ class UR_Admin_Settings {
|
|
370 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
371 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
372 |
$settings .= '<th scope="row" class="titledesc">';
|
373 |
-
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) .'</label>';
|
374 |
-
$settings .= $tooltip_html;
|
375 |
$settings .= '</th>';
|
376 |
-
$settings .= '<td class="forminp forminp-' . sanitize_title( $value['type'] ) . '">&lrm';
|
377 |
-
$settings .= '<span class="colorpickpreview" style="background: '. esc_attr( $option_value ) . '"></span>';
|
378 |
$settings .= '<input
|
379 |
name="' . esc_attr( $value['id'] ) . '"
|
380 |
id="' . esc_attr( $value['id'] ) . '"
|
@@ -382,9 +382,9 @@ class UR_Admin_Settings {
|
|
382 |
dir="ltr"
|
383 |
style="' . esc_attr( $value['css'] ) . '"
|
384 |
value="' . esc_attr( $option_value ) . '"
|
385 |
-
class="' . esc_attr( $value['class'] ) .'colorpick"
|
386 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
387 |
-
' . implode( ' ', $custom_attributes ) . '/>‎' . $description;
|
388 |
$settings .= '<div id="colorPickerDiv_' . esc_attr( $value['id'] ) . '" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div></td></tr>';
|
389 |
break;
|
390 |
|
@@ -392,22 +392,22 @@ class UR_Admin_Settings {
|
|
392 |
case 'textarea':
|
393 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
394 |
|
395 |
-
$settings .= '<tr valign="top" class="'. esc_attr( $value['row_class'] ) . '">';
|
396 |
$settings .= '<th scope="row" class="titledesc">';
|
397 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
398 |
-
$settings .= $tooltip_html;
|
399 |
$settings .= '</th>';
|
400 |
-
$settings .= '<td class="forminp forminp-' . sanitize_title( $value['type'] ) . '">';
|
401 |
-
$settings .= $description;
|
402 |
$settings .= '<textarea
|
403 |
name="' . esc_attr( $value['id'] ) . '"
|
404 |
id="' . esc_attr( $value['id'] ) . '"
|
405 |
-
style="' . esc_attr( $value['css'] ) .'"
|
406 |
class="' . esc_attr( $value['class'] ) . '"
|
407 |
rows="' . esc_attr( $value['rows'] ) . '"
|
408 |
cols="' . esc_attr( $value['cols'] ) . '"
|
409 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
410 |
-
' . implode( ' ', $custom_attributes ) . '>'
|
411 |
. esc_textarea( $option_value ) . '</textarea>';
|
412 |
$settings .= '</td></tr>';
|
413 |
break;
|
@@ -417,27 +417,27 @@ class UR_Admin_Settings {
|
|
417 |
case 'multiselect':
|
418 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
419 |
|
420 |
-
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) .'">';
|
421 |
$settings .= '<th scope="row" class="titledesc">';
|
422 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
423 |
-
$settings .= $tooltip_html;
|
424 |
$settings .= '</th>';
|
425 |
-
$settings .= '<td class="forminp forminp-' .
|
426 |
|
427 |
$multiple = '';
|
428 |
$type = '';
|
429 |
-
if( 'multiselect' == $value['type'] ) {
|
430 |
$type = '[]';
|
431 |
$multiple = 'multiple="multiple"';
|
432 |
}
|
433 |
|
434 |
$settings .= '<select
|
435 |
-
name="' . esc_attr( $value['id'] ) . ''
|
436 |
id="' . esc_attr( $value['id'] ) . '"
|
437 |
style="' . esc_attr( $value['css'] ) . '"
|
438 |
-
class="'. esc_attr( $value['class'] ). '"
|
439 |
-
' . implode( ' ', $custom_attributes ) . '
|
440 |
-
' . $multiple .'>';
|
441 |
|
442 |
foreach ( $value['options'] as $key => $val ) {
|
443 |
$selected = '';
|
@@ -453,7 +453,7 @@ class UR_Admin_Settings {
|
|
453 |
$settings .= '</option>';
|
454 |
}
|
455 |
|
456 |
-
$settings .= '</select>' .
|
457 |
break;
|
458 |
|
459 |
// Radio inputs.
|
@@ -461,12 +461,12 @@ class UR_Admin_Settings {
|
|
461 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
462 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
463 |
$settings .= '<th scope="row" class="titledesc">';
|
464 |
-
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ). '</label>';
|
465 |
-
$settings .= $tooltip_html;
|
466 |
$settings .= '</th>';
|
467 |
-
$settings .= '<td class="forminp forminp-' . sanitize_title( $value['type'] ) . '">';
|
468 |
$settings .= '<fieldset>';
|
469 |
-
$settings .= $description;
|
470 |
$settings .= '<ul>';
|
471 |
|
472 |
foreach ( $value['options'] as $key => $val ) {
|
@@ -474,13 +474,13 @@ class UR_Admin_Settings {
|
|
474 |
$settings .= '<label>';
|
475 |
$settings .= '<input
|
476 |
name="' . esc_attr( $value['id'] ) . '"
|
477 |
-
value="' . $key . '"
|
478 |
type="radio"
|
479 |
style="' . esc_attr( $value['css'] ) . '"
|
480 |
class="' . esc_attr( $value['class'] ) . '"
|
481 |
-
' . implode( ' ', $custom_attributes ) . '
|
482 |
-
' . checked( $key, $option_value, false ) . '
|
483 |
-
/>' . $val . '</label>';
|
484 |
$settings .= '</li>';
|
485 |
}
|
486 |
|
@@ -513,32 +513,32 @@ class UR_Admin_Settings {
|
|
513 |
}
|
514 |
|
515 |
if ( ! isset( $value['checkboxgroup'] ) || 'start' === $value['checkboxgroup'] ) {
|
516 |
-
$settings .= '<tr valign="top" class="' . esc_attr( implode( ' ', $visbility_class ) ) . ' ' . esc_attr( $value['row_class'] ) .'">';
|
517 |
$settings .= '<th scope="row" class="titledesc">';
|
518 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
519 |
-
$settings .= $tooltip_html;
|
520 |
$settings .= '</th><td class="forminp forminp-checkbox"><fieldset>';
|
521 |
} else {
|
522 |
$settings .= '<fieldset class="' . esc_attr( implode( ' ', $visbility_class ) ) . '">';
|
523 |
}
|
524 |
|
525 |
-
$settings .= '<label for="' . $value['id'] . '">';
|
526 |
$settings .= '<input
|
527 |
-
name="' . esc_attr( $value['id'] ) .'"
|
528 |
-
id="' . esc_attr( $value['id'] ) .'"
|
529 |
type="checkbox"
|
530 |
class="' . esc_attr( isset( $value['class'] ) ? $value['class'] : '' ) . '"
|
531 |
value="1"
|
532 |
-
'. checked( $option_value, 'yes', false ) .'
|
533 |
-
'. implode( ' ', $custom_attributes ) .'/>'. $description . '</label>';
|
534 |
|
535 |
if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) {
|
536 |
$settings .= '</fieldset>';
|
537 |
-
$settings .= $desc_field;
|
538 |
$settings .= '</td></tr>';
|
539 |
} else {
|
540 |
$settings .= '</fieldset>';
|
541 |
-
$settings .= $desc_field;
|
542 |
}
|
543 |
break;
|
544 |
|
@@ -559,12 +559,12 @@ class UR_Admin_Settings {
|
|
559 |
$args = wp_parse_args( $value['args'], $args );
|
560 |
}
|
561 |
|
562 |
-
$settings .= '<tr valign="top" class="single_select_page '. esc_attr( $value['row_class'] ) .'" ' . ( ( isset( $value['display'] ) && $value['display'] === 'none' ) ? 'style="display:none"' : '' ) . '>';
|
563 |
-
$settings .= '<th scope="row" class="titledesc">' . esc_html( $value['title'] ) . ' ' . $tooltip_html;
|
564 |
$settings .= '</th>';
|
565 |
$settings .= '<td class="forminp">';
|
566 |
-
$settings .= str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page…', 'user-registration' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) );
|
567 |
-
$settings .= $description;
|
568 |
$settings .= '</td></tr>';
|
569 |
break;
|
570 |
|
@@ -588,10 +588,10 @@ class UR_Admin_Settings {
|
|
588 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
589 |
$settings .= '<th scope="row" class="titledesc">';
|
590 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
591 |
-
$settings .= $tooltip_html;
|
592 |
$settings .= '</th>';
|
593 |
-
$settings .= '<td class="forminp forminp-' . sanitize_title( $value['type'] ) . '">';
|
594 |
-
$settings .= $description;
|
595 |
|
596 |
// Output buffer for tinymce editor
|
597 |
ob_start();
|
@@ -602,35 +602,35 @@ class UR_Admin_Settings {
|
|
602 |
$settings .= '</tr>';
|
603 |
break;
|
604 |
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
href="' . esc_url( $button['href'] ) . '"
|
617 |
class="button ' . esc_attr( $button['class'] ) . '" style="' . esc_attr( $value['css'] ) . '">' . esc_html( $button['title'] ) . '</a>';
|
618 |
-
|
619 |
-
|
620 |
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
|
626 |
// Default: run an action.
|
627 |
default:
|
628 |
$settings = apply_filters( 'user_registration_admin_field_' . $value['type'], $settings, $value );
|
629 |
-
|
630 |
}// End switch case.
|
631 |
}
|
632 |
$settings .= '</table>';
|
633 |
-
$settings .=
|
634 |
$settings .= '</div>';
|
635 |
|
636 |
if ( ! empty( $section['id'] ) ) {
|
@@ -710,7 +710,7 @@ class UR_Admin_Settings {
|
|
710 |
// Options to update will be stored here and saved later.
|
711 |
$update_options = array();
|
712 |
|
713 |
-
if( empty( $options ) ){
|
714 |
return false;
|
715 |
}
|
716 |
|
@@ -724,12 +724,12 @@ class UR_Admin_Settings {
|
|
724 |
// Get posted value.
|
725 |
if ( strstr( $option['id'], '[' ) ) {
|
726 |
parse_str( $option['id'], $option_name_array );
|
727 |
-
$option_name = current( array_keys( $option_name_array ) );
|
728 |
|
729 |
$setting_name = key( $option_name_array[ $option_name ] );
|
730 |
$raw_value = isset( $_POST[ $option_name ][ $setting_name ] ) ? wp_unslash( $_POST[ $option_name ][ $setting_name ] ) : null;
|
731 |
} else {
|
732 |
-
$option_name = $option['id'];
|
733 |
$setting_name = '';
|
734 |
$raw_value = isset( $_POST[ $option['id'] ] ) ? wp_unslash( $_POST[ $option['id'] ] ) : null;
|
735 |
}
|
@@ -753,7 +753,7 @@ class UR_Admin_Settings {
|
|
753 |
break;
|
754 |
}
|
755 |
$default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] );
|
756 |
-
$value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default;
|
757 |
break;
|
758 |
case 'tinymce':
|
759 |
$value = wpautop( $raw_value );
|
77 |
$flag = apply_filters( 'show_user_registration_setting_message', true );
|
78 |
|
79 |
if ( $flag ) {
|
80 |
+
self::add_message( esc_html__( 'Your settings have been saved.', 'user-registration' ) );
|
81 |
}
|
82 |
|
83 |
// Flush rules.
|
139 |
'user-registration-settings',
|
140 |
'user_registration_settings_params',
|
141 |
array(
|
142 |
+
'i18n_nav_warning' => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'user-registration' ),
|
143 |
)
|
144 |
);
|
145 |
|
235 |
public static function output_fields( $options ) {
|
236 |
$settings = '';
|
237 |
|
238 |
+
if ( is_array( $options ) && ! empty( $options ) ) {
|
239 |
|
240 |
$settings .= '<h3 class="ur-settings-section-header main_header">' . esc_html( ucwords( $options['title'] ) );
|
241 |
+
$back_link = isset( $options['back_link'] ) ? esc_url( $options['back_link'] ) : '';
|
242 |
+
$back_link_text = isset( $options['back_link_text'] ) ? wp_kses_post( $options['back_link_text'] ) : '';
|
243 |
|
244 |
+
if ( isset( $options['back_link'] ) ) {
|
245 |
+
$settings .= '<a href="' . esc_url( $back_link ) . '" class="page-title-action">';
|
246 |
|
247 |
+
if ( isset( $options['back_link_text'] ) ) {
|
248 |
+
$settings .= wp_kses_post( $back_link_text );
|
249 |
}
|
250 |
|
251 |
$settings .= '</a>';
|
257 |
continue;
|
258 |
}
|
259 |
|
260 |
+
if ( 'card' === $section['type'] ) {
|
261 |
$settings .= '<div class="user-registration-card ur-mt-4 ur-border-0">';
|
262 |
+
$settings .= '<div class="user-registration-card__header ur-border-0">';
|
263 |
|
264 |
if ( ! empty( $section['title'] ) ) {
|
265 |
$settings .= '<h3 class="user-registration-card__title">' . esc_html( strtoupper( $section['title'] ) );
|
266 |
|
267 |
+
if ( isset( $section['back_link'] ) ) {
|
268 |
+
$settings .= wp_kses_post( $section['back_link'] );
|
269 |
}
|
270 |
|
271 |
$settings .= '</h3>';
|
273 |
$settings .= '</div>';
|
274 |
|
275 |
if ( ! empty( $section['desc'] ) ) {
|
276 |
+
$settings .= '<p class="ur-p-tag">' . wptexturize( wp_kses_post( $section['desc'] ) ) . '</p>';
|
277 |
}
|
278 |
$settings .= '<div class="user-registration-card__body pt-0 pb-0">';
|
279 |
+
$settings .= '<table class="form-table">' . "\n\n";
|
280 |
|
281 |
if ( ! empty( $id ) ) {
|
282 |
do_action( 'user_registration_settings_' . sanitize_title( $id ) );
|
283 |
}
|
284 |
}
|
285 |
|
286 |
+
foreach ( $section['settings'] as $key => $value ) {
|
287 |
|
288 |
if ( ! isset( $value['type'] ) ) {
|
289 |
continue;
|
352 |
|
353 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
354 |
$settings .= '<th scope="row" class="titledesc">';
|
355 |
+
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>' . wp_kses_post( $tooltip_html ) . '</th>';
|
356 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">';
|
357 |
$settings .= '<input
|
358 |
name="' . esc_attr( $value['id'] ) . '"
|
359 |
+
id="' . esc_attr( $value['id'] ) . '"
|
360 |
type="' . esc_attr( $value['type'] ) . '"
|
361 |
style="' . esc_attr( $value['css'] ) . '"
|
362 |
value="' . esc_attr( $option_value ) . '"
|
363 |
class="' . esc_attr( $value['class'] ) . '"
|
364 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
365 |
+
' . esc_attr( implode( ' ', $custom_attributes ) ) . ' ' . wp_kses_post( $description ) . '</td></tr>';
|
366 |
break;
|
367 |
|
368 |
// Color picker.
|
370 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
371 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
372 |
$settings .= '<th scope="row" class="titledesc">';
|
373 |
+
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
374 |
+
$settings .= wp_kses_post( $tooltip_html );
|
375 |
$settings .= '</th>';
|
376 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">&lrm';
|
377 |
+
$settings .= '<span class="colorpickpreview" style="background: ' . esc_attr( $option_value ) . '"></span>';
|
378 |
$settings .= '<input
|
379 |
name="' . esc_attr( $value['id'] ) . '"
|
380 |
id="' . esc_attr( $value['id'] ) . '"
|
382 |
dir="ltr"
|
383 |
style="' . esc_attr( $value['css'] ) . '"
|
384 |
value="' . esc_attr( $option_value ) . '"
|
385 |
+
class="' . esc_attr( $value['class'] ) . 'colorpick"
|
386 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
387 |
+
' . esc_attr( implode( ' ', $custom_attributes ) ) . '/>‎' . wp_kses_post( $description );
|
388 |
$settings .= '<div id="colorPickerDiv_' . esc_attr( $value['id'] ) . '" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div></td></tr>';
|
389 |
break;
|
390 |
|
392 |
case 'textarea':
|
393 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
394 |
|
395 |
+
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
396 |
$settings .= '<th scope="row" class="titledesc">';
|
397 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
398 |
+
$settings .= wp_kses_post( $tooltip_html );
|
399 |
$settings .= '</th>';
|
400 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">';
|
401 |
+
$settings .= wp_kses_post( $description );
|
402 |
$settings .= '<textarea
|
403 |
name="' . esc_attr( $value['id'] ) . '"
|
404 |
id="' . esc_attr( $value['id'] ) . '"
|
405 |
+
style="' . esc_attr( $value['css'] ) . '"
|
406 |
class="' . esc_attr( $value['class'] ) . '"
|
407 |
rows="' . esc_attr( $value['rows'] ) . '"
|
408 |
cols="' . esc_attr( $value['cols'] ) . '"
|
409 |
placeholder="' . esc_attr( $value['placeholder'] ) . '"
|
410 |
+
' . esc_html( implode( ' ', $custom_attributes ) ) . '>'
|
411 |
. esc_textarea( $option_value ) . '</textarea>';
|
412 |
$settings .= '</td></tr>';
|
413 |
break;
|
417 |
case 'multiselect':
|
418 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
419 |
|
420 |
+
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
421 |
$settings .= '<th scope="row" class="titledesc">';
|
422 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
423 |
+
$settings .= wp_kses_post( $tooltip_html );
|
424 |
$settings .= '</th>';
|
425 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">';
|
426 |
|
427 |
$multiple = '';
|
428 |
$type = '';
|
429 |
+
if ( 'multiselect' == $value['type'] ) {
|
430 |
$type = '[]';
|
431 |
$multiple = 'multiple="multiple"';
|
432 |
}
|
433 |
|
434 |
$settings .= '<select
|
435 |
+
name="' . esc_attr( $value['id'] ) . '' . $type . '"
|
436 |
id="' . esc_attr( $value['id'] ) . '"
|
437 |
style="' . esc_attr( $value['css'] ) . '"
|
438 |
+
class="' . esc_attr( $value['class'] ) . '"
|
439 |
+
' . esc_attr( implode( ' ', $custom_attributes ) ) . '
|
440 |
+
' . esc_attr( $multiple ) . '>';
|
441 |
|
442 |
foreach ( $value['options'] as $key => $val ) {
|
443 |
$selected = '';
|
453 |
$settings .= '</option>';
|
454 |
}
|
455 |
|
456 |
+
$settings .= '</select>' . wp_kses_post( $description ) . '</td></tr>';
|
457 |
break;
|
458 |
|
459 |
// Radio inputs.
|
461 |
$option_value = self::get_option( $value['id'], $value['default'] );
|
462 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
463 |
$settings .= '<th scope="row" class="titledesc">';
|
464 |
+
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
465 |
+
$settings .= wp_kses_post( $tooltip_html );
|
466 |
$settings .= '</th>';
|
467 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">';
|
468 |
$settings .= '<fieldset>';
|
469 |
+
$settings .= wp_kses_post( $description );
|
470 |
$settings .= '<ul>';
|
471 |
|
472 |
foreach ( $value['options'] as $key => $val ) {
|
474 |
$settings .= '<label>';
|
475 |
$settings .= '<input
|
476 |
name="' . esc_attr( $value['id'] ) . '"
|
477 |
+
value="' . esc_attr( $key ) . '"
|
478 |
type="radio"
|
479 |
style="' . esc_attr( $value['css'] ) . '"
|
480 |
class="' . esc_attr( $value['class'] ) . '"
|
481 |
+
' . esc_attr( implode( ' ', $custom_attributes ) ) . '
|
482 |
+
' . esc_attr( checked( $key, $option_value, false ) ) . '
|
483 |
+
/>' . esc_html( $val ) . '</label>';
|
484 |
$settings .= '</li>';
|
485 |
}
|
486 |
|
513 |
}
|
514 |
|
515 |
if ( ! isset( $value['checkboxgroup'] ) || 'start' === $value['checkboxgroup'] ) {
|
516 |
+
$settings .= '<tr valign="top" class="' . esc_attr( implode( ' ', $visbility_class ) ) . ' ' . esc_attr( $value['row_class'] ) . '">';
|
517 |
$settings .= '<th scope="row" class="titledesc">';
|
518 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
519 |
+
$settings .= wp_kses_post( $tooltip_html );
|
520 |
$settings .= '</th><td class="forminp forminp-checkbox"><fieldset>';
|
521 |
} else {
|
522 |
$settings .= '<fieldset class="' . esc_attr( implode( ' ', $visbility_class ) ) . '">';
|
523 |
}
|
524 |
|
525 |
+
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">';
|
526 |
$settings .= '<input
|
527 |
+
name="' . esc_attr( $value['id'] ) . '"
|
528 |
+
id="' . esc_attr( $value['id'] ) . '"
|
529 |
type="checkbox"
|
530 |
class="' . esc_attr( isset( $value['class'] ) ? $value['class'] : '' ) . '"
|
531 |
value="1"
|
532 |
+
' . esc_attr( checked( $option_value, 'yes', false ) ) . '
|
533 |
+
' . esc_attr( implode( ' ', $custom_attributes ) ) . '/>' . wp_kses_post( $description ) . '</label>';
|
534 |
|
535 |
if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) {
|
536 |
$settings .= '</fieldset>';
|
537 |
+
$settings .= wp_kses_post( $desc_field );
|
538 |
$settings .= '</td></tr>';
|
539 |
} else {
|
540 |
$settings .= '</fieldset>';
|
541 |
+
$settings .= wp_kses_post( $desc_field );
|
542 |
}
|
543 |
break;
|
544 |
|
559 |
$args = wp_parse_args( $value['args'], $args );
|
560 |
}
|
561 |
|
562 |
+
$settings .= '<tr valign="top" class="single_select_page ' . esc_attr( $value['row_class'] ) . '" ' . ( ( isset( $value['display'] ) && $value['display'] === 'none' ) ? 'style="display:none"' : '' ) . '>';
|
563 |
+
$settings .= '<th scope="row" class="titledesc">' . esc_html( $value['title'] ) . ' ' . wp_kses_post( $tooltip_html );
|
564 |
$settings .= '</th>';
|
565 |
$settings .= '<td class="forminp">';
|
566 |
+
$settings .= str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page…', 'user-registration' ) . "' style='" . esc_attr( $value['css'] ) . "' class='" . esc_attr( $value['class'] ) . "' id=", wp_dropdown_pages( $args ) );
|
567 |
+
$settings .= wp_kses_post( $description );
|
568 |
$settings .= '</td></tr>';
|
569 |
break;
|
570 |
|
588 |
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
589 |
$settings .= '<th scope="row" class="titledesc">';
|
590 |
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_html( $value['title'] ) . '</label>';
|
591 |
+
$settings .= wp_kses_post( $tooltip_html );
|
592 |
$settings .= '</th>';
|
593 |
+
$settings .= '<td class="forminp forminp-' . esc_attr( sanitize_title( $value['type'] ) ) . '">';
|
594 |
+
$settings .= wp_kses_post( $description );
|
595 |
|
596 |
// Output buffer for tinymce editor
|
597 |
ob_start();
|
602 |
$settings .= '</tr>';
|
603 |
break;
|
604 |
|
605 |
+
case 'link':
|
606 |
+
$settings .= '<tr valign="top" class="' . esc_attr( $value['row_class'] ) . '">';
|
607 |
+
$settings .= '<th scope="row" class="titledesc">';
|
608 |
+
$settings .= '<label for="' . esc_attr( $value['id'] ) . '">' . esc_attr( $value['title'] ) . '</label>';
|
609 |
+
$settings .= wp_kses_post( $tooltip_html );
|
610 |
+
$settings .= '</th>';
|
611 |
+
$settings .= '<td>';
|
612 |
+
|
613 |
+
if ( isset( $value['buttons'] ) && is_array( $value['buttons'] ) ) {
|
614 |
+
foreach ( $value['buttons'] as $button ) {
|
615 |
+
$settings .= '<a
|
616 |
href="' . esc_url( $button['href'] ) . '"
|
617 |
class="button ' . esc_attr( $button['class'] ) . '" style="' . esc_attr( $value['css'] ) . '">' . esc_html( $button['title'] ) . '</a>';
|
618 |
+
}
|
619 |
+
}
|
620 |
|
621 |
+
$settings .= ( isset( $value['desc'] ) && isset( $value['desc_tip'] ) && true !== $value['desc_tip'] ) ? '<p class="description" >' . wp_kses_post( $value['desc'] ) . '</p>' : '';
|
622 |
+
$settings .= '</td>';
|
623 |
+
$settings .= '</tr>';
|
624 |
+
break;
|
625 |
|
626 |
// Default: run an action.
|
627 |
default:
|
628 |
$settings = apply_filters( 'user_registration_admin_field_' . $value['type'], $settings, $value );
|
629 |
+
break;
|
630 |
}// End switch case.
|
631 |
}
|
632 |
$settings .= '</table>';
|
633 |
+
$settings .= '</div>';
|
634 |
$settings .= '</div>';
|
635 |
|
636 |
if ( ! empty( $section['id'] ) ) {
|
710 |
// Options to update will be stored here and saved later.
|
711 |
$update_options = array();
|
712 |
|
713 |
+
if ( empty( $options ) ) {
|
714 |
return false;
|
715 |
}
|
716 |
|
724 |
// Get posted value.
|
725 |
if ( strstr( $option['id'], '[' ) ) {
|
726 |
parse_str( $option['id'], $option_name_array );
|
727 |
+
$option_name = sanitize_text_field( current( array_keys( $option_name_array ) ) );
|
728 |
|
729 |
$setting_name = key( $option_name_array[ $option_name ] );
|
730 |
$raw_value = isset( $_POST[ $option_name ][ $setting_name ] ) ? wp_unslash( $_POST[ $option_name ][ $setting_name ] ) : null;
|
731 |
} else {
|
732 |
+
$option_name = sanitize_text_field( $option['id'] );
|
733 |
$setting_name = '';
|
734 |
$raw_value = isset( $_POST[ $option['id'] ] ) ? wp_unslash( $_POST[ $option['id'] ] ) : null;
|
735 |
}
|
753 |
break;
|
754 |
}
|
755 |
$default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] );
|
756 |
+
$value = in_array( $raw_value, $allowed_values ) ? sanitize_text_field( $raw_value ) : sanitize_text_field( $default );
|
757 |
break;
|
758 |
case 'tinymce':
|
759 |
$value = wpautop( $raw_value );
|
includes/admin/class-ur-admin-user-list-manager.php
CHANGED
@@ -82,8 +82,8 @@ class UR_Admin_User_List_Manager {
|
|
82 |
$deny_link = remove_query_arg( array( 'new_role' ), $deny_link );
|
83 |
$deny_link = wp_nonce_url( $deny_link, 'ur_user_change_status' );
|
84 |
|
85 |
-
$approve_action = '<a style="color:#086512" href="' . esc_url( $approve_link ) . '">' .
|
86 |
-
$deny_action = '<a style="color:#e20707" href="' . esc_url( $deny_link ) . '">' .
|
87 |
|
88 |
$user_status = $user_manager->get_user_status();
|
89 |
|
@@ -142,7 +142,7 @@ class UR_Admin_User_List_Manager {
|
|
142 |
$redirect = add_query_arg( array( 'denied' => 1 ), $redirect );
|
143 |
}
|
144 |
|
145 |
-
wp_redirect( $redirect );
|
146 |
exit;
|
147 |
}
|
148 |
}
|
@@ -179,7 +179,7 @@ class UR_Admin_User_List_Manager {
|
|
179 |
// Check if Users are Pending and display pending users notice in UR and Users
|
180 |
if ( count( $users ) > 0 && in_array( $current_screen->id, $ur_pages )) {
|
181 |
$admin_url = admin_url( '', 'admin' ) . 'users.php?s&action=-1&new_role&ur_user_approval_status=pending&ur_user_filter_action=Filter&paged=1&action2=-1&new_role2&ur_user_approval_status2&ur_specific_form_user2';
|
182 |
-
echo '<div id="user-approvation-result" class="notice notice-success is-dismissible"><p><strong>' .
|
183 |
}
|
184 |
}
|
185 |
|
@@ -215,7 +215,7 @@ class UR_Admin_User_List_Manager {
|
|
215 |
}
|
216 |
|
217 |
if ( ! empty( $message ) ) {
|
218 |
-
echo '<div id="user-approvation-result" class="notice notice-success is-dismissible"><p><strong>' . $message . '</strong></p></div>';
|
219 |
}
|
220 |
}
|
221 |
|
@@ -239,8 +239,8 @@ class UR_Admin_User_List_Manager {
|
|
239 |
*/
|
240 |
public function add_column_head( $columns ) {
|
241 |
|
242 |
-
$the_columns['ur_user_user_registered_source'] =
|
243 |
-
$the_columns['ur_user_user_registered_log'] =
|
244 |
$newcol = array_slice( $columns, 0, -1 );
|
245 |
$newcol = array_merge( $newcol, $the_columns );
|
246 |
$columns = array_merge( $newcol, array_slice( $columns, 1 ) );
|
@@ -342,33 +342,33 @@ class UR_Admin_User_List_Manager {
|
|
342 |
<div class="alignleft actions">
|
343 |
|
344 |
<!-- Filter for approval status. -->
|
345 |
-
<label class="screen-reader-text" for="<?php echo $status_id; ?>"><?php
|
346 |
-
<select name="<?php echo $status_id; ?>" id="<?php echo $status_id; ?>">
|
347 |
-
<option value=""><?php
|
348 |
|
349 |
<?php
|
350 |
-
echo '<option value="approved" ' . selected( 'approved', $status_filter_value ) . '>' . $approved_label . '</option>';
|
351 |
-
echo '<option value="pending" ' . selected( 'pending', $status_filter_value ) . '>' . $pending_label . '</option>';
|
352 |
-
echo '<option value="denied" ' . selected( 'denied', $status_filter_value ) . '>' . $denied_label . '</option>';
|
353 |
?>
|
354 |
</select>
|
355 |
|
356 |
<!-- Filter for specific forms. -->
|
357 |
-
<label class="screen-reader-text" for="<?php echo $specific_form_id; ?>"><?php
|
358 |
-
<select name="<?php echo $specific_form_id; ?>" id="<?php echo $specific_form_id; ?>">
|
359 |
-
<option value=""><?php
|
360 |
|
361 |
<?php
|
362 |
$all_forms = ur_get_all_user_registration_form();
|
363 |
|
364 |
foreach ( $all_forms as $form_id => $form_name ) {
|
365 |
-
echo '<option value="' . $form_id . '" ' . selected( $form_id, $specific_form_filter_value ) . ' >' . $form_name . '</option>';
|
366 |
}
|
367 |
|
368 |
?>
|
369 |
</select>
|
370 |
<?php
|
371 |
-
submit_button(
|
372 |
|
373 |
}
|
374 |
|
@@ -494,11 +494,11 @@ class UR_Admin_User_List_Manager {
|
|
494 |
?>
|
495 |
<script type="text/javascript">
|
496 |
jQuery(document).ready(function() {
|
497 |
-
jQuery('<option>').val('approve').text('<?php
|
498 |
-
jQuery('<option>').val('approve').text('<?php
|
499 |
|
500 |
-
jQuery('<option>').val('deny').text('<?php
|
501 |
-
jQuery('<option>').val('deny').text('<?php
|
502 |
});
|
503 |
</script>
|
504 |
<?php
|
@@ -572,7 +572,7 @@ class UR_Admin_User_List_Manager {
|
|
572 |
?>
|
573 |
<table class="form-table">
|
574 |
<tr>
|
575 |
-
<th><label for="ur_user_user_status"><?php
|
576 |
</th>
|
577 |
<td>
|
578 |
<?php
|
@@ -584,7 +584,7 @@ class UR_Admin_User_List_Manager {
|
|
584 |
foreach ( $available_statuses as $status ) :
|
585 |
?>
|
586 |
<option
|
587 |
-
value="<?php echo esc_attr( $status ); ?>"<?php selected( $status, $user_status['user_status'] ); ?>><?php echo esc_html( UR_Admin_User_Manager::get_status_label( $status ) ); ?></option>
|
588 |
<?php
|
589 |
endforeach;
|
590 |
?>
|
@@ -598,10 +598,10 @@ class UR_Admin_User_List_Manager {
|
|
598 |
'Verified' => 1,
|
599 |
'Pending' => 0,
|
600 |
);
|
601 |
-
foreach ( $available_statuses as $
|
602 |
?>
|
603 |
<option
|
604 |
-
value="<?php echo esc_attr( $status ); ?>"<?php selected( $status, $user_status['user_status'] ); ?>><?php echo esc_html( $
|
605 |
<?php
|
606 |
endforeach;
|
607 |
?>
|
@@ -609,7 +609,7 @@ class UR_Admin_User_List_Manager {
|
|
609 |
<?php
|
610 |
}
|
611 |
?>
|
612 |
-
<span class="description"><?php
|
613 |
</td>
|
614 |
</tr>
|
615 |
</table>
|
@@ -638,8 +638,8 @@ class UR_Admin_User_List_Manager {
|
|
638 |
$new_status = $_POST['ur_user_user_status'];
|
639 |
$user_manager->save_status( $new_status );
|
640 |
} elseif ( isset( $_POST['ur_user_email_confirmation_status'] ) ) {
|
641 |
-
$new_status = $_POST['ur_user_email_confirmation_status'];
|
642 |
-
return update_user_meta( $user_id, 'ur_confirm_email', $new_status );
|
643 |
}
|
644 |
}
|
645 |
}
|
82 |
$deny_link = remove_query_arg( array( 'new_role' ), $deny_link );
|
83 |
$deny_link = wp_nonce_url( $deny_link, 'ur_user_change_status' );
|
84 |
|
85 |
+
$approve_action = '<a style="color:#086512" href="' . esc_url( $approve_link ) . '">' . esc_html_x( 'Approve', 'The action on users list page', 'user-registration' ) . '</a>';
|
86 |
+
$deny_action = '<a style="color:#e20707" href="' . esc_url( $deny_link ) . '">' . esc_html_x( 'Deny', 'The action on users list page', 'user-registration' ) . '</a>';
|
87 |
|
88 |
$user_status = $user_manager->get_user_status();
|
89 |
|
142 |
$redirect = add_query_arg( array( 'denied' => 1 ), $redirect );
|
143 |
}
|
144 |
|
145 |
+
wp_redirect( esc_url_raw( $redirect ) );
|
146 |
exit;
|
147 |
}
|
148 |
}
|
179 |
// Check if Users are Pending and display pending users notice in UR and Users
|
180 |
if ( count( $users ) > 0 && in_array( $current_screen->id, $ur_pages )) {
|
181 |
$admin_url = admin_url( '', 'admin' ) . 'users.php?s&action=-1&new_role&ur_user_approval_status=pending&ur_user_filter_action=Filter&paged=1&action2=-1&new_role2&ur_user_approval_status2&ur_specific_form_user2';
|
182 |
+
echo '<div id="user-approvation-result" class="notice notice-success is-dismissible"><p><strong>' . esc_html__( 'User Registration:', 'user-registration' ) . '</strong> ' . esc_html( count( $users ) ) . ' <a href="' . esc_url( $admin_url ) . '">' . ( ( count( $users ) === 1 ) ? esc_html__( 'User', 'user-registration' ) : esc_html__( 'Users', 'user-registration' ) ) . '</a> ' . esc_html__( 'pending approval.', 'user-registration' ) . '</p></div>';
|
183 |
}
|
184 |
}
|
185 |
|
215 |
}
|
216 |
|
217 |
if ( ! empty( $message ) ) {
|
218 |
+
echo '<div id="user-approvation-result" class="notice notice-success is-dismissible"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
|
219 |
}
|
220 |
}
|
221 |
|
239 |
*/
|
240 |
public function add_column_head( $columns ) {
|
241 |
|
242 |
+
$the_columns['ur_user_user_registered_source'] = esc_html__( 'Source', 'user-registration' );
|
243 |
+
$the_columns['ur_user_user_registered_log'] = esc_html__( 'Registered At', 'user-registration' );
|
244 |
$newcol = array_slice( $columns, 0, -1 );
|
245 |
$newcol = array_merge( $newcol, $the_columns );
|
246 |
$columns = array_merge( $newcol, array_slice( $columns, 1 ) );
|
342 |
<div class="alignleft actions">
|
343 |
|
344 |
<!-- Filter for approval status. -->
|
345 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( $status_id ); ?>"><?php esc_html_e( 'All statuses', 'user-registration' ); ?></label>
|
346 |
+
<select name="<?php echo esc_attr( $status_id ); ?>" id="<?php echo esc_attr( $status_id ); ?>">
|
347 |
+
<option value=""><?php esc_html_e( 'All approval statuses', 'user-registration' ); ?></option>
|
348 |
|
349 |
<?php
|
350 |
+
echo '<option value="approved" ' . esc_attr( selected( 'approved', $status_filter_value ) ) . '>' . esc_html( $approved_label ) . '</option>';
|
351 |
+
echo '<option value="pending" ' . esc_attr( selected( 'pending', $status_filter_value ) ) . '>' . esc_html( $pending_label ) . '</option>';
|
352 |
+
echo '<option value="denied" ' . esc_attr( selected( 'denied', $status_filter_value ) ) . '>' . esc_html( $denied_label ) . '</option>';
|
353 |
?>
|
354 |
</select>
|
355 |
|
356 |
<!-- Filter for specific forms. -->
|
357 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( $specific_form_id ); ?>"><?php esc_html_e( 'All Forms', 'user-registration' ); ?></label>
|
358 |
+
<select name="<?php echo esc_attr( $specific_form_id ); ?>" id="<?php echo esc_attr( $specific_form_id ); ?>">
|
359 |
+
<option value=""><?php esc_html_e( 'All UR Forms', 'user-registration' ); ?></option>
|
360 |
|
361 |
<?php
|
362 |
$all_forms = ur_get_all_user_registration_form();
|
363 |
|
364 |
foreach ( $all_forms as $form_id => $form_name ) {
|
365 |
+
echo '<option value="' . esc_attr( $form_id ). '" ' . esc_attr( selected( $form_id, $specific_form_filter_value ) ) . ' >' . esc_html( $form_name ) . '</option>';
|
366 |
}
|
367 |
|
368 |
?>
|
369 |
</select>
|
370 |
<?php
|
371 |
+
submit_button( esc_html__( 'Filter', 'user-registration' ), 'button', 'ur_user_filter_action', false );
|
372 |
|
373 |
}
|
374 |
|
494 |
?>
|
495 |
<script type="text/javascript">
|
496 |
jQuery(document).ready(function() {
|
497 |
+
jQuery('<option>').val('approve').text('<?php esc_html_e( 'Approve', 'user-registration' ); ?>').appendTo("select[name='action']");
|
498 |
+
jQuery('<option>').val('approve').text('<?php esc_html_e( 'Approve', 'user-registration' ); ?>').appendTo("select[name='action2']");
|
499 |
|
500 |
+
jQuery('<option>').val('deny').text('<?php esc_html_e( 'Deny', 'user-registration' ); ?>').appendTo("select[name='action']");
|
501 |
+
jQuery('<option>').val('deny').text('<?php esc_html_e( 'Deny', 'user-registration' ); ?>').appendTo("select[name='action2']");
|
502 |
});
|
503 |
</script>
|
504 |
<?php
|
572 |
?>
|
573 |
<table class="form-table">
|
574 |
<tr>
|
575 |
+
<th><label for="ur_user_user_status"><?php esc_html_e( 'Approval Status', 'user-registration' ); ?></label>
|
576 |
</th>
|
577 |
<td>
|
578 |
<?php
|
584 |
foreach ( $available_statuses as $status ) :
|
585 |
?>
|
586 |
<option
|
587 |
+
value="<?php echo esc_attr( $status ); ?>"<?php esc_attr( selected( $status, $user_status['user_status'] ) ); ?>><?php echo esc_html( UR_Admin_User_Manager::get_status_label( $status ) ); ?></option>
|
588 |
<?php
|
589 |
endforeach;
|
590 |
?>
|
598 |
'Verified' => 1,
|
599 |
'Pending' => 0,
|
600 |
);
|
601 |
+
foreach ( $available_statuses as $status_label => $status ) :
|
602 |
?>
|
603 |
<option
|
604 |
+
value="<?php echo esc_attr( $status ); ?>"<?php esc_attr( selected( $status, $user_status['user_status'] ) ); ?>><?php echo esc_html( $status_label ); ?></option>
|
605 |
<?php
|
606 |
endforeach;
|
607 |
?>
|
609 |
<?php
|
610 |
}
|
611 |
?>
|
612 |
+
<span class="description"><?php esc_html_e( 'If user has access to sign in or not.', 'user-registration' ); ?></span>
|
613 |
</td>
|
614 |
</tr>
|
615 |
</table>
|
638 |
$new_status = $_POST['ur_user_user_status'];
|
639 |
$user_manager->save_status( $new_status );
|
640 |
} elseif ( isset( $_POST['ur_user_email_confirmation_status'] ) ) {
|
641 |
+
$new_status = sanitize_text_field( $_POST['ur_user_email_confirmation_status'] );
|
642 |
+
return update_user_meta( absint( $user_id ), 'ur_confirm_email', $new_status );
|
643 |
}
|
644 |
}
|
645 |
}
|
includes/admin/class-ur-admin-user-manager.php
CHANGED
@@ -99,7 +99,7 @@ class UR_Admin_User_Manager {
|
|
99 |
return;
|
100 |
}
|
101 |
|
102 |
-
return update_user_meta( $this->user->ID, 'ur_user_status', $status );
|
103 |
}
|
104 |
|
105 |
/**
|
@@ -354,15 +354,15 @@ class UR_Admin_User_Manager {
|
|
354 |
*/
|
355 |
public static function get_status_label( $status ) {
|
356 |
if ( $status == self::APPROVED ) {
|
357 |
-
$label =
|
358 |
}
|
359 |
|
360 |
if ( $status == self::PENDING ) {
|
361 |
-
$label =
|
362 |
}
|
363 |
|
364 |
if ( $status == self::DENIED ) {
|
365 |
-
$label =
|
366 |
}
|
367 |
|
368 |
return ucfirst( $label );
|
99 |
return;
|
100 |
}
|
101 |
|
102 |
+
return update_user_meta( absint( $this->user->ID ), 'ur_user_status', sanitize_text_field( $status ) );
|
103 |
}
|
104 |
|
105 |
/**
|
354 |
*/
|
355 |
public static function get_status_label( $status ) {
|
356 |
if ( $status == self::APPROVED ) {
|
357 |
+
$label = esc_html__( 'approved', 'user-registration' );
|
358 |
}
|
359 |
|
360 |
if ( $status == self::PENDING ) {
|
361 |
+
$label = esc_html__( 'pending', 'user-registration' );
|
362 |
}
|
363 |
|
364 |
if ( $status == self::DENIED ) {
|
365 |
+
$label = esc_html__( 'denied', 'user-registration' );
|
366 |
}
|
367 |
|
368 |
return ucfirst( $label );
|
includes/admin/class-ur-admin.php
CHANGED
@@ -87,7 +87,7 @@ class UR_Admin {
|
|
87 |
$result = array_intersect( $user_roles, $option_roles );
|
88 |
|
89 |
if ( count( $result ) > 0 && apply_filters( 'user_registration_prevent_admin_access', true ) ) {
|
90 |
-
wp_safe_redirect( ur_get_page_permalink( 'myaccount' ) );
|
91 |
exit;
|
92 |
}
|
93 |
}
|
@@ -119,7 +119,7 @@ class UR_Admin {
|
|
119 |
if ( ! get_option( 'user_registration_admin_footer_text_rated' ) ) {
|
120 |
$footer_text = sprintf(
|
121 |
/* translators: 1: WooCommerce 2:: five stars */
|
122 |
-
|
123 |
sprintf( '<strong>%s</strong>', esc_html__( 'User Registration', 'user-registration' ) ),
|
124 |
'<a href="https://wordpress.org/support/plugin/user-registration/reviews?rate=5#new-post" target="_blank" class="ur-rating-link" data-rated="' . esc_attr__( 'Thank You!', 'user-registration' ) . '">★★★★★</a>'
|
125 |
);
|
@@ -132,7 +132,7 @@ class UR_Admin {
|
|
132 |
"
|
133 |
);
|
134 |
} else {
|
135 |
-
$footer_text =
|
136 |
}
|
137 |
}
|
138 |
|
@@ -166,21 +166,21 @@ class UR_Admin {
|
|
166 |
?>
|
167 |
<div id="user-registration-review-notice" class="notice notice-info user-registration-notice" data-purpose="review">
|
168 |
<div class="user-registration-notice-thumbnail">
|
169 |
-
<img src="<?php echo UR()->plugin_url() . '/assets/images/UR-Logo.png'; ?>" alt="">
|
170 |
</div>
|
171 |
<div class="user-registration-notice-text">
|
172 |
|
173 |
-
<h3><?php
|
174 |
-
<P><?php
|
175 |
-
<p><?php
|
176 |
-
<p class="extra-pad"><?php
|
177 |
Basically, it would encourage us to release updates regularly with new features & bug fixes so that you can keep on using the plugin without any issues and also to provide free support like we have been doing. <span class="dashicons dashicons-smiley smile-icon"></span><br>', 'user-registration' ); ?></p>
|
178 |
|
179 |
<ul class="user-registration-notice-ul">
|
180 |
-
<li><a class="button button-primary" href="https://wordpress.org/support/plugin/user-registration/reviews/#postform" target="_blank"><span class="dashicons dashicons-external"></span><?php
|
181 |
-
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-smiley"></span><?php
|
182 |
-
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-dismiss"></span><?php
|
183 |
-
<li><a href="https://wpeverest.com/support-forum/" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php
|
184 |
</ul>
|
185 |
</div>
|
186 |
</div>
|
@@ -214,21 +214,21 @@ class UR_Admin {
|
|
214 |
?>
|
215 |
<div id="user-registration-survey-notice" class="notice notice-info user-registration-notice" data-purpose="survey">
|
216 |
<div class="user-registration-notice-thumbnail">
|
217 |
-
<img src="<?php echo UR()->plugin_url() . '/assets/images/UR-Logo.png'; ?>" alt="">
|
218 |
</div>
|
219 |
<div class="user-registration-notice-text">
|
220 |
|
221 |
-
<h3><?php
|
222 |
-
<p><?php
|
223 |
We would be grateful if you could spare a moment and help us fill this survey. This survey will take approximately 4 minutes to complete.', 'user-registration' ); ?></p>
|
224 |
-
<p class="extra-pad"><?php
|
225 |
We will take your feedback from the survey and use that information to make the plugin better. As a result, you will have a better plugin as you wanted. <span class="dashicons dashicons-smiley smile-icon"></span><br>', 'user-registration' ); ?></p>
|
226 |
|
227 |
<ul class="user-registration-notice-ul">
|
228 |
-
<li><a class="button button-primary" href=<?php echo esc_url("https://forms.office.com/pages/responsepage.aspx?id=c04iBAejyEWvNQDb6GzDCILyv8m6NoBDvJVtRTCcOvBUNk5OSTA4OEs1SlRPTlhFSFZXRFA0UFEwRCQlQCN0PWcu"); ?> target="_blank"><span class="dashicons dashicons-external"></span><?php
|
229 |
-
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-smiley"></span><?php
|
230 |
-
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-dismiss"></span><?php
|
231 |
-
<li><a href="https://wpeverest.com/support-forum/" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php
|
232 |
</ul>
|
233 |
</div>
|
234 |
</div>
|
@@ -243,7 +243,7 @@ class UR_Admin {
|
|
243 |
*/
|
244 |
public function live_user_read() {
|
245 |
$now = current_time( 'mysql' );
|
246 |
-
update_option( 'user_registration_users_listing_viewed', $now );
|
247 |
}
|
248 |
|
249 |
/**
|
@@ -261,7 +261,7 @@ class UR_Admin {
|
|
261 |
$read_time = get_option( 'user_registration_users_listing_viewed' );
|
262 |
if ( ! $read_time ) {
|
263 |
$now = current_time( 'mysql' );
|
264 |
-
update_option( 'user_registration_users_listing_viewed', $now );
|
265 |
$read_time = $now;
|
266 |
}
|
267 |
|
@@ -278,7 +278,7 @@ class UR_Admin {
|
|
278 |
$user_query = new WP_User_Query( $user_args );
|
279 |
$user_count = $user_query->get_total();
|
280 |
|
281 |
-
$response['user_registration_new_user_message'] = sprintf(
|
282 |
$response['user_registration_new_user_count'] = $user_count;
|
283 |
return $response;
|
284 |
}
|
87 |
$result = array_intersect( $user_roles, $option_roles );
|
88 |
|
89 |
if ( count( $result ) > 0 && apply_filters( 'user_registration_prevent_admin_access', true ) ) {
|
90 |
+
wp_safe_redirect( esc_url_raw( ur_get_page_permalink( 'myaccount' ) ) );
|
91 |
exit;
|
92 |
}
|
93 |
}
|
119 |
if ( ! get_option( 'user_registration_admin_footer_text_rated' ) ) {
|
120 |
$footer_text = sprintf(
|
121 |
/* translators: 1: WooCommerce 2:: five stars */
|
122 |
+
esc_html__( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'user-registration' ),
|
123 |
sprintf( '<strong>%s</strong>', esc_html__( 'User Registration', 'user-registration' ) ),
|
124 |
'<a href="https://wordpress.org/support/plugin/user-registration/reviews?rate=5#new-post" target="_blank" class="ur-rating-link" data-rated="' . esc_attr__( 'Thank You!', 'user-registration' ) . '">★★★★★</a>'
|
125 |
);
|
132 |
"
|
133 |
);
|
134 |
} else {
|
135 |
+
$footer_text = esc_html__( 'Thank you for using User Registration.', 'user-registration' );
|
136 |
}
|
137 |
}
|
138 |
|
166 |
?>
|
167 |
<div id="user-registration-review-notice" class="notice notice-info user-registration-notice" data-purpose="review">
|
168 |
<div class="user-registration-notice-thumbnail">
|
169 |
+
<img src="<?php echo esc_url( UR()->plugin_url() . '/assets/images/UR-Logo.png' ); ?>" alt="">
|
170 |
</div>
|
171 |
<div class="user-registration-notice-text">
|
172 |
|
173 |
+
<h3><?php esc_html_e( 'HAKUNA <strong>MATATA!</strong>', 'user-registration' ); ?></h3>
|
174 |
+
<P><?php esc_html_e( '( The above word is just to draw your attention. <span class="dashicons dashicons-smiley smile-icon"></span> )', 'user-registration' ); ?> </P>
|
175 |
+
<p><?php esc_html_e( 'Hope you are having nice experience with <strong>User Registration</strong> plugin. Please provide this plugin a nice review.', 'user-registration' ); ?></p>
|
176 |
+
<p class="extra-pad"><?php esc_html_e('<strong>What benefit would you have?</strong> <br>
|
177 |
Basically, it would encourage us to release updates regularly with new features & bug fixes so that you can keep on using the plugin without any issues and also to provide free support like we have been doing. <span class="dashicons dashicons-smiley smile-icon"></span><br>', 'user-registration' ); ?></p>
|
178 |
|
179 |
<ul class="user-registration-notice-ul">
|
180 |
+
<li><a class="button button-primary" href="https://wordpress.org/support/plugin/user-registration/reviews/#postform" target="_blank"><span class="dashicons dashicons-external"></span><?php esc_html_e( 'Sure, I\'d love to!', 'user-registration' ); ?></a></li>
|
181 |
+
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-smiley"></span><?php esc_html_e( 'I already did!', 'user-registration' ); ?></a></li>
|
182 |
+
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again', 'user-registration' ); ?></a></li>
|
183 |
+
<li><a href="https://wpeverest.com/support-forum/" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php esc_html_e( 'I have a query', 'user-registration' ); ?></a></li>
|
184 |
</ul>
|
185 |
</div>
|
186 |
</div>
|
214 |
?>
|
215 |
<div id="user-registration-survey-notice" class="notice notice-info user-registration-notice" data-purpose="survey">
|
216 |
<div class="user-registration-notice-thumbnail">
|
217 |
+
<img src="<?php echo esc_url( UR()->plugin_url() . '/assets/images/UR-Logo.png' ); ?>" alt="">
|
218 |
</div>
|
219 |
<div class="user-registration-notice-text">
|
220 |
|
221 |
+
<h3><?php esc_html_e( 'User Registration Plugin Survey', 'user-registration' ); ?></h3></br>
|
222 |
+
<p><?php esc_html_e( '<strong>Hey there!</strong> <br>
|
223 |
We would be grateful if you could spare a moment and help us fill this survey. This survey will take approximately 4 minutes to complete.', 'user-registration' ); ?></p>
|
224 |
+
<p class="extra-pad"><?php esc_html_e('<strong>What benefit would you have?</strong> <br>
|
225 |
We will take your feedback from the survey and use that information to make the plugin better. As a result, you will have a better plugin as you wanted. <span class="dashicons dashicons-smiley smile-icon"></span><br>', 'user-registration' ); ?></p>
|
226 |
|
227 |
<ul class="user-registration-notice-ul">
|
228 |
+
<li><a class="button button-primary" href=<?php echo esc_url("https://forms.office.com/pages/responsepage.aspx?id=c04iBAejyEWvNQDb6GzDCILyv8m6NoBDvJVtRTCcOvBUNk5OSTA4OEs1SlRPTlhFSFZXRFA0UFEwRCQlQCN0PWcu"); ?> target="_blank"><span class="dashicons dashicons-external"></span><?php esc_html_e( 'Sure, I\'d love to!', 'user-registration' ); ?></a></li>
|
229 |
+
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-smiley"></span><?php esc_html_e( 'I already did!', 'user-registration' ); ?></a></li>
|
230 |
+
<li><a href="#" class="button button-secondary notice-dismiss"><span class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again', 'user-registration' ); ?></a></li>
|
231 |
+
<li><a href="https://wpeverest.com/support-forum/" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php esc_html_e( 'I have a query', 'user-registration' ); ?></a></li>
|
232 |
</ul>
|
233 |
</div>
|
234 |
</div>
|
243 |
*/
|
244 |
public function live_user_read() {
|
245 |
$now = current_time( 'mysql' );
|
246 |
+
update_option( 'user_registration_users_listing_viewed', sanitize_text_field( $now ) );
|
247 |
}
|
248 |
|
249 |
/**
|
261 |
$read_time = get_option( 'user_registration_users_listing_viewed' );
|
262 |
if ( ! $read_time ) {
|
263 |
$now = current_time( 'mysql' );
|
264 |
+
update_option( 'user_registration_users_listing_viewed', sanitize_text_field( $now ) );
|
265 |
$read_time = $now;
|
266 |
}
|
267 |
|
278 |
$user_query = new WP_User_Query( $user_args );
|
279 |
$user_count = $user_query->get_total();
|
280 |
|
281 |
+
$response['user_registration_new_user_message'] = sprintf( esc_html__( '%1$d new %2$s registered.', 'user-registration' ), $user_count, _n( 'User', 'Users', $user_count, 'user-registration' ) );
|
282 |
$response['user_registration_new_user_count'] = $user_count;
|
283 |
return $response;
|
284 |
}
|
includes/admin/functions-ur-admin.php
CHANGED
@@ -147,7 +147,7 @@ add_filter( 'wp_privacy_personal_data_erasers', 'user_registration_register_data
|
|
147 |
function user_registration_register_data_exporter( $exporters ) {
|
148 |
|
149 |
$exporters['user-registration'] = array(
|
150 |
-
'exporter_friendly_name' =>
|
151 |
'callback' => 'user_registration_data_exporter',
|
152 |
);
|
153 |
|
@@ -210,7 +210,7 @@ function user_registration_data_exporter( $email_address, $page = 1 ) {
|
|
210 |
|
211 |
$export_items[] = array(
|
212 |
'group_id' => 'user-registration',
|
213 |
-
'group_label' =>
|
214 |
'item_id' => "user-registration-{$meta->umeta_id}",
|
215 |
'data' => $data,
|
216 |
);
|
@@ -230,7 +230,7 @@ function user_registration_data_exporter( $email_address, $page = 1 ) {
|
|
230 |
*/
|
231 |
function user_registration_register_data_eraser( $erasers = array() ) {
|
232 |
$erasers['user-registration'] = array(
|
233 |
-
'eraser_friendly_name' =>
|
234 |
'callback' => 'user_registration_data_eraser',
|
235 |
);
|
236 |
return $erasers;
|
@@ -352,8 +352,8 @@ function ur_create_page( $slug, $option = '', $page_title = '', $page_content =
|
|
352 |
'post_status' => 'publish',
|
353 |
'post_type' => 'page',
|
354 |
'post_author' => 1,
|
355 |
-
'post_name' => $slug,
|
356 |
-
'post_title' => $page_title,
|
357 |
'post_content' => $page_content,
|
358 |
'post_parent' => $post_parent,
|
359 |
'comment_status' => 'closed',
|
@@ -471,11 +471,11 @@ function ur_update_form_settings( $setting_data, $form_id ) {
|
|
471 |
$remap_setting_data[ $field_data['id'] ]['value'] = sanitize_text_field( $remap_setting_data[ $field_data['id'] ]['value'] );
|
472 |
}
|
473 |
|
474 |
-
update_post_meta( $form_id, $field_data['id'], $remap_setting_data[ $field_data['id'] ]['value'] );
|
475 |
}
|
476 |
} else {
|
477 |
// Update post meta if any setting value is not set for field data id.
|
478 |
-
update_post_meta( $form_id, $field_data['id'], '' );
|
479 |
}
|
480 |
}
|
481 |
}
|
147 |
function user_registration_register_data_exporter( $exporters ) {
|
148 |
|
149 |
$exporters['user-registration'] = array(
|
150 |
+
'exporter_friendly_name' => esc_html__( 'User Extra Information', 'user-registration' ),
|
151 |
'callback' => 'user_registration_data_exporter',
|
152 |
);
|
153 |
|
210 |
|
211 |
$export_items[] = array(
|
212 |
'group_id' => 'user-registration',
|
213 |
+
'group_label' => esc_html__( 'User Extra Information', 'user-registration' ),
|
214 |
'item_id' => "user-registration-{$meta->umeta_id}",
|
215 |
'data' => $data,
|
216 |
);
|
230 |
*/
|
231 |
function user_registration_register_data_eraser( $erasers = array() ) {
|
232 |
$erasers['user-registration'] = array(
|
233 |
+
'eraser_friendly_name' => esc_html__( 'WordPress User Extra Information', 'user-registration' ),
|
234 |
'callback' => 'user_registration_data_eraser',
|
235 |
);
|
236 |
return $erasers;
|
352 |
'post_status' => 'publish',
|
353 |
'post_type' => 'page',
|
354 |
'post_author' => 1,
|
355 |
+
'post_name' => sanitize_text_field( $slug ),
|
356 |
+
'post_title' => sanitize_text_field( $page_title ),
|
357 |
'post_content' => $page_content,
|
358 |
'post_parent' => $post_parent,
|
359 |
'comment_status' => 'closed',
|
471 |
$remap_setting_data[ $field_data['id'] ]['value'] = sanitize_text_field( $remap_setting_data[ $field_data['id'] ]['value'] );
|
472 |
}
|
473 |
|
474 |
+
update_post_meta( absint( $form_id ), sanitize_text_field( $field_data['id'] ), $remap_setting_data[ $field_data['id'] ]['value'] );
|
475 |
}
|
476 |
} else {
|
477 |
// Update post meta if any setting value is not set for field data id.
|
478 |
+
update_post_meta( absint( $form_id) , sanitize_text_field( $field_data['id'] ), '' );
|
479 |
}
|
480 |
}
|
481 |
}
|
includes/admin/settings/class-ur-settings-email.php
CHANGED
@@ -5,8 +5,6 @@
|
|
5 |
* @class UR_Settings_Email
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
8 |
-
* @category Admin
|
9 |
-
* @author WPEverest
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -69,24 +67,24 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
69 |
$settings = apply_filters(
|
70 |
'user_registration_email_settings',
|
71 |
array(
|
72 |
-
'title'
|
73 |
-
'sections' => array
|
74 |
'email_notification_settings' => array(
|
75 |
-
'title'
|
76 |
-
'type'
|
77 |
-
'desc'
|
78 |
'settings' => array(
|
79 |
ur_get_user_login_option(),
|
80 |
array(
|
81 |
'type' => 'email_notification',
|
82 |
-
'id'
|
83 |
),
|
84 |
),
|
85 |
),
|
86 |
-
'sender_option'
|
87 |
-
'title'
|
88 |
-
'type'
|
89 |
-
'desc'
|
90 |
'settings' => array(
|
91 |
array(
|
92 |
'title' => __( '"From" name', 'user-registration' ),
|
@@ -114,10 +112,10 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
114 |
),
|
115 |
),
|
116 |
),
|
117 |
-
'send_test_email'
|
118 |
-
'title'
|
119 |
-
'type'
|
120 |
-
'desc'
|
121 |
'settings' => array(
|
122 |
array(
|
123 |
'title' => __( 'Send To', 'user-registration' ),
|
@@ -133,13 +131,13 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
133 |
'desc_tip' => true,
|
134 |
),
|
135 |
array(
|
136 |
-
'title'
|
137 |
-
'desc'
|
138 |
-
'id'
|
139 |
-
'type'
|
140 |
-
'css'
|
141 |
'buttons' => array(
|
142 |
-
array
|
143 |
'title' => __( 'Send Email', 'user-registration' ),
|
144 |
'href' => '#',
|
145 |
'class' => 'button user_registration_send_email_test',
|
@@ -156,10 +154,19 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
156 |
return apply_filters( 'user_registration_get_email_settings_' . $this->id, $settings );
|
157 |
}
|
158 |
|
|
|
|
|
|
|
159 |
public function get_emails() {
|
160 |
return $this->emails;
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
public function email_notification_setting( $settings, $value ) {
|
164 |
$settings .= '<tr valign="top">';
|
165 |
$settings .= '<td class="ur_emails_wrapper" colspan="2">';
|
@@ -168,12 +175,12 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
168 |
$settings .= '<tr>';
|
169 |
|
170 |
$columns = apply_filters(
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
|
178 |
foreach ( $columns as $key => $column ) {
|
179 |
$settings .= '<th style="padding-left:15px" class="ur-email-settings-table-' . esc_attr( $key ) . '">' . esc_html( $column ) . '</th>';
|
@@ -185,12 +192,12 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
185 |
$emails = $this->get_emails();
|
186 |
foreach ( $emails as $email ) {
|
187 |
$settings .= '<tr><td class="ur-email-settings-table">';
|
188 |
-
$settings .= '<a href="' . admin_url( 'admin.php?page=user-registration-settings&tab=email§ion=ur_settings_' . $email->id . '' ) .
|
189 |
-
'">' .
|
190 |
$settings .= ur_help_tip( __( $email->description, 'user-registration' ) );
|
191 |
$settings .= '</td>';
|
192 |
$settings .= '<td class="ur-email-settings-table">';
|
193 |
-
$settings .= '<a class="button tips" data-tip="' . esc_attr__( 'Configure', 'user-registration' ) . '" href="' . admin_url( 'admin.php?page=user-registration-settings&tab=email§ion=ur_settings_' . $email->id . '' ) . '"><span class="dashicons dashicons-admin-generic"></span> </a>';
|
194 |
$settings .= '</td>';
|
195 |
$settings .= '</tr>';
|
196 |
}
|
@@ -203,12 +210,15 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
203 |
return $settings;
|
204 |
}
|
205 |
|
|
|
|
|
|
|
206 |
public function save() {
|
207 |
global $current_section;
|
208 |
$emails = $this->get_emails();
|
209 |
|
210 |
foreach ( $emails as $email ) {
|
211 |
-
if (
|
212 |
$settings = new $email();
|
213 |
$settings = $settings->get_settings();
|
214 |
}
|
@@ -227,7 +237,7 @@ if ( ! class_exists( 'UR_Settings_Email' ) ) :
|
|
227 |
$emails = $this->get_emails();
|
228 |
|
229 |
foreach ( $emails as $email ) {
|
230 |
-
if (
|
231 |
$settings = new $email();
|
232 |
$settings = $settings->get_settings();
|
233 |
}
|
5 |
* @class UR_Settings_Email
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
67 |
$settings = apply_filters(
|
68 |
'user_registration_email_settings',
|
69 |
array(
|
70 |
+
'title' => __( 'Emails', 'user-registration' ),
|
71 |
+
'sections' => array(
|
72 |
'email_notification_settings' => array(
|
73 |
+
'title' => __( 'Email notifications', 'user-registration' ),
|
74 |
+
'type' => 'card',
|
75 |
+
'desc' => __( 'Email notifications sent from user registration are listed below. Click on an email to configure it.', 'user-registration' ),
|
76 |
'settings' => array(
|
77 |
ur_get_user_login_option(),
|
78 |
array(
|
79 |
'type' => 'email_notification',
|
80 |
+
'id' => 'user_registration_email_notification_settings',
|
81 |
),
|
82 |
),
|
83 |
),
|
84 |
+
'sender_option' => array(
|
85 |
+
'title' => __( 'Email Sender Options', 'user-registration' ),
|
86 |
+
'type' => 'card',
|
87 |
+
'desc' => '',
|
88 |
'settings' => array(
|
89 |
array(
|
90 |
'title' => __( '"From" name', 'user-registration' ),
|
112 |
),
|
113 |
),
|
114 |
),
|
115 |
+
'send_test_email' => array(
|
116 |
+
'title' => __( 'Send a Test Email', 'user-registration' ),
|
117 |
+
'type' => 'card',
|
118 |
+
'desc' => '',
|
119 |
'settings' => array(
|
120 |
array(
|
121 |
'title' => __( 'Send To', 'user-registration' ),
|
131 |
'desc_tip' => true,
|
132 |
),
|
133 |
array(
|
134 |
+
'title' => __( 'Send Email', 'user-registration' ),
|
135 |
+
'desc' => __( 'Click to send test email.', 'user-registration' ),
|
136 |
+
'id' => 'user_registration_email_test',
|
137 |
+
'type' => 'link',
|
138 |
+
'css' => 'min-width:300px;',
|
139 |
'buttons' => array(
|
140 |
+
array(
|
141 |
'title' => __( 'Send Email', 'user-registration' ),
|
142 |
'href' => '#',
|
143 |
'class' => 'button user_registration_send_email_test',
|
154 |
return apply_filters( 'user_registration_get_email_settings_' . $this->id, $settings );
|
155 |
}
|
156 |
|
157 |
+
/**
|
158 |
+
* Retrive Email Data.
|
159 |
+
*/
|
160 |
public function get_emails() {
|
161 |
return $this->emails;
|
162 |
}
|
163 |
|
164 |
+
/**
|
165 |
+
* Email Notification Settings.
|
166 |
+
*
|
167 |
+
* @param string $settings Settings.
|
168 |
+
* @param mixed $value Value.
|
169 |
+
*/
|
170 |
public function email_notification_setting( $settings, $value ) {
|
171 |
$settings .= '<tr valign="top">';
|
172 |
$settings .= '<td class="ur_emails_wrapper" colspan="2">';
|
175 |
$settings .= '<tr>';
|
176 |
|
177 |
$columns = apply_filters(
|
178 |
+
'user_registration_email_setting_columns',
|
179 |
+
array(
|
180 |
+
'name' => __( 'Email', 'user-registration' ),
|
181 |
+
'actions' => __( 'Configure', 'user-registration' ),
|
182 |
+
)
|
183 |
+
);
|
184 |
|
185 |
foreach ( $columns as $key => $column ) {
|
186 |
$settings .= '<th style="padding-left:15px" class="ur-email-settings-table-' . esc_attr( $key ) . '">' . esc_html( $column ) . '</th>';
|
192 |
$emails = $this->get_emails();
|
193 |
foreach ( $emails as $email ) {
|
194 |
$settings .= '<tr><td class="ur-email-settings-table">';
|
195 |
+
$settings .= '<a href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=email§ion=ur_settings_' . $email->id . '' ) ) .
|
196 |
+
'">' . esc_html__( $email->title, 'user-registration' ) . '</a>';
|
197 |
$settings .= ur_help_tip( __( $email->description, 'user-registration' ) );
|
198 |
$settings .= '</td>';
|
199 |
$settings .= '<td class="ur-email-settings-table">';
|
200 |
+
$settings .= '<a class="button tips" data-tip="' . esc_attr__( 'Configure', 'user-registration' ) . '" href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=email§ion=ur_settings_' . $email->id . '' ) ) . '"><span class="dashicons dashicons-admin-generic"></span> </a>';
|
201 |
$settings .= '</td>';
|
202 |
$settings .= '</tr>';
|
203 |
}
|
210 |
return $settings;
|
211 |
}
|
212 |
|
213 |
+
/**
|
214 |
+
* Save Email Settings.
|
215 |
+
*/
|
216 |
public function save() {
|
217 |
global $current_section;
|
218 |
$emails = $this->get_emails();
|
219 |
|
220 |
foreach ( $emails as $email ) {
|
221 |
+
if ( 'ur_settings_' . $email->id . '' === $current_section ) {
|
222 |
$settings = new $email();
|
223 |
$settings = $settings->get_settings();
|
224 |
}
|
237 |
$emails = $this->get_emails();
|
238 |
|
239 |
foreach ( $emails as $email ) {
|
240 |
+
if ( 'ur_settings_' . $email->id . '' === $current_section ) {
|
241 |
$settings = new $email();
|
242 |
$settings = $settings->get_settings();
|
243 |
}
|
includes/admin/settings/class-ur-settings-general.php
CHANGED
@@ -63,12 +63,12 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
63 |
$settings = apply_filters(
|
64 |
'user_registration_general_settings',
|
65 |
array(
|
66 |
-
'title'
|
67 |
-
'sections' => array
|
68 |
-
'general_options'
|
69 |
-
'title'
|
70 |
-
'type'
|
71 |
-
'desc'
|
72 |
'settings' => array(
|
73 |
array(
|
74 |
'title' => __( 'User login option', 'user-registration' ),
|
@@ -113,9 +113,9 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
113 |
),
|
114 |
),
|
115 |
'my_account_options' => array(
|
116 |
-
'title'
|
117 |
-
'type'
|
118 |
-
'desc'
|
119 |
'settings' => array(
|
120 |
array(
|
121 |
'title' => __( 'My account page', 'user-registration' ),
|
@@ -170,10 +170,10 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
170 |
),
|
171 |
),
|
172 |
),
|
173 |
-
'endpoint_options'
|
174 |
-
'title'
|
175 |
-
'type'
|
176 |
-
'desc'
|
177 |
'settings' => array(
|
178 |
array(
|
179 |
'title' => __( 'Edit profile', 'user-registration' ),
|
@@ -226,12 +226,12 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
226 |
$settings = apply_filters(
|
227 |
'user_registration_frontend_messages_settings',
|
228 |
array(
|
229 |
-
'title'
|
230 |
-
'sections' => array
|
231 |
'frontend_success_messages_settings' => array(
|
232 |
-
'title'
|
233 |
-
'type'
|
234 |
-
'desc'
|
235 |
'settings' => array(
|
236 |
array(
|
237 |
'title' => __( 'Manual login after registration', 'user-registration' ),
|
@@ -265,9 +265,9 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
265 |
),
|
266 |
),
|
267 |
'frontend_error_message_messages_settings' => array(
|
268 |
-
'title'
|
269 |
-
'type'
|
270 |
-
'desc'
|
271 |
'settings' => array(
|
272 |
array(
|
273 |
'title' => __( 'Required', 'user-registration' ),
|
@@ -278,7 +278,7 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
278 |
'css' => 'min-width: 350px;',
|
279 |
'default' => __( 'This field is required.', 'user-registration' ),
|
280 |
),
|
281 |
-
|
282 |
'title' => __( 'Special Character Validation in Username', 'user-registration' ),
|
283 |
'desc' => __( 'Enter the error message in form submission on username', 'user-registration' ),
|
284 |
'id' => 'user_registration_form_submission_error_message_disallow_username_character',
|
@@ -364,12 +364,12 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
364 |
$settings = apply_filters(
|
365 |
'user_registration_login_options_settings',
|
366 |
array(
|
367 |
-
'title'
|
368 |
-
'sections' => array
|
369 |
-
'login_options_settings'
|
370 |
-
'title'
|
371 |
-
'type'
|
372 |
-
'desc'
|
373 |
'settings' => array(
|
374 |
array(
|
375 |
'title' => __( 'Form Template', 'user-registration' ),
|
@@ -498,10 +498,10 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
498 |
),
|
499 |
),
|
500 |
),
|
501 |
-
'login_form_labels_settings'
|
502 |
-
'title'
|
503 |
-
'type'
|
504 |
-
'desc'
|
505 |
'settings' => array(
|
506 |
array(
|
507 |
'title' => __( 'Username or Email', 'user-registration' ),
|
@@ -555,9 +555,9 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
555 |
),
|
556 |
),
|
557 |
'login_form_placeholders_settings' => array(
|
558 |
-
'title'
|
559 |
-
'type'
|
560 |
-
'desc'
|
561 |
'settings' => array(
|
562 |
array(
|
563 |
'title' => __( 'Username or Email Field', 'user-registration' ),
|
@@ -580,10 +580,10 @@ if ( ! class_exists( 'UR_Settings_General' ) ) :
|
|
580 |
),
|
581 |
),
|
582 |
),
|
583 |
-
'login_form_messages_settings'
|
584 |
-
'title'
|
585 |
-
'type'
|
586 |
-
'desc'
|
587 |
'settings' => array(
|
588 |
array(
|
589 |
'title' => __( 'Username Required', 'user-registration' ),
|
63 |
$settings = apply_filters(
|
64 |
'user_registration_general_settings',
|
65 |
array(
|
66 |
+
'title' => __( 'General Options', 'user-registration' ),
|
67 |
+
'sections' => array(
|
68 |
+
'general_options' => array(
|
69 |
+
'title' => __( 'General', 'user-registration' ),
|
70 |
+
'type' => 'card',
|
71 |
+
'desc' => '',
|
72 |
'settings' => array(
|
73 |
array(
|
74 |
'title' => __( 'User login option', 'user-registration' ),
|
113 |
),
|
114 |
),
|
115 |
'my_account_options' => array(
|
116 |
+
'title' => __( 'My account Section', 'user-registration' ),
|
117 |
+
'type' => 'card',
|
118 |
+
'desc' => '',
|
119 |
'settings' => array(
|
120 |
array(
|
121 |
'title' => __( 'My account page', 'user-registration' ),
|
170 |
),
|
171 |
),
|
172 |
),
|
173 |
+
'endpoint_options' => array(
|
174 |
+
'title' => __( 'Endpoints Section', 'user-registration' ),
|
175 |
+
'type' => 'card',
|
176 |
+
'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' ),
|
177 |
'settings' => array(
|
178 |
array(
|
179 |
'title' => __( 'Edit profile', 'user-registration' ),
|
226 |
$settings = apply_filters(
|
227 |
'user_registration_frontend_messages_settings',
|
228 |
array(
|
229 |
+
'title' => __( 'Frontend Messages', 'user-registration' ),
|
230 |
+
'sections' => array(
|
231 |
'frontend_success_messages_settings' => array(
|
232 |
+
'title' => __( 'Success Messages', 'user-registration' ),
|
233 |
+
'type' => 'card',
|
234 |
+
'desc' => '',
|
235 |
'settings' => array(
|
236 |
array(
|
237 |
'title' => __( 'Manual login after registration', 'user-registration' ),
|
265 |
),
|
266 |
),
|
267 |
'frontend_error_message_messages_settings' => array(
|
268 |
+
'title' => __( 'Error Messages', 'user-registration' ),
|
269 |
+
'type' => 'card',
|
270 |
+
'desc' => '',
|
271 |
'settings' => array(
|
272 |
array(
|
273 |
'title' => __( 'Required', 'user-registration' ),
|
278 |
'css' => 'min-width: 350px;',
|
279 |
'default' => __( 'This field is required.', 'user-registration' ),
|
280 |
),
|
281 |
+
array(
|
282 |
'title' => __( 'Special Character Validation in Username', 'user-registration' ),
|
283 |
'desc' => __( 'Enter the error message in form submission on username', 'user-registration' ),
|
284 |
'id' => 'user_registration_form_submission_error_message_disallow_username_character',
|
364 |
$settings = apply_filters(
|
365 |
'user_registration_login_options_settings',
|
366 |
array(
|
367 |
+
'title' => __( 'Login Options', 'user-registration' ),
|
368 |
+
'sections' => array(
|
369 |
+
'login_options_settings' => array(
|
370 |
+
'title' => __( 'General', 'user-registration' ),
|
371 |
+
'type' => 'card',
|
372 |
+
'desc' => '',
|
373 |
'settings' => array(
|
374 |
array(
|
375 |
'title' => __( 'Form Template', 'user-registration' ),
|
498 |
),
|
499 |
),
|
500 |
),
|
501 |
+
'login_form_labels_settings' => array(
|
502 |
+
'title' => __( 'Labels', 'user-registration' ),
|
503 |
+
'type' => 'card',
|
504 |
+
'desc' => '',
|
505 |
'settings' => array(
|
506 |
array(
|
507 |
'title' => __( 'Username or Email', 'user-registration' ),
|
555 |
),
|
556 |
),
|
557 |
'login_form_placeholders_settings' => array(
|
558 |
+
'title' => __( 'Placeholders', 'user-registration' ),
|
559 |
+
'type' => 'card',
|
560 |
+
'desc' => '',
|
561 |
'settings' => array(
|
562 |
array(
|
563 |
'title' => __( 'Username or Email Field', 'user-registration' ),
|
580 |
),
|
581 |
),
|
582 |
),
|
583 |
+
'login_form_messages_settings' => array(
|
584 |
+
'title' => __( 'Messages', 'user-registration' ),
|
585 |
+
'type' => 'card',
|
586 |
+
'desc' => '',
|
587 |
'settings' => array(
|
588 |
array(
|
589 |
'title' => __( 'Username Required', 'user-registration' ),
|
includes/admin/settings/class-ur-settings-integration.php
CHANGED
@@ -5,8 +5,6 @@
|
|
5 |
* @class UR_Settings_Integration
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
8 |
-
* @category Admin
|
9 |
-
* @author WPEverest
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -43,12 +41,12 @@ if ( ! class_exists( 'UR_Settings_Integration ' ) ) :
|
|
43 |
$settings = apply_filters(
|
44 |
'user_registration_integration_settings',
|
45 |
array(
|
46 |
-
'title'
|
47 |
-
'sections' => array
|
48 |
'integration_options' => array(
|
49 |
-
'title'
|
50 |
-
'type'
|
51 |
-
'desc'
|
52 |
'settings' => array(
|
53 |
array(
|
54 |
'title' => __( 'Version', 'user-registration' ),
|
@@ -105,7 +103,7 @@ if ( ! class_exists( 'UR_Settings_Integration ' ) ) :
|
|
105 |
'css' => 'min-width: 350px;',
|
106 |
'desc_tip' => true,
|
107 |
),
|
108 |
-
)
|
109 |
),
|
110 |
),
|
111 |
)
|
5 |
* @class UR_Settings_Integration
|
6 |
* @version 1.0.0
|
7 |
* @package UserRegistration/Admin
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
41 |
$settings = apply_filters(
|
42 |
'user_registration_integration_settings',
|
43 |
array(
|
44 |
+
'title' => __( 'Integration', 'user-registration' ),
|
45 |
+
'sections' => array(
|
46 |
'integration_options' => array(
|
47 |
+
'title' => __( 'Google reCaptcha', 'user-registration' ),
|
48 |
+
'type' => 'card',
|
49 |
+
'desc' => '',
|
50 |
'settings' => array(
|
51 |
array(
|
52 |
'title' => __( 'Version', 'user-registration' ),
|
103 |
'css' => 'min-width: 350px;',
|
104 |
'desc_tip' => true,
|
105 |
),
|
106 |
+
),
|
107 |
),
|
108 |
),
|
109 |
)
|
includes/admin/settings/class-ur-settings-license.php
CHANGED
@@ -39,7 +39,7 @@ if ( ! class_exists( 'UR_Settings_License' ) ) :
|
|
39 |
*/
|
40 |
public function get_sections() {
|
41 |
$sections = array(
|
42 |
-
''
|
43 |
);
|
44 |
|
45 |
return apply_filters( 'user_registration_get_sections_' . $this->id, $sections );
|
@@ -55,30 +55,30 @@ if ( ! class_exists( 'UR_Settings_License' ) ) :
|
|
55 |
$settings = apply_filters(
|
56 |
'user_registration_license_settings',
|
57 |
array(
|
58 |
-
'title'
|
59 |
-
'sections' => array
|
60 |
'license_options' => array(
|
61 |
-
'title'
|
62 |
-
'type'
|
63 |
-
'desc'
|
64 |
'settings' => array(
|
65 |
array(
|
66 |
'title' => __( 'License Key', 'user-registration' ),
|
67 |
'desc' => __( 'Please enter the license key', 'user-registration' ),
|
68 |
-
'id' =>
|
69 |
'default' => '',
|
70 |
'type' => 'text',
|
71 |
'css' => 'min-width: 350px;',
|
72 |
'desc_tip' => true,
|
73 |
-
)
|
74 |
-
)
|
75 |
-
)
|
76 |
-
)
|
77 |
)
|
78 |
);
|
79 |
|
80 |
// Replace license input box and display deactivate license button when license is activated.
|
81 |
-
if ( get_option(
|
82 |
$settings['sections']['license_options']['settings'] = array(
|
83 |
array(
|
84 |
'title' => __( 'Deactivate License', 'user-registration' ),
|
@@ -86,7 +86,7 @@ if ( ! class_exists( 'UR_Settings_License' ) ) :
|
|
86 |
'desc_tip' => __( 'Deactivate the license of User Registration plugin', 'user-registration' ),
|
87 |
'type' => 'link',
|
88 |
'id' => 'user-registration_deactivate-license_key',
|
89 |
-
'css'
|
90 |
'buttons' => array(
|
91 |
array(
|
92 |
'title' => __( 'Deactivate License', 'user-registration' ),
|
@@ -94,9 +94,10 @@ if ( ! class_exists( 'UR_Settings_License' ) ) :
|
|
94 |
'class' => 'user_registration-deactivate-license-key',
|
95 |
),
|
96 |
),
|
97 |
-
)
|
98 |
);
|
99 |
-
|
|
|
100 |
|
101 |
// Hide save changes button from settings when license is activated.
|
102 |
$GLOBALS['hide_save_button'] = true;
|
39 |
*/
|
40 |
public function get_sections() {
|
41 |
$sections = array(
|
42 |
+
'' => __( 'License', 'user-registration' ),
|
43 |
);
|
44 |
|
45 |
return apply_filters( 'user_registration_get_sections_' . $this->id, $sections );
|
55 |
$settings = apply_filters(
|
56 |
'user_registration_license_settings',
|
57 |
array(
|
58 |
+
'title' => __( 'License Options', 'user-registration' ),
|
59 |
+
'sections' => array(
|
60 |
'license_options' => array(
|
61 |
+
'title' => __( 'License Activation', 'user-registration' ),
|
62 |
+
'type' => 'card',
|
63 |
+
'desc' => '<strong>' . __( 'License: ', 'user-registration' ) . '</strong>' . __( 'Please enter the license key below inorder to use our premium addons smoothly.', 'user-registration' ),
|
64 |
'settings' => array(
|
65 |
array(
|
66 |
'title' => __( 'License Key', 'user-registration' ),
|
67 |
'desc' => __( 'Please enter the license key', 'user-registration' ),
|
68 |
+
'id' => 'user-registration_license_key',
|
69 |
'default' => '',
|
70 |
'type' => 'text',
|
71 |
'css' => 'min-width: 350px;',
|
72 |
'desc_tip' => true,
|
73 |
+
),
|
74 |
+
),
|
75 |
+
),
|
76 |
+
),
|
77 |
)
|
78 |
);
|
79 |
|
80 |
// Replace license input box and display deactivate license button when license is activated.
|
81 |
+
if ( get_option( 'user-registration_license_key' ) ) {
|
82 |
$settings['sections']['license_options']['settings'] = array(
|
83 |
array(
|
84 |
'title' => __( 'Deactivate License', 'user-registration' ),
|
86 |
'desc_tip' => __( 'Deactivate the license of User Registration plugin', 'user-registration' ),
|
87 |
'type' => 'link',
|
88 |
'id' => 'user-registration_deactivate-license_key',
|
89 |
+
'css' => 'background:red; border:none; color:white;',
|
90 |
'buttons' => array(
|
91 |
array(
|
92 |
'title' => __( 'Deactivate License', 'user-registration' ),
|
94 |
'class' => 'user_registration-deactivate-license-key',
|
95 |
),
|
96 |
),
|
97 |
+
),
|
98 |
);
|
99 |
+
|
100 |
+
$settings['sections']['license_options']['desc'] = __( 'Your license has already been activated. Enjoy using <strong>User Registration</strong>.', 'user-registration' );
|
101 |
|
102 |
// Hide save changes button from settings when license is activated.
|
103 |
$GLOBALS['hide_save_button'] = true;
|
includes/admin/settings/class-ur-settings-page.php
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
*
|
5 |
* @version 1.0.0
|
6 |
* @package UserRegistration/Admin
|
7 |
-
* @category Admin
|
8 |
-
* @author WPEverest
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -64,7 +62,7 @@ if ( ! class_exists( 'UR_Settings_Page', false ) ) :
|
|
64 |
/**
|
65 |
* Add this page to settings.
|
66 |
*
|
67 |
-
* @param array $pages
|
68 |
* @return mixed
|
69 |
*/
|
70 |
public function add_settings_page( $pages ) {
|
@@ -108,7 +106,7 @@ if ( ! class_exists( 'UR_Settings_Page', false ) ) :
|
|
108 |
$array_keys = array_keys( $sections );
|
109 |
|
110 |
foreach ( $sections as $id => $label ) {
|
111 |
-
echo '<li><a href="' . admin_url( 'admin.php?page=user-registration-settings&tab=' . $this->id . '§ion=' . sanitize_title( $id ) ) . '" class="' . ( $current_section
|
112 |
}
|
113 |
|
114 |
echo '</ul>';
|
4 |
*
|
5 |
* @version 1.0.0
|
6 |
* @package UserRegistration/Admin
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
62 |
/**
|
63 |
* Add this page to settings.
|
64 |
*
|
65 |
+
* @param array $pages Pages.
|
66 |
* @return mixed
|
67 |
*/
|
68 |
public function add_settings_page( $pages ) {
|
106 |
$array_keys = array_keys( $sections );
|
107 |
|
108 |
foreach ( $sections as $id => $label ) {
|
109 |
+
echo '<li><a href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=' . $this->id . '§ion=' . sanitize_title( $id ) ) ) . '" class="' . ( $current_section === $id ? 'current' : '' ) . '">' . esc_html( $label ) . '</a></li>';
|
110 |
}
|
111 |
|
112 |
echo '</ul>';
|
includes/admin/settings/emails/class-ur-settings-admin-email.php
CHANGED
@@ -35,14 +35,14 @@ if ( ! class_exists( 'UR_Settings_Admin_Email', false ) ) :
|
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_admin_email',
|
37 |
array(
|
38 |
-
'title'
|
39 |
-
'sections' => array
|
40 |
'admin_email' => array(
|
41 |
-
'title'
|
42 |
-
'type'
|
43 |
-
'desc'
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
-
'settings'
|
46 |
array(
|
47 |
'title' => __( 'Enable this email', 'user-registration' ),
|
48 |
'desc' => __( 'Enable this email sent to admin after successful user registration.', 'user-registration' ),
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_admin_email',
|
37 |
array(
|
38 |
+
'title' => __( 'Emails', 'user-registration' ),
|
39 |
+
'sections' => array(
|
40 |
'admin_email' => array(
|
41 |
+
'title' => __( 'Admin Email', 'user-registration' ),
|
42 |
+
'type' => 'card',
|
43 |
+
'desc' => '',
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
+
'settings' => array(
|
46 |
array(
|
47 |
'title' => __( 'Enable this email', 'user-registration' ),
|
48 |
'desc' => __( 'Enable this email sent to admin after successful user registration.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-awaiting-admin-approval-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Awaiting_Admin_Approval_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_awaiting_admin_approval',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'awaiting_admin_approval_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to user notifying the registration is awaiting admin approval.', 'user-registration' ),
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_awaiting_admin_approval',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'awaiting_admin_approval_email' => array(
|
42 |
+
'title' => __( 'Awaiting Admin Approval Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to user notifying the registration is awaiting admin approval.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-email-confirmation.php
CHANGED
@@ -35,14 +35,14 @@ if ( ! class_exists( 'UR_Settings_Email_Confirmation', false ) ) :
|
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_email_confirmation',
|
37 |
array(
|
38 |
-
'title'
|
39 |
-
'sections' => array
|
40 |
'email_confirmation' => array(
|
41 |
-
'title'
|
42 |
-
'type'
|
43 |
-
'desc'
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
-
'settings'
|
46 |
array(
|
47 |
'title' => __( 'Email Subject', 'user-registration' ),
|
48 |
'desc' => __( 'The email subject you want to customize.', 'user-registration' ),
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_email_confirmation',
|
37 |
array(
|
38 |
+
'title' => __( 'Emails', 'user-registration' ),
|
39 |
+
'sections' => array(
|
40 |
'email_confirmation' => array(
|
41 |
+
'title' => __( 'Confirmation Email', 'user-registration' ),
|
42 |
+
'type' => 'card',
|
43 |
+
'desc' => '',
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
+
'settings' => array(
|
46 |
array(
|
47 |
'title' => __( 'Email Subject', 'user-registration' ),
|
48 |
'desc' => __( 'The email subject you want to customize.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-profile-details-changed-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Profile_Details_Changed_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_profile_details_changed_email',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'profile_details_changed_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the admin when a user changed profile information.', 'user-registration' ),
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_profile_details_changed_email',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'profile_details_changed_email' => array(
|
42 |
+
'title' => __( 'Profile Details Changed Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the admin when a user changed profile information.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-registration-approved-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Registration_Approved_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_approved_email',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'registration_approved_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is approved by site admin.', 'user-registration' ),
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_approved_email',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'registration_approved_email' => array(
|
42 |
+
'title' => __( 'Registration Approved Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is approved by site admin.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-registration-denied-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Registration_Denied_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_denied_email',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'registration_denied_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is denied by the admin.', 'user-registration' ),
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_denied_email',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'registration_denied_email' => array(
|
42 |
+
'title' => __( 'Registration Denied Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is denied by the admin.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-registration-pending-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Registration_Pending_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_pending_email',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'registration_pending_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is pending.', 'user-registration' ),
|
@@ -90,7 +90,6 @@ if ( ! class_exists( 'UR_Settings_Registration_Pending_Email', false ) ) :
|
|
90 |
'user_registration_get_registration_pending_email',
|
91 |
sprintf(
|
92 |
__(
|
93 |
-
|
94 |
'Hi {{username}}, <br/>
|
95 |
|
96 |
Your registration on <a href="{{home_url}}">{{blog_info}}</a> has been changed to pending. <br/>
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_registration_pending_email',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'registration_pending_email' => array(
|
42 |
+
'title' => __( 'Registration Pending Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user notifying the registration is pending.', 'user-registration' ),
|
90 |
'user_registration_get_registration_pending_email',
|
91 |
sprintf(
|
92 |
__(
|
|
|
93 |
'Hi {{username}}, <br/>
|
94 |
|
95 |
Your registration on <a href="{{home_url}}">{{blog_info}}</a> has been changed to pending. <br/>
|
includes/admin/settings/emails/class-ur-settings-reset-password-email.php
CHANGED
@@ -35,14 +35,14 @@ if ( ! class_exists( 'UR_Settings_Reset_Password_Email', false ) ) :
|
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_reset_password_email',
|
37 |
array(
|
38 |
-
'title'
|
39 |
-
'sections' => array
|
40 |
'reset_password_email' => array(
|
41 |
-
'title'
|
42 |
-
'type'
|
43 |
-
'desc'
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
-
'settings'
|
46 |
array(
|
47 |
'title' => __( 'Enable this email', 'user-registration' ),
|
48 |
'desc' => __( 'Enable this email sent to the user when a user requests for reset password.', 'user-registration' ),
|
35 |
$settings = apply_filters(
|
36 |
'user_registration_reset_password_email',
|
37 |
array(
|
38 |
+
'title' => __( 'Emails', 'user-registration' ),
|
39 |
+
'sections' => array(
|
40 |
'reset_password_email' => array(
|
41 |
+
'title' => __( 'Reset Password Email', 'user-registration' ),
|
42 |
+
'type' => 'card',
|
43 |
+
'desc' => '',
|
44 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
45 |
+
'settings' => array(
|
46 |
array(
|
47 |
'title' => __( 'Enable this email', 'user-registration' ),
|
48 |
'desc' => __( 'Enable this email sent to the user when a user requests for reset password.', 'user-registration' ),
|
includes/admin/settings/emails/class-ur-settings-successfully-registered-email.php
CHANGED
@@ -36,14 +36,14 @@ if ( ! class_exists( 'UR_Settings_Successfully_Registered_Email', false ) ) :
|
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_successfully_registered_email',
|
38 |
array(
|
39 |
-
'title'
|
40 |
-
'sections' => array
|
41 |
'successfully_registered_email' => array(
|
42 |
-
'title'
|
43 |
-
'type'
|
44 |
-
'desc'
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
-
'settings'
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user after successful user registration.', 'user-registration' ),
|
@@ -88,7 +88,6 @@ if ( ! class_exists( 'UR_Settings_Successfully_Registered_Email', false ) ) :
|
|
88 |
'user_registration_get_successfully_registered_email',
|
89 |
sprintf(
|
90 |
__(
|
91 |
-
|
92 |
'Hi {{username}}, <br/>
|
93 |
|
94 |
You have successfully completed user registration on <a href="{{home_url}}">{{blog_info}}</a>. <br/>
|
36 |
$settings = apply_filters(
|
37 |
'user_registration_successfully_registered_email',
|
38 |
array(
|
39 |
+
'title' => __( 'Emails', 'user-registration' ),
|
40 |
+
'sections' => array(
|
41 |
'successfully_registered_email' => array(
|
42 |
+
'title' => __( 'Successfully Registered Email', 'user-registration' ),
|
43 |
+
'type' => 'card',
|
44 |
+
'desc' => '',
|
45 |
'back_link' => ur_back_link( __( 'Return to emails', 'user-registration' ), admin_url( 'admin.php?page=user-registration-settings&tab=email' ) ),
|
46 |
+
'settings' => array(
|
47 |
array(
|
48 |
'title' => __( 'Enable this email', 'user-registration' ),
|
49 |
'desc' => __( 'Enable this email sent to the user after successful user registration.', 'user-registration' ),
|
88 |
'user_registration_get_successfully_registered_email',
|
89 |
sprintf(
|
90 |
__(
|
|
|
91 |
'Hi {{username}}, <br/>
|
92 |
|
93 |
You have successfully completed user registration on <a href="{{home_url}}">{{blog_info}}</a>. <br/>
|
includes/admin/updater/class-ur-addon-updater.php
CHANGED
@@ -7,8 +7,6 @@
|
|
7 |
* @class UR_AddOn_Updater
|
8 |
* @version 1.1.0
|
9 |
* @package UserRegistration/Updates
|
10 |
-
* @category Admin
|
11 |
-
* @author WPEverest
|
12 |
*/
|
13 |
|
14 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -20,13 +18,48 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
20 |
*/
|
21 |
class UR_AddOn_Updater {
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
private $wp_override = false;
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
/**
|
32 |
* Class constructor.
|
@@ -42,12 +75,12 @@ class UR_AddOn_Updater {
|
|
42 |
|
43 |
global $edd_plugin_data;
|
44 |
|
45 |
-
$this->api_url
|
46 |
-
$this->api_data
|
47 |
-
$this->name
|
48 |
-
$this->slug
|
49 |
|
50 |
-
if( strpos( $this->name, 'user-registration-pro' ) !== false ) {
|
51 |
$this->slug .= '-pro';
|
52 |
}
|
53 |
|
@@ -101,7 +134,7 @@ class UR_AddOn_Updater {
|
|
101 |
$_transient_data = new stdClass();
|
102 |
}
|
103 |
|
104 |
-
if ( 'plugins.php'
|
105 |
return $_transient_data;
|
106 |
}
|
107 |
|
@@ -143,10 +176,10 @@ class UR_AddOn_Updater {
|
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
-
*
|
147 |
*
|
148 |
-
* @param string $file
|
149 |
-
* @param array $plugin
|
150 |
*/
|
151 |
public function show_update_notification( $file, $plugin ) {
|
152 |
|
@@ -162,11 +195,11 @@ class UR_AddOn_Updater {
|
|
162 |
return;
|
163 |
}
|
164 |
|
165 |
-
if ( $this->name
|
166 |
return;
|
167 |
}
|
168 |
|
169 |
-
// Remove our filter on the site transient
|
170 |
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
171 |
|
172 |
$update_cache = get_site_transient( 'update_plugins' );
|
@@ -210,15 +243,14 @@ class UR_AddOn_Updater {
|
|
210 |
|
211 |
}
|
212 |
|
213 |
-
// Restore our filter
|
214 |
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
215 |
|
216 |
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
217 |
|
218 |
-
// build a plugin list row, with update notification
|
219 |
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
220 |
-
|
221 |
-
echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
222 |
echo '<td colspan="3" class="plugin-update colspanchange">';
|
223 |
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
224 |
|
@@ -226,7 +258,7 @@ class UR_AddOn_Updater {
|
|
226 |
|
227 |
if ( empty( $version_info->download_link ) ) {
|
228 |
printf(
|
229 |
-
|
230 |
esc_html( $version_info->name ),
|
231 |
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
232 |
esc_html( $version_info->new_version ),
|
@@ -234,7 +266,7 @@ class UR_AddOn_Updater {
|
|
234 |
);
|
235 |
} else {
|
236 |
printf(
|
237 |
-
|
238 |
esc_html( $version_info->name ),
|
239 |
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
240 |
esc_html( $version_info->new_version ),
|
@@ -244,7 +276,7 @@ class UR_AddOn_Updater {
|
|
244 |
);
|
245 |
}
|
246 |
|
247 |
-
do_action( "
|
248 |
|
249 |
echo '</div></td></tr>';
|
250 |
}
|
@@ -255,20 +287,20 @@ class UR_AddOn_Updater {
|
|
255 |
*
|
256 |
* @uses api_request()
|
257 |
*
|
258 |
-
* @param mixed $_data
|
259 |
-
* @param string $_action
|
260 |
-
* @param object $_args
|
261 |
* @return object $_data
|
262 |
*/
|
263 |
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
264 |
|
265 |
-
if (
|
266 |
|
267 |
return $_data;
|
268 |
|
269 |
}
|
270 |
|
271 |
-
if ( ! isset( $_args->slug ) || ( $_args->slug
|
272 |
|
273 |
return $_data;
|
274 |
|
@@ -285,7 +317,7 @@ class UR_AddOn_Updater {
|
|
285 |
|
286 |
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
287 |
|
288 |
-
// Get the transient where we store the api request for this plugin for 24 hours
|
289 |
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
290 |
|
291 |
// If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
@@ -293,7 +325,7 @@ class UR_AddOn_Updater {
|
|
293 |
|
294 |
$api_response = $this->api_request( 'plugin_information', $to_send );
|
295 |
|
296 |
-
// Expires in 3 hours
|
297 |
$this->set_version_info_cache( $api_response, $cache_key );
|
298 |
|
299 |
if ( false !== $api_response ) {
|
@@ -329,8 +361,8 @@ class UR_AddOn_Updater {
|
|
329 |
/**
|
330 |
* Disable SSL verification in order to prevent download update failures
|
331 |
*
|
332 |
-
* @param array $args
|
333 |
-
* @param string $url
|
334 |
* @return object $array
|
335 |
*/
|
336 |
public function http_request_args( $args, $url ) {
|
@@ -360,12 +392,12 @@ class UR_AddOn_Updater {
|
|
360 |
|
361 |
$data = array_merge( $this->api_data, $_data );
|
362 |
|
363 |
-
if ( $data['slug']
|
364 |
return;
|
365 |
}
|
366 |
|
367 |
-
if (
|
368 |
-
return false; // Don't allow a plugin to ping itself
|
369 |
}
|
370 |
|
371 |
$api_params = array(
|
@@ -413,6 +445,9 @@ class UR_AddOn_Updater {
|
|
413 |
return $request;
|
414 |
}
|
415 |
|
|
|
|
|
|
|
416 |
public function show_changelog() {
|
417 |
|
418 |
global $edd_plugin_data;
|
@@ -430,10 +465,10 @@ class UR_AddOn_Updater {
|
|
430 |
}
|
431 |
|
432 |
if ( ! current_user_can( 'update_plugins' ) ) {
|
433 |
-
wp_die(
|
434 |
}
|
435 |
|
436 |
-
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
437 |
$beta = ! empty( $data['beta'] ) ? true : false;
|
438 |
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
439 |
$version_info = $this->get_cached_version_info( $cache_key );
|
@@ -444,7 +479,7 @@ class UR_AddOn_Updater {
|
|
444 |
'edd_action' => 'get_version',
|
445 |
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
446 |
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
447 |
-
'slug' => $_REQUEST['slug'],
|
448 |
'author' => $data['author'],
|
449 |
'url' => home_url(),
|
450 |
'beta' => ! empty( $data['beta'] ),
|
@@ -481,12 +516,17 @@ class UR_AddOn_Updater {
|
|
481 |
}
|
482 |
|
483 |
if ( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
484 |
-
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
485 |
}
|
486 |
|
487 |
exit;
|
488 |
}
|
489 |
|
|
|
|
|
|
|
|
|
|
|
490 |
public function get_cached_version_info( $cache_key = '' ) {
|
491 |
|
492 |
if ( empty( $cache_key ) ) {
|
@@ -496,22 +536,28 @@ class UR_AddOn_Updater {
|
|
496 |
$cache = get_option( $cache_key );
|
497 |
|
498 |
if ( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
|
499 |
-
return false; // Cache is expired
|
500 |
}
|
501 |
|
502 |
return json_decode( $cache['value'] );
|
503 |
|
504 |
}
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
507 |
|
508 |
if ( empty( $cache_key ) ) {
|
509 |
-
$cache_key = $this->cache_key;
|
510 |
}
|
511 |
|
512 |
$data = array(
|
513 |
'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
|
514 |
-
'value' =>
|
515 |
);
|
516 |
|
517 |
update_option( $cache_key, $data, 'no' );
|
7 |
* @class UR_AddOn_Updater
|
8 |
* @version 1.1.0
|
9 |
* @package UserRegistration/Updates
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
*/
|
19 |
class UR_AddOn_Updater {
|
20 |
|
21 |
+
/**
|
22 |
+
* API URL.
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $api_url = '';
|
27 |
+
/**
|
28 |
+
* API Data.
|
29 |
+
*
|
30 |
+
* @var array
|
31 |
+
*/
|
32 |
+
private $api_data = array();
|
33 |
+
/**
|
34 |
+
* Name.
|
35 |
+
*
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
private $name = '';
|
39 |
+
/**
|
40 |
+
* Slug.
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $slug = '';
|
45 |
+
/**
|
46 |
+
* Version.
|
47 |
+
*
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
private $version = '';
|
51 |
+
/**
|
52 |
+
* WP Override.
|
53 |
+
*
|
54 |
+
* @var bool
|
55 |
+
*/
|
56 |
private $wp_override = false;
|
57 |
+
/**
|
58 |
+
* Cache Key.
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
private $cache_key = '';
|
63 |
|
64 |
/**
|
65 |
* Class constructor.
|
75 |
|
76 |
global $edd_plugin_data;
|
77 |
|
78 |
+
$this->api_url = trailingslashit( $_api_url );
|
79 |
+
$this->api_data = $_api_data;
|
80 |
+
$this->name = plugin_basename( $_plugin_file );
|
81 |
+
$this->slug = basename( $_plugin_file, '.php' );
|
82 |
|
83 |
+
if ( strpos( $this->name, 'user-registration-pro' ) !== false ) {
|
84 |
$this->slug .= '-pro';
|
85 |
}
|
86 |
|
134 |
$_transient_data = new stdClass();
|
135 |
}
|
136 |
|
137 |
+
if ( 'plugins.php' === $pagenow && is_multisite() ) {
|
138 |
return $_transient_data;
|
139 |
}
|
140 |
|
176 |
}
|
177 |
|
178 |
/**
|
179 |
+
* Show update notification row -- needed for multisite subsites, because WP won't tell you otherwise!
|
180 |
*
|
181 |
+
* @param string $file File.
|
182 |
+
* @param array $plugin Plugin.
|
183 |
*/
|
184 |
public function show_update_notification( $file, $plugin ) {
|
185 |
|
195 |
return;
|
196 |
}
|
197 |
|
198 |
+
if ( $this->name !== $file ) {
|
199 |
return;
|
200 |
}
|
201 |
|
202 |
+
// Remove our filter on the site transient.
|
203 |
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
204 |
|
205 |
$update_cache = get_site_transient( 'update_plugins' );
|
243 |
|
244 |
}
|
245 |
|
246 |
+
// Restore our filter.
|
247 |
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
248 |
|
249 |
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
250 |
|
251 |
+
// build a plugin list row, with update notification.
|
252 |
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
253 |
+
echo '<tr class="plugin-update-tr" id="' . esc_attr( $this->slug ) . '-update" data-slug="' . esc_attr( $this->slug ) . '" data-plugin="' . esc_attr( $this->slug ) . '/' . esc_attr( $file ) . '">';
|
|
|
254 |
echo '<td colspan="3" class="plugin-update colspanchange">';
|
255 |
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
256 |
|
258 |
|
259 |
if ( empty( $version_info->download_link ) ) {
|
260 |
printf(
|
261 |
+
esc_html__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'user-registration' ),
|
262 |
esc_html( $version_info->name ),
|
263 |
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
264 |
esc_html( $version_info->new_version ),
|
266 |
);
|
267 |
} else {
|
268 |
printf(
|
269 |
+
esc_html__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'user-registration' ),
|
270 |
esc_html( $version_info->name ),
|
271 |
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
272 |
esc_html( $version_info->new_version ),
|
276 |
);
|
277 |
}
|
278 |
|
279 |
+
do_action( "in_plugin_update_message_{$file}", $plugin, $version_info );
|
280 |
|
281 |
echo '</div></td></tr>';
|
282 |
}
|
287 |
*
|
288 |
* @uses api_request()
|
289 |
*
|
290 |
+
* @param mixed $_data Data.
|
291 |
+
* @param string $_action Action.
|
292 |
+
* @param object $_args Arguments.
|
293 |
* @return object $_data
|
294 |
*/
|
295 |
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
296 |
|
297 |
+
if ( 'plugin_information' !== $this->api_url ) {
|
298 |
|
299 |
return $_data;
|
300 |
|
301 |
}
|
302 |
|
303 |
+
if ( ! isset( $_args->slug ) || ( $_args->slug !== $this->slug ) ) {
|
304 |
|
305 |
return $_data;
|
306 |
|
317 |
|
318 |
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
319 |
|
320 |
+
// Get the transient where we store the api request for this plugin for 24 hours.
|
321 |
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
322 |
|
323 |
// If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
325 |
|
326 |
$api_response = $this->api_request( 'plugin_information', $to_send );
|
327 |
|
328 |
+
// Expires in 3 hours.
|
329 |
$this->set_version_info_cache( $api_response, $cache_key );
|
330 |
|
331 |
if ( false !== $api_response ) {
|
361 |
/**
|
362 |
* Disable SSL verification in order to prevent download update failures
|
363 |
*
|
364 |
+
* @param array $args Arguments.
|
365 |
+
* @param string $url URL.
|
366 |
* @return object $array
|
367 |
*/
|
368 |
public function http_request_args( $args, $url ) {
|
392 |
|
393 |
$data = array_merge( $this->api_data, $_data );
|
394 |
|
395 |
+
if ( $data['slug'] !== $this->slug ) {
|
396 |
return;
|
397 |
}
|
398 |
|
399 |
+
if ( trailingslashit( home_url() ) === $this->api_url ) {
|
400 |
+
return false; // Don't allow a plugin to ping itself.
|
401 |
}
|
402 |
|
403 |
$api_params = array(
|
445 |
return $request;
|
446 |
}
|
447 |
|
448 |
+
/**
|
449 |
+
* Show Change Log.
|
450 |
+
*/
|
451 |
public function show_changelog() {
|
452 |
|
453 |
global $edd_plugin_data;
|
465 |
}
|
466 |
|
467 |
if ( ! current_user_can( 'update_plugins' ) ) {
|
468 |
+
wp_die( esc_html__( 'You do not have permission to install plugin updates', 'user-registration' ), esc_html__( 'Error', 'user-registration' ), array( 'response' => 403 ) );
|
469 |
}
|
470 |
|
471 |
+
$data = $edd_plugin_data[ sanitize_key( wp_unslash( $_REQUEST['slug'] ) ) ];
|
472 |
$beta = ! empty( $data['beta'] ) ? true : false;
|
473 |
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
474 |
$version_info = $this->get_cached_version_info( $cache_key );
|
479 |
'edd_action' => 'get_version',
|
480 |
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
481 |
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
482 |
+
'slug' => isset( $_REQUEST['slug'] ) ? sanitize_key( wp_unslash( $_REQUEST['slug'] ) ) : '',
|
483 |
'author' => $data['author'],
|
484 |
'url' => home_url(),
|
485 |
'beta' => ! empty( $data['beta'] ),
|
516 |
}
|
517 |
|
518 |
if ( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
519 |
+
echo '<div style="background:#fff;padding:10px;">' . esc_html( $version_info->sections['changelog'] ) . '</div>';
|
520 |
}
|
521 |
|
522 |
exit;
|
523 |
}
|
524 |
|
525 |
+
/**
|
526 |
+
* Get Cache version info.
|
527 |
+
*
|
528 |
+
* @param string $cache_key Cache key.
|
529 |
+
*/
|
530 |
public function get_cached_version_info( $cache_key = '' ) {
|
531 |
|
532 |
if ( empty( $cache_key ) ) {
|
536 |
$cache = get_option( $cache_key );
|
537 |
|
538 |
if ( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
|
539 |
+
return false; // Cache is expired.
|
540 |
}
|
541 |
|
542 |
return json_decode( $cache['value'] );
|
543 |
|
544 |
}
|
545 |
|
546 |
+
/**
|
547 |
+
* Set version info cache.
|
548 |
+
*
|
549 |
+
* @param string $value Value.
|
550 |
+
* @param string $cache_key Key.
|
551 |
+
*/
|
552 |
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
553 |
|
554 |
if ( empty( $cache_key ) ) {
|
555 |
+
$cache_key = sanitize_text_field( $this->cache_key );
|
556 |
}
|
557 |
|
558 |
$data = array(
|
559 |
'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
|
560 |
+
'value' => wp_json_encode( $value ),
|
561 |
);
|
562 |
|
563 |
update_option( $cache_key, $data, 'no' );
|
includes/admin/updater/class-ur-plugin-updater-api.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
/**
|
3 |
* Handles the Activation API responses.
|
4 |
*
|
5 |
-
* @author WPEverest
|
6 |
-
* @category Admin
|
7 |
* @package UserRegistration/Admin/Updates
|
8 |
* @version 1.1.0
|
9 |
*/
|
@@ -17,10 +15,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
*/
|
18 |
class UR_Updater_Key_API {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
private static $endpoint = 'https://wpeverest.com/edd-sl-api/?';
|
21 |
|
22 |
/**
|
23 |
* Attempt to check a plugin license.
|
|
|
|
|
24 |
*/
|
25 |
public static function check( $api_params ) {
|
26 |
$defaults = array(
|
@@ -40,7 +45,7 @@ class UR_Updater_Key_API {
|
|
40 |
)
|
41 |
);
|
42 |
|
43 |
-
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response )
|
44 |
return false;
|
45 |
} else {
|
46 |
return wp_remote_retrieve_body( $response );
|
@@ -49,6 +54,8 @@ class UR_Updater_Key_API {
|
|
49 |
|
50 |
/**
|
51 |
* Attempt to check a plugin version.
|
|
|
|
|
52 |
*/
|
53 |
public static function version( $api_params ) {
|
54 |
$defaults = array(
|
@@ -68,7 +75,7 @@ class UR_Updater_Key_API {
|
|
68 |
)
|
69 |
);
|
70 |
|
71 |
-
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response )
|
72 |
return false;
|
73 |
} else {
|
74 |
return wp_remote_retrieve_body( $response );
|
@@ -78,7 +85,8 @@ class UR_Updater_Key_API {
|
|
78 |
/**
|
79 |
* Attempt to activate a plugin license.
|
80 |
*
|
81 |
-
* @
|
|
|
82 |
*/
|
83 |
public static function activate( $api_params ) {
|
84 |
$defaults = array(
|
@@ -100,7 +108,7 @@ class UR_Updater_Key_API {
|
|
100 |
|
101 |
// Make sure there are no errors.
|
102 |
if ( is_wp_error( $response ) ) {
|
103 |
-
return
|
104 |
array(
|
105 |
'error_code' => $response->get_error_code(),
|
106 |
'error' => $response->get_error_message(),
|
@@ -108,8 +116,8 @@ class UR_Updater_Key_API {
|
|
108 |
);
|
109 |
}
|
110 |
|
111 |
-
if ( wp_remote_retrieve_response_code( $response )
|
112 |
-
return
|
113 |
array(
|
114 |
'error_code' => wp_remote_retrieve_response_code( $response ),
|
115 |
'error' => 'Error code: ' . wp_remote_retrieve_response_code( $response ),
|
@@ -125,6 +133,8 @@ class UR_Updater_Key_API {
|
|
125 |
|
126 |
/**
|
127 |
* Attempt to deactivate a plugin license.
|
|
|
|
|
128 |
*/
|
129 |
public static function deactivate( $api_params ) {
|
130 |
$defaults = array(
|
@@ -144,7 +154,7 @@ class UR_Updater_Key_API {
|
|
144 |
)
|
145 |
);
|
146 |
|
147 |
-
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response )
|
148 |
return false;
|
149 |
} else {
|
150 |
return wp_remote_retrieve_body( $response );
|
2 |
/**
|
3 |
* Handles the Activation API responses.
|
4 |
*
|
|
|
|
|
5 |
* @package UserRegistration/Admin/Updates
|
6 |
* @version 1.1.0
|
7 |
*/
|
15 |
*/
|
16 |
class UR_Updater_Key_API {
|
17 |
|
18 |
+
/**
|
19 |
+
* Endpoint.
|
20 |
+
*
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
private static $endpoint = 'https://wpeverest.com/edd-sl-api/?';
|
24 |
|
25 |
/**
|
26 |
* Attempt to check a plugin license.
|
27 |
+
*
|
28 |
+
* @param mixed $api_params Parameters.
|
29 |
*/
|
30 |
public static function check( $api_params ) {
|
31 |
$defaults = array(
|
45 |
)
|
46 |
);
|
47 |
|
48 |
+
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
49 |
return false;
|
50 |
} else {
|
51 |
return wp_remote_retrieve_body( $response );
|
54 |
|
55 |
/**
|
56 |
* Attempt to check a plugin version.
|
57 |
+
*
|
58 |
+
* @param mixed $api_params API Params.
|
59 |
*/
|
60 |
public static function version( $api_params ) {
|
61 |
$defaults = array(
|
75 |
)
|
76 |
);
|
77 |
|
78 |
+
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
79 |
return false;
|
80 |
} else {
|
81 |
return wp_remote_retrieve_body( $response );
|
85 |
/**
|
86 |
* Attempt to activate a plugin license.
|
87 |
*
|
88 |
+
* @param mixed $api_params API Params.
|
89 |
+
* @return string JSON response.
|
90 |
*/
|
91 |
public static function activate( $api_params ) {
|
92 |
$defaults = array(
|
108 |
|
109 |
// Make sure there are no errors.
|
110 |
if ( is_wp_error( $response ) ) {
|
111 |
+
return wp_json_encode(
|
112 |
array(
|
113 |
'error_code' => $response->get_error_code(),
|
114 |
'error' => $response->get_error_message(),
|
116 |
);
|
117 |
}
|
118 |
|
119 |
+
if ( wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
120 |
+
return wp_json_encode(
|
121 |
array(
|
122 |
'error_code' => wp_remote_retrieve_response_code( $response ),
|
123 |
'error' => 'Error code: ' . wp_remote_retrieve_response_code( $response ),
|
133 |
|
134 |
/**
|
135 |
* Attempt to deactivate a plugin license.
|
136 |
+
*
|
137 |
+
* @param mixed $api_params API Params.
|
138 |
*/
|
139 |
public static function deactivate( $api_params ) {
|
140 |
$defaults = array(
|
154 |
)
|
155 |
);
|
156 |
|
157 |
+
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
158 |
return false;
|
159 |
} else {
|
160 |
return wp_remote_retrieve_body( $response );
|
includes/admin/updater/class-ur-plugin-updates.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
/**
|
3 |
* Class for displaying plugin warning notifications and determining 3rd party plugin compatibility.
|
4 |
*
|
5 |
-
* @author WPEverest
|
6 |
-
* @category Admin
|
7 |
* @package UserRegistration/Admin
|
8 |
* @version 1.1.0
|
9 |
*/
|
@@ -34,7 +32,7 @@ class UR_Plugin_Updates {
|
|
34 |
/**
|
35 |
* Get plugins that have a valid value for a specific header.
|
36 |
*
|
37 |
-
* @param string $header
|
38 |
* @return array of plugin info arrays
|
39 |
*/
|
40 |
protected function get_plugins_with_header( $header ) {
|
2 |
/**
|
3 |
* Class for displaying plugin warning notifications and determining 3rd party plugin compatibility.
|
4 |
*
|
|
|
|
|
5 |
* @package UserRegistration/Admin
|
6 |
* @version 1.1.0
|
7 |
*/
|
32 |
/**
|
33 |
* Get plugins that have a valid value for a specific header.
|
34 |
*
|
35 |
+
* @param string $header Header.
|
36 |
* @return array of plugin info arrays
|
37 |
*/
|
38 |
protected function get_plugins_with_header( $header ) {
|
includes/admin/views/html-admin-page-addons.php
CHANGED
@@ -4,34 +4,40 @@
|
|
4 |
*
|
5 |
* @var string $view
|
6 |
* @var object $addons
|
|
|
7 |
*/
|
|
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit; // Exit if accessed directly.
|
10 |
}
|
11 |
|
12 |
?>
|
13 |
<div class="wrap ur_addons_wrap">
|
14 |
-
<
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
|
18 |
-
<
|
|
|
19 |
|
20 |
<?php if ( $sections ) : ?>
|
21 |
<ul class="subsubsub">
|
22 |
<?php foreach ( $sections as $section_id => $section ) : ?>
|
23 |
-
<li><a class="<?php echo $current_section === $section_id ? 'current' : ''; ?>" href="<?php echo admin_url( 'admin.php?page=user-registration-addons§ion=' . esc_attr( $section_id ) ); ?>"><?php echo esc_html( $section->title ); ?></a><?php echo ( end( $section_keys ) !== $section_id ) ? : ''; ?></li>
|
24 |
<?php endforeach; ?>
|
25 |
</ul>
|
26 |
<br class="clear" />
|
27 |
-
<?php
|
|
|
28 |
<ul class="products">
|
29 |
-
|
30 |
<li class="product">
|
31 |
<a href="<?php echo esc_attr( $addon->link ); ?>">
|
32 |
<h2><?php echo esc_html( $addon->title ); ?></h2>
|
33 |
<?php if ( ! empty( $addon->image ) ) : ?>
|
34 |
-
<span class="product-image"><img src="<?php echo
|
35 |
<?php endif; ?>
|
36 |
<span class="price"><?php echo isset( $addon->price ) ? wp_kses_post( $addon->price ) : ''; ?></span>
|
37 |
<p><?php echo wp_kses_post( $addon->excerpt ); ?></p>
|
@@ -41,6 +47,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
41 |
</ul>
|
42 |
<?php endif; ?>
|
43 |
<?php else : ?>
|
44 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
45 |
<?php endif; ?>
|
46 |
</div>
|
4 |
*
|
5 |
* @var string $view
|
6 |
* @var object $addons
|
7 |
+
* @package UserRegistration
|
8 |
*/
|
9 |
+
|
10 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
exit; // Exit if accessed directly.
|
12 |
}
|
13 |
|
14 |
?>
|
15 |
<div class="wrap ur_addons_wrap">
|
16 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'User Registration Extensions', 'user-registration' ); ?></h1>
|
17 |
+
|
18 |
+
<?php if ( apply_filters( 'user_registration_refresh_addons', true ) ) : ?>
|
19 |
+
<a href="<?php echo esc_url( $refresh_url ); ?>" class="page-title-action"><?php esc_html_e( 'Refresh Extensions', 'user-registration' ); ?></a>
|
20 |
+
<?php endif; ?>
|
21 |
|
22 |
+
<hr class="wp-header-end">
|
23 |
+
<h2 class="screen-reader-text"><?php esc_html_e( 'Filter extensions list', 'user-registration' ); ?></h2>
|
24 |
|
25 |
<?php if ( $sections ) : ?>
|
26 |
<ul class="subsubsub">
|
27 |
<?php foreach ( $sections as $section_id => $section ) : ?>
|
28 |
+
<li><a class="<?php echo $current_section === $section_id ? 'current' : ''; ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=user-registration-addons§ion=' . esc_attr( $section_id ) ) ); ?>"><?php echo esc_html( $section->title ); ?></a><?php echo ( end( $section_keys ) !== $section_id ) ? : ''; ?></li>
|
29 |
<?php endforeach; ?>
|
30 |
</ul>
|
31 |
<br class="clear" />
|
32 |
+
<?php $addons = UR_Admin_Addons::get_section_data( $current_section ); ?>
|
33 |
+
<?php if ( $addons ) : ?>
|
34 |
<ul class="products">
|
35 |
+
<?php foreach ( $addons as $addon ) : ?>
|
36 |
<li class="product">
|
37 |
<a href="<?php echo esc_attr( $addon->link ); ?>">
|
38 |
<h2><?php echo esc_html( $addon->title ); ?></h2>
|
39 |
<?php if ( ! empty( $addon->image ) ) : ?>
|
40 |
+
<span class="product-image"><img src="<?php echo esc_url( UR()->plugin_url() . '/assets/' . $addon->image ); ?>"/></span>
|
41 |
<?php endif; ?>
|
42 |
<span class="price"><?php echo isset( $addon->price ) ? wp_kses_post( $addon->price ) : ''; ?></span>
|
43 |
<p><?php echo wp_kses_post( $addon->excerpt ); ?></p>
|
47 |
</ul>
|
48 |
<?php endif; ?>
|
49 |
<?php else : ?>
|
50 |
+
<p>
|
51 |
+
<?php
|
52 |
+
/* translators: %s - User Registration Extensions Catalog */
|
53 |
+
printf( esc_html__( 'Our catalog of User Registration Extensions can be found on WPEverest.com here: <a href="%s">User Registration Extensions Catalog</a>', 'user-registration' ), 'https://wpeverest.com/user-registration-extensions/' );
|
54 |
+
?>
|
55 |
+
</p>
|
56 |
<?php endif; ?>
|
57 |
</div>
|
includes/admin/views/html-admin-page-export-users.php
CHANGED
@@ -1,22 +1,25 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Export Users
|
|
|
|
|
4 |
*/
|
|
|
5 |
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
exit; // Exit if accessed directly.
|
7 |
}
|
8 |
|
9 |
?>
|
10 |
-
<h3 class="ur-settings-section-header main_header"><?php
|
11 |
<div class="ur-export-users-page">
|
12 |
<div class="nav-tab-content">
|
13 |
<div class="nav-tab-inside">
|
14 |
-
|
15 |
-
<h3 class="hndle"><?php
|
16 |
|
17 |
<div class="inside">
|
18 |
<p class="help">
|
19 |
-
<?php
|
20 |
</p>
|
21 |
|
22 |
<p>
|
@@ -29,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
29 |
</select>
|
30 |
</p>
|
31 |
|
32 |
-
<input type="submit" class="button button-primary" name="user_registration_export_users" value="<?php
|
33 |
|
34 |
</div>
|
35 |
</div><!-- .postbox -->
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Export Users
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
+
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit; // Exit if accessed directly.
|
10 |
}
|
11 |
|
12 |
?>
|
13 |
+
<h3 class="ur-settings-section-header main_header"><?php esc_html_e( 'Export Users', 'user-registration' ); ?></h3>
|
14 |
<div class="ur-export-users-page">
|
15 |
<div class="nav-tab-content">
|
16 |
<div class="nav-tab-inside">
|
17 |
+
<div class="postbox">
|
18 |
+
<h3 class="hndle"><?php esc_html_e( 'GENERAL', 'user-registration' ); ?></h3>
|
19 |
|
20 |
<div class="inside">
|
21 |
<p class="help">
|
22 |
+
<?php echo wp_kses_post( 'Export your users along with their extra information registered with a user registration form as a <strong>CSV</strong> file.', 'user-registration' ); ?>
|
23 |
</p>
|
24 |
|
25 |
<p>
|
32 |
</select>
|
33 |
</p>
|
34 |
|
35 |
+
<input type="submit" class="button button-primary" name="user_registration_export_users" value="<?php esc_attr_e( 'Export Users', 'user-registration' ); ?>">
|
36 |
|
37 |
</div>
|
38 |
</div><!-- .postbox -->
|
includes/admin/views/html-admin-page-forms.php
CHANGED
@@ -1,4 +1,10 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit; // Exit if accessed directly.
|
4 |
}
|
@@ -11,10 +17,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
</div>
|
12 |
<div id="menu-management">
|
13 |
<div class="menu-edit">
|
14 |
-
<input type="hidden" name="ur_form_id" id="ur_form_id" value="<?php echo $form_id; ?>"/>
|
15 |
<div id="nav-menu-header">
|
16 |
<div class="ur-brand-logo ur-px-2">
|
17 |
-
<img src="<?php echo UR()->plugin_url() . '/assets/images/logo.svg'; ?>" alt="">
|
18 |
</div>
|
19 |
<div class="major-publishing-actions wp-clearfix">
|
20 |
<div class="publishing-action">
|
@@ -23,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
|
24 |
?>
|
25 |
<input type="text" onfocus="this.select();" readonly="readonly"
|
26 |
-
value='[user_registration_form id=<?php echo '"' . $form_id . '"'; ?>]'
|
27 |
class=" code" size="35">
|
28 |
|
29 |
<button id="copy-shortcode" class="button button-primary button-large ur-copy-shortcode " href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode!', 'user-registration' ); ?>" data-copied="<?php esc_attr_e( 'Copied!', 'user-registration' ); ?>">
|
@@ -35,11 +41,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
35 |
<?php
|
36 |
}
|
37 |
?>
|
38 |
-
<button id="ur-full-screen-mode" class="button button-secondary button-large button-icon closed" title="<?php
|
39 |
<?php if ( isset( $preview_link ) ) { ?>
|
40 |
-
<a href="<?php echo esc_url( $preview_link ); ?>" target="_blank" class="button button-secondary button-large" title="<?php
|
41 |
<?php } ?>
|
42 |
-
<button type="button" name="save_form" id="save_form_footer" class="button button-primary button-large menu-form ur_save_form_action_button"> <?php echo $save_label; ?> </button>
|
43 |
</div><!-- END .publishing-action -->
|
44 |
</div><!-- END .major-publishing-actions -->
|
45 |
</div><!-- END .nav-menu-header -->
|
@@ -49,7 +55,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
49 |
<nav class="nav-tab-wrapper ur-tabs">
|
50 |
<ul class="ur-tab-lists">
|
51 |
<li><a href="#ur-tab-registered-fields"
|
52 |
-
|
53 |
</li>
|
54 |
<li class="ur-no-pointer"><a href="#ur-tab-field-options" class="nav-tab"><?php esc_html_e( 'Field Options', 'user-registration' ); ?></a>
|
55 |
</li>
|
@@ -59,7 +65,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
59 |
?>
|
60 |
|
61 |
<li><a href="#ur-tab-field-settings"
|
62 |
-
|
63 |
</li>
|
64 |
</ul>
|
65 |
<div style="clear:both"></div>
|
@@ -71,14 +77,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
71 |
<svg xmlns="http://www.w3.org/2000/svg" height="24px" width="24px" viewBox="0 0 24 24" fill="#a1a4b9"><path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"/></svg>
|
72 |
</div>
|
73 |
<div class="ur-fields-not-found" hidden>
|
74 |
-
<img src="<?php echo
|
75 |
<h3 class="ur-fields-not-found-title">Whoops!</h3>
|
76 |
<span>There is not any field that you were searching for.</span>
|
77 |
</div>
|
78 |
-
<h2 class='ur-toggle-heading'><?php
|
79 |
<hr/>
|
80 |
<?php $this->get_registered_user_form_fields(); ?>
|
81 |
-
<h2 class='ur-toggle-heading'><?php
|
82 |
<hr/>
|
83 |
<?php $this->get_registered_other_form_fields(); ?>
|
84 |
<?php do_action( 'user_registration_extra_fields' ); ?>
|
@@ -104,7 +110,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
104 |
$builder_class = apply_filters( 'user_registration_builder_class', array() );
|
105 |
$builder_class = implode( ' ', $builder_class );
|
106 |
?>
|
107 |
-
<div class='ur-builder-wrapper <?php echo $builder_class; ?>'>
|
108 |
<?php
|
109 |
if ( ! empty( $form_data ) && isset( $_GET['edit-registration'] ) && is_numeric( $_GET['edit-registration'] ) ) {
|
110 |
$this->get_edit_form_field( $form_data );
|
@@ -125,9 +131,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
125 |
<div class="ur-builder-wrapper-footer">
|
126 |
<a href='#' class="ur-button-quick-links" title="Quick Links"><span>?</span></a>
|
127 |
<ul class="ur-quick-links-content" hidden>
|
128 |
-
<li><a href="https://wpeverest.com/support/" target='_blank'><?php echo
|
129 |
-
<li><a href="https://docs.wpeverest.com/docs/user-registration/registration-form-and-login-form/how-to-show-login-form/" target='_blank'><?php echo
|
130 |
-
<li><a href="https://docs.wpeverest.com/docs/user-registration/" target='_blank'><?php echo
|
131 |
</ul>
|
132 |
<?php do_action( 'user_registration_form_builder_wrapper_footer' ); ?>
|
133 |
</div>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Page - Forms
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
+
*/
|
7 |
+
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit; // Exit if accessed directly.
|
10 |
}
|
17 |
</div>
|
18 |
<div id="menu-management">
|
19 |
<div class="menu-edit">
|
20 |
+
<input type="hidden" name="ur_form_id" id="ur_form_id" value="<?php echo esc_attr( $form_id ); ?>"/>
|
21 |
<div id="nav-menu-header">
|
22 |
<div class="ur-brand-logo ur-px-2">
|
23 |
+
<img src="<?php echo esc_url( UR()->plugin_url() . '/assets/images/logo.svg' ); ?>" alt="">
|
24 |
</div>
|
25 |
<div class="major-publishing-actions wp-clearfix">
|
26 |
<div class="publishing-action">
|
29 |
|
30 |
?>
|
31 |
<input type="text" onfocus="this.select();" readonly="readonly"
|
32 |
+
value='[user_registration_form id=<?php echo '"' . esc_attr( $form_id ) . '"'; ?>]'
|
33 |
class=" code" size="35">
|
34 |
|
35 |
<button id="copy-shortcode" class="button button-primary button-large ur-copy-shortcode " href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode!', 'user-registration' ); ?>" data-copied="<?php esc_attr_e( 'Copied!', 'user-registration' ); ?>">
|
41 |
<?php
|
42 |
}
|
43 |
?>
|
44 |
+
<button id="ur-full-screen-mode" class="button button-secondary button-large button-icon closed" title="<?php esc_attr_e( 'Fullscreen', 'user-registration' ); ?>"><span class="ur-fs-open-label dashicons dashicons-editor-expand"></span><span class="ur-fs-close-label dashicons dashicons-editor-contract"></span></button>
|
45 |
<?php if ( isset( $preview_link ) ) { ?>
|
46 |
+
<a href="<?php echo esc_url( $preview_link ); ?>" target="_blank" class="button button-secondary button-large" title="<?php esc_attr_e( 'Preview Form', 'user-registration' ); ?>"><?php esc_html_e( 'Preview', 'user-registration' ); ?></a>
|
47 |
<?php } ?>
|
48 |
+
<button type="button" name="save_form" id="save_form_footer" class="button button-primary button-large menu-form ur_save_form_action_button"> <?php echo esc_html( $save_label ); ?> </button>
|
49 |
</div><!-- END .publishing-action -->
|
50 |
</div><!-- END .major-publishing-actions -->
|
51 |
</div><!-- END .nav-menu-header -->
|
55 |
<nav class="nav-tab-wrapper ur-tabs">
|
56 |
<ul class="ur-tab-lists">
|
57 |
<li><a href="#ur-tab-registered-fields"
|
58 |
+
class="nav-tab active"><?php esc_html_e( 'Fields', 'user-registration' ); ?></a>
|
59 |
</li>
|
60 |
<li class="ur-no-pointer"><a href="#ur-tab-field-options" class="nav-tab"><?php esc_html_e( 'Field Options', 'user-registration' ); ?></a>
|
61 |
</li>
|
65 |
?>
|
66 |
|
67 |
<li><a href="#ur-tab-field-settings"
|
68 |
+
class="nav-tab"><?php esc_html_e( 'Form Setting', 'user-registration' ); ?></a>
|
69 |
</li>
|
70 |
</ul>
|
71 |
<div style="clear:both"></div>
|
77 |
<svg xmlns="http://www.w3.org/2000/svg" height="24px" width="24px" viewBox="0 0 24 24" fill="#a1a4b9"><path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"/></svg>
|
78 |
</div>
|
79 |
<div class="ur-fields-not-found" hidden>
|
80 |
+
<img src="<?php echo esc_url( plugin_dir_url( UR_PLUGIN_FILE ) . 'assets/images/not-found.png' ); ?>" />
|
81 |
<h3 class="ur-fields-not-found-title">Whoops!</h3>
|
82 |
<span>There is not any field that you were searching for.</span>
|
83 |
</div>
|
84 |
+
<h2 class='ur-toggle-heading'><?php esc_html_e( 'Default User Fields', 'user-registration' ); ?></h2>
|
85 |
<hr/>
|
86 |
<?php $this->get_registered_user_form_fields(); ?>
|
87 |
+
<h2 class='ur-toggle-heading'><?php esc_html_e( 'Extra Fields', 'user-registration' ); ?></h2>
|
88 |
<hr/>
|
89 |
<?php $this->get_registered_other_form_fields(); ?>
|
90 |
<?php do_action( 'user_registration_extra_fields' ); ?>
|
110 |
$builder_class = apply_filters( 'user_registration_builder_class', array() );
|
111 |
$builder_class = implode( ' ', $builder_class );
|
112 |
?>
|
113 |
+
<div class='ur-builder-wrapper <?php echo esc_attr( $builder_class ); ?>'>
|
114 |
<?php
|
115 |
if ( ! empty( $form_data ) && isset( $_GET['edit-registration'] ) && is_numeric( $_GET['edit-registration'] ) ) {
|
116 |
$this->get_edit_form_field( $form_data );
|
131 |
<div class="ur-builder-wrapper-footer">
|
132 |
<a href='#' class="ur-button-quick-links" title="Quick Links"><span>?</span></a>
|
133 |
<ul class="ur-quick-links-content" hidden>
|
134 |
+
<li><a href="https://wpeverest.com/support/" target='_blank'><?php echo esc_html__( 'Get Support', 'user-registration' ); ?></a></li>
|
135 |
+
<li><a href="https://docs.wpeverest.com/docs/user-registration/registration-form-and-login-form/how-to-show-login-form/" target='_blank'><?php echo esc_html__( 'Create Login Form', 'user-registration' ); ?></a></li>
|
136 |
+
<li><a href="https://docs.wpeverest.com/docs/user-registration/" target='_blank'><?php echo esc_html__( 'Documentation', 'user-registration' ); ?></a></li>
|
137 |
</ul>
|
138 |
<?php do_action( 'user_registration_form_builder_wrapper_footer' ); ?>
|
139 |
</div>
|
includes/admin/views/html-admin-page-import-export-forms.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Import / Export Forms.
|
5 |
*
|
@@ -11,16 +10,16 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
}
|
12 |
|
13 |
?>
|
14 |
-
<h3 class="ur-settings-section-header main_header"><?php
|
15 |
<div class="ur-export-users-page">
|
16 |
<div class="nav-tab-content">
|
17 |
<div class="nav-tab-inside">
|
18 |
<div class="postbox">
|
19 |
-
<h3 class="hndle"><?php
|
20 |
|
21 |
<div class="inside">
|
22 |
<p class="help">
|
23 |
-
<?php
|
24 |
</p>
|
25 |
|
26 |
<p>
|
@@ -33,29 +32,29 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
33 |
</select>
|
34 |
</p>
|
35 |
|
36 |
-
<input type="submit" class="button button-primary" name="user_registration_export_form" value="<?php
|
37 |
|
38 |
</div>
|
39 |
</div><!-- .postbox -->
|
40 |
<div class="postbox">
|
41 |
-
<h3 class="hndle"><?php
|
42 |
|
43 |
<div class="inside">
|
44 |
<p class="help">
|
45 |
-
<?php
|
46 |
</p>
|
47 |
<div class="ur-form-group">
|
48 |
<div class="user-registration-custom-file">
|
49 |
<input type="file" class="user-registration-custom-file__input" name="jsonfile" id="jsonfile" accept=".json"/>
|
50 |
<label class="user-registration-custom-file__label" for="csvfile">
|
51 |
-
<span class="user-registration-custom-selected-file"><?php esc_html_e( 'No file selected.', '
|
52 |
<span class="user-registration-custom-file__button">Browse File</span>
|
53 |
</label>
|
54 |
</div>
|
55 |
<p class="help">Only JSON file format allowed.</p>
|
56 |
</div>
|
57 |
<div class="publishing-action">
|
58 |
-
<input type="button" class="button button-primary ur_import_form_action_button" name="user_registration_import_form" value="<?php
|
59 |
</div>
|
60 |
</div>
|
61 |
</div><!-- .postbox -->
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Import / Export Forms.
|
4 |
*
|
10 |
}
|
11 |
|
12 |
?>
|
13 |
+
<h3 class="ur-settings-section-header main_header"><?php esc_html_e( 'Import/Export Forms', 'user-registration' ); ?></h3>
|
14 |
<div class="ur-export-users-page">
|
15 |
<div class="nav-tab-content">
|
16 |
<div class="nav-tab-inside">
|
17 |
<div class="postbox">
|
18 |
+
<h3 class="hndle"><?php esc_html_e( 'EXPORT FORMS WITH SETTINGS', 'user-registration' ); ?></h3>
|
19 |
|
20 |
<div class="inside">
|
21 |
<p class="help">
|
22 |
+
<?php echo wp_kses_post( 'Export your forms along with their settings as <strong>JSON</strong> file.', 'user-registration' ); ?>
|
23 |
</p>
|
24 |
|
25 |
<p>
|
32 |
</select>
|
33 |
</p>
|
34 |
|
35 |
+
<input type="submit" class="button button-primary" name="user_registration_export_form" value="<?php esc_html_e( 'Export Forms', 'user-registration' ); ?>">
|
36 |
|
37 |
</div>
|
38 |
</div><!-- .postbox -->
|
39 |
<div class="postbox">
|
40 |
+
<h3 class="hndle"><?php esc_html_e( 'IMPORT FORMS WITH SETTINGS', 'user-registration' ); ?></h3>
|
41 |
|
42 |
<div class="inside">
|
43 |
<p class="help">
|
44 |
+
<?php echo wp_kses_post( 'Import your forms along with their settings from <strong>JSON</strong> file.', 'user-registration' ); ?>
|
45 |
</p>
|
46 |
<div class="ur-form-group">
|
47 |
<div class="user-registration-custom-file">
|
48 |
<input type="file" class="user-registration-custom-file__input" name="jsonfile" id="jsonfile" accept=".json"/>
|
49 |
<label class="user-registration-custom-file__label" for="csvfile">
|
50 |
+
<span class="user-registration-custom-selected-file"><?php esc_html_e( 'No file selected.', 'user-registration' ); ?></span>
|
51 |
<span class="user-registration-custom-file__button">Browse File</span>
|
52 |
</label>
|
53 |
</div>
|
54 |
<p class="help">Only JSON file format allowed.</p>
|
55 |
</div>
|
56 |
<div class="publishing-action">
|
57 |
+
<input type="button" class="button button-primary ur_import_form_action_button" name="user_registration_import_form" value="<?php esc_html_e( 'Import Forms', 'user-registration' ); ?>">
|
58 |
</div>
|
59 |
</div>
|
60 |
</div><!-- .postbox -->
|
includes/admin/views/html-admin-page-status-logs.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Status Logs
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -17,18 +19,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
<?php echo esc_html( $viewed_log ); ?>
|
18 |
<?php if ( ! empty( $handle ) ) : ?>
|
19 |
<a class="page-title-action"
|
20 |
-
|
21 |
-
|
22 |
<?php endif; ?>
|
23 |
</h2>
|
24 |
</div>
|
25 |
<div class="alignright">
|
26 |
-
<form action="<?php echo admin_url( 'admin.php?page=user-registration-status' ); ?>" method="post">
|
27 |
<select name="log_file" style="max-width: 450px;vertical-align:inherit">
|
28 |
<?php foreach ( $logs as $log_key => $log_file ) : ?>
|
29 |
<option
|
30 |
value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?>
|
31 |
-
(<?php echo date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), filemtime( UR_LOG_DIR . $log_file ) ); ?>
|
32 |
)
|
33 |
</option>
|
34 |
<?php endforeach; ?>
|
@@ -46,5 +48,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
46 |
</div>
|
47 |
<?php else : ?>
|
48 |
<div class="updated user-registration-message inline">
|
49 |
-
<p><?php
|
50 |
<?php endif; ?>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Status Logs
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
<?php echo esc_html( $viewed_log ); ?>
|
20 |
<?php if ( ! empty( $handle ) ) : ?>
|
21 |
<a class="page-title-action"
|
22 |
+
href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'handle' => $handle ), admin_url( 'admin.php?page=user-registration-status' ) ), 'remove_log' ) ); ?>"
|
23 |
+
class="button"><?php esc_html_e( 'Delete log', 'user-registration' ); ?></a>
|
24 |
<?php endif; ?>
|
25 |
</h2>
|
26 |
</div>
|
27 |
<div class="alignright">
|
28 |
+
<form action="<?php echo esc_url( admin_url( 'admin.php?page=user-registration-status' ) ); ?>" method="post">
|
29 |
<select name="log_file" style="max-width: 450px;vertical-align:inherit">
|
30 |
<?php foreach ( $logs as $log_key => $log_file ) : ?>
|
31 |
<option
|
32 |
value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?>
|
33 |
+
(<?php echo esc_html( date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), filemtime( UR_LOG_DIR . $log_file ) ) ); ?>
|
34 |
)
|
35 |
</option>
|
36 |
<?php endforeach; ?>
|
48 |
</div>
|
49 |
<?php else : ?>
|
50 |
<div class="updated user-registration-message inline">
|
51 |
+
<p><?php esc_html_e( 'There are currently no logs to view.', 'user-registration' ); ?></p></div>
|
52 |
<?php endif; ?>
|
includes/admin/views/html-admin-page-status.php
CHANGED
@@ -1,31 +1,33 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Status
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
exit; // Exit if accessed directly.
|
8 |
}
|
9 |
|
10 |
-
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'logs';
|
11 |
-
$
|
12 |
'logs' => __( 'Logs', 'user-registration' ),
|
13 |
);
|
14 |
-
$
|
15 |
?>
|
16 |
<div class="wrap user-registration">
|
17 |
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
18 |
<?php
|
19 |
-
foreach ( $
|
20 |
-
echo '<a href="' . admin_url( 'admin.php?page=user-registration-status&tab=' . $name ) . '" class="nav-tab ';
|
21 |
-
if ( $current_tab
|
22 |
echo 'nav-tab-active';
|
23 |
}
|
24 |
-
echo '">' . $label . '</a>';
|
25 |
}
|
26 |
?>
|
27 |
</nav>
|
28 |
-
<h1 class="screen-reader-text"><?php echo esc_html( $
|
29 |
<?php
|
30 |
UR_Admin_Status::status_logs();
|
31 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Page - Status
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit; // Exit if accessed directly.
|
10 |
}
|
11 |
|
12 |
+
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : 'logs';
|
13 |
+
$page_tabs = array(
|
14 |
'logs' => __( 'Logs', 'user-registration' ),
|
15 |
);
|
16 |
+
$page_tabs = apply_filters( 'user_registration_admin_status_tabs', $page_tabs );
|
17 |
?>
|
18 |
<div class="wrap user-registration">
|
19 |
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
20 |
<?php
|
21 |
+
foreach ( $page_tabs as $name => $label ) {
|
22 |
+
echo '<a href="' . esc_url( admin_url( 'admin.php?page=user-registration-status&tab=' . $name ) ) . '" class="nav-tab ';
|
23 |
+
if ( $current_tab === $name ) {
|
24 |
echo 'nav-tab-active';
|
25 |
}
|
26 |
+
echo '">' . esc_html( $label ) . '</a>';
|
27 |
}
|
28 |
?>
|
29 |
</nav>
|
30 |
+
<h1 class="screen-reader-text"><?php echo esc_html( $page_tabs[ $current_tab ] ); ?></h1>
|
31 |
<?php
|
32 |
UR_Admin_Status::status_logs();
|
33 |
?>
|
includes/admin/views/html-admin-settings.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Settings
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -15,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
<nav class="nav-tab-wrapper ur-nav ur-nav--tab ur-nav-tab-wrapper ur-scroll-ui__items">
|
16 |
<?php
|
17 |
foreach ( $tabs as $name => $label ) {
|
18 |
-
echo '<a href="' . admin_url( 'admin.php?page=user-registration-settings&tab=' . $name ) . '" class="nav-tab ur-nav__link ur-scroll-ui__item ' . ( $current_tab
|
19 |
}
|
20 |
|
21 |
do_action( 'user_registration_settings_tabs' );
|
@@ -41,7 +43,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
41 |
?>
|
42 |
<p class="submit">
|
43 |
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
|
44 |
-
<input name="save" class="button-primary" type="submit" value="<?php echo apply_filters( '
|
45 |
<?php endif; ?>
|
46 |
<input type="hidden" name="subtab" id="last_tab" />
|
47 |
<?php wp_nonce_field( 'user-registration-settings' ); ?>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Settings
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
<nav class="nav-tab-wrapper ur-nav ur-nav--tab ur-nav-tab-wrapper ur-scroll-ui__items">
|
18 |
<?php
|
19 |
foreach ( $tabs as $name => $label ) {
|
20 |
+
echo '<a href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=' . $name ) ) . '" class="nav-tab ur-nav__link ur-scroll-ui__item ' . ( $current_tab === $name ? 'nav-tab-active is-active' : '' ) . '">' . esc_html( $label ) . '</a>';
|
21 |
}
|
22 |
|
23 |
do_action( 'user_registration_settings_tabs' );
|
43 |
?>
|
44 |
<p class="submit">
|
45 |
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
|
46 |
+
<input name="save" class="button-primary" type="submit" value="<?php echo esc_attr( apply_filters( 'user_registration_setting_save_label', esc_attr__( 'Save Changes', 'user-registration' ) ) ); ?>" />
|
47 |
<?php endif; ?>
|
48 |
<input type="hidden" name="subtab" id="last_tab" />
|
49 |
<?php wp_nonce_field( 'user-registration-settings' ); ?>
|
includes/admin/views/html-license-form.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Plugins - License form
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -15,14 +17,14 @@ $license_key = sanitize_title( $this->plugin_slug . '_license_key' );
|
|
15 |
<?php $this->user_registration_error_notices(); ?>
|
16 |
<input type="checkbox" name="checked[]" value="1" checked="checked" style="display: none;">
|
17 |
<div class="update-message inline user-registration-updater-license-key">
|
18 |
-
<label for="<?php echo $license_key; ?>"><?php
|
19 |
-
<input type="text" id="<?php echo $license_key; ?>" name="<?php echo esc_attr( $license_key ); ?>" placeholder="<?php echo
|
20 |
-
<span class="description"><?php
|
21 |
</div>
|
22 |
</td>
|
23 |
<script>
|
24 |
jQuery( function() {
|
25 |
-
jQuery( 'tr#<?php echo esc_attr( $this->plugin_slug ); ?>-license-row' ).prev().attr( 'id', '<?php echo sanitize_title( $this->plugin_slug ); ?>' ).addClass( 'update user-registration-updater-licensed' );
|
26 |
});
|
27 |
</script>
|
28 |
</tr>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Plugins - License form
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
<?php $this->user_registration_error_notices(); ?>
|
18 |
<input type="checkbox" name="checked[]" value="1" checked="checked" style="display: none;">
|
19 |
<div class="update-message inline user-registration-updater-license-key">
|
20 |
+
<label for="<?php echo esc_attr( $license_key ); ?>"><?php esc_html_e( 'License:', 'user-registration' ); ?></label>
|
21 |
+
<input type="text" id="<?php echo esc_attr( $license_key ); ?>" name="<?php echo esc_attr( $license_key ); ?>" placeholder="<?php echo esc_attr__( 'XXXX-XXXX-XXXX-XXXX', 'user-registration' ); ?>" />
|
22 |
+
<span class="description"><?php esc_html_e( 'Enter your license key and hit return. A valid key is required for updates.', 'user-registration' ); ?> <?php printf( 'Lost your key? <a href="%s">Retrieve it here</a>.', esc_url( 'https://wpeverest.com/lost-licence-key/' ) ); ?></span>
|
23 |
</div>
|
24 |
</td>
|
25 |
<script>
|
26 |
jQuery( function() {
|
27 |
+
jQuery( 'tr#<?php echo esc_attr( $this->plugin_slug ); ?>-license-row' ).prev().attr( 'id', '<?php echo esc_attr( sanitize_title( $this->plugin_slug ) ); ?>' ).addClass( 'update user-registration-updater-licensed' );
|
28 |
});
|
29 |
</script>
|
30 |
</tr>
|
includes/admin/views/html-notice-custom.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Custom Notices
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,6 +11,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated user-registration-message">
|
12 |
-
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', $notice ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php
|
13 |
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
14 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Custom Notices
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated user-registration-message">
|
14 |
+
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', $notice ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'user-registration' ); ?></a>
|
15 |
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
16 |
</div>
|
includes/admin/views/html-notice-deactivation.php
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
*
|
5 |
* Link to WPEverst contact form page.
|
6 |
*
|
7 |
-
* @author WPEverest
|
8 |
-
* @category Admin
|
9 |
* @package User Registration/Admin
|
10 |
* @since 1.1.4
|
11 |
*/
|
@@ -22,7 +20,7 @@ $deactivate_url = wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . UR
|
|
22 |
<tr class="plugin-update-tr active updated" data-slug="user-registration" data-plugin="user-registration/user-registration.php">
|
23 |
<td colspan ="3" class="plugin-update colspanchange">
|
24 |
<div class="notice inline notice-alt notice-warning">
|
25 |
-
<p><?php printf(
|
26 |
</div>
|
27 |
</td>
|
28 |
</tr>
|
4 |
*
|
5 |
* Link to WPEverst contact form page.
|
6 |
*
|
|
|
|
|
7 |
* @package User Registration/Admin
|
8 |
* @since 1.1.4
|
9 |
*/
|
20 |
<tr class="plugin-update-tr active updated" data-slug="user-registration" data-plugin="user-registration/user-registration.php">
|
21 |
<td colspan ="3" class="plugin-update colspanchange">
|
22 |
<div class="notice inline notice-alt notice-warning">
|
23 |
+
<p><?php printf( esc_html__( 'Before we deactivate User Registration, would you care to <a href="%1$s" target="_blank">let us know why</a> so we can improve it for you? <a href="%2$s">No, deactivate now</a>.', 'user-registration' ), $reason_deactivation_url, $deactivate_url ); ?></p>
|
24 |
</div>
|
25 |
</td>
|
26 |
</tr>
|
includes/admin/views/html-notice-error.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Error
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Error
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
includes/admin/views/html-notice-install.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Install
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,6 +11,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated user-registration-message ur-connect">
|
12 |
-
<p><?php
|
13 |
-
<p class="submit"><a href="<?php echo esc_url( add_query_arg( 'install_user_registration_pages', 'true', admin_url( 'admin.php?page=user-registration-settings' ) ) ); ?>" class="button-primary"><?php
|
14 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Install
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated user-registration-message ur-connect">
|
14 |
+
<p><?php esc_html_e( '<strong>Welcome to User Registration</strong> – You‘re almost ready to create registration :)', 'user-registration' ); ?></p>
|
15 |
+
<p class="submit"><a href="<?php echo esc_url( add_query_arg( 'install_user_registration_pages', 'true', admin_url( 'admin.php?page=user-registration-settings' ) ) ); ?>" class="button-primary"><?php esc_html_e( 'Install User Registration Pages', 'user-registration' ); ?></a> <a class="button-secondary skip" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'install' ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php esc_html_e( 'Skip setup', 'user-registration' ); ?></a></p>
|
16 |
</div>
|
includes/admin/views/html-notice-key-activated.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Activated
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,5 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated notice is-dismissible">
|
12 |
-
<p><?php printf(
|
13 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Activated
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated notice is-dismissible">
|
14 |
+
<p><?php printf( esc_html__( 'Your licence for <strong>%s</strong> has been activated. Thanks!', 'user-registration' ), esc_html( $this->plugin_data['Name'] ) ); ?></p>
|
15 |
</div>
|
includes/admin/views/html-notice-key-deactivated.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Deactivated
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,5 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated notice is-dismissible">
|
12 |
-
<p><?php printf(
|
13 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Deactivated
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated notice is-dismissible">
|
14 |
+
<p><?php printf( esc_html__( 'Your licence for <strong>%s</strong> has been deactivated.', 'user-registration' ), esc_html( $this->plugin_data['Name'] ) ); ?></p>
|
15 |
</div>
|
includes/admin/views/html-notice-key-unvalidated.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Unvalidated
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,6 +11,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated">
|
12 |
-
<p class="ur-updater-dismiss" style="float:right;"><a href="<?php echo esc_url( add_query_arg( 'dismiss-' . sanitize_title( $this->plugin_slug ), '1' ) ); ?>"><?php
|
13 |
-
<p><?php
|
14 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - License Unvalidated
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated">
|
14 |
+
<p class="ur-updater-dismiss" style="float:right;"><a href="<?php echo esc_url( add_query_arg( 'dismiss-' . sanitize_title( $this->plugin_slug ), '1' ) ); ?>"><?php esc_html_e( 'Hide notice', 'user-registration' ); ?></a></p>
|
15 |
+
<p><?php echo sprintf( wp_kses_post( '%1$sPlease enter your license key%2$s in the plugin list below to get updates for <strong>%3$s</strong> Add-Ons.', 'user-registration' ), '<a href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=license' ) ) . '">', '</a>', esc_html( $this->plugin_data['Name'] ) ); ?></p>
|
16 |
</div>
|
includes/admin/views/html-notice-registration.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Allow Registration
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,8 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="error user-registration-message">
|
12 |
-
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'register' ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php
|
13 |
|
14 |
-
<p><?php echo sprintf(
|
15 |
</div>
|
16 |
-
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Allow Registration
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="error user-registration-message">
|
14 |
+
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'register' ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'user-registration' ); ?></a>
|
15 |
|
16 |
+
<p><?php echo sprintf( esc_html__( 'To allow users to register for your website via User registration, you must first enable user registration. Go to %1$sSettings > General%2$s tab, and under Membership make sure to check <strong>Anyone can register</strong>.', 'user-registration' ), '<a target="_blank" href="' . admin_url( 'options-general.php#admin_email' ) . '">', '</a>' ); ?></p>
|
17 |
</div>
|
|
includes/admin/views/html-notice-update.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Update
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,8 +11,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated user-registration-message ur-connect">
|
12 |
-
<p><strong><?php
|
13 |
-
<p class="submit"><a href="<?php echo esc_url( add_query_arg( 'do_update_user_registration', 'true', admin_url( 'options-general.php?page=user-registration' ) ) ); ?>" class="ur-update-now button-primary"><?php
|
14 |
</div>
|
15 |
<script type="text/javascript">
|
16 |
jQuery( '.ur-update-now' ).click( 'click', function() {
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Update
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated user-registration-message ur-connect">
|
14 |
+
<p><strong><?php esc_html_e( 'User Registration Data Update', 'user-registration' ); ?></strong> – <?php esc_html_e( 'We need to update your site\'s database to the latest version.', 'user-registration' ); ?></p>
|
15 |
+
<p class="submit"><a href="<?php echo esc_url( add_query_arg( 'do_update_user_registration', 'true', admin_url( 'options-general.php?page=user-registration' ) ) ); ?>" class="ur-update-now button-primary"><?php esc_html_e( 'Run the updater', 'user-registration' ); ?></a></p>
|
16 |
</div>
|
17 |
<script type="text/javascript">
|
18 |
jQuery( '.ur-update-now' ).click( 'click', function() {
|
includes/admin/views/html-notice-updated.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Updated
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated user-registration-message ess-connect">
|
12 |
-
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'update', remove_query_arg( 'do_update_user_registration' ) ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php
|
13 |
|
14 |
-
<p><?php
|
15 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Updated
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated user-registration-message ess-connect">
|
14 |
+
<a class="user-registration-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'update', remove_query_arg( 'do_update_user_registration' ) ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'user-registration' ); ?></a>
|
15 |
|
16 |
+
<p><?php esc_html_e( 'User Registration data update complete. Thank you for updating to the latest version!', 'user-registration' ); ?></p>
|
17 |
</div>
|
includes/admin/views/html-notice-updating.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Updating
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -9,5 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated user-registration-message ur-connect">
|
12 |
-
<p><strong><?php
|
13 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Notice - Updating
|
4 |
+
*
|
5 |
+
* @package UserRegistration
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
|
12 |
?>
|
13 |
<div id="message" class="updated user-registration-message ur-connect">
|
14 |
+
<p><strong><?php esc_html_e( 'User Registration Data Update', 'user-registration' ); ?></strong> – <?php esc_html_e( 'Your database is being updated in the background.', 'user-registration' ); ?> <a href="<?php echo esc_url( add_query_arg( 'force_update_user_registration', 'true', admin_url( 'options-general.php?page=user-registration' ) ) ); ?>"><?php esc_html_e( 'Taking a while? Click here to run it now.', 'user-registration' ); ?></a></p>
|
15 |
</div>
|
includes/class-ur-ajax.php
CHANGED
@@ -41,12 +41,12 @@ class UR_AJAX {
|
|
41 |
'user_form_submit' => true,
|
42 |
'update_profile_details' => true,
|
43 |
'profile_pic_upload' => true,
|
44 |
-
'ajax_login_submit'
|
45 |
-
'send_test_email'
|
46 |
'deactivation_notice' => false,
|
47 |
'rated' => false,
|
48 |
'dashboard_widget' => false,
|
49 |
-
'dismiss_notice'
|
50 |
'import_form_action' => false,
|
51 |
);
|
52 |
|
@@ -86,7 +86,7 @@ class UR_AJAX {
|
|
86 |
|
87 |
$form_id = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
|
88 |
$nonce = isset( $_POST['ur_frontend_form_nonce'] ) ? $_POST['ur_frontend_form_nonce'] : '';
|
89 |
-
$captcha_response = isset( $_POST['captchaResponse'] ) ? $_POST['captchaResponse'] : '';
|
90 |
$flag = wp_verify_nonce( $nonce, 'ur_frontend_form_id-' . $form_id );
|
91 |
$recaptcha_enabled = ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_enable_recaptcha_support', 'no' );
|
92 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
@@ -206,17 +206,17 @@ class UR_AJAX {
|
|
206 |
}
|
207 |
|
208 |
if ( isset( $single_field['user_registration_profile_pic_url'] ) ) {
|
209 |
-
if( 'no' === get_option( 'user_registration_disable_profile_picture', 'no' ) ) {
|
210 |
-
if( wp_http_validate_url( $single_field['user_registration_profile_pic_url'] )) {
|
211 |
-
$profile_pic_url = esc_url_raw( $single_field['user_registration_profile_pic_url']);
|
212 |
-
update_user_meta( $user_id, 'user_registration_profile_pic_url',
|
213 |
}
|
214 |
}
|
215 |
}
|
216 |
|
217 |
$profile = user_registration_form_data( $user_id, $form_id );
|
218 |
|
219 |
-
if( isset( $profile['user_registration_profile_pic_url'])) {
|
220 |
unset( $profile['user_registration_profile_pic_url'] );
|
221 |
}
|
222 |
|
@@ -230,18 +230,18 @@ class UR_AJAX {
|
|
230 |
case 'checkbox':
|
231 |
if ( isset( $single_field[ $key ] ) ) {
|
232 |
// Serialize values fo checkbox field.
|
233 |
-
$single_field[ $key ] = ( json_decode( $single_field[ $key ] ) !== null ) ? json_decode( $single_field[ $key ] ) : $single_field[ $key ];
|
234 |
}
|
235 |
break;
|
236 |
-
case 'wysiwyg'
|
237 |
-
if ( isset($single_field[ $key ] ) ) {
|
238 |
$single_field[ $key ] = sanitize_text_field( htmlentities( $single_field[ $key ] ) );
|
239 |
} else {
|
240 |
$single_field[ $key ] = '';
|
241 |
}
|
242 |
break;
|
243 |
default:
|
244 |
-
$single_field[ $key ] = isset( $single_field[ $key ] ) ?
|
245 |
break;
|
246 |
}
|
247 |
|
@@ -269,7 +269,7 @@ class UR_AJAX {
|
|
269 |
}
|
270 |
|
271 |
// Action to add extra validation to edit profile fields.
|
272 |
-
do_action( 'user_registration_validate_' . $key, $single_field[ $key ]);
|
273 |
|
274 |
}// End foreach().
|
275 |
|
@@ -284,9 +284,9 @@ class UR_AJAX {
|
|
284 |
if ( in_array( $new_key, ur_get_user_table_fields() ) ) {
|
285 |
|
286 |
if ( $new_key === 'display_name' ) {
|
287 |
-
$user_data['display_name'] = $single_field[ $key ];
|
288 |
} else {
|
289 |
-
$user_data[ $new_key ] = $single_field[ $key ];
|
290 |
}
|
291 |
} else {
|
292 |
$update_key = $key;
|
@@ -357,18 +357,18 @@ class UR_AJAX {
|
|
357 |
|
358 |
// valid extension for image
|
359 |
$valid_extensions = $_REQUEST['valid_extension'];
|
360 |
-
$valid_extension_type = explode(','
|
361 |
-
$valid_ext=array();
|
362 |
|
363 |
-
foreach($valid_extension_type as $key
|
364 |
-
$image_extension = explode('/'
|
365 |
-
$valid_ext[$key]= $image_extension[1];
|
366 |
}
|
367 |
|
368 |
-
$src_file_name = isset($upload['name'] ) ? $upload['name'] : '';
|
369 |
-
$file_extension = strtolower(pathinfo($src_file_name, PATHINFO_EXTENSION));
|
370 |
|
371 |
-
//Validates if the uploaded file has the acceptable extension.
|
372 |
if ( ! in_array( $file_extension, $valid_ext ) ) {
|
373 |
wp_send_json_error(
|
374 |
array(
|
@@ -421,8 +421,7 @@ class UR_AJAX {
|
|
421 |
);
|
422 |
break;
|
423 |
}
|
424 |
-
}
|
425 |
-
elseif ( empty( $_POST['profile-pic-url'] ) ) {
|
426 |
$upload_dir = wp_upload_dir();
|
427 |
$profile_url = get_user_meta( $user_id, 'user_registration_profile_pic_url', true );
|
428 |
|
@@ -443,10 +442,10 @@ class UR_AJAX {
|
|
443 |
/**
|
444 |
* Login from Using Ajax
|
445 |
*/
|
446 |
-
public static function ajax_login_submit(){
|
447 |
// Custom error messages.
|
448 |
$messages = array(
|
449 |
-
'empty_username'
|
450 |
'empty_password' => get_option( 'user_registration_message_empty_password', null ),
|
451 |
'invalid_username' => get_option( 'user_registration_message_invalid_username', null ),
|
452 |
'unknown_email' => get_option( 'user_registration_message_unknown_email', __( 'A user could not be found with this email address.', 'user-registration' ) ),
|
@@ -469,10 +468,10 @@ class UR_AJAX {
|
|
469 |
);
|
470 |
}
|
471 |
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
$captcha_response = isset( $_POST['CaptchaResponse'] ) ? $_POST['CaptchaResponse'] : '';
|
477 |
$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
|
478 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
@@ -501,20 +500,20 @@ class UR_AJAX {
|
|
501 |
}
|
502 |
|
503 |
// To check the specific login
|
504 |
-
if (
|
505 |
$user_data = get_user_by( 'email', $info['user_login'] );
|
506 |
$info['user_login'] = isset( $user_data->user_email ) ? $user_data->user_email : is_email( $info['user_login'] );
|
507 |
-
} elseif (
|
508 |
$user_data = get_user_by( 'login', $info['user_login'] );
|
509 |
-
$info['user_login'] = isset( $user_data->user_login ) ? $user_data->user_login : !is_email( $info['user_login'] );
|
510 |
} else {
|
511 |
-
|
512 |
}
|
513 |
|
514 |
// perform the table login
|
515 |
-
|
516 |
|
517 |
-
|
518 |
|
519 |
// set the custom error message
|
520 |
if ( ! empty( $user->errors['empty_username'] ) && ! empty( $messages['empty_username'] ) ) {
|
@@ -533,8 +532,8 @@ class UR_AJAX {
|
|
533 |
$user->errors['denied_access'][0] = sprintf( '<strong>%s:</strong> %s', __( 'ERROR', 'user-registration' ), $messages['denied_access'] );
|
534 |
}
|
535 |
$message = $user->get_error_message();
|
536 |
-
wp_send_json_error(array('message' => $message ));
|
537 |
-
|
538 |
if ( in_array( 'administrator', $user->roles ) && 'yes' === get_option( 'user_registration_login_options_prevent_core_login', 'no' ) ) {
|
539 |
$redirect = admin_url();
|
540 |
} else {
|
@@ -547,8 +546,8 @@ class UR_AJAX {
|
|
547 |
}
|
548 |
}
|
549 |
$redirect = apply_filters( 'user_registration_login_redirect', $redirect, $user );
|
550 |
-
|
551 |
-
|
552 |
wp_send_json( $user );
|
553 |
}
|
554 |
/**
|
@@ -568,11 +567,11 @@ class UR_AJAX {
|
|
568 |
We thank you for trying out User Registration and joining our mission to make sure you get your emails delivered.<br>
|
569 |
Regards,<br>
|
570 |
User Registration Team';
|
571 |
-
$status = wp_mail( $email
|
572 |
if ( $status ) {
|
573 |
-
wp_send_json_success( array( 'message' => __('Test email was sent successfully! Please check your inbox to make sure it is delivered.', 'user-registration' ) ) );
|
574 |
} {
|
575 |
-
|
576 |
}
|
577 |
}
|
578 |
/**
|
@@ -684,7 +683,7 @@ class UR_AJAX {
|
|
684 |
|
685 |
$post_data = array(
|
686 |
'post_type' => 'user_registration',
|
687 |
-
'post_title' =>
|
688 |
'post_content' => wp_json_encode( $post_data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ),
|
689 |
'post_status' => 'publish',
|
690 |
'comment_status' => 'closed', // if you prefer
|
@@ -922,11 +921,11 @@ class UR_AJAX {
|
|
922 |
* @return void
|
923 |
**/
|
924 |
public static function dismiss_notice() {
|
925 |
-
$notice_type = $_POST["notice_type"] ? $_POST["notice_type"] : '';
|
926 |
check_admin_referer( $notice_type . '-nonce', 'security' );
|
927 |
|
928 |
if ( ! empty( $_POST['dismissed'] ) ) {
|
929 |
-
update_option( 'user_registration_' . $notice_type .'_notice_dismissed', 'yes' );
|
930 |
}
|
931 |
}
|
932 |
}
|
41 |
'user_form_submit' => true,
|
42 |
'update_profile_details' => true,
|
43 |
'profile_pic_upload' => true,
|
44 |
+
'ajax_login_submit' => true,
|
45 |
+
'send_test_email' => true,
|
46 |
'deactivation_notice' => false,
|
47 |
'rated' => false,
|
48 |
'dashboard_widget' => false,
|
49 |
+
'dismiss_notice' => false,
|
50 |
'import_form_action' => false,
|
51 |
);
|
52 |
|
86 |
|
87 |
$form_id = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
|
88 |
$nonce = isset( $_POST['ur_frontend_form_nonce'] ) ? $_POST['ur_frontend_form_nonce'] : '';
|
89 |
+
$captcha_response = isset( $_POST['captchaResponse'] ) ? ur_clean( wp_unslash($_POST['captchaResponse']) ) : '';
|
90 |
$flag = wp_verify_nonce( $nonce, 'ur_frontend_form_id-' . $form_id );
|
91 |
$recaptcha_enabled = ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_enable_recaptcha_support', 'no' );
|
92 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
206 |
}
|
207 |
|
208 |
if ( isset( $single_field['user_registration_profile_pic_url'] ) ) {
|
209 |
+
if ( 'no' === get_option( 'user_registration_disable_profile_picture', 'no' ) ) {
|
210 |
+
if ( wp_http_validate_url( $single_field['user_registration_profile_pic_url'] ) ) {
|
211 |
+
$profile_pic_url = esc_url_raw( $single_field['user_registration_profile_pic_url'] );
|
212 |
+
update_user_meta( $user_id, 'user_registration_profile_pic_url', $profile_pic_url );
|
213 |
}
|
214 |
}
|
215 |
}
|
216 |
|
217 |
$profile = user_registration_form_data( $user_id, $form_id );
|
218 |
|
219 |
+
if ( isset( $profile['user_registration_profile_pic_url'] ) ) {
|
220 |
unset( $profile['user_registration_profile_pic_url'] );
|
221 |
}
|
222 |
|
230 |
case 'checkbox':
|
231 |
if ( isset( $single_field[ $key ] ) ) {
|
232 |
// Serialize values fo checkbox field.
|
233 |
+
$single_field[ $key ] = ( json_decode( $single_field[ $key ] ) !== null ) ? json_decode( $single_field[ $key ] ) : sanitize_text_field( $single_field[ $key ] );
|
234 |
}
|
235 |
break;
|
236 |
+
case 'wysiwyg':
|
237 |
+
if ( isset( $single_field[ $key ] ) ) {
|
238 |
$single_field[ $key ] = sanitize_text_field( htmlentities( $single_field[ $key ] ) );
|
239 |
} else {
|
240 |
$single_field[ $key ] = '';
|
241 |
}
|
242 |
break;
|
243 |
default:
|
244 |
+
$single_field[ $key ] = isset( $single_field[ $key ] ) ? sanitize_text_field( ( $single_field[ $key ] ) ): '';
|
245 |
break;
|
246 |
}
|
247 |
|
269 |
}
|
270 |
|
271 |
// Action to add extra validation to edit profile fields.
|
272 |
+
do_action( 'user_registration_validate_' . $key, $single_field[ $key ] );
|
273 |
|
274 |
}// End foreach().
|
275 |
|
284 |
if ( in_array( $new_key, ur_get_user_table_fields() ) ) {
|
285 |
|
286 |
if ( $new_key === 'display_name' ) {
|
287 |
+
$user_data['display_name'] = sanitize_text_field( ($single_field[ $key ]));
|
288 |
} else {
|
289 |
+
$user_data[ $new_key ] = sanitize_text_field( $single_field[ $key ]);
|
290 |
}
|
291 |
} else {
|
292 |
$update_key = $key;
|
357 |
|
358 |
// valid extension for image
|
359 |
$valid_extensions = $_REQUEST['valid_extension'];
|
360 |
+
$valid_extension_type = explode( ',', $valid_extensions );
|
361 |
+
$valid_ext = array();
|
362 |
|
363 |
+
foreach ( $valid_extension_type as $key => $value ) {
|
364 |
+
$image_extension = explode( '/', $value );
|
365 |
+
$valid_ext[ $key ] = $image_extension[1];
|
366 |
}
|
367 |
|
368 |
+
$src_file_name = isset( $upload['name'] ) ? $upload['name'] : '';
|
369 |
+
$file_extension = strtolower( pathinfo( $src_file_name, PATHINFO_EXTENSION ) );
|
370 |
|
371 |
+
// Validates if the uploaded file has the acceptable extension.
|
372 |
if ( ! in_array( $file_extension, $valid_ext ) ) {
|
373 |
wp_send_json_error(
|
374 |
array(
|
421 |
);
|
422 |
break;
|
423 |
}
|
424 |
+
} elseif ( empty( $_POST['profile-pic-url'] ) ) {
|
|
|
425 |
$upload_dir = wp_upload_dir();
|
426 |
$profile_url = get_user_meta( $user_id, 'user_registration_profile_pic_url', true );
|
427 |
|
442 |
/**
|
443 |
* Login from Using Ajax
|
444 |
*/
|
445 |
+
public static function ajax_login_submit() {
|
446 |
// Custom error messages.
|
447 |
$messages = array(
|
448 |
+
'empty_username' => get_option( 'user_registration_message_username_required', __( 'Username is required.', 'user-registration' ) ),
|
449 |
'empty_password' => get_option( 'user_registration_message_empty_password', null ),
|
450 |
'invalid_username' => get_option( 'user_registration_message_invalid_username', null ),
|
451 |
'unknown_email' => get_option( 'user_registration_message_unknown_email', __( 'A user could not be found with this email address.', 'user-registration' ) ),
|
468 |
);
|
469 |
}
|
470 |
|
471 |
+
$info = array();
|
472 |
+
$info['user_login'] = sanitize_user( isset( $_POST['username'] ) ? $_POST['username'] : '' );
|
473 |
+
$info['user_password'] = isset( $_POST['password'] ) ? $_POST['password'] : '';
|
474 |
+
$info['remember'] = isset( $_POST['rememberme'] );
|
475 |
$captcha_response = isset( $_POST['CaptchaResponse'] ) ? $_POST['CaptchaResponse'] : '';
|
476 |
$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
|
477 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
500 |
}
|
501 |
|
502 |
// To check the specific login
|
503 |
+
if ( 'email' === get_option( 'user_registration_general_setting_login_options_with', array() ) ) {
|
504 |
$user_data = get_user_by( 'email', $info['user_login'] );
|
505 |
$info['user_login'] = isset( $user_data->user_email ) ? $user_data->user_email : is_email( $info['user_login'] );
|
506 |
+
} elseif ( 'username' === get_option( 'user_registration_general_setting_login_options_with', array() ) ) {
|
507 |
$user_data = get_user_by( 'login', $info['user_login'] );
|
508 |
+
$info['user_login'] = isset( $user_data->user_login ) ? $user_data->user_login : ! is_email( $info['user_login'] );
|
509 |
} else {
|
510 |
+
$info['user_login'] = $info['user_login'];
|
511 |
}
|
512 |
|
513 |
// perform the table login
|
514 |
+
$user = wp_signon( $info );
|
515 |
|
516 |
+
if ( is_wp_error( $user ) ) {
|
517 |
|
518 |
// set the custom error message
|
519 |
if ( ! empty( $user->errors['empty_username'] ) && ! empty( $messages['empty_username'] ) ) {
|
532 |
$user->errors['denied_access'][0] = sprintf( '<strong>%s:</strong> %s', __( 'ERROR', 'user-registration' ), $messages['denied_access'] );
|
533 |
}
|
534 |
$message = $user->get_error_message();
|
535 |
+
wp_send_json_error( array( 'message' => $message ) );
|
536 |
+
} else {
|
537 |
if ( in_array( 'administrator', $user->roles ) && 'yes' === get_option( 'user_registration_login_options_prevent_core_login', 'no' ) ) {
|
538 |
$redirect = admin_url();
|
539 |
} else {
|
546 |
}
|
547 |
}
|
548 |
$redirect = apply_filters( 'user_registration_login_redirect', $redirect, $user );
|
549 |
+
wp_send_json_success( array( 'message' => $redirect ) );
|
550 |
+
}
|
551 |
wp_send_json( $user );
|
552 |
}
|
553 |
/**
|
567 |
We thank you for trying out User Registration and joining our mission to make sure you get your emails delivered.<br>
|
568 |
Regards,<br>
|
569 |
User Registration Team';
|
570 |
+
$status = wp_mail( $email, $subject, $message, $header );
|
571 |
if ( $status ) {
|
572 |
+
wp_send_json_success( array( 'message' => __( 'Test email was sent successfully! Please check your inbox to make sure it is delivered.', 'user-registration' ) ) );
|
573 |
} {
|
574 |
+
wp_send_json_error( array( 'message' => __( 'Test email was unsuccessful! Something went wrong.', 'user-registration' ) ) );
|
575 |
}
|
576 |
}
|
577 |
/**
|
683 |
|
684 |
$post_data = array(
|
685 |
'post_type' => 'user_registration',
|
686 |
+
'post_title' => sanitize_text_field( $form_name),
|
687 |
'post_content' => wp_json_encode( $post_data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ),
|
688 |
'post_status' => 'publish',
|
689 |
'comment_status' => 'closed', // if you prefer
|
921 |
* @return void
|
922 |
**/
|
923 |
public static function dismiss_notice() {
|
924 |
+
$notice_type = isset($_POST["notice_type"]) ? $_POST["notice_type"] : '';
|
925 |
check_admin_referer( $notice_type . '-nonce', 'security' );
|
926 |
|
927 |
if ( ! empty( $_POST['dismissed'] ) ) {
|
928 |
+
update_option( 'user_registration_' . $notice_type . '_notice_dismissed', 'yes' );
|
929 |
}
|
930 |
}
|
931 |
}
|
includes/class-ur-email-confirmation.php
CHANGED
@@ -161,7 +161,7 @@ class UR_Email_Confirmation {
|
|
161 |
return $columns;
|
162 |
}
|
163 |
|
164 |
-
$the_columns['ur_user_user_status'] =
|
165 |
|
166 |
$newcol = array_slice( $columns, 0, -1 );
|
167 |
$newcol = array_merge( $newcol, $the_columns );
|
@@ -183,9 +183,9 @@ class UR_Email_Confirmation {
|
|
183 |
$token = get_user_meta( $user_id, 'ur_confirm_email_token', true );
|
184 |
|
185 |
if ( '1' === $val ) {
|
186 |
-
$val =
|
187 |
} elseif ( $val === '0' && isset( $token ) ) {
|
188 |
-
$val =
|
189 |
} else {
|
190 |
$val = '-';
|
191 |
}
|
@@ -205,27 +205,27 @@ class UR_Email_Confirmation {
|
|
205 |
|
206 |
// Successful registration message.
|
207 |
public function custom_registration_message() {
|
208 |
-
return ur_print_notice( apply_filters("user_registration_success_message_after_email_confirmation",
|
209 |
}
|
210 |
|
211 |
// Token mismatch message.
|
212 |
public function custom_registration_error_message() {
|
213 |
-
return ur_print_notice(
|
214 |
}
|
215 |
|
216 |
// Token expired message.
|
217 |
public function custom_token_expired_message() {
|
218 |
-
return ur_print_notice(
|
219 |
}
|
220 |
|
221 |
// Resend verification email message.
|
222 |
public function custom_resend_email_token_message() {
|
223 |
-
return ur_print_notice(
|
224 |
}
|
225 |
|
226 |
// Resend verification email error message.
|
227 |
public function custom_resend_email_token_error_message() {
|
228 |
-
return ur_print_notice(
|
229 |
}
|
230 |
|
231 |
/**
|
@@ -243,7 +243,7 @@ class UR_Email_Confirmation {
|
|
243 |
if ( isset( $_GET['ur_resend_id'] ) && $_GET['ur_resend_token'] === 'true' ) {
|
244 |
|
245 |
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'ur_resend_token' ) ) {
|
246 |
-
die(
|
247 |
}
|
248 |
|
249 |
$output = $this->crypt_the_string( $_GET['ur_resend_id'], 'd' );
|
@@ -377,7 +377,7 @@ class UR_Email_Confirmation {
|
|
377 |
* @param int $user_id User ID.
|
378 |
*/
|
379 |
public function set_email_status( $valid_form_data, $form_id, $user_id ) {
|
380 |
-
$form_id = ( $form_id ) ? $form_id : 0;
|
381 |
|
382 |
if ( 'email_confirmation' === ur_get_single_post_meta( $form_id, 'user_registration_form_setting_login_options', get_option( 'user_registration_general_setting_login_options', 'default' ) ) ) {
|
383 |
$token = $this->get_token( $user_id );
|
161 |
return $columns;
|
162 |
}
|
163 |
|
164 |
+
$the_columns['ur_user_user_status'] = esc_html__( 'Status', 'user-registration' );
|
165 |
|
166 |
$newcol = array_slice( $columns, 0, -1 );
|
167 |
$newcol = array_merge( $newcol, $the_columns );
|
183 |
$token = get_user_meta( $user_id, 'ur_confirm_email_token', true );
|
184 |
|
185 |
if ( '1' === $val ) {
|
186 |
+
$val = esc_html__( 'Verified', 'user-registration' );
|
187 |
} elseif ( $val === '0' && isset( $token ) ) {
|
188 |
+
$val = esc_html__( 'Pending', 'user-registration' );
|
189 |
} else {
|
190 |
$val = '-';
|
191 |
}
|
205 |
|
206 |
// Successful registration message.
|
207 |
public function custom_registration_message() {
|
208 |
+
return ur_print_notice( apply_filters("user_registration_success_message_after_email_confirmation", esc_html__('User successfully registered. Login to continue.', 'user-registration' ) ) );
|
209 |
}
|
210 |
|
211 |
// Token mismatch message.
|
212 |
public function custom_registration_error_message() {
|
213 |
+
return ur_print_notice( esc_html__( 'Token Mismatch!', 'user-registration' ), 'error' );
|
214 |
}
|
215 |
|
216 |
// Token expired message.
|
217 |
public function custom_token_expired_message() {
|
218 |
+
return ur_print_notice( esc_html__( 'Token Expired . Please request for new verification email.', 'user-registration' ), 'error' );
|
219 |
}
|
220 |
|
221 |
// Resend verification email message.
|
222 |
public function custom_resend_email_token_message() {
|
223 |
+
return ur_print_notice( esc_html__( 'Verification Email Sent!', 'user-registration' ) );
|
224 |
}
|
225 |
|
226 |
// Resend verification email error message.
|
227 |
public function custom_resend_email_token_error_message() {
|
228 |
+
return ur_print_notice( esc_html__( 'User does not exist!', 'user-registration' ), 'error' );
|
229 |
}
|
230 |
|
231 |
/**
|
243 |
if ( isset( $_GET['ur_resend_id'] ) && $_GET['ur_resend_token'] === 'true' ) {
|
244 |
|
245 |
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'ur_resend_token' ) ) {
|
246 |
+
die( esc_html__( 'Action failed. Please refresh the page and retry.', 'user-registration' ) );
|
247 |
}
|
248 |
|
249 |
$output = $this->crypt_the_string( $_GET['ur_resend_id'], 'd' );
|
377 |
* @param int $user_id User ID.
|
378 |
*/
|
379 |
public function set_email_status( $valid_form_data, $form_id, $user_id ) {
|
380 |
+
$form_id = isset( $form_id ) ? $form_id : 0;
|
381 |
|
382 |
if ( 'email_confirmation' === ur_get_single_post_meta( $form_id, 'user_registration_form_setting_login_options', get_option( 'user_registration_general_setting_login_options', 'default' ) ) ) {
|
383 |
$token = $this->get_token( $user_id );
|
includes/class-ur-emailer.php
CHANGED
@@ -177,7 +177,7 @@ class UR_Emailer {
|
|
177 |
|
178 |
// Check if value contains array.
|
179 |
// @codingStandardsIgnoreStart
|
180 |
-
$value =
|
181 |
if ( isset( $single_field[ $key ] ) && is_array( $single_field[ $key ] ) ) {
|
182 |
$value = implode( ',', $single_field[ $key ] );
|
183 |
}
|
@@ -416,8 +416,8 @@ class UR_Emailer {
|
|
416 |
public static function lost_password_email( $user_login, $user_data, $key ) {
|
417 |
|
418 |
$user = get_user_by( 'login', $user_login );
|
419 |
-
$email = isset( $user->data->user_email ) ? $user->data->user_email : '';
|
420 |
-
$username = isset( $user->data->user_login ) ? $user->data->user_login : '';
|
421 |
|
422 |
if ( empty( $email ) || empty( $username ) ) {
|
423 |
return false;
|
@@ -473,7 +473,7 @@ class UR_Emailer {
|
|
473 |
$admin_email = explode( ',', $admin_email );
|
474 |
$admin_email = array_map( 'trim', $admin_email );
|
475 |
|
476 |
-
$subject = get_option( 'user_registration_profile_details_changed_email_subject',
|
477 |
$settings = new UR_Settings_Profile_Details_Changed_Email();
|
478 |
$message = $settings->ur_get_profile_details_changed_email();
|
479 |
$message = get_option( 'user_registration_profile_details_changed_email', $message );
|
177 |
|
178 |
// Check if value contains array.
|
179 |
// @codingStandardsIgnoreStart
|
180 |
+
$value = isset( $single_field[ $key ] ) ? sanitize_text_field( $single_field[ $key ] ): '';
|
181 |
if ( isset( $single_field[ $key ] ) && is_array( $single_field[ $key ] ) ) {
|
182 |
$value = implode( ',', $single_field[ $key ] );
|
183 |
}
|
416 |
public static function lost_password_email( $user_login, $user_data, $key ) {
|
417 |
|
418 |
$user = get_user_by( 'login', $user_login );
|
419 |
+
$email = isset( $user->data->user_email ) ? sanitize_email( $user->data->user_email ): '';
|
420 |
+
$username = isset( $user->data->user_login ) ? sanitize_text_field( $user->data->user_login ) : '';
|
421 |
|
422 |
if ( empty( $email ) || empty( $username ) ) {
|
423 |
return false;
|
473 |
$admin_email = explode( ',', $admin_email );
|
474 |
$admin_email = array_map( 'trim', $admin_email );
|
475 |
|
476 |
+
$subject = get_option( 'user_registration_profile_details_changed_email_subject', esc_html__( 'Profile Details Changed Email: {{blog_info}}', 'user-registration' ) );
|
477 |
$settings = new UR_Settings_Profile_Details_Changed_Email();
|
478 |
$message = $settings->ur_get_profile_details_changed_email();
|
479 |
$message = get_option( 'user_registration_profile_details_changed_email', $message );
|
includes/class-ur-form-handler.php
CHANGED
@@ -37,7 +37,7 @@ class UR_Form_Handler {
|
|
37 |
*/
|
38 |
public static function redirect_reset_password_link() {
|
39 |
if ( is_ur_account_page() && ! empty( $_GET['key'] ) && ! empty( $_GET['login'] ) ) {
|
40 |
-
$value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
|
41 |
UR_Shortcode_My_Account::set_reset_password_cookie( $value );
|
42 |
|
43 |
wp_safe_redirect( add_query_arg( 'show-reset-form', 'true', ur_lostpassword_url() ) );
|
@@ -108,10 +108,10 @@ class UR_Form_Handler {
|
|
108 |
|
109 |
switch ( $_FILES['profile-pic']['error'] ) {
|
110 |
case UPLOAD_ERR_INI_SIZE:
|
111 |
-
ur_add_notice(
|
112 |
break;
|
113 |
default:
|
114 |
-
ur_add_notice(
|
115 |
break;
|
116 |
}
|
117 |
} elseif ( empty( $_POST['profile-pic-url'] ) ) {
|
@@ -165,7 +165,7 @@ class UR_Form_Handler {
|
|
165 |
break;
|
166 |
|
167 |
default:
|
168 |
-
$_POST[ $key ] = isset( $_POST[ $key ] ) ?
|
169 |
break;
|
170 |
}
|
171 |
|
@@ -181,7 +181,7 @@ class UR_Form_Handler {
|
|
181 |
|
182 |
// Validation: Required fields.
|
183 |
if ( ! empty( $field['required'] ) && empty( $_POST[ $key ] ) && ! $disabled ) {
|
184 |
-
ur_add_notice( sprintf(
|
185 |
}
|
186 |
|
187 |
if ( 'user_email' === $field['field_key'] ) {
|
@@ -189,7 +189,7 @@ class UR_Form_Handler {
|
|
189 |
|
190 |
// Check if email already exists before updating user details.
|
191 |
if ( email_exists( $_POST[ $key ] ) && email_exists( $_POST[ $key ] ) !== $user_id ) {
|
192 |
-
ur_add_notice(
|
193 |
}
|
194 |
}
|
195 |
|
@@ -203,7 +203,7 @@ class UR_Form_Handler {
|
|
203 |
$_POST[ $key ] = strtolower( $_POST[ $key ] );
|
204 |
|
205 |
if ( ! is_email( $_POST[ $key ] ) ) {
|
206 |
-
ur_add_notice( sprintf(
|
207 |
}
|
208 |
|
209 |
break;
|
@@ -359,9 +359,9 @@ class UR_Form_Handler {
|
|
359 |
'denied_access' => get_option( 'user_registration_message_denied_account', null ),
|
360 |
);
|
361 |
|
362 |
-
$nonce_value = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';
|
363 |
$nonce_value = isset( $_POST['user-registration-login-nonce'] ) ? $_POST['user-registration-login-nonce'] : $nonce_value;
|
364 |
-
$recaptcha_value = isset( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';
|
365 |
$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
|
366 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
367 |
$secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );
|
@@ -374,7 +374,7 @@ class UR_Form_Handler {
|
|
374 |
'remember' => isset( $_POST['rememberme'] ),
|
375 |
);
|
376 |
|
377 |
-
$username = trim( $_POST['username'] );
|
378 |
$validation_error = new WP_Error();
|
379 |
$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
|
380 |
|
@@ -483,7 +483,7 @@ class UR_Form_Handler {
|
|
483 |
* Handle lost password form.
|
484 |
*/
|
485 |
public static function process_lost_password() {
|
486 |
-
if ( isset( $_POST['ur_reset_password'] ) && isset( $_POST['user_login'] ) && isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'lost_password' ) ) {
|
487 |
$success = UR_Shortcode_My_Account::retrieve_password();
|
488 |
|
489 |
// If successful, redirect to my account with query arg set
|
@@ -534,15 +534,15 @@ class UR_Form_Handler {
|
|
534 |
|
535 |
if ( $user instanceof WP_User ) {
|
536 |
if ( empty( $posted_fields['password_1'] ) ) {
|
537 |
-
ur_add_notice(
|
538 |
}
|
539 |
|
540 |
if ( $posted_fields['password_1'] !== $posted_fields['password_2'] ) {
|
541 |
-
ur_add_notice(
|
542 |
}
|
543 |
|
544 |
if ( wp_check_password( $posted_fields['password_1'], $user->user_pass, $user->ID ) ) {
|
545 |
-
ur_add_notice(
|
546 |
}
|
547 |
$errors = new WP_Error();
|
548 |
|
37 |
*/
|
38 |
public static function redirect_reset_password_link() {
|
39 |
if ( is_ur_account_page() && ! empty( $_GET['key'] ) && ! empty( $_GET['login'] ) ) {
|
40 |
+
$value = sprintf( '%s:%s', sanitize_text_field(wp_unslash( $_GET['login'] )), sanitize_text_field(wp_unslash( $_GET['key'] ) ) );
|
41 |
UR_Shortcode_My_Account::set_reset_password_cookie( $value );
|
42 |
|
43 |
wp_safe_redirect( add_query_arg( 'show-reset-form', 'true', ur_lostpassword_url() ) );
|
108 |
|
109 |
switch ( $_FILES['profile-pic']['error'] ) {
|
110 |
case UPLOAD_ERR_INI_SIZE:
|
111 |
+
ur_add_notice( esc_html__( 'File size exceed, please check your file size.', 'user-registration' ), 'error' );
|
112 |
break;
|
113 |
default:
|
114 |
+
ur_add_notice( esc_html__( 'Something went wrong while uploading, please contact your site administrator.', 'user-registration' ), 'error' );
|
115 |
break;
|
116 |
}
|
117 |
} elseif ( empty( $_POST['profile-pic-url'] ) ) {
|
165 |
break;
|
166 |
|
167 |
default:
|
168 |
+
$_POST[ $key ] = isset( $_POST[ $key ] ) ? sanitize_text_field(( $_POST[ $key ] ) ) : '';
|
169 |
break;
|
170 |
}
|
171 |
|
181 |
|
182 |
// Validation: Required fields.
|
183 |
if ( ! empty( $field['required'] ) && empty( $_POST[ $key ] ) && ! $disabled ) {
|
184 |
+
ur_add_notice( sprintf( esc_html__( '%s is a required field.', 'user-registration' ), $field['label'] ), 'error' );
|
185 |
}
|
186 |
|
187 |
if ( 'user_email' === $field['field_key'] ) {
|
189 |
|
190 |
// Check if email already exists before updating user details.
|
191 |
if ( email_exists( $_POST[ $key ] ) && email_exists( $_POST[ $key ] ) !== $user_id ) {
|
192 |
+
ur_add_notice( esc_html__( 'Email already exists', 'user-registration' ), 'error' );
|
193 |
}
|
194 |
}
|
195 |
|
203 |
$_POST[ $key ] = strtolower( $_POST[ $key ] );
|
204 |
|
205 |
if ( ! is_email( $_POST[ $key ] ) ) {
|
206 |
+
ur_add_notice( sprintf( esc_html__( '%s is not a valid email address.', 'user-registration' ), '<strong>' . $field['label'] . '</strong>' ), 'error' );
|
207 |
}
|
208 |
|
209 |
break;
|
359 |
'denied_access' => get_option( 'user_registration_message_denied_account', null ),
|
360 |
);
|
361 |
|
362 |
+
$nonce_value = isset( $_POST['_wpnonce'] ) ? sanitize_key($_POST['_wpnonce']) : '';
|
363 |
$nonce_value = isset( $_POST['user-registration-login-nonce'] ) ? $_POST['user-registration-login-nonce'] : $nonce_value;
|
364 |
+
$recaptcha_value = isset( $_POST['g-recaptcha-response'] ) ? sanitize_text_field( wp_unslash( $_POST['g-recaptcha-response'] ) ): '';
|
365 |
$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
|
366 |
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
|
367 |
$secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );
|
374 |
'remember' => isset( $_POST['rememberme'] ),
|
375 |
);
|
376 |
|
377 |
+
$username = sanitize_user(trim( $_POST['username'] ) );
|
378 |
$validation_error = new WP_Error();
|
379 |
$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
|
380 |
|
483 |
* Handle lost password form.
|
484 |
*/
|
485 |
public static function process_lost_password() {
|
486 |
+
if ( isset( $_POST['ur_reset_password'] ) && isset( $_POST['user_login'] ) && isset( $_POST['_wpnonce'] ) && wp_verify_nonce( sanitize_key($_POST['_wpnonce']), 'lost_password' ) ) {
|
487 |
$success = UR_Shortcode_My_Account::retrieve_password();
|
488 |
|
489 |
// If successful, redirect to my account with query arg set
|
534 |
|
535 |
if ( $user instanceof WP_User ) {
|
536 |
if ( empty( $posted_fields['password_1'] ) ) {
|
537 |
+
ur_add_notice( esc_html__( 'Please enter your password.', 'user-registration' ), 'error' );
|
538 |
}
|
539 |
|
540 |
if ( $posted_fields['password_1'] !== $posted_fields['password_2'] ) {
|
541 |
+
ur_add_notice( esc_html__( 'Passwords do not match.', 'user-registration' ), 'error' );
|
542 |
}
|
543 |
|
544 |
if ( wp_check_password( $posted_fields['password_1'], $user->user_pass, $user->ID ) ) {
|
545 |
+
ur_add_notice( esc_html__( 'New password must not be same as old password.', 'user-registration' ), 'error' );
|
546 |
}
|
547 |
$errors = new WP_Error();
|
548 |
|
includes/class-ur-frontend-scripts.php
CHANGED
@@ -362,27 +362,27 @@ class UR_Frontend_Scripts {
|
|
362 |
'user_registration_profile_picture_upload_nonce' => wp_create_nonce( 'user_registration_profile_picture_upload_nonce' ),
|
363 |
'form_required_fields' => ur_get_required_fields(),
|
364 |
'login_option' => get_option( 'user_registration_general_setting_login_options' ),
|
365 |
-
'user_registration_profile_picture_uploading' =>
|
366 |
'ajax_submission_on_edit_profile' => get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ),
|
367 |
-
'message_required_fields' => get_option( 'user_registration_form_submission_error_message_required_fields',
|
368 |
-
'message_email_fields' => get_option( 'user_registration_form_submission_error_message_email',
|
369 |
-
'message_url_fields' => get_option( 'user_registration_form_submission_error_message_website_URL',
|
370 |
-
'message_number_fields' => get_option( 'user_registration_form_submission_error_message_number',
|
371 |
-
'message_confirm_password_fields' => get_option( 'user_registration_form_submission_error_message_confirm_password',
|
372 |
-
'message_validate_phone_number' => get_option( 'user_registration_form_submission_error_message_phone_number',
|
373 |
-
'message_username_character_fields' => get_option( 'user_registration_form_submission_error_message_disallow_username_character',
|
374 |
-
'message_confirm_email_fields' => get_option( 'user_registration_form_submission_error_message_confirm_email',
|
375 |
-
'message_confirm_number_field_max' =>
|
376 |
-
'message_confirm_number_field_min' =>
|
377 |
-
'message_confirm_number_field_step' =>
|
378 |
'ursL10n' => array(
|
379 |
-
'user_successfully_saved' => get_option( 'user_registration_successful_form_submission_message_manual_registation',
|
380 |
-
'user_under_approval' => get_option( 'user_registration_successful_form_submission_message_admin_approval',
|
381 |
-
'user_email_pending' => get_option( 'user_registration_successful_form_submission_message_email_confirmation',
|
382 |
-
'captcha_error' => get_option( 'user_registration_form_submission_error_message_recaptcha',
|
383 |
-
'hide_password_title' =>
|
384 |
-
'show_password_title' =>
|
385 |
-
'password_strength_error' =>
|
386 |
),
|
387 |
);
|
388 |
break;
|
@@ -392,14 +392,14 @@ class UR_Frontend_Scripts {
|
|
392 |
'home_url' => home_url(),
|
393 |
'i18n_password_error' => esc_attr__( 'Please enter a stronger password.', 'user-registration' ),
|
394 |
'pwsL10n' => array(
|
395 |
-
'shortpw' =>
|
396 |
-
'bad' =>
|
397 |
-
'good' =>
|
398 |
-
'strong' =>
|
399 |
-
'mismatch' =>
|
400 |
|
401 |
),
|
402 |
-
'i18n_password_hint' => apply_filters( 'user_registration_strong_password_message',
|
403 |
);
|
404 |
break;
|
405 |
case 'ur-login':
|
362 |
'user_registration_profile_picture_upload_nonce' => wp_create_nonce( 'user_registration_profile_picture_upload_nonce' ),
|
363 |
'form_required_fields' => ur_get_required_fields(),
|
364 |
'login_option' => get_option( 'user_registration_general_setting_login_options' ),
|
365 |
+
'user_registration_profile_picture_uploading' => esc_html__( 'Uploading...', 'user-registration' ),
|
366 |
'ajax_submission_on_edit_profile' => get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ),
|
367 |
+
'message_required_fields' => get_option( 'user_registration_form_submission_error_message_required_fields', esc_html__( 'This field is required.', 'user-registration' ) ),
|
368 |
+
'message_email_fields' => get_option( 'user_registration_form_submission_error_message_email', esc_html__( 'Please enter a valid email address.', 'user-registration' ) ),
|
369 |
+
'message_url_fields' => get_option( 'user_registration_form_submission_error_message_website_URL', esc_html__( 'Please enter a valid URL.', 'user-registration' ) ),
|
370 |
+
'message_number_fields' => get_option( 'user_registration_form_submission_error_message_number', esc_html__( 'Please enter a valid number.', 'user-registration' ) ),
|
371 |
+
'message_confirm_password_fields' => get_option( 'user_registration_form_submission_error_message_confirm_password', esc_html__( 'Password and confirm password not matched.', 'user-registration' ) ),
|
372 |
+
'message_validate_phone_number' => get_option( 'user_registration_form_submission_error_message_phone_number', esc_html__( 'Please enter a valid phone number.', 'user-registration' ) ),
|
373 |
+
'message_username_character_fields' => get_option( 'user_registration_form_submission_error_message_disallow_username_character', esc_html__( 'Please enter a valid username.', 'user-registration' ) ),
|
374 |
+
'message_confirm_email_fields' => get_option( 'user_registration_form_submission_error_message_confirm_email', esc_html__( 'Email and confirm email not matched.', 'user-registration' ) ),
|
375 |
+
'message_confirm_number_field_max' => esc_html__( 'Please enter a value less than or equal to %qty%.', 'user-registration' ),
|
376 |
+
'message_confirm_number_field_min' => esc_html__( 'Please enter a value greater than or equal to %qty%.', 'user-registration' ),
|
377 |
+
'message_confirm_number_field_step' => esc_html__( 'Please enter a multiple of %qty%.', 'user-registration' ),
|
378 |
'ursL10n' => array(
|
379 |
+
'user_successfully_saved' => get_option( 'user_registration_successful_form_submission_message_manual_registation', esc_html__( 'User successfully registered.', 'user-registration' ) ),
|
380 |
+
'user_under_approval' => get_option( 'user_registration_successful_form_submission_message_admin_approval', esc_html__( 'User registered. Wait until admin approves your registration.', 'user-registration' ) ),
|
381 |
+
'user_email_pending' => get_option( 'user_registration_successful_form_submission_message_email_confirmation', esc_html__( 'User registered. Verify your email by clicking on the link sent to your email.', 'user-registration' ) ),
|
382 |
+
'captcha_error' => get_option( 'user_registration_form_submission_error_message_recaptcha', esc_html__( 'Captcha code error, please try again.', 'user-registration' ) ),
|
383 |
+
'hide_password_title' => esc_html__( 'Hide Password', 'user-registration' ),
|
384 |
+
'show_password_title' => esc_html__( 'Show Password', 'user-registration' ),
|
385 |
+
'password_strength_error' => esc_html__( 'Password strength is not strong enough', 'user-registration' ),
|
386 |
),
|
387 |
);
|
388 |
break;
|
392 |
'home_url' => home_url(),
|
393 |
'i18n_password_error' => esc_attr__( 'Please enter a stronger password.', 'user-registration' ),
|
394 |
'pwsL10n' => array(
|
395 |
+
'shortpw' => esc_html__( 'Very Weak', 'user-registration' ),
|
396 |
+
'bad' => esc_html__( 'Weak', 'user-registration' ),
|
397 |
+
'good' => esc_html__( 'Medium', 'user-registration' ),
|
398 |
+
'strong' => esc_html__( 'Strong', 'user-registration' ),
|
399 |
+
'mismatch' => esc_html__( 'Password with confirm password not matched.', 'user-registration' ),
|
400 |
|
401 |
),
|
402 |
+
'i18n_password_hint' => apply_filters( 'user_registration_strong_password_message', esc_html__( 'Hint: To make password stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).', 'user-registration' ) ),
|
403 |
);
|
404 |
break;
|
405 |
case 'ur-login':
|
includes/class-ur-install.php
CHANGED
@@ -315,12 +315,12 @@ class UR_Install {
|
|
315 |
$pages['registration'] = array(
|
316 |
'name' => _x( 'registration', 'Page slug', 'user-registration' ),
|
317 |
'title' => _x( 'Registration', 'Page title', 'user-registration' ),
|
318 |
-
'content' => '[' . apply_filters( 'user_registration_form_shortcode_tag', 'user_registration_form' ) . ' id="' . $default_form_page_id . '"]',
|
319 |
);
|
320 |
}
|
321 |
|
322 |
foreach ( $pages as $key => $page ) {
|
323 |
-
ur_create_page( esc_sql( $page['name'] ), 'user_registration_' . $key . '_page_id', $page['title'], $page['content'] );
|
324 |
}
|
325 |
}
|
326 |
|
@@ -365,7 +365,7 @@ class UR_Install {
|
|
365 |
$default_post_id = wp_insert_post(
|
366 |
array(
|
367 |
'post_type' => 'user_registration',
|
368 |
-
'post_title' =>
|
369 |
'post_content' => $post_content,
|
370 |
'post_status' => 'publish',
|
371 |
'comment_status' => 'closed',
|
315 |
$pages['registration'] = array(
|
316 |
'name' => _x( 'registration', 'Page slug', 'user-registration' ),
|
317 |
'title' => _x( 'Registration', 'Page title', 'user-registration' ),
|
318 |
+
'content' => '[' . apply_filters( 'user_registration_form_shortcode_tag', 'user_registration_form' ) . ' id="' . esc_attr( $default_form_page_id ) . '"]',
|
319 |
);
|
320 |
}
|
321 |
|
322 |
foreach ( $pages as $key => $page ) {
|
323 |
+
ur_create_page( esc_sql( $page['name'] ), 'user_registration_' . $key . '_page_id', wp_kses_post(($page['title'])), wp_kses_post($page['content']) );
|
324 |
}
|
325 |
}
|
326 |
|
365 |
$default_post_id = wp_insert_post(
|
366 |
array(
|
367 |
'post_type' => 'user_registration',
|
368 |
+
'post_title' => esc_html__( 'Default form', 'user-registration' ),
|
369 |
'post_content' => $post_content,
|
370 |
'post_status' => 'publish',
|
371 |
'comment_status' => 'closed',
|
includes/class-ur-plugin-updater.php
CHANGED
@@ -105,9 +105,9 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
105 |
|
106 |
// Check to make sure we've RP extensions and plugin update capability.
|
107 |
$extensions = $this->get_plugins_with_header( self::VERSION_TESTED_HEADER );
|
108 |
-
if ( ( ! empty( $extensions ) || file_exists( WP_PLUGIN_DIR. '/user-registration-pro/user-registration.php' ) ) && current_user_can( 'update_plugins' ) ) {
|
109 |
$this->plugin_requests();
|
110 |
-
add_action(
|
111 |
$this->plugin_license_view();
|
112 |
}
|
113 |
|
@@ -133,7 +133,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
133 |
$this->add_notice( array( $this, 'activated_key_notice' ) );
|
134 |
} elseif ( ! empty( $_GET['deactivated_license'] ) && $_GET['deactivated_license'] === $this->plugin_slug ) {
|
135 |
$this->add_notice( array( $this, 'deactivated_key_notice' ) );
|
136 |
-
} elseif( !empty( $_POST['download_user_registration_pro'] ) ) {
|
137 |
$this->install_extension();
|
138 |
wp_redirect( remove_query_arg( array( 'deactivated_license', $this->plugin_slug . '_deactivate_license' ), add_query_arg( 'activated_license', $this->plugin_slug ) ) );
|
139 |
exit;
|
@@ -189,7 +189,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
189 |
throw new Exception( sprintf( __( '<strong>Activation error:</strong> %1$s', 'user-registration' ), $status['errorMessage'] ) );
|
190 |
}
|
191 |
|
192 |
-
add_action(
|
193 |
}
|
194 |
}
|
195 |
|
@@ -247,13 +247,13 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
247 |
activate_plugin( $install_status['file'] );
|
248 |
}
|
249 |
|
250 |
-
add_action(
|
251 |
} catch ( Exception $e ) {
|
252 |
|
253 |
$message = $e->getMessage();
|
254 |
add_option(
|
255 |
'user_registration_failed_installing_extensions_message',
|
256 |
-
|
257 |
);
|
258 |
}
|
259 |
}
|
@@ -417,41 +417,41 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
417 |
} elseif ( false === $activate_results->success ) {
|
418 |
switch ( $activate_results->error ) {
|
419 |
case 'expired':
|
420 |
-
$error_msg = sprintf( __( 'The provided license key expired on %1$s. Please <a href="%2$s" target="_blank">renew your license key</a>.', 'user-registration' ), date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ), 'https://wpeverest.com/checkout/?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired' );
|
421 |
break;
|
422 |
|
423 |
case 'revoked':
|
424 |
-
$error_msg = sprintf(
|
425 |
break;
|
426 |
|
427 |
case 'missing':
|
428 |
-
$error_msg = sprintf(
|
429 |
break;
|
430 |
|
431 |
case 'invalid':
|
432 |
case 'site_inactive':
|
433 |
-
$error_msg = sprintf(
|
434 |
break;
|
435 |
|
436 |
case 'invalid_item_id':
|
437 |
case 'item_name_mismatch':
|
438 |
-
$error_msg = sprintf( __( 'This appears to be an invalid license key for <strong>%1$s</strong>.', 'user-registration' ), $this->plugin_data['Name'] );
|
439 |
break;
|
440 |
|
441 |
case 'no_activations_left':
|
442 |
-
$error_msg = sprintf(
|
443 |
break;
|
444 |
|
445 |
case 'license_not_activable':
|
446 |
-
$error_msg =
|
447 |
break;
|
448 |
|
449 |
default:
|
450 |
-
$error_msg = sprintf(
|
451 |
break;
|
452 |
}
|
453 |
|
454 |
-
throw new Exception( sprintf( __( '<strong>Activation error:</strong> %1$s', 'user-registration' ), $error_msg ) );
|
455 |
|
456 |
} elseif ( 'valid' === $activate_results->license ) {
|
457 |
$this->api_key = $license_key;
|
@@ -477,7 +477,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
477 |
* Deactivate a license.
|
478 |
*/
|
479 |
public function deactivate_license() {
|
480 |
-
if( get_transient( 'user_registration_pro_activated' ) ) {
|
481 |
return;
|
482 |
}
|
483 |
|
@@ -528,7 +528,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
528 |
$ur_pro_plugins_path = WP_PLUGIN_DIR . '\user-registration-pro\user-registration.php';
|
529 |
$message = get_option( 'user_registration_failed_installing_extensions_message', '' );
|
530 |
|
531 |
-
if ( ! file_exists
|
532 |
$message = $message . ' Please manually download <strong>User Registration PRO</strong>.';
|
533 |
echo '<div class="error updated notice is-dismissible">
|
534 |
<p>' . sprintf( __( '%1$s', 'user-registration' ), wp_kses_post( $message ) ) . '</p>
|
@@ -553,7 +553,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
553 |
public function user_registration_upgrade_to_pro_notice() {
|
554 |
|
555 |
// Donot show notice on form builder page.
|
556 |
-
if( isset( $_REQUEST['page'] ) && 'add-new-registration' === $_REQUEST['page'] ) {
|
557 |
return;
|
558 |
}
|
559 |
|
@@ -564,46 +564,90 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
564 |
$content = '';
|
565 |
|
566 |
if ( $license_key ) {
|
567 |
-
$content .= sprintf( __( '<strong>If you have active premium license of User Registration</strong>, please click button below to install and activate <strong>User Registration Pro</strong>. Going forward <strong>User Registration Pro</strong> is necessary for smooth running of premium addons of User Registration that you are currently using.', 'user-registration') );
|
568 |
$link .= '<button class="button button-primary" type="text" name="download_user_registration_pro" value="download_user_registration_pro"><span class="dashicons dashicons-external"></span>' . __( 'Install and Activate User Registration Pro', 'user-registration' ) . '</button>';
|
569 |
} else {
|
570 |
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you already have an active license key.', 'user-registration' ), __( 'please activate the key.', 'user-registration' ) );
|
571 |
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you do not have active premium license of User Registration', 'user-registration' ), __( 'please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using.', 'user-registration' ) );
|
572 |
-
$link .= '<li><a class="button button-primary" href="' . esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/pricing/?utm_source=user-dashboard&utm_medium=notice-3.0.0&utm_campaign=user-registration-pro-3.0.0') . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Purchase Premium License', 'user-registration' ) . '</a></li>';
|
573 |
$link .= '<li><a class="button button-secondary" href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=license' ) ) . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Activate License Key', 'user-registration' ) . '</a></li>';
|
574 |
}
|
575 |
|
576 |
// If Pro is active do not show upgrade to pro notice but show update addons notice if not upto date.
|
577 |
if ( is_plugin_active( 'user-registration-pro/user-registration.php' ) ) {
|
578 |
$updated_addons_list = array(
|
579 |
-
'user-registration-advanced-fields/user-registration-advanced-fields.php'
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
'user-registration-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
'user-registration-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
);
|
591 |
|
592 |
-
$plugins =
|
593 |
$show_notice = false;
|
594 |
|
595 |
// Remove user registration required notice in outdated version of addon when pro is installed.
|
596 |
global $wp_filter;
|
597 |
$update_addon_content = '<p>Please update all the listed addons to the latest version.</p><ol style="margin-top:0px; font-size:12px;">';
|
598 |
-
foreach ( $updated_addons_list as $addon_file => $addon_detail) {
|
599 |
-
if( is_plugin_active( $addon_file ) && $plugins[ $addon_file ]['Version'] < $addon_detail['version'] ) {
|
600 |
$show_notice = true;
|
601 |
|
602 |
$update_addon_content .= '<li>' . $addon_detail['title'] . ' <strong>v( ' . $addon_detail['version'] . ' )</strong></li>';
|
603 |
-
if ( ! empty( $wp_filter[
|
604 |
-
foreach ( $wp_filter[
|
605 |
-
if( ! empty( $wp_filter[
|
606 |
-
unset( $wp_filter[
|
607 |
}
|
608 |
}
|
609 |
}
|
@@ -613,7 +657,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
613 |
$update_addon_content .= '</ol>';
|
614 |
|
615 |
// Display update addons notice.
|
616 |
-
if( $show_notice ) {
|
617 |
?>
|
618 |
<div id="user-registration-upgrade-notice" class="notice notice-error user-registration-notice" data-purpose="review">
|
619 |
<div class="user-registration-notice-thumbnail">
|
@@ -621,16 +665,15 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
621 |
</div>
|
622 |
<div class="user-registration-notice-text">
|
623 |
<h3 class="ur-error extra-pad"><?php _e( '<strong> Update all addons of User Registration!!</strong>', 'user-registration' ); ?></h3>
|
624 |
-
<p class="extra-pad"><?php
|
625 |
-
<?php echo wp_kses_post( sprintf( __( '%1$s', 'user-registration' ), $update_addon_content ) )
|
626 |
<ul class="user-registration-notice-ul">
|
627 |
-
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ) ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
|
628 |
</ul>
|
629 |
</div>
|
630 |
</div>
|
631 |
-
|
632 |
}
|
633 |
-
|
634 |
} else if ( ! file_exists( $ur_pro_plugins_path ) || ! is_plugin_active( 'user-registration-pro/user-registration.php' ) || ! $license_key ) {
|
635 |
?>
|
636 |
<div id="user-registration-upgrade-notice" class="notice notice-error user-registration-notice" data-purpose="review">
|
@@ -639,11 +682,11 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
639 |
</div>
|
640 |
<div class="user-registration-notice-text">
|
641 |
<h3 class="ur-error extra-pad"><?php _e( '<strong> Upgrade To PRO!!</strong>', 'user-registration' ); ?></h3>
|
642 |
-
<p class="extra-pad"><?php
|
643 |
-
<?php echo $license_key ?
|
644 |
<ul class="user-registration-notice-ul">
|
645 |
-
<?php echo $license_key ? '<li><form method="post">' . wp_kses_post( $link ) . '</form></li>' : wp_kses_post( $link ); ?>
|
646 |
-
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ) ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial" ></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
|
647 |
</ul>
|
648 |
</div>
|
649 |
</div>
|
@@ -657,7 +700,7 @@ class UR_Plugin_Updater extends UR_Plugin_Updates {
|
|
657 |
* @since 3.0.0
|
658 |
*/
|
659 |
public function user_registration_extension_download_success_notice() {
|
660 |
-
$notice_html = __(
|
661 |
include dirname( __FILE__ ) . '/admin/views/html-notice-key-activated.php';
|
662 |
}
|
663 |
}
|
105 |
|
106 |
// Check to make sure we've RP extensions and plugin update capability.
|
107 |
$extensions = $this->get_plugins_with_header( self::VERSION_TESTED_HEADER );
|
108 |
+
if ( ( ! empty( $extensions ) || file_exists( WP_PLUGIN_DIR . '/user-registration-pro/user-registration.php' ) ) && current_user_can( 'update_plugins' ) ) {
|
109 |
$this->plugin_requests();
|
110 |
+
add_action( 'in_admin_header', array( $this, 'user_registration_upgrade_to_pro_notice' ) );
|
111 |
$this->plugin_license_view();
|
112 |
}
|
113 |
|
133 |
$this->add_notice( array( $this, 'activated_key_notice' ) );
|
134 |
} elseif ( ! empty( $_GET['deactivated_license'] ) && $_GET['deactivated_license'] === $this->plugin_slug ) {
|
135 |
$this->add_notice( array( $this, 'deactivated_key_notice' ) );
|
136 |
+
} elseif ( ! empty( $_POST['download_user_registration_pro'] ) ) {
|
137 |
$this->install_extension();
|
138 |
wp_redirect( remove_query_arg( array( 'deactivated_license', $this->plugin_slug . '_deactivate_license' ), add_query_arg( 'activated_license', $this->plugin_slug ) ) );
|
139 |
exit;
|
189 |
throw new Exception( sprintf( __( '<strong>Activation error:</strong> %1$s', 'user-registration' ), $status['errorMessage'] ) );
|
190 |
}
|
191 |
|
192 |
+
add_action( 'admin_notices', array( $this, 'user_registration_extension_download_success_notice' ) );
|
193 |
}
|
194 |
}
|
195 |
|
247 |
activate_plugin( $install_status['file'] );
|
248 |
}
|
249 |
|
250 |
+
add_action( 'admin_notices', array( $this, 'user_registration_extension_download_success_notice' ) );
|
251 |
} catch ( Exception $e ) {
|
252 |
|
253 |
$message = $e->getMessage();
|
254 |
add_option(
|
255 |
'user_registration_failed_installing_extensions_message',
|
256 |
+
$message
|
257 |
);
|
258 |
}
|
259 |
}
|
417 |
} elseif ( false === $activate_results->success ) {
|
418 |
switch ( $activate_results->error ) {
|
419 |
case 'expired':
|
420 |
+
$error_msg = sprintf( __( 'The provided license key expired on %1$s. Please <a href="%2$s" target="_blank">renew your license key</a>.', 'user-registration' ), esc_html( date_i18n( get_option( 'date_format' ) ), esc_html( strtotime( $license->expires, current_time( 'timestamp' ) ) ) ), esc_url( 'https://wpeverest.com/checkout/?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired' ) );
|
421 |
break;
|
422 |
|
423 |
case 'revoked':
|
424 |
+
$error_msg = sprintf( esc_html__( 'The provided license key has been disabled. Please <a href="%s" target="_blank">contact support</a> for more information.', 'user-registration' ), 'https://wpeverest.com/contact?utm_campaign=admin&utm_source=licenses&utm_medium=revoked' );
|
425 |
break;
|
426 |
|
427 |
case 'missing':
|
428 |
+
$error_msg = sprintf( esc_html__( 'The provided license is invalid. Please <a href="%s" target="_blank">visit your account page</a> and verify it.', 'user-registration' ), 'https://wpeverest.com/my-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing' );
|
429 |
break;
|
430 |
|
431 |
case 'invalid':
|
432 |
case 'site_inactive':
|
433 |
+
$error_msg = sprintf( esc_html__( 'The provided license is not active for this URL. Please <a href="%s" target="_blank">visit your account page</a> to manage your license key URLs.', 'user-registration' ), 'https://wpeverest.com/my-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing' );
|
434 |
break;
|
435 |
|
436 |
case 'invalid_item_id':
|
437 |
case 'item_name_mismatch':
|
438 |
+
$error_msg = sprintf( __( 'This appears to be an invalid license key for <strong>%1$s</strong>.', 'user-registration' ), esc_html( $this->plugin_data['Name'] ) );
|
439 |
break;
|
440 |
|
441 |
case 'no_activations_left':
|
442 |
+
$error_msg = sprintf( esc_html__( 'The provided license key has reached its activation limit. Please <a href="%1$s" target="_blank">View possible upgrades</a> now.', 'user-registration' ), 'https://wpeverest.com/my-account/' );
|
443 |
break;
|
444 |
|
445 |
case 'license_not_activable':
|
446 |
+
$error_msg = esc_html__( 'The key you entered belongs to a bundle, please use the product specific license key.', 'user-registration' );
|
447 |
break;
|
448 |
|
449 |
default:
|
450 |
+
$error_msg = sprintf( esc_html__( 'The provided license key could not be found. Please <a href="%s" target="_blank">contact support</a> for more information.', 'user-registration' ), 'https://wpeverest.com/contact/' );
|
451 |
break;
|
452 |
}
|
453 |
|
454 |
+
throw new Exception( sprintf( __( '<strong>Activation error:</strong> %1$s', 'user-registration' ), esc_html( $error_msg ) ) );
|
455 |
|
456 |
} elseif ( 'valid' === $activate_results->license ) {
|
457 |
$this->api_key = $license_key;
|
477 |
* Deactivate a license.
|
478 |
*/
|
479 |
public function deactivate_license() {
|
480 |
+
if ( get_transient( 'user_registration_pro_activated' ) ) {
|
481 |
return;
|
482 |
}
|
483 |
|
528 |
$ur_pro_plugins_path = WP_PLUGIN_DIR . '\user-registration-pro\user-registration.php';
|
529 |
$message = get_option( 'user_registration_failed_installing_extensions_message', '' );
|
530 |
|
531 |
+
if ( ! file_exists( $ur_pro_plugins_path ) ) {
|
532 |
$message = $message . ' Please manually download <strong>User Registration PRO</strong>.';
|
533 |
echo '<div class="error updated notice is-dismissible">
|
534 |
<p>' . sprintf( __( '%1$s', 'user-registration' ), wp_kses_post( $message ) ) . '</p>
|
553 |
public function user_registration_upgrade_to_pro_notice() {
|
554 |
|
555 |
// Donot show notice on form builder page.
|
556 |
+
if ( isset( $_REQUEST['page'] ) && 'add-new-registration' === $_REQUEST['page'] ) {
|
557 |
return;
|
558 |
}
|
559 |
|
564 |
$content = '';
|
565 |
|
566 |
if ( $license_key ) {
|
567 |
+
$content .= sprintf( __( '<strong>If you have active premium license of User Registration</strong>, please click button below to install and activate <strong>User Registration Pro</strong>. Going forward <strong>User Registration Pro</strong> is necessary for smooth running of premium addons of User Registration that you are currently using.', 'user-registration' ) );
|
568 |
$link .= '<button class="button button-primary" type="text" name="download_user_registration_pro" value="download_user_registration_pro"><span class="dashicons dashicons-external"></span>' . __( 'Install and Activate User Registration Pro', 'user-registration' ) . '</button>';
|
569 |
} else {
|
570 |
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you already have an active license key.', 'user-registration' ), __( 'please activate the key.', 'user-registration' ) );
|
571 |
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you do not have active premium license of User Registration', 'user-registration' ), __( 'please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using.', 'user-registration' ) );
|
572 |
+
$link .= '<li><a class="button button-primary" href="' . esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/pricing/?utm_source=user-dashboard&utm_medium=notice-3.0.0&utm_campaign=user-registration-pro-3.0.0' ) . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Purchase Premium License', 'user-registration' ) . '</a></li>';
|
573 |
$link .= '<li><a class="button button-secondary" href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=license' ) ) . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Activate License Key', 'user-registration' ) . '</a></li>';
|
574 |
}
|
575 |
|
576 |
// If Pro is active do not show upgrade to pro notice but show update addons notice if not upto date.
|
577 |
if ( is_plugin_active( 'user-registration-pro/user-registration.php' ) ) {
|
578 |
$updated_addons_list = array(
|
579 |
+
'user-registration-advanced-fields/user-registration-advanced-fields.php' => array(
|
580 |
+
'title' => 'User Registration Advanced Fields',
|
581 |
+
'version' => '1.4.7',
|
582 |
+
'notice_slug' => 'user_registration_advanced_fields_admin_notice',
|
583 |
+
),
|
584 |
+
'user-registration-conditional-logic/user-registration-conditional-logic.php' => array(
|
585 |
+
'title' => 'User Registration Conditional Logic',
|
586 |
+
'version' => '1.3.0',
|
587 |
+
'notice_slug' => 'user_registration_conditional_logic_admin_notice',
|
588 |
+
),
|
589 |
+
'user-registration-content-restriction/user-registration-content-restriction.php' => array(
|
590 |
+
'title' => 'User Registration Content Restriction',
|
591 |
+
'version' => '1.1.5',
|
592 |
+
'notice_slug' => 'user_registration_content_restriction_admin_notice',
|
593 |
+
),
|
594 |
+
'user-registration-customize-my-account/user-registration-customize-my-account.php' => array(
|
595 |
+
'title' => 'User Registration Customize My Account',
|
596 |
+
'version' => '1.1.4',
|
597 |
+
'notice_slug' => 'user_registration_customize_my_account_admin_notice',
|
598 |
+
),
|
599 |
+
'user-registration-email-templates/user-registration-email-templates.php' => array(
|
600 |
+
'title' => 'User Registration Email Templates',
|
601 |
+
'version' => '1.0.4',
|
602 |
+
'notice_slug' => 'user_registration_email_templates_admin_notice',
|
603 |
+
),
|
604 |
+
'user-registration-file-upload/user-registration-file-upload.php' => array(
|
605 |
+
'title' => 'User Registration File Upload',
|
606 |
+
'version' => '1.2.4',
|
607 |
+
'notice_slug' => 'user_registration_file_upload_admin_notice',
|
608 |
+
),
|
609 |
+
'user-registration-frontend-listing/user-registration-frontend-listing.php' => array(
|
610 |
+
'title' => 'User Registration Frontend Listing',
|
611 |
+
'version' => '1.0.3',
|
612 |
+
'notice_slug' => 'ur_frontend_listing_admin_notice',
|
613 |
+
),
|
614 |
+
'user-registration-mailchimp/user-registration-mailchimp.php' => array(
|
615 |
+
'title' => 'User Registration MailChimp',
|
616 |
+
'version' => '1.3.0',
|
617 |
+
'notice_slug' => 'urmc_admin_notices',
|
618 |
+
),
|
619 |
+
'user-registration-pdf-form-submission/user-registration-pdf-form-submission.php' => array(
|
620 |
+
'title' => 'User Registration PDF Form Submission',
|
621 |
+
'version' => '1.0.8',
|
622 |
+
'notice_slug' => 'user_registration_pdf_admin_notice',
|
623 |
+
),
|
624 |
+
'user-registration-social-connect/user-registration-social-connect.php' => array(
|
625 |
+
'title' => 'User Registration Social Connect',
|
626 |
+
'version' => '1.3.7',
|
627 |
+
'notice_slug' => 'user_registration_social_connect_admin_notice',
|
628 |
+
),
|
629 |
+
'user-registration-woocommerce/user-registration-woocommerce.php' => array(
|
630 |
+
'title' => 'User Registration WooCommerce',
|
631 |
+
'version' => '1.2.7',
|
632 |
+
'notice_slug' => 'user_registration_woocommerce_admin_notice',
|
633 |
+
),
|
634 |
);
|
635 |
|
636 |
+
$plugins = get_plugins();
|
637 |
$show_notice = false;
|
638 |
|
639 |
// Remove user registration required notice in outdated version of addon when pro is installed.
|
640 |
global $wp_filter;
|
641 |
$update_addon_content = '<p>Please update all the listed addons to the latest version.</p><ol style="margin-top:0px; font-size:12px;">';
|
642 |
+
foreach ( $updated_addons_list as $addon_file => $addon_detail ) {
|
643 |
+
if ( is_plugin_active( $addon_file ) && $plugins[ $addon_file ]['Version'] < $addon_detail['version'] ) {
|
644 |
$show_notice = true;
|
645 |
|
646 |
$update_addon_content .= '<li>' . $addon_detail['title'] . ' <strong>v( ' . $addon_detail['version'] . ' )</strong></li>';
|
647 |
+
if ( ! empty( $wp_filter['admin_notices']->callbacks ) && is_array( $wp_filter['admin_notices']->callbacks ) ) {
|
648 |
+
foreach ( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) {
|
649 |
+
if ( ! empty( $wp_filter['admin_notices']->callbacks[ $priority ][ $addon_detail['notice_slug'] ] ) ) {
|
650 |
+
unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $addon_detail['notice_slug'] ] );
|
651 |
}
|
652 |
}
|
653 |
}
|
657 |
$update_addon_content .= '</ol>';
|
658 |
|
659 |
// Display update addons notice.
|
660 |
+
if ( $show_notice ) {
|
661 |
?>
|
662 |
<div id="user-registration-upgrade-notice" class="notice notice-error user-registration-notice" data-purpose="review">
|
663 |
<div class="user-registration-notice-thumbnail">
|
665 |
</div>
|
666 |
<div class="user-registration-notice-text">
|
667 |
<h3 class="ur-error extra-pad"><?php _e( '<strong> Update all addons of User Registration!!</strong>', 'user-registration' ); ?></h3>
|
668 |
+
<p class="extra-pad"><?php echo sprintf( __( 'It seems some of the <strong>User Registration</strong> Addons are outdated. Please update the outdated addons to the latest version for the <strong>User Registration Pro</strong> plugin to work correctly.<br>', 'user-registration' ) ); ?></p>
|
669 |
+
<?php echo wp_kses_post( sprintf( __( '%1$s', 'user-registration' ), $update_addon_content ) ); ?>
|
670 |
<ul class="user-registration-notice-ul">
|
671 |
+
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ); ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
|
672 |
</ul>
|
673 |
</div>
|
674 |
</div>
|
675 |
+
<?php
|
676 |
}
|
|
|
677 |
} else if ( ! file_exists( $ur_pro_plugins_path ) || ! is_plugin_active( 'user-registration-pro/user-registration.php' ) || ! $license_key ) {
|
678 |
?>
|
679 |
<div id="user-registration-upgrade-notice" class="notice notice-error user-registration-notice" data-purpose="review">
|
682 |
</div>
|
683 |
<div class="user-registration-notice-text">
|
684 |
<h3 class="ur-error extra-pad"><?php _e( '<strong> Upgrade To PRO!!</strong>', 'user-registration' ); ?></h3>
|
685 |
+
<p class="extra-pad"><?php _e( 'It seems you are using some premium addons of User Registration plugin. <br>', 'user-registration' ); ?></p>
|
686 |
+
<?php echo esc_html( $license_key ) ? '<p class="extra-pad">' . wp_kses_post( $content ) . '</p>' : wp_kses_post( $content ); ?>
|
687 |
<ul class="user-registration-notice-ul">
|
688 |
+
<?php echo esc_html( $license_key ) ? '<li><form method="post">' . wp_kses_post( $link ) . '</form></li>' : wp_kses_post( $link ); ?>
|
689 |
+
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ); ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial" ></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
|
690 |
</ul>
|
691 |
</div>
|
692 |
</div>
|
700 |
* @since 3.0.0
|
701 |
*/
|
702 |
public function user_registration_extension_download_success_notice() {
|
703 |
+
$notice_html = __( 'User Registration Pro has been installed successfully.', 'user-registration' );
|
704 |
include dirname( __FILE__ ) . '/admin/views/html-notice-key-activated.php';
|
705 |
}
|
706 |
}
|
includes/class-ur-preview.php
CHANGED
@@ -48,7 +48,7 @@ class UR_Preview {
|
|
48 |
* @param string $link Link.
|
49 |
*/
|
50 |
public function edit_form_link( $link ) {
|
51 |
-
$form_id = absint( $_GET['form_id'] );
|
52 |
$edit_form_url = add_query_arg(
|
53 |
array(
|
54 |
'page' => 'add-new-registration',
|
@@ -57,7 +57,7 @@ class UR_Preview {
|
|
57 |
admin_url( 'admin.php' )
|
58 |
);
|
59 |
|
60 |
-
$link = '<a class="post-edit-link" href="' . $edit_form_url . '">' . __( 'Edit Form', 'user-registration' ) . '</a>';
|
61 |
return $link;
|
62 |
}
|
63 |
|
@@ -105,7 +105,7 @@ class UR_Preview {
|
|
105 |
* @return string
|
106 |
*/
|
107 |
public static function form_preview_title( $title ) {
|
108 |
-
$form_id = absint( $_GET['form_id'] ); // @codingStandardsIgnoreLine
|
109 |
|
110 |
if ( $form_id && in_the_loop() ) {
|
111 |
$form_data = UR()->form->get_form( $form_id );
|
48 |
* @param string $link Link.
|
49 |
*/
|
50 |
public function edit_form_link( $link ) {
|
51 |
+
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ;
|
52 |
$edit_form_url = add_query_arg(
|
53 |
array(
|
54 |
'page' => 'add-new-registration',
|
57 |
admin_url( 'admin.php' )
|
58 |
);
|
59 |
|
60 |
+
$link = '<a class="post-edit-link" href="' . esc_url( $edit_form_url ) . '">' . __( 'Edit Form', 'user-registration' ) . '</a>';
|
61 |
return $link;
|
62 |
}
|
63 |
|
105 |
* @return string
|
106 |
*/
|
107 |
public static function form_preview_title( $title ) {
|
108 |
+
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ; // @codingStandardsIgnoreLine
|
109 |
|
110 |
if ( $form_id && in_the_loop() ) {
|
111 |
$form_data = UR()->form->get_form( $form_id );
|
includes/class-ur-shortcodes.php
CHANGED
@@ -57,9 +57,11 @@ class UR_Shortcodes {
|
|
57 |
) {
|
58 |
ob_start();
|
59 |
|
60 |
-
|
|
|
61 |
call_user_func( $function, $atts );
|
62 |
-
|
|
|
63 |
|
64 |
return ob_get_clean();
|
65 |
}
|
@@ -120,37 +122,38 @@ class UR_Shortcodes {
|
|
120 |
* @param mixed $atts
|
121 |
*/
|
122 |
public static function edit_profile( $atts ) {
|
123 |
-
return
|
124 |
}
|
125 |
|
126 |
/**
|
127 |
* Output for Edit-profile form .
|
128 |
-
*
|
129 |
*/
|
130 |
private static function render_edit_profile() {
|
131 |
-
|
132 |
$form_id = get_user_meta( $user_id, 'ur_form_id', true );
|
133 |
do_action( 'user_registration_my_account_enqueue_scripts', array(), $form_id );
|
134 |
$has_date = ur_has_date_field( $form_id );
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
if ( ! is_user_logged_in() ) {
|
141 |
$myaccount_page = get_post( get_option( 'user_registration_myaccount_page_id' ) );
|
142 |
$matched = 0;
|
143 |
|
144 |
if ( ! empty( $myaccount_page ) ) {
|
145 |
$matched = preg_match( '/\[user_registration_my_account(\s\S+){0,3}\]|\[user_registration_login(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
146 |
-
if(1 > absint( $matched )) {
|
147 |
$matched = preg_match( '/\[woocommerce_my_account(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
148 |
}
|
149 |
if ( 1 === $matched ) {
|
150 |
$page_id = $myaccount_page->ID;
|
151 |
}
|
152 |
}
|
153 |
-
|
|
|
|
|
154 |
} else {
|
155 |
include_once 'shortcodes/class-ur-shortcode-my-account.php';
|
156 |
UR_Shortcode_My_Account::edit_profile();
|
@@ -265,7 +268,7 @@ class UR_Shortcodes {
|
|
265 |
'recaptcha_node' => $recaptcha_node,
|
266 |
'parts' => self::$parts,
|
267 |
'row_ids' => $form_row_ids_array,
|
268 |
-
'recaptcha_enabled'
|
269 |
)
|
270 |
);
|
271 |
}
|
57 |
) {
|
58 |
ob_start();
|
59 |
|
60 |
+
$wrap_before = empty( $wrapper['before'] ) ? '<div id="user-registration" class="' . esc_attr( $wrapper['class'] ) . '">' : $wrapper['before'];
|
61 |
+
echo wp_kses_post( $wrap_before );
|
62 |
call_user_func( $function, $atts );
|
63 |
+
$wrap_after = empty( $wrapper['after'] ) ? '</div>' : $wrapper['after'];
|
64 |
+
echo wp_kses_post( $wrap_after );
|
65 |
|
66 |
return ob_get_clean();
|
67 |
}
|
122 |
* @param mixed $atts
|
123 |
*/
|
124 |
public static function edit_profile( $atts ) {
|
125 |
+
return self::shortcode_wrapper( array( __CLASS__, 'render_edit_profile' ), $atts );
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
* Output for Edit-profile form .
|
|
|
130 |
*/
|
131 |
private static function render_edit_profile() {
|
132 |
+
$user_id = get_current_user_id();
|
133 |
$form_id = get_user_meta( $user_id, 'ur_form_id', true );
|
134 |
do_action( 'user_registration_my_account_enqueue_scripts', array(), $form_id );
|
135 |
$has_date = ur_has_date_field( $form_id );
|
136 |
|
137 |
+
if ( true === $has_date ) {
|
138 |
+
wp_enqueue_style( 'flatpickr' );
|
139 |
+
wp_enqueue_script( 'flatpickr' );
|
140 |
+
}
|
141 |
if ( ! is_user_logged_in() ) {
|
142 |
$myaccount_page = get_post( get_option( 'user_registration_myaccount_page_id' ) );
|
143 |
$matched = 0;
|
144 |
|
145 |
if ( ! empty( $myaccount_page ) ) {
|
146 |
$matched = preg_match( '/\[user_registration_my_account(\s\S+){0,3}\]|\[user_registration_login(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
147 |
+
if ( 1 > absint( $matched ) ) {
|
148 |
$matched = preg_match( '/\[woocommerce_my_account(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
149 |
}
|
150 |
if ( 1 === $matched ) {
|
151 |
$page_id = $myaccount_page->ID;
|
152 |
}
|
153 |
}
|
154 |
+
|
155 |
+
/* translators: %s - Link to login form. */
|
156 |
+
echo wp_kses_post( apply_filters( 'user_registration_logged_in_message', sprintf( __( 'Please Login to edit profile. <a href="%s">Login Here?</a>', 'user-registration' ), isset( $page_id ) ? get_permalink( $page_id ) : wp_login_url() ) ) );
|
157 |
} else {
|
158 |
include_once 'shortcodes/class-ur-shortcode-my-account.php';
|
159 |
UR_Shortcode_My_Account::edit_profile();
|
268 |
'recaptcha_node' => $recaptcha_node,
|
269 |
'parts' => self::$parts,
|
270 |
'row_ids' => $form_row_ids_array,
|
271 |
+
'recaptcha_enabled' => $recaptcha_enabled,
|
272 |
)
|
273 |
);
|
274 |
}
|
includes/form/class-ur-form-field-checkbox.php
CHANGED
@@ -32,17 +32,17 @@ class UR_Form_Field_Checkbox extends UR_Form_Field {
|
|
32 |
$this->id = 'user_registration_checkbox';
|
33 |
$this->form_id = 1;
|
34 |
$this->registered_fields_config = array(
|
35 |
-
'label' =>
|
36 |
'icon' => 'ur-icon ur-icon-input-checkbox',
|
37 |
);
|
38 |
|
39 |
$this->field_defaults = array(
|
40 |
-
'default_label' =>
|
41 |
'default_field_name' => 'check_box_' . ur_get_random_number(),
|
42 |
'default_options' => array(
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
),
|
47 |
);
|
48 |
}
|
@@ -52,7 +52,7 @@ class UR_Form_Field_Checkbox extends UR_Form_Field {
|
|
52 |
*/
|
53 |
public function get_registered_admin_fields() {
|
54 |
|
55 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -71,7 +71,7 @@ class UR_Form_Field_Checkbox extends UR_Form_Field {
|
|
71 |
add_filter(
|
72 |
$filter_hook,
|
73 |
function ( $msg ) use ( $field_label ) {
|
74 |
-
return
|
75 |
}
|
76 |
);
|
77 |
}
|
32 |
$this->id = 'user_registration_checkbox';
|
33 |
$this->form_id = 1;
|
34 |
$this->registered_fields_config = array(
|
35 |
+
'label' => esc_html__( 'Checkbox', 'user-registration' ),
|
36 |
'icon' => 'ur-icon ur-icon-input-checkbox',
|
37 |
);
|
38 |
|
39 |
$this->field_defaults = array(
|
40 |
+
'default_label' => esc_html__( 'Checkbox', 'user-registration' ),
|
41 |
'default_field_name' => 'check_box_' . ur_get_random_number(),
|
42 |
'default_options' => array(
|
43 |
+
esc_html__( 'First Choice', 'user-registration' ),
|
44 |
+
esc_html__( 'Second Choice', 'user-registration' ),
|
45 |
+
esc_html__( 'Third Choice', 'user-registration' ),
|
46 |
),
|
47 |
);
|
48 |
}
|
52 |
*/
|
53 |
public function get_registered_admin_fields() {
|
54 |
|
55 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
56 |
}
|
57 |
|
58 |
/**
|
71 |
add_filter(
|
72 |
$filter_hook,
|
73 |
function ( $msg ) use ( $field_label ) {
|
74 |
+
return esc_html__( $field_label . ' is required.', 'user-registration' );
|
75 |
}
|
76 |
);
|
77 |
}
|
includes/form/class-ur-form-field-country.php
CHANGED
@@ -295,7 +295,7 @@ class UR_Form_Field_Country extends UR_Form_Field {
|
|
295 |
|
296 |
$form_data = UR()->form->get_form( $form_id, array( 'content_only' => true ) );
|
297 |
$fields = self::get_form_field_data( $form_data );
|
298 |
-
|
299 |
// Get selected_countries data of the field
|
300 |
foreach ( $fields as $field ) {
|
301 |
if ( "country" === $field->field_key && $field_name === $field->general_setting->field_name ) {
|
@@ -318,7 +318,7 @@ class UR_Form_Field_Country extends UR_Form_Field {
|
|
318 |
|
319 |
return $filtered_countries;
|
320 |
}
|
321 |
-
|
322 |
/**
|
323 |
* Get form field data by post_content array passed
|
324 |
*
|
@@ -356,7 +356,7 @@ class UR_Form_Field_Country extends UR_Form_Field {
|
|
356 |
|
357 |
public function get_registered_admin_fields() {
|
358 |
|
359 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
360 |
}
|
361 |
|
362 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
@@ -369,7 +369,7 @@ class UR_Form_Field_Country extends UR_Form_Field {
|
|
369 |
add_filter(
|
370 |
$filter_hook,
|
371 |
function ( $msg ) use ( $field_label ) {
|
372 |
-
return
|
373 |
}
|
374 |
);
|
375 |
}
|
295 |
|
296 |
$form_data = UR()->form->get_form( $form_id, array( 'content_only' => true ) );
|
297 |
$fields = self::get_form_field_data( $form_data );
|
298 |
+
|
299 |
// Get selected_countries data of the field
|
300 |
foreach ( $fields as $field ) {
|
301 |
if ( "country" === $field->field_key && $field_name === $field->general_setting->field_name ) {
|
318 |
|
319 |
return $filtered_countries;
|
320 |
}
|
321 |
+
|
322 |
/**
|
323 |
* Get form field data by post_content array passed
|
324 |
*
|
356 |
|
357 |
public function get_registered_admin_fields() {
|
358 |
|
359 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
360 |
}
|
361 |
|
362 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
369 |
add_filter(
|
370 |
$filter_hook,
|
371 |
function ( $msg ) use ( $field_label ) {
|
372 |
+
return esc_html__( $field_label . ' is required.', 'user-registration' );
|
373 |
}
|
374 |
);
|
375 |
}
|
includes/form/class-ur-form-field-date.php
CHANGED
@@ -46,7 +46,7 @@ class UR_Form_Field_Date extends UR_Form_Field {
|
|
46 |
|
47 |
public function get_registered_admin_fields() {
|
48 |
|
49 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
50 |
}
|
51 |
|
52 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
@@ -61,7 +61,7 @@ class UR_Form_Field_Date extends UR_Form_Field {
|
|
61 |
add_filter(
|
62 |
$filter_hook,
|
63 |
function ( $msg ) use ( $field_label ) {
|
64 |
-
return
|
65 |
}
|
66 |
);
|
67 |
}
|
46 |
|
47 |
public function get_registered_admin_fields() {
|
48 |
|
49 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
50 |
}
|
51 |
|
52 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
61 |
add_filter(
|
62 |
$filter_hook,
|
63 |
function ( $msg ) use ( $field_label ) {
|
64 |
+
return esc_html__( $field_label . ' is required.', 'user-registration' );
|
65 |
}
|
66 |
);
|
67 |
}
|
includes/form/class-ur-form-field-description.php
CHANGED
@@ -45,7 +45,7 @@ class UR_Form_Field_Description extends UR_Form_Field {
|
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
49 |
}
|
50 |
|
51 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
@@ -58,7 +58,7 @@ class UR_Form_Field_Description extends UR_Form_Field {
|
|
58 |
add_filter(
|
59 |
$filter_hook,
|
60 |
function ( $msg ) use ( $field_label ) {
|
61 |
-
return
|
62 |
}
|
63 |
);
|
64 |
}
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
49 |
}
|
50 |
|
51 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
58 |
add_filter(
|
59 |
$filter_hook,
|
60 |
function ( $msg ) use ( $field_label ) {
|
61 |
+
return esc_html__( $field_label . ' is required.', 'user-registration' );
|
62 |
}
|
63 |
);
|
64 |
}
|
includes/form/class-ur-form-field-display-name.php
CHANGED
@@ -44,7 +44,7 @@ class UR_Form_Field_Display_Name extends UR_Form_Field {
|
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
includes/form/class-ur-form-field-email.php
CHANGED
@@ -44,7 +44,7 @@ class UR_Form_Field_Email extends UR_Form_Field {
|
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
includes/form/class-ur-form-field-first-name.php
CHANGED
@@ -44,7 +44,7 @@ class UR_Form_Field_First_Name extends UR_Form_Field {
|
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
includes/form/class-ur-form-field-last-name.php
CHANGED
@@ -44,7 +44,7 @@ class UR_Form_Field_Last_Name extends UR_Form_Field {
|
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
44 |
|
45 |
public function get_registered_admin_fields() {
|
46 |
|
47 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
48 |
}
|
49 |
|
50 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
includes/form/class-ur-form-field-nickname.php
CHANGED
@@ -45,7 +45,7 @@ class UR_Form_Field_Nickname extends UR_Form_Field {
|
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
49 |
}
|
50 |
|
51 |
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
49 |
}
|
50 |
|
51 |
|
includes/form/class-ur-form-field-number.php
CHANGED
@@ -46,7 +46,7 @@ class UR_Form_Field_Number extends UR_Form_Field {
|
|
46 |
|
47 |
public function get_registered_admin_fields() {
|
48 |
|
49 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
50 |
}
|
51 |
|
52 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
46 |
|
47 |
public function get_registered_admin_fields() {
|
48 |
|
49 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
50 |
}
|
51 |
|
52 |
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
|
includes/form/class-ur-form-field-password.php
CHANGED
@@ -45,7 +45,7 @@ class UR_Form_Field_Password extends UR_Form_Field {
|
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
-
return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
49 |
}
|
50 |
|
51 |
|
45 |
|
46 |
public function get_registered_admin_fields() {
|
47 |
|
48 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
49 |
}
|
50 |
|
51 |
|
includes/form/class-ur-form-field-privacy-policy.php
CHANGED
@@ -47,7 +47,7 @@ class UR_Form_Field_Privacy_Policy extends UR_Form_Field {
|
|
47 |
*/
|
48 |
public function get_registered_admin_fields() {
|
49 |
|
50 |
-
return '<li id="' . $this->id . '_list" class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>';
|
51 |
}
|
52 |
|
53 |
|
47 |
*/
|
48 |
public function get_registered_admin_fields() {
|
49 |
|
50 |
+
return '<li id="' . esc_attr( $this->id ) . '_list " class="ur-registered-item draggable" data-field-id="' .esc_attr( $this->id ) . '"><span class="' . esc_attr( $this->registered_fields_config['icon'] ). '"></span>' . esc_html( $this->registered_fields_config['label'] ) . '</li>';
|
51 |
}
|
52 |
|
53 |
|
includes/form/views/admin/admin-checkbox.php
CHANGED
@@ -29,9 +29,8 @@ $options = array_map( 'trim', $options );
|
|
29 |
|
30 |
$checked = in_array( $option, $default_values ) ? 'checked' : '';
|
31 |
|
32 |
-
echo "<label><input type = 'checkbox' value='" . esc_attr( trim( $option ) ) . "' " . $checked . ' disabled/>' . esc_html( trim( $option ) ) . '</label>';
|
33 |
}
|
34 |
?>
|
35 |
</div>
|
36 |
</div>
|
37 |
-
|
29 |
|
30 |
$checked = in_array( $option, $default_values ) ? 'checked' : '';
|
31 |
|
32 |
+
echo "<label><input type = 'checkbox' value='" . esc_attr( trim( $option ) ) . "' " . esc_attr( $checked ) . ' disabled/>' . esc_html( trim( $option ) ) . '</label>';
|
33 |
}
|
34 |
?>
|
35 |
</div>
|
36 |
</div>
|
|
includes/form/views/admin/admin-radio.php
CHANGED
@@ -32,9 +32,8 @@ $options = array_map( 'trim', $options );
|
|
32 |
$checked = checked( $option, $default_value, false );
|
33 |
}
|
34 |
|
35 |
-
echo "<label><input type = 'radio' value='" . esc_attr( trim( $option ) ) . "' '" . $checked . "' disabled/>" . esc_html( trim( $option ) ) . '</label>';
|
36 |
}
|
37 |
?>
|
38 |
</div>
|
39 |
</div>
|
40 |
-
|
32 |
$checked = checked( $option, $default_value, false );
|
33 |
}
|
34 |
|
35 |
+
echo "<label><input type = 'radio' value='" . esc_attr( trim( $option ) ) . "' '" . esc_attr( $checked ) . "' disabled/>" . esc_html( trim( $option ) ) . '</label>';
|
36 |
}
|
37 |
?>
|
38 |
</div>
|
39 |
</div>
|
|
includes/form/views/admin/admin-select.php
CHANGED
@@ -1,32 +1,31 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Form View: Select
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit; // Exit if accessed directly.
|
8 |
-
}
|
9 |
-
|
10 |
-
// Compatibility for older version. Get string value from options in advanced settings. Modified since @1.5.7
|
11 |
-
$default_options = isset( $this->field_defaults['default_options'] ) ? $this->field_defaults['default_options'] : array();
|
12 |
-
$old_options = isset( $this->admin_data->advance_setting->options ) ? explode( ',', trim( $this->admin_data->advance_setting->options, ',' ) ) : $default_options;
|
13 |
-
$options = isset( $this->admin_data->general_setting->options ) ? $this->admin_data->general_setting->options : $old_options;
|
14 |
-
$default_value = isset( $this->admin_data->general_setting->default_value ) ? $this->admin_data->general_setting->default_value : '';
|
15 |
-
$options = array_map( 'trim', $options );
|
16 |
-
|
17 |
-
?>
|
18 |
-
<div class="ur-input-type-select ur-admin-template">
|
19 |
-
<div class="ur-label">
|
20 |
-
<label><?php echo esc_html( $this->get_general_setting_data( 'label' ) ); ?></label>
|
21 |
-
</div>
|
22 |
-
<div class="ur-field" data-field-key="select">
|
23 |
-
<select id="ur-input-type-select" disabled>
|
24 |
-
<?php
|
25 |
-
foreach ( $options as $option ) {
|
26 |
-
echo "<option value='" . esc_attr( trim( $option ) ) . "' '" . selected( $option, $default_value, false ) . "'>" . esc_html( trim( $option ) ) . '</option>';
|
27 |
-
}
|
28 |
-
?>
|
29 |
-
</select>
|
30 |
-
</div>
|
31 |
-
</div>
|
32 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Form View: Select
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
// Compatibility for older version. Get string value from options in advanced settings. Modified since @1.5.7
|
11 |
+
$default_options = isset( $this->field_defaults['default_options'] ) ? $this->field_defaults['default_options'] : array();
|
12 |
+
$old_options = isset( $this->admin_data->advance_setting->options ) ? explode( ',', trim( $this->admin_data->advance_setting->options, ',' ) ) : $default_options;
|
13 |
+
$options = isset( $this->admin_data->general_setting->options ) ? $this->admin_data->general_setting->options : $old_options;
|
14 |
+
$default_value = isset( $this->admin_data->general_setting->default_value ) ? $this->admin_data->general_setting->default_value : '';
|
15 |
+
$options = array_map( 'trim', $options );
|
16 |
+
|
17 |
+
?>
|
18 |
+
<div class="ur-input-type-select ur-admin-template">
|
19 |
+
<div class="ur-label">
|
20 |
+
<label><?php echo esc_html( $this->get_general_setting_data( 'label' ) ); ?></label>
|
21 |
+
</div>
|
22 |
+
<div class="ur-field" data-field-key="select">
|
23 |
+
<select id="ur-input-type-select" disabled>
|
24 |
+
<?php
|
25 |
+
foreach ( $options as $option ) {
|
26 |
+
echo "<option value='" . esc_attr( trim( $option ) ) . "' '" . esc_attr( selected( $option, $default_value, false ) ) . "'>" . esc_html( trim( $option ) ) . '</option>';
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
</select>
|
30 |
+
</div>
|
31 |
+
</div>
|
|
includes/frontend/class-ur-frontend-form-handler.php
CHANGED
@@ -59,7 +59,7 @@ class UR_Frontend_Form_Handler {
|
|
59 |
self::add_hook( $form_field_data, $form_data );
|
60 |
$enable_auto_password_generation = ur_get_single_post_meta( $form_id, 'user_registration_pro_auto_password_activate' );
|
61 |
|
62 |
-
if( 'yes' === $enable_auto_password_generation || '1' === $enable_auto_password_generation ) {
|
63 |
do_action( 'user_registration_auto_generate_password', $form_id );
|
64 |
$user_pass = wp_slash( apply_filters( 'user_registration_auto_generated_password', 'user_pass' ) );
|
65 |
self::validate_form_data( $form_field_data, $form_data, $form_id );
|
@@ -105,17 +105,16 @@ class UR_Frontend_Form_Handler {
|
|
105 |
'username' => isset( self::$valid_form_data['user_login'] ) ? self::$valid_form_data['user_login']->value : '',
|
106 |
);
|
107 |
|
108 |
-
if ( isset( $_POST['ur_stripe_payment_method'] ) && 'ideal' ===
|
109 |
|
110 |
if ( 'auto_login' === $login_option ) {
|
111 |
$success_params['auto_login'] = true;
|
112 |
}
|
113 |
} elseif ( '1' === ur_get_single_post_meta( $form_id, 'user_registration_enable_paypal_standard', 'no' ) ) {
|
114 |
-
|
115 |
-
|
116 |
-
}
|
117 |
}
|
118 |
-
|
119 |
|
120 |
if ( 'auto_login' === $login_option ) {
|
121 |
wp_clear_auth_cookie();
|
@@ -127,9 +126,9 @@ class UR_Frontend_Form_Handler {
|
|
127 |
$success_params['form_login_option'] = $login_option;
|
128 |
$success_params = apply_filters( 'user_registration_success_params', $success_params, self::$valid_form_data, $form_id, $user_id );
|
129 |
|
130 |
-
if ( isset( $_POST['ur_stripe_payment_method'] ) && 'ideal' ===
|
131 |
wp_send_json_success( $success_params );
|
132 |
-
}else{
|
133 |
do_action( 'user_registration_after_register_user_action', self::$valid_form_data, $form_id, $user_id );
|
134 |
wp_send_json_success( $success_params );
|
135 |
}
|
@@ -351,7 +350,7 @@ class UR_Frontend_Form_Handler {
|
|
351 |
|
352 |
if ( isset( $data->extra_params['field_key'] ) && ( $data->extra_params['field_key'] === 'checkbox' || $data->extra_params['field_key'] === 'learndash_course' ) ) {
|
353 |
$data->value = ( json_decode( $data->value ) !== null ) ? json_decode( $data->value ) : $data->value;
|
354 |
-
} else if( isset( $data->extra_params['field_key'] ) && ( $data->extra_params['field_key'] === 'wysiwyg' ) ) {
|
355 |
$data->value = sanitize_text_field( htmlentities( $data->value ) );
|
356 |
}
|
357 |
update_user_meta( $user_id, $field_name, $data->value );
|
59 |
self::add_hook( $form_field_data, $form_data );
|
60 |
$enable_auto_password_generation = ur_get_single_post_meta( $form_id, 'user_registration_pro_auto_password_activate' );
|
61 |
|
62 |
+
if ( 'yes' === $enable_auto_password_generation || '1' === $enable_auto_password_generation ) {
|
63 |
do_action( 'user_registration_auto_generate_password', $form_id );
|
64 |
$user_pass = wp_slash( apply_filters( 'user_registration_auto_generated_password', 'user_pass' ) );
|
65 |
self::validate_form_data( $form_field_data, $form_data, $form_id );
|
105 |
'username' => isset( self::$valid_form_data['user_login'] ) ? self::$valid_form_data['user_login']->value : '',
|
106 |
);
|
107 |
|
108 |
+
if ( isset( $_POST['ur_stripe_payment_method'] ) && 'ideal' === sanitize_text_field( $_POST['ur_stripe_payment_method'] ) ) {
|
109 |
|
110 |
if ( 'auto_login' === $login_option ) {
|
111 |
$success_params['auto_login'] = true;
|
112 |
}
|
113 |
} elseif ( '1' === ur_get_single_post_meta( $form_id, 'user_registration_enable_paypal_standard', 'no' ) ) {
|
114 |
+
if ( 'auto_login' === $login_option ) {
|
115 |
+
$success_params['auto_login'] = false;
|
|
|
116 |
}
|
117 |
+
} else {
|
118 |
|
119 |
if ( 'auto_login' === $login_option ) {
|
120 |
wp_clear_auth_cookie();
|
126 |
$success_params['form_login_option'] = $login_option;
|
127 |
$success_params = apply_filters( 'user_registration_success_params', $success_params, self::$valid_form_data, $form_id, $user_id );
|
128 |
|
129 |
+
if ( isset( $_POST['ur_stripe_payment_method'] ) && 'ideal' === sanitize_text_field( $_POST['ur_stripe_payment_method'] ) ) {
|
130 |
wp_send_json_success( $success_params );
|
131 |
+
} else {
|
132 |
do_action( 'user_registration_after_register_user_action', self::$valid_form_data, $form_id, $user_id );
|
133 |
wp_send_json_success( $success_params );
|
134 |
}
|
350 |
|
351 |
if ( isset( $data->extra_params['field_key'] ) && ( $data->extra_params['field_key'] === 'checkbox' || $data->extra_params['field_key'] === 'learndash_course' ) ) {
|
352 |
$data->value = ( json_decode( $data->value ) !== null ) ? json_decode( $data->value ) : $data->value;
|
353 |
+
} else if ( isset( $data->extra_params['field_key'] ) && ( $data->extra_params['field_key'] === 'wysiwyg' ) ) {
|
354 |
$data->value = sanitize_text_field( htmlentities( $data->value ) );
|
355 |
}
|
356 |
update_user_meta( $user_id, $field_name, $data->value );
|
includes/functions-ur-core.php
CHANGED
@@ -316,20 +316,19 @@ function ur_post_content_has_shortcode( $tag = '' ) {
|
|
316 |
global $post;
|
317 |
$new_shortcode = '';
|
318 |
$wp_version = '5.0';
|
319 |
-
if ( version_compare($GLOBALS['wp_version'], $wp_version, '>=' ) ) {
|
320 |
-
if( is_object( $post ) ) {
|
321 |
$blocks = parse_blocks( $post->post_content );
|
322 |
-
foreach( $blocks as $block ) {
|
323 |
|
324 |
if ( 'core/shortcode' === $block['blockName'] && isset( $block['innerHTML'] ) ) {
|
325 |
$new_shortcode = $block['innerHTML'];
|
326 |
} elseif ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['shortcode'] ) ) {
|
327 |
-
$new_shortcode =
|
328 |
}
|
329 |
-
|
330 |
}
|
331 |
}
|
332 |
-
|
333 |
} else {
|
334 |
return ( is_singular() || is_front_page() ) && is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $tag );
|
335 |
}
|
@@ -1122,8 +1121,8 @@ function ur_login_option_with() {
|
|
1122 |
'user_registration_login_options_with',
|
1123 |
array(
|
1124 |
'default' => __( 'Username or Email', 'user-registration' ),
|
1125 |
-
'username'
|
1126 |
-
'email'
|
1127 |
)
|
1128 |
);
|
1129 |
}
|
@@ -1145,7 +1144,7 @@ function ur_get_single_post_meta( $post_id, $meta_key, $default = null ) {
|
|
1145 |
|
1146 |
if ( isset( $post_meta[0] ) ) {
|
1147 |
if ( 'user_registration_form_setting_enable_recaptcha_support' === $meta_key || 'user_registration_form_setting_enable_strong_password' === $meta_key
|
1148 |
-
|| 'user_registration_pdf_submission_to_admin' === $meta_key || 'user_registration_pdf_submission_to_user' === $meta_key || 'user_registration_form_setting_enable_assign_user_role_conditionally' === $meta_key) {
|
1149 |
if ( 'yes' === $post_meta[0] ) {
|
1150 |
$post_meta[0] = 1;
|
1151 |
}
|
@@ -1175,7 +1174,7 @@ function ur_get_form_setting_by_key( $form_id, $meta_key, $default = '' ) {
|
|
1175 |
foreach ( $fields as $field ) {
|
1176 |
|
1177 |
if ( isset( $field['id'] ) && $meta_key == $field['id'] ) {
|
1178 |
-
$value = isset( $field['default'] ) ? $field['default'] : $default;
|
1179 |
break;
|
1180 |
}
|
1181 |
}
|
@@ -1345,7 +1344,7 @@ function ur_addon_updater( $file, $item_id, $addon_version, $beta = false ) {
|
|
1345 |
$license_key = trim( get_option( 'user-registration_license_key' ) );
|
1346 |
if ( class_exists( 'UR_AddOn_Updater' ) ) {
|
1347 |
new UR_AddOn_Updater(
|
1348 |
-
$api_endpoint,
|
1349 |
$file,
|
1350 |
array(
|
1351 |
'version' => $addon_version,
|
@@ -1552,15 +1551,15 @@ function ur_get_user_extra_fields( $user_id ) {
|
|
1552 |
* @param string $user_status.
|
1553 |
* @param string $user_email_status.
|
1554 |
*/
|
1555 |
-
function ur_get_user_status( $user_status
|
1556 |
$status = array();
|
1557 |
-
if ( $user_status === '0' || $user_email_status === '0'
|
1558 |
array_push( $status, 'Pending' );
|
1559 |
-
} elseif ($user_status === '-1' || $user_email_status === '-1' ) {
|
1560 |
array_push( $status, 'Denied' );
|
1561 |
} else {
|
1562 |
if ( $user_email_status ) {
|
1563 |
-
|
1564 |
} else {
|
1565 |
array_push( $status, 'Approved' );
|
1566 |
}
|
@@ -1695,7 +1694,7 @@ function ur_print_js() {
|
|
1695 |
*
|
1696 |
* @param string $js JavaScript code.
|
1697 |
*/
|
1698 |
-
echo apply_filters( 'user_registration_queued_js', $js );
|
1699 |
|
1700 |
unset( $ur_queued_js );
|
1701 |
}
|
@@ -1906,30 +1905,29 @@ function ur_parse_args( &$args, $defaults ) {
|
|
1906 |
/**
|
1907 |
* Override email content for specific form.
|
1908 |
*
|
1909 |
-
* @param int
|
1910 |
* @param object $settings Settings for specific email.
|
1911 |
* @param string $message Message to be sent in email body.
|
1912 |
* @param string $subject Subject of the email.
|
1913 |
*
|
1914 |
* @return array
|
1915 |
*/
|
1916 |
-
function user_registration_email_content_overrider($form_id, $settings, $message, $subject) {
|
1917 |
// Check if email templates addon is active.
|
1918 |
-
if( class_exists( 'User_Registration_Email_Templates')) {
|
1919 |
$email_content_override = ur_get_single_post_meta( $form_id, 'user_registration_email_content_override', '' );
|
1920 |
|
1921 |
// Check if the post meta exists and have contents.
|
1922 |
-
if( $email_content_override ) {
|
1923 |
|
1924 |
-
$auto_password_template_overrider = isset( $email_content_override[$settings->id] ) ?
|
1925 |
|
1926 |
// Check if the email override is enabled.
|
1927 |
-
if( '' !== $auto_password_template_overrider && '1' === $auto_password_template_overrider['override']) {
|
1928 |
$message = $auto_password_template_overrider['content'];
|
1929 |
$subject = $auto_password_template_overrider['subject'];
|
1930 |
}
|
1931 |
}
|
1932 |
-
|
1933 |
}
|
1934 |
return array( $message, $subject );
|
1935 |
}
|
@@ -1938,8 +1936,8 @@ function user_registration_email_content_overrider($form_id, $settings, $message
|
|
1938 |
*
|
1939 |
* @param string $new_string Field Key.
|
1940 |
* @param string $post_key Post Key
|
1941 |
-
* @param array
|
1942 |
-
* @param mixed
|
1943 |
*/
|
1944 |
function ur_get_valid_form_data_format( $new_string, $post_key, $profile, $value ) {
|
1945 |
$valid_form_data = array();
|
@@ -1964,7 +1962,7 @@ function ur_get_valid_form_data_format( $new_string, $post_key, $profile, $value
|
|
1964 |
$valid_form_data[ $new_string ]->field_name = $new_string;
|
1965 |
$valid_form_data[ $new_string ]->value = $value;
|
1966 |
$valid_form_data[ $new_string ]->extra_params = array(
|
1967 |
-
'field_key' => $new_string
|
1968 |
);
|
1969 |
}
|
1970 |
return $valid_form_data;
|
@@ -1977,13 +1975,13 @@ function ur_get_valid_form_data_format( $new_string, $post_key, $profile, $value
|
|
1977 |
*
|
1978 |
* @since 1.9.4
|
1979 |
*/
|
1980 |
-
function ur_resolve_conflicting_shortcodes_with_aioseo( $conflict_shortcodes ){
|
1981 |
$ur_shortcodes = array(
|
1982 |
'User Registration My Account' => '[user_registration_my_account]',
|
1983 |
-
'User Registration Login' => '[user_registration_login]'
|
1984 |
-
|
1985 |
|
1986 |
-
$conflict_shortcodes = array_merge( $conflict_shortcodes, $ur_shortcodes);
|
1987 |
return $conflict_shortcodes;
|
1988 |
}
|
1989 |
add_filter( 'aioseo_conflicting_shortcodes', 'ur_resolve_conflicting_shortcodes_with_aioseo' );
|
@@ -2049,12 +2047,12 @@ function ur_parse_name_values_for_smart_tags( $user_id, $form_id, $valid_form_da
|
|
2049 |
/**
|
2050 |
* Get field data by field_name.
|
2051 |
*
|
2052 |
-
* @param int
|
2053 |
* @param string $field_name Field Name.
|
2054 |
*
|
2055 |
* @return array
|
2056 |
*/
|
2057 |
-
function ur_get_field_data_by_field_name($form_id
|
2058 |
$field_data = array();
|
2059 |
|
2060 |
$post_content_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();
|
@@ -2062,9 +2060,9 @@ function ur_get_field_data_by_field_name($form_id,$field_name){
|
|
2062 |
foreach ( $post_content_array as $post_content_row ) {
|
2063 |
foreach ( $post_content_row as $post_content_grid ) {
|
2064 |
foreach ( $post_content_grid as $field ) {
|
2065 |
-
if ( isset( $field->field_key ) && isset( $field->general_setting->field_name ) &&
|
2066 |
$field_data = array(
|
2067 |
-
|
2068 |
);
|
2069 |
}
|
2070 |
}
|
@@ -2131,51 +2129,51 @@ if ( ! function_exists( 'user_registration_pro_render_conditional_logic' ) ) {
|
|
2131 |
/**
|
2132 |
* Render Conditional Logic in form settings of form builder.
|
2133 |
*
|
2134 |
-
* @param array
|
2135 |
* @param string $integration Integration.
|
2136 |
* @return string
|
2137 |
*/
|
2138 |
-
function user_registration_pro_render_conditional_logic($connection
|
2139 |
$output = '<div class="ur_conditional_logic_container">';
|
2140 |
-
|
2141 |
$checked = '';
|
2142 |
|
2143 |
if ( isset( $connection['enable_conditional_logic'] ) && ur_string_to_bool( $connection['enable_conditional_logic'] ) ) {
|
2144 |
|
2145 |
$checked = 'checked=checked';
|
2146 |
}
|
2147 |
-
|
2148 |
-
$output .= '<label>' .esc_html__(
|
2149 |
-
$output .=
|
2150 |
|
2151 |
-
|
2152 |
-
$output .= '<h4>'. esc_html__(
|
2153 |
-
|
2154 |
$output .= '<div class="ur-conditional-wrapper">';
|
2155 |
$output .= '<select class="ur_conditional_field" name="ur_conditional_field">';
|
2156 |
$get_all_fields = user_registration_pro_get_conditional_fields_by_form_id( $form_id, '' );
|
2157 |
$selected_ur_field_type = '';
|
2158 |
|
2159 |
-
if( isset( $get_all_fields ) ) {
|
2160 |
|
2161 |
-
foreach( $get_all_fields as $key => $field ) {
|
2162 |
$selectedAttr = '';
|
2163 |
|
2164 |
-
if( isset( $connection[
|
2165 |
$selectedAttr = 'selected=selected';
|
2166 |
$selected_ur_field_type = $field['field_key'];
|
2167 |
}
|
2168 |
-
$output .='<option data-type="' . esc_attr( $field[
|
2169 |
}
|
2170 |
}
|
2171 |
-
|
2172 |
$output .= '<select class="ur-conditional-condition" name="ur-conditional-condition">';
|
2173 |
-
$output .= '<option value="is" '. ( isset( $connection[
|
2174 |
-
|
2175 |
-
|
2176 |
|
2177 |
if ( $selected_ur_field_type == 'checkbox' || $selected_ur_field_type == 'radio' || $selected_ur_field_type == 'select' || $selected_ur_field_type == 'country' || $selected_ur_field_type == 'billing_country' || $selected_ur_field_type == 'shipping_country' || $selected_ur_field_type == 'select2' || $selected_ur_field_type == 'multi_select2' ) {
|
2178 |
-
$choices = user_registration_pro_get_checkbox_choices( $form_id, $connection[
|
2179 |
$output .= '<select name="ur-conditional-input" class="ur-conditional-input">';
|
2180 |
|
2181 |
if ( is_array( $choices ) && array_filter( $choices ) ) {
|
@@ -2183,21 +2181,21 @@ if ( ! function_exists( 'user_registration_pro_render_conditional_logic' ) ) {
|
|
2183 |
|
2184 |
foreach ( $choices as $key => $choice ) {
|
2185 |
$key = $selected_ur_field_type == 'country' ? $key : $choice;
|
2186 |
-
$selectedvalue = isset( $connection[
|
2187 |
$output .= '<option ' . $selectedvalue . ' value="' . esc_attr( $key ) . '">' . esc_html( $choice ) . '</option>';
|
2188 |
}
|
2189 |
} else {
|
2190 |
-
$selected = isset( $connection[
|
2191 |
$output .= '<option value="1" ' . ( $selected == '1' ? 'selected="selected"' : '' ) . ' >' . esc_html__( 'Checked', 'user-registration' ) . '</option>';
|
2192 |
}
|
2193 |
$output .= '</select>';
|
2194 |
} else {
|
2195 |
-
$value = isset( $connection[
|
2196 |
-
$output .= '<input class="ur-conditional-input" type="text" name="ur-conditional-input" value="'. esc_attr( $value ).'">';
|
2197 |
}
|
2198 |
-
$output .=
|
2199 |
-
|
2200 |
-
|
2201 |
return $output;
|
2202 |
}
|
2203 |
}
|
316 |
global $post;
|
317 |
$new_shortcode = '';
|
318 |
$wp_version = '5.0';
|
319 |
+
if ( version_compare( $GLOBALS['wp_version'], $wp_version, '>=' ) ) {
|
320 |
+
if ( is_object( $post ) ) {
|
321 |
$blocks = parse_blocks( $post->post_content );
|
322 |
+
foreach ( $blocks as $block ) {
|
323 |
|
324 |
if ( 'core/shortcode' === $block['blockName'] && isset( $block['innerHTML'] ) ) {
|
325 |
$new_shortcode = $block['innerHTML'];
|
326 |
} elseif ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['shortcode'] ) ) {
|
327 |
+
$new_shortcode = '[' . $block['attrs']['shortcode'] . ']';
|
328 |
}
|
|
|
329 |
}
|
330 |
}
|
331 |
+
return ( is_singular() || is_front_page() ) && is_a( $post, 'WP_Post' ) && has_shortcode( $new_shortcode, $tag );
|
332 |
} else {
|
333 |
return ( is_singular() || is_front_page() ) && is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $tag );
|
334 |
}
|
1121 |
'user_registration_login_options_with',
|
1122 |
array(
|
1123 |
'default' => __( 'Username or Email', 'user-registration' ),
|
1124 |
+
'username' => __( 'Username', 'user-registration' ),
|
1125 |
+
'email' => __( 'Email', 'user-registration' ),
|
1126 |
)
|
1127 |
);
|
1128 |
}
|
1144 |
|
1145 |
if ( isset( $post_meta[0] ) ) {
|
1146 |
if ( 'user_registration_form_setting_enable_recaptcha_support' === $meta_key || 'user_registration_form_setting_enable_strong_password' === $meta_key
|
1147 |
+
|| 'user_registration_pdf_submission_to_admin' === $meta_key || 'user_registration_pdf_submission_to_user' === $meta_key || 'user_registration_form_setting_enable_assign_user_role_conditionally' === $meta_key ) {
|
1148 |
if ( 'yes' === $post_meta[0] ) {
|
1149 |
$post_meta[0] = 1;
|
1150 |
}
|
1174 |
foreach ( $fields as $field ) {
|
1175 |
|
1176 |
if ( isset( $field['id'] ) && $meta_key == $field['id'] ) {
|
1177 |
+
$value = isset( $field['default'] ) ? sanitize_text_field( $field['default'] ) : $default;
|
1178 |
break;
|
1179 |
}
|
1180 |
}
|
1344 |
$license_key = trim( get_option( 'user-registration_license_key' ) );
|
1345 |
if ( class_exists( 'UR_AddOn_Updater' ) ) {
|
1346 |
new UR_AddOn_Updater(
|
1347 |
+
esc_url_raw( $api_endpoint ),
|
1348 |
$file,
|
1349 |
array(
|
1350 |
'version' => $addon_version,
|
1551 |
* @param string $user_status.
|
1552 |
* @param string $user_email_status.
|
1553 |
*/
|
1554 |
+
function ur_get_user_status( $user_status, $user_email_status ) {
|
1555 |
$status = array();
|
1556 |
+
if ( $user_status === '0' || $user_email_status === '0' ) {
|
1557 |
array_push( $status, 'Pending' );
|
1558 |
+
} elseif ( $user_status === '-1' || $user_email_status === '-1' ) {
|
1559 |
array_push( $status, 'Denied' );
|
1560 |
} else {
|
1561 |
if ( $user_email_status ) {
|
1562 |
+
array_push( $status, 'Verified' );
|
1563 |
} else {
|
1564 |
array_push( $status, 'Approved' );
|
1565 |
}
|
1694 |
*
|
1695 |
* @param string $js JavaScript code.
|
1696 |
*/
|
1697 |
+
echo wp_kses( apply_filters( 'user_registration_queued_js', $js ), array( 'script' => array( 'type' => true ) ) );
|
1698 |
|
1699 |
unset( $ur_queued_js );
|
1700 |
}
|
1905 |
/**
|
1906 |
* Override email content for specific form.
|
1907 |
*
|
1908 |
+
* @param int $form_id Form Id.
|
1909 |
* @param object $settings Settings for specific email.
|
1910 |
* @param string $message Message to be sent in email body.
|
1911 |
* @param string $subject Subject of the email.
|
1912 |
*
|
1913 |
* @return array
|
1914 |
*/
|
1915 |
+
function user_registration_email_content_overrider( $form_id, $settings, $message, $subject ) {
|
1916 |
// Check if email templates addon is active.
|
1917 |
+
if ( class_exists( 'User_Registration_Email_Templates' ) ) {
|
1918 |
$email_content_override = ur_get_single_post_meta( $form_id, 'user_registration_email_content_override', '' );
|
1919 |
|
1920 |
// Check if the post meta exists and have contents.
|
1921 |
+
if ( $email_content_override ) {
|
1922 |
|
1923 |
+
$auto_password_template_overrider = isset( $email_content_override[ $settings->id ] ) ? $email_content_override[ $settings->id ] : '';
|
1924 |
|
1925 |
// Check if the email override is enabled.
|
1926 |
+
if ( '' !== $auto_password_template_overrider && '1' === $auto_password_template_overrider['override'] ) {
|
1927 |
$message = $auto_password_template_overrider['content'];
|
1928 |
$subject = $auto_password_template_overrider['subject'];
|
1929 |
}
|
1930 |
}
|
|
|
1931 |
}
|
1932 |
return array( $message, $subject );
|
1933 |
}
|
1936 |
*
|
1937 |
* @param string $new_string Field Key.
|
1938 |
* @param string $post_key Post Key
|
1939 |
+
* @param array $profile Form Data.
|
1940 |
+
* @param mixed $value Value.
|
1941 |
*/
|
1942 |
function ur_get_valid_form_data_format( $new_string, $post_key, $profile, $value ) {
|
1943 |
$valid_form_data = array();
|
1962 |
$valid_form_data[ $new_string ]->field_name = $new_string;
|
1963 |
$valid_form_data[ $new_string ]->value = $value;
|
1964 |
$valid_form_data[ $new_string ]->extra_params = array(
|
1965 |
+
'field_key' => $new_string,
|
1966 |
);
|
1967 |
}
|
1968 |
return $valid_form_data;
|
1975 |
*
|
1976 |
* @since 1.9.4
|
1977 |
*/
|
1978 |
+
function ur_resolve_conflicting_shortcodes_with_aioseo( $conflict_shortcodes ) {
|
1979 |
$ur_shortcodes = array(
|
1980 |
'User Registration My Account' => '[user_registration_my_account]',
|
1981 |
+
'User Registration Login' => '[user_registration_login]',
|
1982 |
+
);
|
1983 |
|
1984 |
+
$conflict_shortcodes = array_merge( $conflict_shortcodes, $ur_shortcodes );
|
1985 |
return $conflict_shortcodes;
|
1986 |
}
|
1987 |
add_filter( 'aioseo_conflicting_shortcodes', 'ur_resolve_conflicting_shortcodes_with_aioseo' );
|
2047 |
/**
|
2048 |
* Get field data by field_name.
|
2049 |
*
|
2050 |
+
* @param int $form_id Form Id.
|
2051 |
* @param string $field_name Field Name.
|
2052 |
*
|
2053 |
* @return array
|
2054 |
*/
|
2055 |
+
function ur_get_field_data_by_field_name( $form_id, $field_name ) {
|
2056 |
$field_data = array();
|
2057 |
|
2058 |
$post_content_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();
|
2060 |
foreach ( $post_content_array as $post_content_row ) {
|
2061 |
foreach ( $post_content_row as $post_content_grid ) {
|
2062 |
foreach ( $post_content_grid as $field ) {
|
2063 |
+
if ( isset( $field->field_key ) && isset( $field->general_setting->field_name ) && $field->general_setting->field_name === $field_name ) {
|
2064 |
$field_data = array(
|
2065 |
+
'field_key' => $field->field_key,
|
2066 |
);
|
2067 |
}
|
2068 |
}
|
2129 |
/**
|
2130 |
* Render Conditional Logic in form settings of form builder.
|
2131 |
*
|
2132 |
+
* @param array $connection Connection Data.
|
2133 |
* @param string $integration Integration.
|
2134 |
* @return string
|
2135 |
*/
|
2136 |
+
function user_registration_pro_render_conditional_logic( $connection, $integration, $form_id ) {
|
2137 |
$output = '<div class="ur_conditional_logic_container">';
|
2138 |
+
$output .= '<div class="ur_use_conditional_logic_wrapper ur-check">';
|
2139 |
$checked = '';
|
2140 |
|
2141 |
if ( isset( $connection['enable_conditional_logic'] ) && ur_string_to_bool( $connection['enable_conditional_logic'] ) ) {
|
2142 |
|
2143 |
$checked = 'checked=checked';
|
2144 |
}
|
2145 |
+
$output .= '<input class="ur-use-conditional-logic" type="checkbox" name="ur_use_conditional_logic" id="ur_use_conditional_logic" ' . $checked . '>';
|
2146 |
+
$output .= '<label>' . esc_html__( 'Use conditional logic', 'user-registration' ) . '</label>';
|
2147 |
+
$output .= '</div>';
|
2148 |
|
2149 |
+
$output .= '<div class="ur_conditional_logic_wrapper" data-source="' . esc_attr( $integration ) . '">';
|
2150 |
+
$output .= '<h4>' . esc_html__( 'Conditional Rules', 'user-registration' ) . '</h4>';
|
2151 |
+
$output .= '<div class="ur-logic"><p>' . esc_html__( 'Send data only if the following matches.', 'user-registration' ) . '</p></div>';
|
2152 |
$output .= '<div class="ur-conditional-wrapper">';
|
2153 |
$output .= '<select class="ur_conditional_field" name="ur_conditional_field">';
|
2154 |
$get_all_fields = user_registration_pro_get_conditional_fields_by_form_id( $form_id, '' );
|
2155 |
$selected_ur_field_type = '';
|
2156 |
|
2157 |
+
if ( isset( $get_all_fields ) ) {
|
2158 |
|
2159 |
+
foreach ( $get_all_fields as $key => $field ) {
|
2160 |
$selectedAttr = '';
|
2161 |
|
2162 |
+
if ( isset( $connection['conditional_logic_data']['conditional_field'] ) && $connection['conditional_logic_data']['conditional_field'] === $key ) {
|
2163 |
$selectedAttr = 'selected=selected';
|
2164 |
$selected_ur_field_type = $field['field_key'];
|
2165 |
}
|
2166 |
+
$output .= '<option data-type="' . esc_attr( $field['field_key'] ) . '" data-label="' . esc_attr( $field['label'] ) . '" value="' . esc_attr( $key ) . '" ' . $selectedAttr . '>' . esc_html( $field['label'] ) . '</option>';
|
2167 |
}
|
2168 |
}
|
2169 |
+
$output .= '</select>';
|
2170 |
$output .= '<select class="ur-conditional-condition" name="ur-conditional-condition">';
|
2171 |
+
$output .= '<option value="is" ' . ( isset( $connection['conditional_logic_data']['conditional_operator'] ) && 'is' === $connection['conditional_logic_data']['conditional_operator'] ? 'selected' : '' ) . '> is </option>';
|
2172 |
+
$output .= '<option value="is_not" ' . ( isset( $connection['conditional_logic_data']['conditional_operator'] ) && 'is_not' === $connection['conditional_logic_data']['conditional_operator'] ? 'selected' : '' ) . '> is not </option>';
|
2173 |
+
$output .= '</select>';
|
2174 |
|
2175 |
if ( $selected_ur_field_type == 'checkbox' || $selected_ur_field_type == 'radio' || $selected_ur_field_type == 'select' || $selected_ur_field_type == 'country' || $selected_ur_field_type == 'billing_country' || $selected_ur_field_type == 'shipping_country' || $selected_ur_field_type == 'select2' || $selected_ur_field_type == 'multi_select2' ) {
|
2176 |
+
$choices = user_registration_pro_get_checkbox_choices( $form_id, $connection['conditional_logic_data']['conditional_field'] );
|
2177 |
$output .= '<select name="ur-conditional-input" class="ur-conditional-input">';
|
2178 |
|
2179 |
if ( is_array( $choices ) && array_filter( $choices ) ) {
|
2181 |
|
2182 |
foreach ( $choices as $key => $choice ) {
|
2183 |
$key = $selected_ur_field_type == 'country' ? $key : $choice;
|
2184 |
+
$selectedvalue = isset( $connection['conditional_logic_data']['conditional_value'] ) && $connection['conditional_logic_data']['conditional_value'] == $key ? 'selected="selected"' : '';
|
2185 |
$output .= '<option ' . $selectedvalue . ' value="' . esc_attr( $key ) . '">' . esc_html( $choice ) . '</option>';
|
2186 |
}
|
2187 |
} else {
|
2188 |
+
$selected = isset( $connection['conditional_logic_data']['conditional_value'] ) ? $connection['conditional_logic_data']['conditional_value'] : 0;
|
2189 |
$output .= '<option value="1" ' . ( $selected == '1' ? 'selected="selected"' : '' ) . ' >' . esc_html__( 'Checked', 'user-registration' ) . '</option>';
|
2190 |
}
|
2191 |
$output .= '</select>';
|
2192 |
} else {
|
2193 |
+
$value = isset( $connection['conditional_logic_data']['conditional_value'] ) ? $connection['conditional_logic_data']['conditional_value'] : '';
|
2194 |
+
$output .= '<input class="ur-conditional-input" type="text" name="ur-conditional-input" value="' . esc_attr( $value ) . '">';
|
2195 |
}
|
2196 |
+
$output .= '</div>';
|
2197 |
+
$output .= '</div>';
|
2198 |
+
$output .= '</div>';
|
2199 |
return $output;
|
2200 |
}
|
2201 |
}
|
includes/functions-ur-template.php
CHANGED
@@ -11,31 +11,30 @@
|
|
11 |
* @version 1.0.0
|
12 |
*/
|
13 |
|
14 |
-
if (!defined('ABSPATH')) {
|
15 |
exit; // Exit if accessed directly
|
16 |
}
|
17 |
|
18 |
-
add_action('template_redirect', 'ur_template_redirect');
|
19 |
-
add_action('template_redirect', 'ur_login_template_redirect');
|
20 |
-
add_action('template_redirect', 'ur_registration_template_redirect');
|
21 |
|
22 |
/**
|
23 |
* Redirect after logout.
|
24 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
25 |
*/
|
26 |
-
function ur_template_redirect()
|
27 |
-
{
|
28 |
global $wp;
|
29 |
|
30 |
-
if (isset($wp->query_vars['user-logout']) && !empty($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'user-logout')) {
|
31 |
// Logout
|
32 |
-
$redirect_url = str_replace('/user-logout', '', $wp->request);
|
33 |
-
wp_safe_redirect(str_replace('&', '&', wp_logout_url($redirect_url)));
|
34 |
exit;
|
35 |
-
} elseif (isset($wp->query_vars['user-logout']) && 'true' === $wp->query_vars['user-logout']) {
|
36 |
|
37 |
// Redirect to the correct logout endpoint.
|
38 |
-
wp_safe_redirect(esc_url_raw(ur_get_page_permalink('user-logout')));
|
39 |
exit;
|
40 |
}
|
41 |
}
|
@@ -44,28 +43,27 @@ function ur_template_redirect()
|
|
44 |
* Check for login shortcode in the page and redirect to the url passed with login shortcode parameter redirect_url
|
45 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
46 |
*/
|
47 |
-
function ur_login_template_redirect()
|
48 |
-
|
49 |
-
global $post;
|
50 |
|
51 |
-
$post_content = isset($post->post_content) ? $post->post_content : '';
|
52 |
|
53 |
-
if ((has_shortcode($post_content, 'user_registration_login') || has_shortcode($post_content, 'user_registration_my_account')) && is_user_logged_in()) {
|
54 |
-
preg_match('/' . get_shortcode_regex() . '/s', $post_content, $matches);
|
55 |
|
56 |
// Remove all html tags.
|
57 |
-
$escaped_atts_string = preg_replace('/<[\/]{0,1}[^<>]*>/', '', $matches[3]);
|
58 |
|
59 |
-
$attributes = shortcode_parse_atts($escaped_atts_string);
|
60 |
-
$redirect_url = isset($attributes['redirect_url']) ? $attributes['redirect_url'] : '';
|
61 |
-
$redirect_url = trim($redirect_url, ']');
|
62 |
-
$redirect_url = trim($redirect_url, '"');
|
63 |
-
$redirect_url = trim($redirect_url, "'");
|
64 |
|
65 |
-
$redirect_url = apply_filters(
|
66 |
|
67 |
-
if (!is_elementor_editing_page() && !empty($redirect_url) ) {
|
68 |
-
wp_redirect($redirect_url);
|
69 |
exit();
|
70 |
}
|
71 |
}
|
@@ -78,11 +76,9 @@ function ur_login_template_redirect()
|
|
78 |
* @return void
|
79 |
* @since 1.5.1
|
80 |
*/
|
81 |
-
function ur_registration_template_redirect()
|
82 |
-
{
|
83 |
-
|
84 |
// Return if the user is not logged in.
|
85 |
-
if (is_user_logged_in() === false) {
|
86 |
return;
|
87 |
}
|
88 |
|
@@ -90,27 +86,27 @@ function ur_registration_template_redirect()
|
|
90 |
$current_user_id = $current_user->ID;
|
91 |
|
92 |
// Donot redirect for admins.
|
93 |
-
if (in_array('administrator', wp_get_current_user()->roles)) {
|
94 |
return;
|
95 |
} else {
|
96 |
|
97 |
global $post;
|
98 |
|
99 |
-
$post_content = isset($post->post_content) ? $post->post_content : '';
|
100 |
|
101 |
-
if (has_shortcode($post_content, 'user_registration_form')) {
|
102 |
|
103 |
-
$attributes = ur_get_shortcode_attr($post_content);
|
104 |
-
$form_id = isset($attributes[0]['id']) ? $attributes[0]['id'] : 0;
|
105 |
|
106 |
-
preg_match_all('!\d+!', $form_id, $form_id);
|
107 |
|
108 |
-
$redirect_url = ur_get_single_post_meta($form_id[0][0], 'user_registration_form_setting_redirect_options', '');
|
109 |
-
$redirect_url = apply_filters('user_registration_redirect_from_registration_page', $redirect_url, $current_user);
|
110 |
$redirect_url = ur_string_translation( $form_id[0][0], 'user_registration_form_setting_redirect_options', $redirect_url );
|
111 |
|
112 |
-
if (!is_elementor_editing_page() && !empty($redirect_url)) {
|
113 |
-
wp_redirect($redirect_url);
|
114 |
exit();
|
115 |
}
|
116 |
}
|
@@ -124,25 +120,24 @@ function ur_registration_template_redirect()
|
|
124 |
*
|
125 |
* @return array
|
126 |
*/
|
127 |
-
function ur_body_class($classes)
|
128 |
-
{
|
129 |
$classes = (array) $classes;
|
130 |
$classes[] = 'user-registration-page';
|
131 |
-
if (is_ur_account_page()) {
|
132 |
$classes[] = 'user-registration-account';
|
133 |
}
|
134 |
|
135 |
-
foreach (UR()->query->query_vars as $key => $value) {
|
136 |
-
if (is_ur_endpoint_url($key)) {
|
137 |
-
$classes[] = 'user-registration-' . sanitize_html_class($key);
|
138 |
}
|
139 |
}
|
140 |
|
141 |
-
return array_unique($classes);
|
142 |
}
|
143 |
|
144 |
|
145 |
-
if (!function_exists('user_registration_form_field')) {
|
146 |
|
147 |
/**
|
148 |
* Outputs a form fields on frontend.
|
@@ -153,25 +148,24 @@ if (!function_exists('user_registration_form_field')) {
|
|
153 |
*
|
154 |
* @return string
|
155 |
*/
|
156 |
-
function user_registration_form_field($key, $args, $value = null)
|
157 |
-
{
|
158 |
|
159 |
/* Conditional Logic codes */
|
160 |
$rules = array();
|
161 |
-
$rules['conditional_rules'] = isset($args['conditional_rules']) ? $args['conditional_rules'] : '';
|
162 |
-
$rules['logic_gate'] = isset($args['logic_gate']) ? $args['logic_gate'] : '';
|
163 |
-
$rules['rules'] = isset($args['rules']) ? $args['rules'] : array();
|
164 |
-
$rules['required'] = isset($args['required']) ? $args['required'] : '';
|
165 |
-
|
166 |
-
foreach ($rules['rules'] as $rules_key => $rule) {
|
167 |
-
if (empty($rule['field'])) {
|
168 |
-
unset($rules['rules'][$rules_key]);
|
169 |
}
|
170 |
}
|
171 |
|
172 |
-
$rules['rules'] = array_values($rules['rules']);
|
173 |
|
174 |
-
$rules = (!empty($rules['rules']) && isset($args['enable_conditional_logic'])) ? wp_json_encode($rules) : '';
|
175 |
/*Conditonal Logic codes end*/
|
176 |
|
177 |
$defaults = array(
|
@@ -196,165 +190,165 @@ if (!function_exists('user_registration_form_field')) {
|
|
196 |
'priority' => '',
|
197 |
);
|
198 |
|
199 |
-
$args = wp_parse_args($args, $defaults);
|
200 |
-
$args = apply_filters('user_registration_form_field_args', $args, $key, $value);
|
201 |
|
202 |
-
if (true === $args['required']) {
|
203 |
$args['class'][] = 'validate-required';
|
204 |
-
$required = ' <abbr class="required" title="' . esc_attr__('required', 'user-registration') . '">*</abbr>';
|
205 |
} else {
|
206 |
$args['required'] = $required = '';
|
207 |
}
|
208 |
|
209 |
-
if (is_null($value) || empty($value)) {
|
210 |
$value = $args['default'];
|
211 |
}
|
212 |
|
213 |
// Custom attribute handling
|
214 |
$custom_attributes = array();
|
215 |
-
$args['custom_attributes'] = array_filter((array) $args['custom_attributes']);
|
216 |
|
217 |
-
if ($args['size']) {
|
218 |
-
$args['custom_attributes']['maxlength'] = absint($args['size']);
|
219 |
}
|
220 |
|
221 |
-
if (!empty($args['min']) || '0' === $args['min']) {
|
222 |
$args['custom_attributes']['min'] = $args['min'];
|
223 |
}
|
224 |
|
225 |
-
if (!empty($args['max']) || '0' === $args['max']) {
|
226 |
$args['custom_attributes']['max'] = $args['max'];
|
227 |
}
|
228 |
|
229 |
-
if (!empty($args['step'])) {
|
230 |
$args['custom_attributes']['step'] = $args['step'];
|
231 |
}
|
232 |
|
233 |
-
if (!empty($args['autocomplete'])) {
|
234 |
$args['custom_attributes']['autocomplete'] = $args['autocomplete'];
|
235 |
}
|
236 |
|
237 |
-
if (true === $args['autofocus']) {
|
238 |
$args['custom_attributes']['autofocus'] = 'autofocus';
|
239 |
}
|
240 |
|
241 |
-
if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
|
242 |
-
foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
|
243 |
-
$custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
|
244 |
}
|
245 |
}
|
246 |
|
247 |
-
if (!empty($args['validate'])) {
|
248 |
-
foreach ($args['validate'] as $validate) {
|
249 |
$args['class'][] = 'validate-' . $validate;
|
250 |
}
|
251 |
}
|
252 |
|
253 |
-
$tooltip_html = !empty($args['tip']) ? ur_help_tip($args['tip']) : '';
|
254 |
$cl_html = '';
|
255 |
|
256 |
-
if (isset($args['enable_conditional_logic']) && true === $args['enable_conditional_logic']) {
|
257 |
-
$cl_map = isset($args['cl_map']) ? $args['cl_map'] : '';
|
258 |
-
$cl_html = sprintf('data-conditional-logic-enabled="yes" data-conditional-logic-map="%s"', esc_attr($cl_map));
|
259 |
}
|
260 |
|
261 |
$field = '';
|
262 |
$label_id = $args['id'];
|
263 |
$sort = $args['priority'] ? $args['priority'] : '';
|
264 |
-
$field_container = '<div class="form-row %1$s" id="%2$s" data-priority="' . esc_attr($sort) . '" ' . $cl_html . '>%3$s</div>';
|
265 |
$class = '';
|
266 |
-
if (!is_admin()) {
|
267 |
-
$form_id = isset( $args['form_id'] )? $args['form_id'] : ''
|
268 |
-
$enable_field_icon = ur_get_single_post_meta($form_id, 'user_registration_enable_field_icon');
|
269 |
|
270 |
-
if ('1' === $enable_field_icon) {
|
271 |
-
$class =
|
272 |
} else {
|
273 |
-
$class =
|
274 |
}
|
275 |
}
|
276 |
|
277 |
-
switch ($args['type']) {
|
278 |
|
279 |
case 'title':
|
280 |
-
$field .= '<h4>' . esc_html($args['title']) . '</h4>';
|
281 |
break;
|
282 |
|
283 |
case 'textarea':
|
284 |
-
$field .= '<textarea data-rules="' . esc_attr($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>';
|
285 |
break;
|
286 |
|
287 |
case 'checkbox':
|
288 |
$field_key = isset( $args['field_key'] ) ? $args['field_key'] : '';
|
289 |
$default_value = isset( $args['default_value'] ) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
290 |
$default = ! empty( $value ) ? $value : $default_value;
|
291 |
-
$select_all = isset( $args['select_all'] ) ?
|
292 |
$options = isset( $args['options'] ) ? $args['options'] : ( $args['choices'] ? $args['choices'] : array() ); // $args['choices'] for backward compatibility. Modified since 1.5.7.
|
293 |
-
$choice_limit = isset( $args['choice_limit'] ) ?
|
294 |
-
$choice_limit_attr =
|
295 |
-
if (
|
296 |
$choice_limit_attr = 'data-choice-limit="' . $choice_limit . '"';
|
297 |
}
|
298 |
|
299 |
-
if (isset($options) && array_filter($options)) {
|
300 |
|
301 |
-
if (!empty($default)) {
|
302 |
-
$default = (is_serialized($default)) ? unserialize($default) : $default;
|
303 |
}
|
304 |
|
305 |
-
$choices = isset($options) ? $options : array();
|
306 |
|
307 |
-
$field = '<label class="ur-label" ' . implode(' ', $custom_attributes) . '>';
|
308 |
$field .= $args['label'] . $required . $tooltip_html . '</label>';
|
309 |
|
310 |
$checkbox_start = 0;
|
311 |
|
312 |
$field .= '<ul ' . $choice_limit_attr . '>';
|
313 |
|
314 |
-
if(
|
315 |
-
|
316 |
-
|
317 |
}
|
318 |
foreach ( $choices as $choice_index => $choice ) {
|
319 |
|
320 |
$value = '';
|
321 |
-
if ('' !== $default) {
|
322 |
-
if (is_array($default) && in_array(trim($choice_index), $default)) {
|
323 |
$value = 'checked="checked"';
|
324 |
-
} elseif ($default === $choice_index) {
|
325 |
$value = 'checked="checked"';
|
326 |
}
|
327 |
}
|
328 |
$field .= '<li class="ur-checkbox-list">';
|
329 |
-
$field .= '<input data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" ' . implode(' ', $custom_attributes) . ' data-value="' . esc_attr($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_index) . '"' . esc_attr($value) . ' /> ';
|
330 |
-
$field .= '<label class="ur-checkbox-label" for="' . esc_attr($args['id']) . '_' . esc_attr($choice_index) . '">' . trim($choice) . '</label> </li>';
|
331 |
$checkbox_start++;
|
332 |
}
|
333 |
$field .= '</ul>';
|
334 |
} else {
|
335 |
-
$field = '<label class="ur-label checkbox" ' . implode(' ', $custom_attributes) . '>
|
336 |
-
<input data-rules="' . esc_attr($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) . ' /> '
|
337 |
. $args['label'] . $required . $tooltip_html . '</label>';
|
338 |
}
|
339 |
break;
|
340 |
|
341 |
case 'password':
|
342 |
-
$extra_params_key = str_replace('user_registration_', 'ur_', $key) . '_params';
|
343 |
-
$extra_params = json_decode(get_user_meta(get_current_user_id(), $extra_params_key, true));
|
344 |
$field .= ' <span class="input-wrapper"> ';
|
345 |
-
if (empty($extra_params)) {
|
346 |
-
$field_container = '<div class="form-row %1$s hide_show_password" id="%2$s" data-priority="' . esc_attr($sort) . '">%3$s</div>';
|
347 |
$field .= '<span class="password-input-group input-form-field-icons">';
|
348 |
-
$field .= '<input data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" type="' . esc_attr($args['type']) . '" class="input-text '
|
349 |
-
if ('yes' === get_option('user_registration_login_option_hide_show_password', 'no')) {
|
350 |
$field .= '<a href="javaScript:void(0)" class="password_preview dashicons dashicons-hidden" title=" Show password "></a>';
|
351 |
}
|
352 |
$field .= '</span>';
|
353 |
} else {
|
354 |
-
$field .= '<input data-rules="' . esc_attr($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) . ' />';
|
355 |
}
|
356 |
-
if (!is_admin()) {
|
357 |
-
if ('yes' === $enable_field_icon || '1' === $enable_field_icon) {
|
358 |
$field .= '<span class="' . $args['icon'] . '"></span>';
|
359 |
}
|
360 |
$field .= ' </span> ';
|
@@ -368,72 +362,72 @@ if (!function_exists('user_registration_form_field')) {
|
|
368 |
case 'url':
|
369 |
case 'file':
|
370 |
case 'timepicker':
|
371 |
-
$extra_params_key = str_replace('user_registration_', 'ur_', $key) . '_params';
|
372 |
-
$extra_params = json_decode(get_user_meta(get_current_user_id(), $extra_params_key, true));
|
373 |
-
$current_time = isset( $args[
|
374 |
-
$time_interval = isset( $args[
|
375 |
-
$time_min = isset( $args[
|
376 |
-
$time_max = isset( $args[
|
377 |
-
$username_length = isset($args['username_length']) ?
|
378 |
-
$username_character = isset($args['username_character']) ?
|
379 |
-
$attr =
|
380 |
-
if (
|
381 |
$attr .= 'data-username-length="' . $username_length . '"';
|
382 |
}
|
383 |
|
384 |
-
if ($username_character) {
|
385 |
$attr .= 'data-username-character="' . $username_character . '"';
|
386 |
}
|
387 |
|
388 |
-
if(
|
389 |
$attr .= 'data-time-interval="' . $time_interval . '"';
|
390 |
}
|
391 |
|
392 |
-
if(
|
393 |
$attr .= 'data-time-min="' . $time_min . '"';
|
394 |
}
|
395 |
|
396 |
-
if(
|
397 |
$attr .= 'data-time-max="' . $time_max . '"';
|
398 |
}
|
399 |
|
400 |
-
if ($current_time) {
|
401 |
$attr .= 'data-current-time="' . $current_time . '"';
|
402 |
}
|
403 |
|
404 |
$field .= ' <span class="input-wrapper"> ';
|
405 |
-
if (empty($extra_params)) {
|
406 |
-
$field .= '<input data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" type="' . esc_attr($args['type']) . '" class="input-text ' . $class . ' 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) . ' ' . $attr . '/>';
|
407 |
} else {
|
408 |
-
$field .= '<input data-rules="' . esc_attr($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) . ' ' . $attr . ' />';
|
409 |
}
|
410 |
|
411 |
-
if (!is_admin()) {
|
412 |
-
if ('yes' === $enable_field_icon || '1' === $enable_field_icon && 'file' != $args['type']) {
|
413 |
-
$field .= '<span class="' . $args['icon'] . '"></span>';
|
414 |
}
|
415 |
$field .= ' </span> ';
|
416 |
}
|
417 |
break;
|
418 |
|
419 |
case 'date':
|
420 |
-
$extra_params_key = str_replace('user_registration_', 'ur_', $key) . '_params';
|
421 |
-
$extra_params = json_decode(get_user_meta(get_current_user_id(), $extra_params_key, true));
|
422 |
|
423 |
$actual_value = $value;
|
424 |
-
if (isset($args['custom_attributes']['data-date-format'])) {
|
425 |
$date_format = $args['custom_attributes']['data-date-format'];
|
426 |
-
$default_date = isset($args['custom_attributes']['data-default-date']) ? $args['custom_attributes']['data-default-date'] : '';
|
427 |
-
if (empty($value) && 'today' === $default_date) {
|
428 |
-
$value = date_i18n($date_format);
|
429 |
-
$actual_value = date_i18n($date_format);
|
430 |
} else {
|
431 |
-
$value = str_replace('/', '-', $value);
|
432 |
-
if (!strpos($value, 'to')) {
|
433 |
-
$value = '' !== $value ? date_i18n($date_format, strtotime($value)) : '';
|
434 |
} else {
|
435 |
-
$date_range = explode('to', $value);
|
436 |
-
$value = date_i18n($date_format, strtotime(trim($date_range[0]))) . ' to ' . date_i18n($date_format, strtotime(trim($date_range[1])));
|
437 |
}
|
438 |
}
|
439 |
}
|
@@ -441,49 +435,49 @@ if (!function_exists('user_registration_form_field')) {
|
|
441 |
$field .= ' <span class="input-wrapper"> ';
|
442 |
|
443 |
if ( empty( $extra_params ) ) {
|
444 |
-
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" id="load_flatpickr" value="' . esc_attr( $actual_value ) . '" class="regular-text '. $class .'" readonly placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
445 |
$field .= '<input type="hidden" id="formated_date" value="' . esc_attr( $value ) . '"/>';
|
446 |
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" data-field-type="' . esc_attr( $args['type'] ) . '" value="' . esc_attr( $actual_value ) . '" 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'] ) . '" ' . implode( ' ', $custom_attributes ) . ' style="display:none"/>';
|
447 |
} else {
|
448 |
-
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" id="load_flatpickr" value="' . esc_attr( $actual_value ) . '" class="regular-text '. $class .'" readonly placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
449 |
$field .= '<input type="hidden" id="formated_date" value="' . esc_attr( $value ) . '"/>';
|
450 |
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" data-field-type="' . esc_attr( $args['type'] ) . '" value="' . esc_attr( $actual_value ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' style="display:none" />';
|
451 |
}
|
452 |
|
453 |
-
if('yes' === $enable_field_icon || '1'
|
454 |
-
if(!is_admin(
|
455 |
-
$field .= '<span class="'
|
456 |
}
|
457 |
}
|
458 |
$field .= '</span> ';
|
459 |
break;
|
460 |
|
461 |
case 'color':
|
462 |
-
$field .= '<input data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" type="text" class="input-text input-color ' . esc_attr(implode(' ', $args['input_class'])) . '" name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '" placeholder="' . esc_attr($args['placeholder']) . '" value="' . esc_attr($value) . '" data-default-color="' . esc_attr($args['default']) . '" ' . implode(' ', $custom_attributes) . ' />';
|
463 |
break;
|
464 |
|
465 |
case 'select':
|
466 |
-
$default_value = isset($args['default_value']) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
467 |
|
468 |
-
$value = !empty($value) ? $value : $default_value;
|
469 |
$options = $field .= '';
|
470 |
-
if (!empty($args['options'])) {
|
471 |
// If we have a blank option, select2 needs a placeholder
|
472 |
-
if (!empty($args['placeholder'])) {
|
473 |
-
$options .= '<option value="" selected disabled>' . esc_html($args['placeholder']) . '</option>';
|
474 |
}
|
475 |
|
476 |
$custom_attributes[] = 'data-allow_clear="true"';
|
477 |
-
foreach ($args['options'] as $option_key => $option_text) {
|
478 |
$selected_attribute = '';
|
479 |
|
480 |
-
if (empty($args['placeholder'])) {
|
481 |
-
$selected_attribute = selected($value, trim($option_key), false);
|
482 |
}
|
483 |
-
$options .= '<option value="' . esc_attr(trim($option_key)) . '" ' . $selected_attribute . '>' . esc_attr(trim($option_text)) . '</option>';
|
484 |
}
|
485 |
|
486 |
-
$field .= '<select data-rules="' . esc_attr($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']) . '">
|
487 |
' . $options . '
|
488 |
</select>';
|
489 |
}
|
@@ -492,57 +486,57 @@ if (!function_exists('user_registration_form_field')) {
|
|
492 |
case 'multiselect':
|
493 |
$options = $field .= '';
|
494 |
|
495 |
-
if (is_serialized($value)) {
|
496 |
-
$default_value = unserialize($value);
|
497 |
} else {
|
498 |
$default_value = $value;
|
499 |
}
|
500 |
|
501 |
-
if (!empty($args['options'])) {
|
502 |
-
foreach ($args['options'] as $option_key => $option_text) {
|
503 |
|
504 |
-
if ('' === $option_key) {
|
505 |
// If we have a blank option, select2 needs a placeholder
|
506 |
-
if (empty($args['placeholder'])) {
|
507 |
-
$args['placeholder'] = $option_text ? $option_text : __('Choose an option', 'user-registration');
|
508 |
}
|
509 |
$custom_attributes[] = 'data-allow_clear="true"';
|
510 |
}
|
511 |
|
512 |
-
if (is_array($default_value)) {
|
513 |
-
$options .= '<option value="' . esc_attr(trim($option_key)) . '" ' . selected(in_array(trim($option_key), $default_value), true, false) . '>' . esc_attr(trim($option_text)) . '</option>';
|
514 |
} else {
|
515 |
-
$options .= '<option value="' . esc_attr(trim($option_key)) . '" ' . selected($default_value, trim($option_key), false) . '>' . esc_attr(trim($option_text)) . '</option>';
|
516 |
}
|
517 |
}
|
518 |
|
519 |
-
$field .= '<select multiple data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" name="' . esc_attr($key) . '[]" id="' . esc_attr($args['id']) . '" class="select ur-enhanced-select' . esc_attr(implode(' ', $args['input_class'])) . '" ' . implode(' ', $custom_attributes) . ' data-placeholder="' . esc_attr($args['placeholder']) . '">
|
520 |
' . $options . '
|
521 |
</select>';
|
522 |
}
|
523 |
break;
|
524 |
|
525 |
case 'radio':
|
526 |
-
$default_value = isset($args['default_value']) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
527 |
-
$value = !empty($value) ? $value : $default_value;
|
528 |
-
$label_id = current(array_keys($args['options']));
|
529 |
-
if (!empty($args['options'])) {
|
530 |
|
531 |
$field .= '<ul>';
|
532 |
-
foreach ($args['options'] as $option_index => $option_text) {
|
533 |
|
534 |
$field .= '<li class="ur-radio-list">';
|
535 |
|
536 |
$checked = '';
|
537 |
-
if (!empty($value)) {
|
538 |
-
$checked = checked($value, trim($option_index), false);
|
539 |
}
|
540 |
|
541 |
-
$field .= '<input data-rules="' . esc_attr($rules) . '" data-id="' . esc_attr($key) . '" type="radio" class="input-radio ' . esc_attr(implode(' ', $args['input_class'])) . '" value="' . esc_attr(trim($option_index)) . '" name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '_' . esc_attr($option_text) . '" ' . implode(' ', $custom_attributes) . ' / ' . $checked . ' /> ';
|
542 |
-
$field .= '<label for="' . esc_attr($args['id']) . '_' . esc_attr($option_text) . '" class="radio">';
|
543 |
|
544 |
$field .= wp_kses(
|
545 |
-
trim($option_text),
|
546 |
array(
|
547 |
'a' => array(
|
548 |
'href' => array(),
|
@@ -557,17 +551,15 @@ if (!function_exists('user_registration_form_field')) {
|
|
557 |
break;
|
558 |
} // End switch().
|
559 |
|
560 |
-
if ($args['description']) {
|
561 |
$field .= '<span class="description">' . $args['description'] . '</span>';
|
562 |
}
|
563 |
|
564 |
-
|
565 |
-
|
566 |
-
if (!empty($field)) {
|
567 |
|
568 |
$field_html = '';
|
569 |
-
if ($args['label'] && 'checkbox' != $args['type']) {
|
570 |
-
$field_html .= '<label for="' . esc_attr($label_id) . '" class="ur-label">' . wp_kses(
|
571 |
$args['label'],
|
572 |
array(
|
573 |
'a' => array(
|
@@ -580,13 +572,13 @@ if (!function_exists('user_registration_form_field')) {
|
|
580 |
}
|
581 |
|
582 |
$field_html .= $field;
|
583 |
-
$container_class = esc_attr(implode(' ', $args['class']));
|
584 |
-
$container_id = esc_attr($args['id']) . '_field';
|
585 |
-
$field = sprintf($field_container, $container_class, $container_id, $field_html);
|
586 |
}
|
587 |
|
588 |
-
$field = apply_filters('user_registration_form_field_' . $args['type'], $field, $key, $args, $value);
|
589 |
-
if ($args['return']) {
|
590 |
return $field;
|
591 |
} else {
|
592 |
echo $field;
|
@@ -594,7 +586,7 @@ if (!function_exists('user_registration_form_field')) {
|
|
594 |
}
|
595 |
} // End if().
|
596 |
|
597 |
-
if (!function_exists('user_registration_form_data')) {
|
598 |
|
599 |
/**
|
600 |
* Get form fields to display on profile tab
|
@@ -604,130 +596,129 @@ if (!function_exists('user_registration_form_data')) {
|
|
604 |
*
|
605 |
* @return array
|
606 |
*/
|
607 |
-
function user_registration_form_data($user_id = 0, $form_id = 0)
|
608 |
-
|
609 |
-
$all_meta_value = get_user_meta($user_id);
|
610 |
$fields = array();
|
611 |
|
612 |
-
$post_content_array = ($form_id) ? UR()->form->get_form($form_id, array('content_only' => true)) : array();
|
613 |
|
614 |
$all_meta_value_keys = array();
|
615 |
-
if (gettype($all_meta_value) === 'array') {
|
616 |
-
$all_meta_value_keys = array_keys($all_meta_value);
|
617 |
}
|
618 |
|
619 |
-
$post_content_array = apply_filters('user_registration_profile_account_filter_all_fields', $post_content_array, $form_id);
|
620 |
-
|
621 |
-
foreach ($post_content_array as $post_content_row) {
|
622 |
-
foreach ($post_content_row as $post_content_grid) {
|
623 |
-
foreach ($post_content_grid as $field) {
|
624 |
-
$field_name = isset($field->general_setting->field_name) ? $field->general_setting->field_name : '';
|
625 |
-
$field_label = isset($field->general_setting->label) ? $field->general_setting->label : '';
|
626 |
-
$field_description = isset($field->general_setting->description) ? $field->general_setting->description : '';
|
627 |
-
$placeholder = isset($field->general_setting->placeholder) ? $field->general_setting->placeholder : '';
|
628 |
-
$options = isset($field->general_setting->options) ? $field->general_setting->options : array();
|
629 |
-
$field_key = isset($field->field_key) ? ($field->field_key) : '';
|
630 |
-
$field_type = isset($field->field_key) ? ur_get_field_type($field_key) : '';
|
631 |
-
$required = isset($field->general_setting->required) ? $field->general_setting->required : '';
|
632 |
$required = 'yes' == $required ? true : false;
|
633 |
-
$enable_cl = isset($field->advance_setting->enable_conditional_logic) && ('1' === $field->advance_setting->enable_conditional_logic || 'on' === $field->advance_setting->enable_conditional_logic) ? true : false;
|
634 |
-
$cl_map = isset($field->advance_setting->cl_map) ? $field->advance_setting->cl_map : '';
|
635 |
-
$custom_attributes = isset($field->general_setting->custom_attributes) ? $field->general_setting->custom_attributes : array();
|
636 |
|
637 |
-
if (empty($field_label)) {
|
638 |
-
$field_label_array = explode('_', $field_name);
|
639 |
-
$field_label = join(' ', array_map('ucwords', $field_label_array));
|
640 |
}
|
641 |
|
642 |
-
if (!empty($field_name)) {
|
643 |
$extra_params = array();
|
644 |
|
645 |
-
switch ($field_key) {
|
646 |
|
647 |
case 'radio':
|
648 |
case 'select':
|
649 |
-
$advanced_options = isset($field->advance_setting->options) ? $field->advance_setting->options : '';
|
650 |
-
$advanced_options = explode(',', $advanced_options);
|
651 |
-
$extra_params['options'] = !empty($options) ? $options : $advanced_options;
|
652 |
-
$extra_params['options'] = array_map('trim', $extra_params['options']);
|
653 |
|
654 |
-
$extra_params['options'] = array_combine($extra_params['options'], $extra_params['options']);
|
655 |
|
656 |
break;
|
657 |
|
658 |
case 'checkbox':
|
659 |
-
$advanced_options = isset($field->advance_setting->choices) ? $field->advance_setting->choices : '';
|
660 |
-
$advanced_options = explode(',', $advanced_options);
|
661 |
-
$extra_params['options'] = !empty($options) ? $options : $advanced_options;
|
662 |
-
$extra_params['options'] = array_map('trim', $extra_params['options']);
|
663 |
|
664 |
-
$extra_params['options'] =
|
665 |
|
666 |
break;
|
667 |
|
668 |
case 'date':
|
669 |
-
$date_format = isset($field->advance_setting->date_format) ? $field->advance_setting->date_format : '';
|
670 |
-
$min_date = isset($field->advance_setting->min_date) ? str_replace('/', '-', $field->advance_setting->min_date) : '';
|
671 |
-
$max_date = isset($field->advance_setting->max_date) ? str_replace('/', '-', $field->advance_setting->max_date) : '';
|
672 |
-
$set_current_date = isset($field->advance_setting->set_current_date) ? $field->advance_setting->set_current_date : '';
|
673 |
-
$enable_date_range = isset($field->advance_setting->enable_date_range) ? $field->advance_setting->enable_date_range : '';
|
674 |
$extra_params['custom_attributes']['data-date-format'] = $date_format;
|
675 |
|
676 |
-
if (isset($field->advance_setting->enable_min_max) && 'true' === $field->advance_setting->enable_min_max) {
|
677 |
-
$extra_params['custom_attributes']['data-min-date'] = '' !== $min_date ? date_i18n($date_format, strtotime($min_date)) : '';
|
678 |
-
$extra_params['custom_attributes']['data-max-date'] = '' !== $max_date ? date_i18n($date_format, strtotime($max_date)) : '';
|
679 |
}
|
680 |
$extra_params['custom_attributes']['data-default-date'] = $set_current_date;
|
681 |
$extra_params['custom_attributes']['data-mode'] = $enable_date_range;
|
682 |
break;
|
683 |
|
684 |
case 'country':
|
685 |
-
$class_name = ur_load_form_field_class($field_key);
|
686 |
-
$extra_params['options'] = $class_name::get_instance()->get_selected_countries($form_id, $field_name);
|
687 |
break;
|
688 |
|
689 |
case 'file':
|
690 |
-
$extra_params['max_files'] = isset($field->general_setting->max_files) ? $field->general_setting->max_files : '';
|
691 |
break;
|
692 |
|
693 |
case 'phone':
|
694 |
-
$extra_params['phone_format'] = isset($field->general_setting->phone_format) ? $field->general_setting->phone_format : '';
|
695 |
break;
|
696 |
|
697 |
default:
|
698 |
break;
|
699 |
}
|
700 |
|
701 |
-
$extra_params['default'] = isset($all_meta_value['user_registration_' . $field_name][0]) ? $all_meta_value['user_registration_' . $field_name][0] : '';
|
702 |
|
703 |
-
if (in_array($field_key, ur_get_user_profile_field_only())) {
|
704 |
|
705 |
-
$fields['user_registration_' . $field_name] = array(
|
706 |
-
'label' => ur_string_translation($form_id, 'user_registration_' . $field_name . '_label', $field_label),
|
707 |
-
'description' => ur_string_translation($form_id, 'user_registration_' . $field_name . '_description', $field_description),
|
708 |
'type' => $field_type,
|
709 |
-
'placeholder' => ur_string_translation($form_id, 'user_registration_' . $field_name . '_placeholder', $placeholder),
|
710 |
'field_key' => $field_key,
|
711 |
'required' => $required,
|
712 |
);
|
713 |
|
714 |
-
if (true === $enable_cl) {
|
715 |
-
$fields['user_registration_' . $field_name]['enable_conditional_logic'] = $enable_cl;
|
716 |
-
$fields['user_registration_' . $field_name]['cl_map'] = $cl_map;
|
717 |
}
|
718 |
}
|
719 |
|
720 |
-
if (true === $enable_cl) {
|
721 |
-
$fields['user_registration_' . $field_name]['enable_conditional_logic'] = $enable_cl;
|
722 |
-
$fields['user_registration_' . $field_name]['cl_map'] = $cl_map;
|
723 |
}
|
724 |
|
725 |
-
if (count($custom_attributes) > 0) {
|
726 |
$extra_params['custom_attributes'] = $custom_attributes;
|
727 |
}
|
728 |
|
729 |
-
if (isset($fields['user_registration_' . $field_name]) && count($extra_params) > 0) {
|
730 |
-
$fields['user_registration_' . $field_name] = array_merge($fields['user_registration_' . $field_name], $extra_params);
|
731 |
}
|
732 |
$filter_data = array(
|
733 |
'fields' => $fields,
|
@@ -735,8 +726,8 @@ if (!function_exists('user_registration_form_data')) {
|
|
735 |
'field_name' => $field_name,
|
736 |
);
|
737 |
|
738 |
-
$filtered_data_array = apply_filters('user_registration_profile_account_filter_' . $field_key, $filter_data, $form_id);
|
739 |
-
if (isset($filtered_data_array['fields'])) {
|
740 |
$fields = $filtered_data_array['fields'];
|
741 |
}
|
742 |
} // End if().
|
@@ -747,24 +738,23 @@ if (!function_exists('user_registration_form_data')) {
|
|
747 |
}
|
748 |
} // End if().
|
749 |
|
750 |
-
if (!function_exists('user_registration_account_content')) {
|
751 |
|
752 |
/**
|
753 |
* My Account content output.
|
754 |
*/
|
755 |
-
function user_registration_account_content()
|
756 |
-
{
|
757 |
global $wp;
|
758 |
|
759 |
-
if (!empty($wp->query_vars)) {
|
760 |
-
foreach ($wp->query_vars as $key => $value) {
|
761 |
// Ignore pagename param.
|
762 |
-
if ('pagename' === $key) {
|
763 |
continue;
|
764 |
}
|
765 |
|
766 |
-
if (has_action('user_registration_account_' . $key . '_endpoint')) {
|
767 |
-
do_action('user_registration_account_' . $key . '_endpoint', $value);
|
768 |
return;
|
769 |
}
|
770 |
}
|
@@ -774,42 +764,39 @@ if (!function_exists('user_registration_account_content')) {
|
|
774 |
ur_get_template(
|
775 |
'myaccount/dashboard.php',
|
776 |
array(
|
777 |
-
'current_user' => get_user_by('id', get_current_user_id()),
|
778 |
)
|
779 |
);
|
780 |
}
|
781 |
}
|
782 |
|
783 |
-
if (!function_exists('user_registration_account_navigation')) {
|
784 |
|
785 |
/**
|
786 |
* My Account navigation template.
|
787 |
*/
|
788 |
-
function user_registration_account_navigation()
|
789 |
-
|
790 |
-
ur_get_template('myaccount/navigation.php');
|
791 |
}
|
792 |
}
|
793 |
|
794 |
-
if (!function_exists('user_registration_account_edit_profile')) {
|
795 |
|
796 |
/**
|
797 |
* My Account > Edit profile template.
|
798 |
*/
|
799 |
-
function user_registration_account_edit_profile()
|
800 |
-
|
801 |
-
UR_Shortcode_My_Account::edit_profile();
|
802 |
}
|
803 |
}
|
804 |
|
805 |
-
if (!function_exists('user_registration_account_edit_account')) {
|
806 |
|
807 |
/**
|
808 |
* My Account > Edit account template.
|
809 |
*/
|
810 |
-
function user_registration_account_edit_account()
|
811 |
-
|
812 |
-
UR_Shortcode_My_Account::edit_account();
|
813 |
}
|
814 |
}
|
815 |
|
@@ -827,56 +814,56 @@ function ur_logout_url( $redirect = '' ) {
|
|
827 |
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
828 |
|
829 |
if ( ( ur_post_content_has_shortcode( 'user_registration_login' ) || ur_post_content_has_shortcode( 'user_registration_my_account' ) ) && is_user_logged_in() ) {
|
830 |
-
if ( version_compare($GLOBALS['wp_version'], $wp_version, '>=' ) ) {
|
831 |
$blocks = parse_blocks( $post_content );
|
832 |
-
foreach( $blocks as $block ) {
|
833 |
if ( 'core/shortcode' === $block['blockName'] && isset( $block['innerHTML'] ) ) {
|
834 |
$new_shortcode = $block['innerHTML'];
|
835 |
} elseif ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['shortcode'] ) ) {
|
836 |
-
$new_shortcode =
|
837 |
}
|
838 |
|
839 |
if ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['logoutUrl'] ) ) {
|
840 |
$redirect = $block['attrs']['logoutUrl'];
|
841 |
}
|
842 |
}
|
843 |
-
|
844 |
|
845 |
} else {
|
846 |
preg_match( '/' . get_shortcode_regex() . '/s', $post_content, $matches );
|
847 |
}
|
848 |
|
849 |
-
$attributes = shortcode_parse_atts($matches[3]);
|
850 |
/**
|
851 |
* Introduced logout_redirect parameter in user_registration_my_account shortcode.
|
852 |
*
|
853 |
* @since 1.7.5
|
854 |
*/
|
855 |
-
if (isset($attributes['logout_redirect'])) {
|
856 |
-
$redirect = isset($attributes['logout_redirect']) ? $attributes['logout_redirect'] : '';
|
857 |
-
$redirect = trim($redirect, ']');
|
858 |
-
$redirect = trim($redirect, '"');
|
859 |
-
$redirect = trim($redirect, "'");
|
860 |
-
$redirect = '' != $redirect ? home_url($redirect) : ur_get_page_permalink('myaccount');
|
861 |
}
|
862 |
-
}else {
|
863 |
$blocks = parse_blocks( $post->post_content );
|
864 |
|
865 |
-
|
866 |
if ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['logoutUrl'] ) ) {
|
867 |
$redirect = home_url( $block['attrs']['logoutUrl'] );
|
868 |
}
|
869 |
}
|
870 |
}
|
871 |
-
$redirect = apply_filters('user_registration_redirect_after_logout', $redirect);
|
872 |
|
873 |
-
if ($logout_endpoint && !is_front_page()) {
|
874 |
-
return wp_nonce_url(ur_get_endpoint_url('user-logout', '', $redirect), 'user-logout');
|
875 |
} else {
|
876 |
-
if ('' === $redirect) {
|
877 |
$redirect = home_url();
|
878 |
}
|
879 |
-
return wp_logout_url($redirect);
|
880 |
}
|
881 |
}
|
882 |
|
@@ -887,9 +874,8 @@ function ur_logout_url( $redirect = '' ) {
|
|
887 |
*
|
888 |
* @return bool
|
889 |
*/
|
890 |
-
function is_elementor_editing_page()
|
891 |
-
|
892 |
-
|
893 |
-
!empty($_GET['elementor
|
894 |
-
(!empty($_GET['action']) && 'elementor' === $_GET['action']);
|
895 |
}
|
11 |
* @version 1.0.0
|
12 |
*/
|
13 |
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
exit; // Exit if accessed directly
|
16 |
}
|
17 |
|
18 |
+
add_action( 'template_redirect', 'ur_template_redirect' );
|
19 |
+
add_action( 'template_redirect', 'ur_login_template_redirect' );
|
20 |
+
add_action( 'template_redirect', 'ur_registration_template_redirect' );
|
21 |
|
22 |
/**
|
23 |
* Redirect after logout.
|
24 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
25 |
*/
|
26 |
+
function ur_template_redirect() {
|
|
|
27 |
global $wp;
|
28 |
|
29 |
+
if ( isset( $wp->query_vars['user-logout'] ) && ! empty( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'user-logout' ) ) {
|
30 |
// Logout
|
31 |
+
$redirect_url = str_replace( '/user-logout', '', $wp->request );
|
32 |
+
wp_safe_redirect( str_replace( '&', '&', wp_logout_url( $redirect_url ) ) );
|
33 |
exit;
|
34 |
+
} elseif ( isset( $wp->query_vars['user-logout'] ) && 'true' === $wp->query_vars['user-logout'] ) {
|
35 |
|
36 |
// Redirect to the correct logout endpoint.
|
37 |
+
wp_safe_redirect( esc_url_raw( ur_get_page_permalink( 'user-logout' ) ) );
|
38 |
exit;
|
39 |
}
|
40 |
}
|
43 |
* Check for login shortcode in the page and redirect to the url passed with login shortcode parameter redirect_url
|
44 |
* Handle redirects before content is output - hooked into template_redirect so is_page works.
|
45 |
*/
|
46 |
+
function ur_login_template_redirect() {
|
47 |
+
global $post;
|
|
|
48 |
|
49 |
+
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
50 |
|
51 |
+
if ( ( has_shortcode( $post_content, 'user_registration_login' ) || has_shortcode( $post_content, 'user_registration_my_account' ) ) && is_user_logged_in() ) {
|
52 |
+
preg_match( '/' . get_shortcode_regex() . '/s', $post_content, $matches );
|
53 |
|
54 |
// Remove all html tags.
|
55 |
+
$escaped_atts_string = preg_replace( '/<[\/]{0,1}[^<>]*>/', '', $matches[3] );
|
56 |
|
57 |
+
$attributes = shortcode_parse_atts( $escaped_atts_string );
|
58 |
+
$redirect_url = isset( $attributes['redirect_url'] ) ? $attributes['redirect_url'] : '';
|
59 |
+
$redirect_url = trim( $redirect_url, ']' );
|
60 |
+
$redirect_url = trim( $redirect_url, '"' );
|
61 |
+
$redirect_url = trim( $redirect_url, "'" );
|
62 |
|
63 |
+
$redirect_url = apply_filters( 'user_registration_redirect_url_after_login', $redirect_url );
|
64 |
|
65 |
+
if ( ! is_elementor_editing_page() && ! empty( $redirect_url ) ) {
|
66 |
+
wp_redirect( $redirect_url );
|
67 |
exit();
|
68 |
}
|
69 |
}
|
76 |
* @return void
|
77 |
* @since 1.5.1
|
78 |
*/
|
79 |
+
function ur_registration_template_redirect() {
|
|
|
|
|
80 |
// Return if the user is not logged in.
|
81 |
+
if ( is_user_logged_in() === false ) {
|
82 |
return;
|
83 |
}
|
84 |
|
86 |
$current_user_id = $current_user->ID;
|
87 |
|
88 |
// Donot redirect for admins.
|
89 |
+
if ( in_array( 'administrator', wp_get_current_user()->roles ) ) {
|
90 |
return;
|
91 |
} else {
|
92 |
|
93 |
global $post;
|
94 |
|
95 |
+
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
96 |
|
97 |
+
if ( has_shortcode( $post_content, 'user_registration_form' ) ) {
|
98 |
|
99 |
+
$attributes = ur_get_shortcode_attr( $post_content );
|
100 |
+
$form_id = isset( $attributes[0]['id'] ) ? $attributes[0]['id'] : 0;
|
101 |
|
102 |
+
preg_match_all( '!\d+!', $form_id, $form_id );
|
103 |
|
104 |
+
$redirect_url = ur_get_single_post_meta( $form_id[0][0], 'user_registration_form_setting_redirect_options', '' );
|
105 |
+
$redirect_url = apply_filters( 'user_registration_redirect_from_registration_page', $redirect_url, $current_user );
|
106 |
$redirect_url = ur_string_translation( $form_id[0][0], 'user_registration_form_setting_redirect_options', $redirect_url );
|
107 |
|
108 |
+
if ( ! is_elementor_editing_page() && ! empty( $redirect_url ) ) {
|
109 |
+
wp_redirect( $redirect_url );
|
110 |
exit();
|
111 |
}
|
112 |
}
|
120 |
*
|
121 |
* @return array
|
122 |
*/
|
123 |
+
function ur_body_class( $classes ) {
|
|
|
124 |
$classes = (array) $classes;
|
125 |
$classes[] = 'user-registration-page';
|
126 |
+
if ( is_ur_account_page() ) {
|
127 |
$classes[] = 'user-registration-account';
|
128 |
}
|
129 |
|
130 |
+
foreach ( UR()->query->query_vars as $key => $value ) {
|
131 |
+
if ( is_ur_endpoint_url( $key ) ) {
|
132 |
+
$classes[] = 'user-registration-' . sanitize_html_class( $key );
|
133 |
}
|
134 |
}
|
135 |
|
136 |
+
return array_unique( $classes );
|
137 |
}
|
138 |
|
139 |
|
140 |
+
if ( ! function_exists( 'user_registration_form_field' ) ) {
|
141 |
|
142 |
/**
|
143 |
* Outputs a form fields on frontend.
|
148 |
*
|
149 |
* @return string
|
150 |
*/
|
151 |
+
function user_registration_form_field( $key, $args, $value = null ) {
|
|
|
152 |
|
153 |
/* Conditional Logic codes */
|
154 |
$rules = array();
|
155 |
+
$rules['conditional_rules'] = isset( $args['conditional_rules'] ) ? $args['conditional_rules'] : '';
|
156 |
+
$rules['logic_gate'] = isset( $args['logic_gate'] ) ? $args['logic_gate'] : '';
|
157 |
+
$rules['rules'] = isset( $args['rules'] ) ? $args['rules'] : array();
|
158 |
+
$rules['required'] = isset( $args['required'] ) ? $args['required'] : '';
|
159 |
+
|
160 |
+
foreach ( $rules['rules'] as $rules_key => $rule ) {
|
161 |
+
if ( empty( $rule['field'] ) ) {
|
162 |
+
unset( $rules['rules'][ $rules_key ] );
|
163 |
}
|
164 |
}
|
165 |
|
166 |
+
$rules['rules'] = array_values( $rules['rules'] );
|
167 |
|
168 |
+
$rules = ( ! empty( $rules['rules'] ) && isset( $args['enable_conditional_logic'] ) ) ? wp_json_encode( $rules ) : '';
|
169 |
/*Conditonal Logic codes end*/
|
170 |
|
171 |
$defaults = array(
|
190 |
'priority' => '',
|
191 |
);
|
192 |
|
193 |
+
$args = wp_parse_args( $args, $defaults );
|
194 |
+
$args = apply_filters( 'user_registration_form_field_args', $args, $key, $value );
|
195 |
|
196 |
+
if ( true === $args['required'] ) {
|
197 |
$args['class'][] = 'validate-required';
|
198 |
+
$required = ' <abbr class="required" title="' . esc_attr__( 'required', 'user-registration' ) . '">*</abbr>';
|
199 |
} else {
|
200 |
$args['required'] = $required = '';
|
201 |
}
|
202 |
|
203 |
+
if ( is_null( $value ) || empty( $value ) ) {
|
204 |
$value = $args['default'];
|
205 |
}
|
206 |
|
207 |
// Custom attribute handling
|
208 |
$custom_attributes = array();
|
209 |
+
$args['custom_attributes'] = array_filter( (array) $args['custom_attributes'] );
|
210 |
|
211 |
+
if ( $args['size'] ) {
|
212 |
+
$args['custom_attributes']['maxlength'] = absint( $args['size'] );
|
213 |
}
|
214 |
|
215 |
+
if ( ! empty( $args['min'] ) || '0' === $args['min'] ) {
|
216 |
$args['custom_attributes']['min'] = $args['min'];
|
217 |
}
|
218 |
|
219 |
+
if ( ! empty( $args['max'] ) || '0' === $args['max'] ) {
|
220 |
$args['custom_attributes']['max'] = $args['max'];
|
221 |
}
|
222 |
|
223 |
+
if ( ! empty( $args['step'] ) ) {
|
224 |
$args['custom_attributes']['step'] = $args['step'];
|
225 |
}
|
226 |
|
227 |
+
if ( ! empty( $args['autocomplete'] ) ) {
|
228 |
$args['custom_attributes']['autocomplete'] = $args['autocomplete'];
|
229 |
}
|
230 |
|
231 |
+
if ( true === $args['autofocus'] ) {
|
232 |
$args['custom_attributes']['autofocus'] = 'autofocus';
|
233 |
}
|
234 |
|
235 |
+
if ( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
|
236 |
+
foreach ( $args['custom_attributes'] as $attribute => $attribute_value ) {
|
237 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
238 |
}
|
239 |
}
|
240 |
|
241 |
+
if ( ! empty( $args['validate'] ) ) {
|
242 |
+
foreach ( $args['validate'] as $validate ) {
|
243 |
$args['class'][] = 'validate-' . $validate;
|
244 |
}
|
245 |
}
|
246 |
|
247 |
+
$tooltip_html = ! empty( $args['tip'] ) ? ur_help_tip( $args['tip'] ) : '';
|
248 |
$cl_html = '';
|
249 |
|
250 |
+
if ( isset( $args['enable_conditional_logic'] ) && true === $args['enable_conditional_logic'] ) {
|
251 |
+
$cl_map = isset( $args['cl_map'] ) ? $args['cl_map'] : '';
|
252 |
+
$cl_html = sprintf( 'data-conditional-logic-enabled="yes" data-conditional-logic-map="%s"', esc_attr( $cl_map ) );
|
253 |
}
|
254 |
|
255 |
$field = '';
|
256 |
$label_id = $args['id'];
|
257 |
$sort = $args['priority'] ? $args['priority'] : '';
|
258 |
+
$field_container = '<div class="form-row %1$s" id="%2$s" data-priority="' . esc_attr( $sort ) . '" ' . $cl_html . '>%3$s</div>';
|
259 |
$class = '';
|
260 |
+
if ( ! is_admin() ) {
|
261 |
+
$form_id = isset( $args['form_id'] ) ? $args['form_id'] : '';
|
262 |
+
$enable_field_icon = ur_get_single_post_meta( $form_id, 'user_registration_enable_field_icon' );
|
263 |
|
264 |
+
if ( '1' === $enable_field_icon ) {
|
265 |
+
$class = '';
|
266 |
} else {
|
267 |
+
$class = 'without_icon';
|
268 |
}
|
269 |
}
|
270 |
|
271 |
+
switch ( $args['type'] ) {
|
272 |
|
273 |
case 'title':
|
274 |
+
$field .= '<h4>' . esc_html( $args['title'] ) . '</h4>';
|
275 |
break;
|
276 |
|
277 |
case 'textarea':
|
278 |
+
$field .= '<textarea data-rules="' . esc_attr( $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>';
|
279 |
break;
|
280 |
|
281 |
case 'checkbox':
|
282 |
$field_key = isset( $args['field_key'] ) ? $args['field_key'] : '';
|
283 |
$default_value = isset( $args['default_value'] ) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
284 |
$default = ! empty( $value ) ? $value : $default_value;
|
285 |
+
$select_all = isset( $args['select_all'] ) ? $args['select_all'] : '';
|
286 |
$options = isset( $args['options'] ) ? $args['options'] : ( $args['choices'] ? $args['choices'] : array() ); // $args['choices'] for backward compatibility. Modified since 1.5.7.
|
287 |
+
$choice_limit = isset( $args['choice_limit'] ) ? $args['choice_limit'] : '';
|
288 |
+
$choice_limit_attr = '';
|
289 |
+
if ( '' !== $choice_limit ) {
|
290 |
$choice_limit_attr = 'data-choice-limit="' . $choice_limit . '"';
|
291 |
}
|
292 |
|
293 |
+
if ( isset( $options ) && array_filter( $options ) ) {
|
294 |
|
295 |
+
if ( ! empty( $default ) ) {
|
296 |
+
$default = ( is_serialized( $default ) ) ? unserialize( $default ) : $default;
|
297 |
}
|
298 |
|
299 |
+
$choices = isset( $options ) ? $options : array();
|
300 |
|
301 |
+
$field = '<label class="ur-label" ' . implode( ' ', $custom_attributes ) . '>';
|
302 |
$field .= $args['label'] . $required . $tooltip_html . '</label>';
|
303 |
|
304 |
$checkbox_start = 0;
|
305 |
|
306 |
$field .= '<ul ' . $choice_limit_attr . '>';
|
307 |
|
308 |
+
if ( 'yes' === $select_all ) {
|
309 |
+
$field .= '<li class="ur-checkbox-list"><input type="checkbox" id="checkall" class="ur-input-checkbox" data-check="' . esc_attr( $key ) . '"/>';
|
310 |
+
$field .= '<label class="ur-checkbox-label"> Select All</label></li>';
|
311 |
}
|
312 |
foreach ( $choices as $choice_index => $choice ) {
|
313 |
|
314 |
$value = '';
|
315 |
+
if ( '' !== $default ) {
|
316 |
+
if ( is_array( $default ) && in_array( trim( $choice_index ), $default ) ) {
|
317 |
$value = 'checked="checked"';
|
318 |
+
} elseif ( $default === $choice_index ) {
|
319 |
$value = 'checked="checked"';
|
320 |
}
|
321 |
}
|
322 |
$field .= '<li class="ur-checkbox-list">';
|
323 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" ' . implode( ' ', $custom_attributes ) . ' data-value="' . esc_attr( $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_index ) . '"' . esc_attr( $value ) . ' /> ';
|
324 |
+
$field .= '<label class="ur-checkbox-label" for="' . esc_attr( $args['id'] ) . '_' . esc_attr( $choice_index ) . '">' . trim( $choice ) . '</label> </li>';
|
325 |
$checkbox_start++;
|
326 |
}
|
327 |
$field .= '</ul>';
|
328 |
} else {
|
329 |
+
$field = '<label class="ur-label checkbox" ' . implode( ' ', $custom_attributes ) . '>
|
330 |
+
<input data-rules="' . esc_attr( $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 ) . ' /> '
|
331 |
. $args['label'] . $required . $tooltip_html . '</label>';
|
332 |
}
|
333 |
break;
|
334 |
|
335 |
case 'password':
|
336 |
+
$extra_params_key = str_replace( 'user_registration_', 'ur_', $key ) . '_params';
|
337 |
+
$extra_params = json_decode( get_user_meta( get_current_user_id(), $extra_params_key, true ) );
|
338 |
$field .= ' <span class="input-wrapper"> ';
|
339 |
+
if ( empty( $extra_params ) ) {
|
340 |
+
$field_container = '<div class="form-row %1$s hide_show_password" id="%2$s" data-priority="' . esc_attr( $sort ) . '">%3$s</div>';
|
341 |
$field .= '<span class="password-input-group input-form-field-icons">';
|
342 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text ' . $class . ' 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 ) . ' />';
|
343 |
+
if ( 'yes' === get_option( 'user_registration_login_option_hide_show_password', 'no' ) ) {
|
344 |
$field .= '<a href="javaScript:void(0)" class="password_preview dashicons dashicons-hidden" title=" Show password "></a>';
|
345 |
}
|
346 |
$field .= '</span>';
|
347 |
} else {
|
348 |
+
$field .= '<input data-rules="' . esc_attr( $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 ) . ' />';
|
349 |
}
|
350 |
+
if ( ! is_admin() ) {
|
351 |
+
if ( 'yes' === $enable_field_icon || '1' === $enable_field_icon ) {
|
352 |
$field .= '<span class="' . $args['icon'] . '"></span>';
|
353 |
}
|
354 |
$field .= ' </span> ';
|
362 |
case 'url':
|
363 |
case 'file':
|
364 |
case 'timepicker':
|
365 |
+
$extra_params_key = str_replace( 'user_registration_', 'ur_', $key ) . '_params';
|
366 |
+
$extra_params = json_decode( get_user_meta( get_current_user_id(), $extra_params_key, true ) );
|
367 |
+
$current_time = isset( $args['current_time'] ) ? $args['current_time'] : '';
|
368 |
+
$time_interval = isset( $args['time_interval'] ) ? $args['time_interval'] : '';
|
369 |
+
$time_min = isset( $args['time_min'] ) ? $args['time_min'] : '';
|
370 |
+
$time_max = isset( $args['time_max'] ) ? $args['time_max'] : '';
|
371 |
+
$username_length = isset( $args['username_length'] ) ? $args['username_length'] : '';
|
372 |
+
$username_character = isset( $args['username_character'] ) ? $args['username_character'] : '';
|
373 |
+
$attr = '';
|
374 |
+
if ( '' !== $username_length ) {
|
375 |
$attr .= 'data-username-length="' . $username_length . '"';
|
376 |
}
|
377 |
|
378 |
+
if ( $username_character ) {
|
379 |
$attr .= 'data-username-character="' . $username_character . '"';
|
380 |
}
|
381 |
|
382 |
+
if ( '' !== $time_interval ) {
|
383 |
$attr .= 'data-time-interval="' . $time_interval . '"';
|
384 |
}
|
385 |
|
386 |
+
if ( '' !== $time_min ) {
|
387 |
$attr .= 'data-time-min="' . $time_min . '"';
|
388 |
}
|
389 |
|
390 |
+
if ( '' !== $time_max ) {
|
391 |
$attr .= 'data-time-max="' . $time_max . '"';
|
392 |
}
|
393 |
|
394 |
+
if ( $current_time ) {
|
395 |
$attr .= 'data-current-time="' . $current_time . '"';
|
396 |
}
|
397 |
|
398 |
$field .= ' <span class="input-wrapper"> ';
|
399 |
+
if ( empty( $extra_params ) ) {
|
400 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="' . esc_attr( $args['type'] ) . '" class="input-text ' . $class . ' 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 ) . ' ' . $attr . '/>';
|
401 |
} else {
|
402 |
+
$field .= '<input data-rules="' . esc_attr( $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 ) . ' ' . $attr . ' />';
|
403 |
}
|
404 |
|
405 |
+
if ( ! is_admin() ) {
|
406 |
+
if ( 'yes' === $enable_field_icon || '1' === $enable_field_icon && 'file' != $args['type'] ) {
|
407 |
+
$field .= '<span class="' . esc_attr( $args['icon'] ) . '"></span>';
|
408 |
}
|
409 |
$field .= ' </span> ';
|
410 |
}
|
411 |
break;
|
412 |
|
413 |
case 'date':
|
414 |
+
$extra_params_key = str_replace( 'user_registration_', 'ur_', $key ) . '_params';
|
415 |
+
$extra_params = json_decode( get_user_meta( get_current_user_id(), $extra_params_key, true ) );
|
416 |
|
417 |
$actual_value = $value;
|
418 |
+
if ( isset( $args['custom_attributes']['data-date-format'] ) ) {
|
419 |
$date_format = $args['custom_attributes']['data-date-format'];
|
420 |
+
$default_date = isset( $args['custom_attributes']['data-default-date'] ) ? $args['custom_attributes']['data-default-date'] : '';
|
421 |
+
if ( empty( $value ) && 'today' === $default_date ) {
|
422 |
+
$value = date_i18n( $date_format );
|
423 |
+
$actual_value = date_i18n( $date_format );
|
424 |
} else {
|
425 |
+
$value = str_replace( '/', '-', $value );
|
426 |
+
if ( ! strpos( $value, 'to' ) ) {
|
427 |
+
$value = '' !== $value ? date_i18n( $date_format, strtotime( $value ) ) : '';
|
428 |
} else {
|
429 |
+
$date_range = explode( 'to', $value );
|
430 |
+
$value = date_i18n( $date_format, strtotime( trim( $date_range[0] ) ) ) . ' to ' . date_i18n( $date_format, strtotime( trim( $date_range[1] ) ) );
|
431 |
}
|
432 |
}
|
433 |
}
|
435 |
$field .= ' <span class="input-wrapper"> ';
|
436 |
|
437 |
if ( empty( $extra_params ) ) {
|
438 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" id="load_flatpickr" value="' . esc_attr( $actual_value ) . '" class="regular-text ' . esc_attr( $class ) . '" readonly placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
439 |
$field .= '<input type="hidden" id="formated_date" value="' . esc_attr( $value ) . '"/>';
|
440 |
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" data-field-type="' . esc_attr( $args['type'] ) . '" value="' . esc_attr( $actual_value ) . '" 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'] ) . '" ' . implode( ' ', $custom_attributes ) . ' style="display:none"/>';
|
441 |
} else {
|
442 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" id="load_flatpickr" value="' . esc_attr( $actual_value ) . '" class="regular-text ' . $class . '" readonly placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
443 |
$field .= '<input type="hidden" id="formated_date" value="' . esc_attr( $value ) . '"/>';
|
444 |
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" data-field-type="' . esc_attr( $args['type'] ) . '" value="' . esc_attr( $actual_value ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' style="display:none" />';
|
445 |
}
|
446 |
|
447 |
+
if ( 'yes' === $enable_field_icon || '1' === $enable_field_icon ) {
|
448 |
+
if ( ! is_admin() ) {
|
449 |
+
$field .= '<span class="' . esc_attr( $args['icon'] ) . '"></span>';
|
450 |
}
|
451 |
}
|
452 |
$field .= '</span> ';
|
453 |
break;
|
454 |
|
455 |
case 'color':
|
456 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="text" class="input-text input-color ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" data-default-color="' . esc_attr( $args['default'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
|
457 |
break;
|
458 |
|
459 |
case 'select':
|
460 |
+
$default_value = isset( $args['default_value'] ) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
461 |
|
462 |
+
$value = ! empty( $value ) ? $value : $default_value;
|
463 |
$options = $field .= '';
|
464 |
+
if ( ! empty( $args['options'] ) ) {
|
465 |
// If we have a blank option, select2 needs a placeholder
|
466 |
+
if ( ! empty( $args['placeholder'] ) ) {
|
467 |
+
$options .= '<option value="" selected disabled>' . esc_html( $args['placeholder'] ) . '</option>';
|
468 |
}
|
469 |
|
470 |
$custom_attributes[] = 'data-allow_clear="true"';
|
471 |
+
foreach ( $args['options'] as $option_key => $option_text ) {
|
472 |
$selected_attribute = '';
|
473 |
|
474 |
+
if ( empty( $args['placeholder'] ) ) {
|
475 |
+
$selected_attribute = selected( $value, trim( $option_key ), false );
|
476 |
}
|
477 |
+
$options .= '<option value="' . esc_attr( trim( $option_key ) ) . '" ' . $selected_attribute . '>' . esc_attr( trim( $option_text ) ) . '</option>';
|
478 |
}
|
479 |
|
480 |
+
$field .= '<select data-rules="' . esc_attr( $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'] ) . '">
|
481 |
' . $options . '
|
482 |
</select>';
|
483 |
}
|
486 |
case 'multiselect':
|
487 |
$options = $field .= '';
|
488 |
|
489 |
+
if ( is_serialized( $value ) ) {
|
490 |
+
$default_value = unserialize( $value );
|
491 |
} else {
|
492 |
$default_value = $value;
|
493 |
}
|
494 |
|
495 |
+
if ( ! empty( $args['options'] ) ) {
|
496 |
+
foreach ( $args['options'] as $option_key => $option_text ) {
|
497 |
|
498 |
+
if ( '' === $option_key ) {
|
499 |
// If we have a blank option, select2 needs a placeholder
|
500 |
+
if ( empty( $args['placeholder'] ) ) {
|
501 |
+
$args['placeholder'] = $option_text ? $option_text : __( 'Choose an option', 'user-registration' );
|
502 |
}
|
503 |
$custom_attributes[] = 'data-allow_clear="true"';
|
504 |
}
|
505 |
|
506 |
+
if ( is_array( $default_value ) ) {
|
507 |
+
$options .= '<option value="' . esc_attr( trim( $option_key ) ) . '" ' . selected( in_array( trim( $option_key ), $default_value ), true, false ) . '>' . esc_attr( trim( $option_text ) ) . '</option>';
|
508 |
} else {
|
509 |
+
$options .= '<option value="' . esc_attr( trim( $option_key ) ) . '" ' . selected( $default_value, trim( $option_key ), false ) . '>' . esc_attr( trim( $option_text ) ) . '</option>';
|
510 |
}
|
511 |
}
|
512 |
|
513 |
+
$field .= '<select multiple data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" name="' . esc_attr( $key ) . '[]" id="' . esc_attr( $args['id'] ) . '" class="select ur-enhanced-select' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">
|
514 |
' . $options . '
|
515 |
</select>';
|
516 |
}
|
517 |
break;
|
518 |
|
519 |
case 'radio':
|
520 |
+
$default_value = isset( $args['default_value'] ) ? $args['default_value'] : ''; // Backward compatibility. Modified since 1.5.7
|
521 |
+
$value = ! empty( $value ) ? $value : $default_value;
|
522 |
+
$label_id = current( array_keys( $args['options'] ) );
|
523 |
+
if ( ! empty( $args['options'] ) ) {
|
524 |
|
525 |
$field .= '<ul>';
|
526 |
+
foreach ( $args['options'] as $option_index => $option_text ) {
|
527 |
|
528 |
$field .= '<li class="ur-radio-list">';
|
529 |
|
530 |
$checked = '';
|
531 |
+
if ( ! empty( $value ) ) {
|
532 |
+
$checked = checked( $value, trim( $option_index ), false );
|
533 |
}
|
534 |
|
535 |
+
$field .= '<input data-rules="' . esc_attr( $rules ) . '" data-id="' . esc_attr( $key ) . '" type="radio" class="input-radio ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" value="' . esc_attr( trim( $option_index ) ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_text ) . '" ' . implode( ' ', $custom_attributes ) . ' / ' . $checked . ' /> ';
|
536 |
+
$field .= '<label for="' . esc_attr( $args['id'] ) . '_' . esc_attr( $option_text ) . '" class="radio">';
|
537 |
|
538 |
$field .= wp_kses(
|
539 |
+
trim( $option_text ),
|
540 |
array(
|
541 |
'a' => array(
|
542 |
'href' => array(),
|
551 |
break;
|
552 |
} // End switch().
|
553 |
|
554 |
+
if ( $args['description'] ) {
|
555 |
$field .= '<span class="description">' . $args['description'] . '</span>';
|
556 |
}
|
557 |
|
558 |
+
if ( ! empty( $field ) ) {
|
|
|
|
|
559 |
|
560 |
$field_html = '';
|
561 |
+
if ( $args['label'] && 'checkbox' != $args['type'] ) {
|
562 |
+
$field_html .= '<label for="' . esc_attr( $label_id ) . '" class="ur-label">' . wp_kses(
|
563 |
$args['label'],
|
564 |
array(
|
565 |
'a' => array(
|
572 |
}
|
573 |
|
574 |
$field_html .= $field;
|
575 |
+
$container_class = esc_attr( implode( ' ', $args['class'] ) );
|
576 |
+
$container_id = esc_attr( $args['id'] ) . '_field';
|
577 |
+
$field = sprintf( $field_container, $container_class, $container_id, $field_html );
|
578 |
}
|
579 |
|
580 |
+
$field = apply_filters( 'user_registration_form_field_' . $args['type'], $field, $key, $args, $value );
|
581 |
+
if ( $args['return'] ) {
|
582 |
return $field;
|
583 |
} else {
|
584 |
echo $field;
|
586 |
}
|
587 |
} // End if().
|
588 |
|
589 |
+
if ( ! function_exists( 'user_registration_form_data' ) ) {
|
590 |
|
591 |
/**
|
592 |
* Get form fields to display on profile tab
|
596 |
*
|
597 |
* @return array
|
598 |
*/
|
599 |
+
function user_registration_form_data( $user_id = 0, $form_id = 0 ) {
|
600 |
+
$all_meta_value = get_user_meta( $user_id );
|
|
|
601 |
$fields = array();
|
602 |
|
603 |
+
$post_content_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();
|
604 |
|
605 |
$all_meta_value_keys = array();
|
606 |
+
if ( gettype( $all_meta_value ) === 'array' ) {
|
607 |
+
$all_meta_value_keys = array_keys( $all_meta_value );
|
608 |
}
|
609 |
|
610 |
+
$post_content_array = apply_filters( 'user_registration_profile_account_filter_all_fields', $post_content_array, $form_id );
|
611 |
+
|
612 |
+
foreach ( $post_content_array as $post_content_row ) {
|
613 |
+
foreach ( $post_content_row as $post_content_grid ) {
|
614 |
+
foreach ( $post_content_grid as $field ) {
|
615 |
+
$field_name = isset( $field->general_setting->field_name ) ? $field->general_setting->field_name : '';
|
616 |
+
$field_label = isset( $field->general_setting->label ) ? $field->general_setting->label : '';
|
617 |
+
$field_description = isset( $field->general_setting->description ) ? $field->general_setting->description : '';
|
618 |
+
$placeholder = isset( $field->general_setting->placeholder ) ? $field->general_setting->placeholder : '';
|
619 |
+
$options = isset( $field->general_setting->options ) ? $field->general_setting->options : array();
|
620 |
+
$field_key = isset( $field->field_key ) ? ( $field->field_key ) : '';
|
621 |
+
$field_type = isset( $field->field_key ) ? ur_get_field_type( $field_key ) : '';
|
622 |
+
$required = isset( $field->general_setting->required ) ? $field->general_setting->required : '';
|
623 |
$required = 'yes' == $required ? true : false;
|
624 |
+
$enable_cl = isset( $field->advance_setting->enable_conditional_logic ) && ( '1' === $field->advance_setting->enable_conditional_logic || 'on' === $field->advance_setting->enable_conditional_logic ) ? true : false;
|
625 |
+
$cl_map = isset( $field->advance_setting->cl_map ) ? $field->advance_setting->cl_map : '';
|
626 |
+
$custom_attributes = isset( $field->general_setting->custom_attributes ) ? $field->general_setting->custom_attributes : array();
|
627 |
|
628 |
+
if ( empty( $field_label ) ) {
|
629 |
+
$field_label_array = explode( '_', $field_name );
|
630 |
+
$field_label = join( ' ', array_map( 'ucwords', $field_label_array ) );
|
631 |
}
|
632 |
|
633 |
+
if ( ! empty( $field_name ) ) {
|
634 |
$extra_params = array();
|
635 |
|
636 |
+
switch ( $field_key ) {
|
637 |
|
638 |
case 'radio':
|
639 |
case 'select':
|
640 |
+
$advanced_options = isset( $field->advance_setting->options ) ? $field->advance_setting->options : '';
|
641 |
+
$advanced_options = explode( ',', $advanced_options );
|
642 |
+
$extra_params['options'] = ! empty( $options ) ? $options : $advanced_options;
|
643 |
+
$extra_params['options'] = array_map( 'trim', $extra_params['options'] );
|
644 |
|
645 |
+
$extra_params['options'] = array_combine( $extra_params['options'], $extra_params['options'] );
|
646 |
|
647 |
break;
|
648 |
|
649 |
case 'checkbox':
|
650 |
+
$advanced_options = isset( $field->advance_setting->choices ) ? $field->advance_setting->choices : '';
|
651 |
+
$advanced_options = explode( ',', $advanced_options );
|
652 |
+
$extra_params['options'] = ! empty( $options ) ? $options : $advanced_options;
|
653 |
+
$extra_params['options'] = array_map( 'trim', $extra_params['options'] );
|
654 |
|
655 |
+
$extra_params['options'] = array_combine( $extra_params['options'], $extra_params['options'] );
|
656 |
|
657 |
break;
|
658 |
|
659 |
case 'date':
|
660 |
+
$date_format = isset( $field->advance_setting->date_format ) ? $field->advance_setting->date_format : '';
|
661 |
+
$min_date = isset( $field->advance_setting->min_date ) ? str_replace( '/', '-', $field->advance_setting->min_date ) : '';
|
662 |
+
$max_date = isset( $field->advance_setting->max_date ) ? str_replace( '/', '-', $field->advance_setting->max_date ) : '';
|
663 |
+
$set_current_date = isset( $field->advance_setting->set_current_date ) ? $field->advance_setting->set_current_date : '';
|
664 |
+
$enable_date_range = isset( $field->advance_setting->enable_date_range ) ? $field->advance_setting->enable_date_range : '';
|
665 |
$extra_params['custom_attributes']['data-date-format'] = $date_format;
|
666 |
|
667 |
+
if ( isset( $field->advance_setting->enable_min_max ) && 'true' === $field->advance_setting->enable_min_max ) {
|
668 |
+
$extra_params['custom_attributes']['data-min-date'] = '' !== $min_date ? date_i18n( $date_format, strtotime( $min_date ) ) : '';
|
669 |
+
$extra_params['custom_attributes']['data-max-date'] = '' !== $max_date ? date_i18n( $date_format, strtotime( $max_date ) ) : '';
|
670 |
}
|
671 |
$extra_params['custom_attributes']['data-default-date'] = $set_current_date;
|
672 |
$extra_params['custom_attributes']['data-mode'] = $enable_date_range;
|
673 |
break;
|
674 |
|
675 |
case 'country':
|
676 |
+
$class_name = ur_load_form_field_class( $field_key );
|
677 |
+
$extra_params['options'] = $class_name::get_instance()->get_selected_countries( $form_id, $field_name );
|
678 |
break;
|
679 |
|
680 |
case 'file':
|
681 |
+
$extra_params['max_files'] = isset( $field->general_setting->max_files ) ? $field->general_setting->max_files : '';
|
682 |
break;
|
683 |
|
684 |
case 'phone':
|
685 |
+
$extra_params['phone_format'] = isset( $field->general_setting->phone_format ) ? $field->general_setting->phone_format : '';
|
686 |
break;
|
687 |
|
688 |
default:
|
689 |
break;
|
690 |
}
|
691 |
|
692 |
+
$extra_params['default'] = isset( $all_meta_value[ 'user_registration_' . $field_name ][0] ) ? $all_meta_value[ 'user_registration_' . $field_name ][0] : '';
|
693 |
|
694 |
+
if ( in_array( $field_key, ur_get_user_profile_field_only() ) ) {
|
695 |
|
696 |
+
$fields[ 'user_registration_' . $field_name ] = array(
|
697 |
+
'label' => ur_string_translation( $form_id, 'user_registration_' . $field_name . '_label', $field_label ),
|
698 |
+
'description' => ur_string_translation( $form_id, 'user_registration_' . $field_name . '_description', $field_description ),
|
699 |
'type' => $field_type,
|
700 |
+
'placeholder' => ur_string_translation( $form_id, 'user_registration_' . $field_name . '_placeholder', $placeholder ),
|
701 |
'field_key' => $field_key,
|
702 |
'required' => $required,
|
703 |
);
|
704 |
|
705 |
+
if ( true === $enable_cl ) {
|
706 |
+
$fields[ 'user_registration_' . $field_name ]['enable_conditional_logic'] = $enable_cl;
|
707 |
+
$fields[ 'user_registration_' . $field_name ]['cl_map'] = $cl_map;
|
708 |
}
|
709 |
}
|
710 |
|
711 |
+
if ( true === $enable_cl ) {
|
712 |
+
$fields[ 'user_registration_' . $field_name ]['enable_conditional_logic'] = $enable_cl;
|
713 |
+
$fields[ 'user_registration_' . $field_name ]['cl_map'] = $cl_map;
|
714 |
}
|
715 |
|
716 |
+
if ( count( $custom_attributes ) > 0 ) {
|
717 |
$extra_params['custom_attributes'] = $custom_attributes;
|
718 |
}
|
719 |
|
720 |
+
if ( isset( $fields[ 'user_registration_' . $field_name ] ) && count( $extra_params ) > 0 ) {
|
721 |
+
$fields[ 'user_registration_' . $field_name ] = array_merge( $fields[ 'user_registration_' . $field_name ], $extra_params );
|
722 |
}
|
723 |
$filter_data = array(
|
724 |
'fields' => $fields,
|
726 |
'field_name' => $field_name,
|
727 |
);
|
728 |
|
729 |
+
$filtered_data_array = apply_filters( 'user_registration_profile_account_filter_' . $field_key, $filter_data, $form_id );
|
730 |
+
if ( isset( $filtered_data_array['fields'] ) ) {
|
731 |
$fields = $filtered_data_array['fields'];
|
732 |
}
|
733 |
} // End if().
|
738 |
}
|
739 |
} // End if().
|
740 |
|
741 |
+
if ( ! function_exists( 'user_registration_account_content' ) ) {
|
742 |
|
743 |
/**
|
744 |
* My Account content output.
|
745 |
*/
|
746 |
+
function user_registration_account_content() {
|
|
|
747 |
global $wp;
|
748 |
|
749 |
+
if ( ! empty( $wp->query_vars ) ) {
|
750 |
+
foreach ( $wp->query_vars as $key => $value ) {
|
751 |
// Ignore pagename param.
|
752 |
+
if ( 'pagename' === $key ) {
|
753 |
continue;
|
754 |
}
|
755 |
|
756 |
+
if ( has_action( 'user_registration_account_' . $key . '_endpoint' ) ) {
|
757 |
+
do_action( 'user_registration_account_' . $key . '_endpoint', $value );
|
758 |
return;
|
759 |
}
|
760 |
}
|
764 |
ur_get_template(
|
765 |
'myaccount/dashboard.php',
|
766 |
array(
|
767 |
+
'current_user' => get_user_by( 'id', get_current_user_id() ),
|
768 |
)
|
769 |
);
|
770 |
}
|
771 |
}
|
772 |
|
773 |
+
if ( ! function_exists( 'user_registration_account_navigation' ) ) {
|
774 |
|
775 |
/**
|
776 |
* My Account navigation template.
|
777 |
*/
|
778 |
+
function user_registration_account_navigation() {
|
779 |
+
ur_get_template( 'myaccount/navigation.php' );
|
|
|
780 |
}
|
781 |
}
|
782 |
|
783 |
+
if ( ! function_exists( 'user_registration_account_edit_profile' ) ) {
|
784 |
|
785 |
/**
|
786 |
* My Account > Edit profile template.
|
787 |
*/
|
788 |
+
function user_registration_account_edit_profile() {
|
789 |
+
UR_Shortcode_My_Account::edit_profile();
|
|
|
790 |
}
|
791 |
}
|
792 |
|
793 |
+
if ( ! function_exists( 'user_registration_account_edit_account' ) ) {
|
794 |
|
795 |
/**
|
796 |
* My Account > Edit account template.
|
797 |
*/
|
798 |
+
function user_registration_account_edit_account() {
|
799 |
+
UR_Shortcode_My_Account::edit_account();
|
|
|
800 |
}
|
801 |
}
|
802 |
|
814 |
$post_content = isset( $post->post_content ) ? $post->post_content : '';
|
815 |
|
816 |
if ( ( ur_post_content_has_shortcode( 'user_registration_login' ) || ur_post_content_has_shortcode( 'user_registration_my_account' ) ) && is_user_logged_in() ) {
|
817 |
+
if ( version_compare( $GLOBALS['wp_version'], $wp_version, '>=' ) ) {
|
818 |
$blocks = parse_blocks( $post_content );
|
819 |
+
foreach ( $blocks as $block ) {
|
820 |
if ( 'core/shortcode' === $block['blockName'] && isset( $block['innerHTML'] ) ) {
|
821 |
$new_shortcode = $block['innerHTML'];
|
822 |
} elseif ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['shortcode'] ) ) {
|
823 |
+
$new_shortcode = '[' . $block['attrs']['shortcode'] . ']';
|
824 |
}
|
825 |
|
826 |
if ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['logoutUrl'] ) ) {
|
827 |
$redirect = $block['attrs']['logoutUrl'];
|
828 |
}
|
829 |
}
|
830 |
+
preg_match( '/' . get_shortcode_regex() . '/s', $new_shortcode, $matches );
|
831 |
|
832 |
} else {
|
833 |
preg_match( '/' . get_shortcode_regex() . '/s', $post_content, $matches );
|
834 |
}
|
835 |
|
836 |
+
$attributes = shortcode_parse_atts( $matches[3] );
|
837 |
/**
|
838 |
* Introduced logout_redirect parameter in user_registration_my_account shortcode.
|
839 |
*
|
840 |
* @since 1.7.5
|
841 |
*/
|
842 |
+
if ( isset( $attributes['logout_redirect'] ) ) {
|
843 |
+
$redirect = isset( $attributes['logout_redirect'] ) ? $attributes['logout_redirect'] : '';
|
844 |
+
$redirect = trim( $redirect, ']' );
|
845 |
+
$redirect = trim( $redirect, '"' );
|
846 |
+
$redirect = trim( $redirect, "'" );
|
847 |
+
$redirect = '' != $redirect ? home_url( $redirect ) : ur_get_page_permalink( 'myaccount' );
|
848 |
}
|
849 |
+
} else {
|
850 |
$blocks = parse_blocks( $post->post_content );
|
851 |
|
852 |
+
foreach ( $blocks as $block ) {
|
853 |
if ( 'user-registration/form-selector' === $block['blockName'] && isset( $block['attrs']['logoutUrl'] ) ) {
|
854 |
$redirect = home_url( $block['attrs']['logoutUrl'] );
|
855 |
}
|
856 |
}
|
857 |
}
|
858 |
+
$redirect = apply_filters( 'user_registration_redirect_after_logout', $redirect );
|
859 |
|
860 |
+
if ( $logout_endpoint && ! is_front_page() ) {
|
861 |
+
return wp_nonce_url( ur_get_endpoint_url( 'user-logout', '', $redirect ), 'user-logout' );
|
862 |
} else {
|
863 |
+
if ( '' === $redirect ) {
|
864 |
$redirect = home_url();
|
865 |
}
|
866 |
+
return wp_logout_url( $redirect );
|
867 |
}
|
868 |
}
|
869 |
|
874 |
*
|
875 |
* @return bool
|
876 |
*/
|
877 |
+
function is_elementor_editing_page() {
|
878 |
+
return ( ! empty( $_POST['action'] ) && 'elementor_ajax' === $_POST['action'] ) ||
|
879 |
+
! empty( $_GET['elementor-preview'] ) ||
|
880 |
+
( ! empty( $_GET['action'] ) && 'elementor' === $_GET['action'] );
|
|
|
881 |
}
|
includes/shortcodes/class-ur-shortcode-login.php
CHANGED
@@ -56,12 +56,14 @@ class UR_Shortcode_Login {
|
|
56 |
'myaccount/form-login.php',
|
57 |
array(
|
58 |
'recaptcha_node' => $recaptcha_node,
|
59 |
-
'redirect' => $redirect_url,
|
60 |
)
|
61 |
);
|
62 |
}
|
63 |
} else {
|
64 |
-
|
|
|
|
|
65 |
}
|
66 |
}
|
67 |
}
|
56 |
'myaccount/form-login.php',
|
57 |
array(
|
58 |
'recaptcha_node' => $recaptcha_node,
|
59 |
+
'redirect' => esc_url_raw( $redirect_url ),
|
60 |
)
|
61 |
);
|
62 |
}
|
63 |
} else {
|
64 |
+
|
65 |
+
/* translators: %s - Link to logout. */
|
66 |
+
echo wp_kses_post( apply_filters( 'user_registration_logged_in_message', sprintf( __( 'You are already logged in. <a href="%s">Log out?</a>', 'user-registration' ), ur_logout_url() ) ) );
|
67 |
}
|
68 |
}
|
69 |
}
|
includes/shortcodes/class-ur-shortcode-my-account.php
CHANGED
@@ -64,7 +64,7 @@ class UR_Shortcode_My_Account {
|
|
64 |
|
65 |
if ( ! is_user_logged_in() ) {
|
66 |
|
67 |
-
$redirect_url = isset( $atts['redirect_url'] ) ? trim( $atts['redirect_url'] ) : '';
|
68 |
$redirect_url = ( isset( $_GET['redirect_to'] ) && empty( $redirect_url ) ) ? esc_url( wp_unslash( $_GET['redirect_to'] ) ) : $redirect_url; // @codingStandardsIgnoreLine
|
69 |
$form_id = isset( $atts['form_id'] ) ? absint( $atts['form_id'] ) : 0;
|
70 |
$message = apply_filters( 'user_registration_my_account_message', '' );
|
64 |
|
65 |
if ( ! is_user_logged_in() ) {
|
66 |
|
67 |
+
$redirect_url = isset( $atts['redirect_url'] ) ? esc_url( trim( $atts['redirect_url'] ) ) : '';
|
68 |
$redirect_url = ( isset( $_GET['redirect_to'] ) && empty( $redirect_url ) ) ? esc_url( wp_unslash( $_GET['redirect_to'] ) ) : $redirect_url; // @codingStandardsIgnoreLine
|
69 |
$form_id = isset( $atts['form_id'] ) ? absint( $atts['form_id'] ) : 0;
|
70 |
$message = apply_filters( 'user_registration_my_account_message', '' );
|
languages/user-registration.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: User Registration 2.1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-12-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: user-registration\n"
|
@@ -65,9 +65,9 @@ msgstr ""
|
|
65 |
|
66 |
#: includes/abstracts/abstract-ur-list-table.php:232
|
67 |
#: includes/abstracts/abstract-ur-list-table.php:272
|
68 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
69 |
#: includes/admin/class-ur-admin-import-export-forms.php:51
|
70 |
-
#: includes/admin/class-ur-admin-notices.php:
|
71 |
#: includes/admin/class-ur-admin-settings.php:69
|
72 |
#: includes/admin/class-ur-admin-status.php:169
|
73 |
#: includes/class-ur-email-confirmation.php:246
|
@@ -107,244 +107,261 @@ msgstr ""
|
|
107 |
msgid "Y/m/d"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/admin/class-ur-admin-
|
|
|
|
|
|
|
|
|
111 |
msgid "Upload Profile Picture"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/admin/class-ur-admin-assets.php:
|
115 |
msgid "Select Image"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/admin/class-ur-admin-assets.php:
|
119 |
msgctxt "enhanced select"
|
120 |
msgid "No matches found"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: includes/admin/class-ur-admin-assets.php:
|
124 |
msgctxt "enhanced select"
|
125 |
msgid "Loading failed"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: includes/admin/class-ur-admin-assets.php:
|
129 |
msgctxt "enhanced select"
|
130 |
msgid "Please enter 1 or more characters"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/admin/class-ur-admin-assets.php:
|
134 |
msgctxt "enhanced select"
|
135 |
msgid "Please enter %qty% or more characters"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/admin/class-ur-admin-assets.php:
|
139 |
msgctxt "enhanced select"
|
140 |
msgid "Please delete 1 character"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: includes/admin/class-ur-admin-assets.php:
|
144 |
msgctxt "enhanced select"
|
145 |
msgid "Please delete %qty% characters"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/admin/class-ur-admin-assets.php:
|
149 |
msgctxt "enhanced select"
|
150 |
msgid "You can only select 1 item"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/admin/class-ur-admin-assets.php:
|
154 |
msgctxt "enhanced select"
|
155 |
msgid "You can only select %qty% items"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/admin/class-ur-admin-assets.php:
|
159 |
msgctxt "enhanced select"
|
160 |
msgid "Loading more results…"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: includes/admin/class-ur-admin-assets.php:
|
164 |
msgctxt "enhanced select"
|
165 |
msgid "Searching…"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: includes/admin/class-ur-admin-assets.php:
|
169 |
msgid "Could not install."
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: includes/admin/class-ur-admin-assets.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
msgid "Enabled"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: includes/admin/class-ur-admin-assets.php:
|
177 |
msgid "Disabled"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/admin/class-ur-admin-assets.php:
|
181 |
msgid "Clone"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/admin/class-ur-admin-assets.php:
|
185 |
#: includes/admin/class-ur-admin-registrations-table-list.php:107
|
186 |
msgid "Trash"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: includes/admin/class-ur-admin-assets.php:
|
190 |
msgid "Delete"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/admin/class-ur-admin-assets.php:
|
194 |
-
#: includes/admin/class-ur-admin-form-modal.php:
|
195 |
msgid "Cancel"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: includes/admin/class-ur-admin-assets.php:
|
199 |
msgctxt "user-registration admin"
|
200 |
msgid "User Email"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: includes/admin/class-ur-admin-assets.php:
|
204 |
msgctxt "user-registration admin"
|
205 |
msgid "User Password"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: includes/admin/class-ur-admin-assets.php:
|
209 |
msgctxt "user-registration admin"
|
210 |
msgid "Payment"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/admin/class-ur-admin-assets.php:
|
214 |
msgctxt "user-registration admin"
|
215 |
msgid "Stripe Gateway"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/admin/class-ur-admin-assets.php:
|
219 |
msgctxt "user registration admin"
|
220 |
msgid "Are you sure want to delete this row?"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: includes/admin/class-ur-admin-assets.php:
|
224 |
msgctxt "user registration admin"
|
225 |
msgid "Are you sure want to delete this field?"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: includes/admin/class-ur-admin-assets.php:
|
229 |
msgctxt "user registration admin"
|
230 |
msgid "At least one row is required to create a registration form."
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: includes/admin/class-ur-admin-assets.php:
|
234 |
msgctxt "user registration admin"
|
235 |
msgid "Cannot delete row"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: includes/admin/class-ur-admin-assets.php:
|
239 |
msgctxt "user registration admin"
|
240 |
msgid "This field is one time draggable."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/admin/class-ur-admin-assets.php:
|
244 |
msgctxt "user registration admin"
|
245 |
msgid "Could not clone this field."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: includes/admin/class-ur-admin-assets.php:
|
249 |
msgctxt "user registration admin"
|
250 |
msgid "Form successfully saved."
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: includes/admin/class-ur-admin-assets.php:
|
254 |
msgctxt "user registration admin"
|
255 |
msgid "Success"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: includes/admin/class-ur-admin-assets.php:
|
259 |
msgctxt "user registration admin"
|
260 |
msgid "Error"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: includes/admin/class-ur-admin-assets.php:
|
264 |
msgid "Confirm Deletion"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: includes/admin/class-ur-admin-assets.php:
|
268 |
msgctxt "user registration admin"
|
269 |
msgid "At least one field needs to be selected."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: includes/admin/class-ur-admin-assets.php:
|
273 |
msgctxt "user registration admin"
|
274 |
msgid "Empty form name."
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: includes/admin/class-ur-admin-assets.php:
|
278 |
msgctxt "user registration admin"
|
279 |
msgid "Previous save action on going."
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: includes/admin/class-ur-admin-assets.php:
|
283 |
msgctxt "user registration admin"
|
284 |
msgid "Duplicate field name."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: includes/admin/class-ur-admin-assets.php:
|
288 |
msgctxt "user registration admin"
|
289 |
msgid "Empty field label."
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: includes/admin/class-ur-admin-assets.php:
|
293 |
msgctxt "user registration admin"
|
294 |
msgid "Invalid field name. Please do not use space, empty or special character, you can use underscore."
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: includes/admin/class-ur-admin-assets.php:
|
298 |
msgctxt "user registration admin"
|
299 |
msgid "Multiple field key "
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: includes/admin/class-ur-admin-assets.php:
|
303 |
msgctxt "user registration admin"
|
304 |
msgid "field is required."
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: includes/admin/class-ur-admin-assets.php:
|
308 |
msgctxt "user registration admin"
|
309 |
msgid "Drag your first form item here."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: includes/admin/class-ur-admin-assets.php:
|
313 |
msgctxt "user registration admin"
|
314 |
msgid "Please select at least one country."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/admin/class-ur-admin-assets.php:
|
318 |
msgctxt "user registration admin"
|
319 |
msgid "input size must be greater than zero."
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: includes/admin/class-ur-admin-assets.php:
|
323 |
msgctxt "user registration admin"
|
324 |
msgid "input of min value must be less than max value."
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
328 |
msgid "No users found with this form id."
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
332 |
msgid "User Role"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
336 |
msgid "User Status"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
340 |
msgid "User Registered"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
344 |
msgid "User Registered GMT"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: includes/admin/class-ur-admin-export-users.php:
|
348 |
msgid "User ID"
|
349 |
msgstr ""
|
350 |
|
@@ -356,121 +373,123 @@ msgstr ""
|
|
356 |
msgid "Add Registration Form"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: includes/admin/class-ur-admin-form-modal.php:
|
360 |
msgid "Insert Form"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: includes/admin/class-ur-admin-form-modal.php:
|
364 |
msgid "Close"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: includes/admin/class-ur-admin-form-modal.php:
|
368 |
msgid "Select a form below to insert"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: includes/admin/class-ur-admin-form-modal.php:
|
|
|
|
|
|
|
|
|
372 |
msgid "Add Form"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: includes/admin/class-ur-admin-import-export-forms.php:
|
376 |
msgid "Imported Successfully."
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: includes/admin/class-ur-admin-import-export-forms.php:
|
380 |
-
#: includes/admin/class-ur-admin-import-export-forms.php:
|
381 |
msgid "Invalid file content. Please export file from user registration plugin."
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: includes/admin/class-ur-admin-import-export-forms.php:
|
385 |
msgid "Invalid file format. Only Json File Allowed."
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: includes/admin/class-ur-admin-import-export-forms.php:
|
389 |
msgid "Please select json file to import form data."
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: includes/admin/class-ur-admin-menus.php:
|
393 |
msgid "User Registration settings"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: includes/admin/class-ur-admin-menus.php:
|
397 |
#: includes/class-ur-install.php:638
|
398 |
msgid "Settings"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/admin/class-ur-admin-menus.php:
|
402 |
msgid "User Registration Status"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/admin/class-ur-admin-menus.php:
|
406 |
#: includes/class-ur-email-confirmation.php:164
|
407 |
msgid "Status"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: includes/admin/class-ur-admin-menus.php:
|
411 |
-
#: includes/admin/class-ur-admin-menus.php:411
|
412 |
-
#: includes/admin/class-ur-admin-registrations-table-list.php:162
|
413 |
-
msgid "Add New"
|
414 |
-
msgstr ""
|
415 |
-
|
416 |
-
#: includes/admin/class-ur-admin-menus.php:427
|
417 |
msgid "User Registration extensions"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: includes/admin/class-ur-admin-menus.php:
|
421 |
msgid "Extensions"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: includes/admin/class-ur-admin-menus.php:
|
425 |
msgid "Create Form"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: includes/admin/class-ur-admin-menus.php:
|
429 |
msgid "Update form"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: includes/admin/class-ur-admin-menus.php:
|
433 |
msgid "User Registration endpoints"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/admin/class-ur-admin-menus.php:
|
437 |
#: includes/admin/settings/class-ur-settings-general.php:195
|
438 |
#: includes/class-ur-query.php:78
|
439 |
msgid "Lost password"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: includes/admin/class-ur-admin-menus.php:
|
443 |
msgid "Select all"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: includes/admin/class-ur-admin-menus.php:
|
447 |
msgid "Add to menu"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: includes/admin/class-ur-admin-menus.php:
|
451 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
452 |
msgid "Untitled"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: includes/admin/class-ur-admin-menus.php:
|
|
|
|
|
|
|
|
|
456 |
msgid "Empty form data"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: includes/admin/class-ur-admin-notices.php:
|
460 |
#: user-registration.php:77
|
461 |
#: user-registration.php:86
|
462 |
msgid "Cheatin’ huh?"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: includes/admin/class-ur-admin-profile.php:
|
466 |
msgid "User Extra Information %s"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: includes/admin/class-ur-admin-profile.php:
|
470 |
-
#: includes/admin/class-ur-admin-profile.php:
|
471 |
#: includes/form/class-ur-form-field-select.php:35
|
472 |
#: includes/form/class-ur-form-field-select.php:40
|
473 |
-
#: includes/functions-ur-core.php:
|
474 |
msgid "Select"
|
475 |
msgstr ""
|
476 |
|
@@ -493,7 +512,7 @@ msgstr ""
|
|
493 |
#: includes/admin/class-ur-admin-registrations-table-list.php:54
|
494 |
#: includes/form/class-ur-form-field-date.php:37
|
495 |
#: includes/form/class-ur-form-field-date.php:42
|
496 |
-
#: includes/functions-ur-core.php:
|
497 |
msgid "Date"
|
498 |
msgstr ""
|
499 |
|
@@ -519,7 +538,7 @@ msgid "Delete this item permanently"
|
|
519 |
msgstr ""
|
520 |
|
521 |
#: includes/admin/class-ur-admin-registrations-table-list.php:126
|
522 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
523 |
msgid "Preview"
|
524 |
msgstr ""
|
525 |
|
@@ -702,8 +721,8 @@ msgstr ""
|
|
702 |
|
703 |
#: includes/admin/class-ur-admin.php:183
|
704 |
#: includes/admin/class-ur-admin.php:231
|
705 |
-
#: includes/class-ur-plugin-updater.php:
|
706 |
-
#: includes/class-ur-plugin-updater.php:
|
707 |
msgid "I have a query"
|
708 |
msgstr ""
|
709 |
|
@@ -751,8 +770,8 @@ msgstr ""
|
|
751 |
msgid "General"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
755 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
756 |
#: includes/admin/settings/emails/class-ur-settings-admin-email.php:38
|
757 |
#: includes/admin/settings/emails/class-ur-settings-awaiting-admin-approval-email.php:39
|
758 |
#: includes/admin/settings/emails/class-ur-settings-email-confirmation.php:38
|
@@ -765,67 +784,67 @@ msgstr ""
|
|
765 |
msgid "Emails"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
769 |
msgid "Email notifications"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
773 |
msgid "Email notifications sent from user registration are listed below. Click on an email to configure it."
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
777 |
msgid "Email Sender Options"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
781 |
msgid "\"From\" name"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
785 |
msgid "How the sender name appears in outgoing user registration emails."
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
789 |
msgid "\"From\" address"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
793 |
msgid "How the sender email appears in outgoing user registration emails."
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
797 |
msgid "Send a Test Email"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
801 |
msgid "Send To"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
805 |
msgid "Enter email address where test email will be sent."
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
809 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
810 |
msgid "Send Email"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
814 |
msgid "Click to send test email."
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
818 |
#: includes/admin/settings/class-ur-settings-general.php:291
|
819 |
-
#: includes/functions-ur-core.php:
|
820 |
msgid "Email"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
824 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
825 |
msgid "Configure"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: includes/admin/settings/class-ur-settings-email.php:
|
829 |
msgid "Smart Tags Used"
|
830 |
msgstr ""
|
831 |
|
@@ -845,13 +864,13 @@ msgid "Frontend Messages"
|
|
845 |
msgstr ""
|
846 |
|
847 |
#: includes/admin/settings/class-ur-settings-general.php:74
|
848 |
-
#: includes/functions-ur-core.php:
|
849 |
msgid "User login option"
|
850 |
msgstr ""
|
851 |
|
852 |
#: includes/admin/settings/class-ur-settings-general.php:75
|
853 |
#: includes/admin/settings/class-ur-settings-general.php:392
|
854 |
-
#: includes/functions-ur-core.php:
|
855 |
msgid "This option lets you choose login option after user registration."
|
856 |
msgstr ""
|
857 |
|
@@ -979,7 +998,7 @@ msgid "Success Messages"
|
|
979 |
msgstr ""
|
980 |
|
981 |
#: includes/admin/settings/class-ur-settings-general.php:237
|
982 |
-
#: includes/functions-ur-core.php:
|
983 |
msgid "Manual login after registration"
|
984 |
msgstr ""
|
985 |
|
@@ -993,7 +1012,7 @@ msgid "User successfully registered."
|
|
993 |
msgstr ""
|
994 |
|
995 |
#: includes/admin/settings/class-ur-settings-general.php:247
|
996 |
-
#: includes/functions-ur-core.php:
|
997 |
msgid "Email confirmation to login"
|
998 |
msgstr ""
|
999 |
|
@@ -1007,7 +1026,7 @@ msgid "User registered. Verify your email by clicking on the link sent to your e
|
|
1007 |
msgstr ""
|
1008 |
|
1009 |
#: includes/admin/settings/class-ur-settings-general.php:257
|
1010 |
-
#: includes/functions-ur-core.php:
|
1011 |
msgid "Admin approval after registration"
|
1012 |
msgstr ""
|
1013 |
|
@@ -1025,7 +1044,7 @@ msgid "Error Messages"
|
|
1025 |
msgstr ""
|
1026 |
|
1027 |
#: includes/admin/settings/class-ur-settings-general.php:273
|
1028 |
-
#: includes/functions-ur-core.php:
|
1029 |
msgid "Required"
|
1030 |
msgstr ""
|
1031 |
|
@@ -1075,7 +1094,7 @@ msgstr ""
|
|
1075 |
#: includes/admin/settings/class-ur-settings-general.php:311
|
1076 |
#: includes/form/class-ur-form-field-number.php:37
|
1077 |
#: includes/form/class-ur-form-field-number.php:42
|
1078 |
-
#: includes/functions-ur-core.php:
|
1079 |
msgid "Number"
|
1080 |
msgstr ""
|
1081 |
|
@@ -1117,7 +1136,7 @@ msgid "Password and confirm password not matched."
|
|
1117 |
msgstr ""
|
1118 |
|
1119 |
#: includes/admin/settings/class-ur-settings-general.php:341
|
1120 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1121 |
msgid "Google reCaptcha"
|
1122 |
msgstr ""
|
1123 |
|
@@ -1127,14 +1146,14 @@ msgstr ""
|
|
1127 |
|
1128 |
#: includes/admin/settings/class-ur-settings-general.php:347
|
1129 |
#: includes/class-ur-ajax.php:111
|
1130 |
-
#: includes/class-ur-ajax.php:
|
1131 |
#: includes/class-ur-form-handler.php:391
|
1132 |
#: includes/class-ur-frontend-scripts.php:382
|
1133 |
msgid "Captcha code error, please try again."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
#: includes/admin/settings/class-ur-settings-general.php:375
|
1137 |
-
#: includes/functions-ur-core.php:
|
1138 |
msgid "Form Template"
|
1139 |
msgstr ""
|
1140 |
|
@@ -1143,27 +1162,27 @@ msgid "Choose the login form template."
|
|
1143 |
msgstr ""
|
1144 |
|
1145 |
#: includes/admin/settings/class-ur-settings-general.php:383
|
1146 |
-
#: includes/functions-ur-core.php:
|
1147 |
msgid "Default"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
#: includes/admin/settings/class-ur-settings-general.php:384
|
1151 |
-
#: includes/functions-ur-core.php:
|
1152 |
msgid "Bordered"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
#: includes/admin/settings/class-ur-settings-general.php:385
|
1156 |
-
#: includes/functions-ur-core.php:
|
1157 |
msgid "Flat"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
#: includes/admin/settings/class-ur-settings-general.php:386
|
1161 |
-
#: includes/functions-ur-core.php:
|
1162 |
msgid "Rounded"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
#: includes/admin/settings/class-ur-settings-general.php:387
|
1166 |
-
#: includes/functions-ur-core.php:
|
1167 |
msgid "Rounded Edge"
|
1168 |
msgstr ""
|
1169 |
|
@@ -1254,7 +1273,7 @@ msgid "This option lets you enter the label to registration url in login form."
|
|
1254 |
msgstr ""
|
1255 |
|
1256 |
#: includes/admin/settings/class-ur-settings-general.php:475
|
1257 |
-
#: templates/myaccount/form-login.php:
|
1258 |
msgid "Not a member yet? Register now."
|
1259 |
msgstr ""
|
1260 |
|
@@ -1287,7 +1306,7 @@ msgid "Labels"
|
|
1287 |
msgstr ""
|
1288 |
|
1289 |
#: includes/admin/settings/class-ur-settings-general.php:507
|
1290 |
-
#: includes/functions-ur-core.php:
|
1291 |
msgid "Username or Email"
|
1292 |
msgstr ""
|
1293 |
|
@@ -1302,7 +1321,7 @@ msgstr ""
|
|
1302 |
|
1303 |
#: includes/admin/settings/class-ur-settings-general.php:517
|
1304 |
#: includes/admin/settings/class-ur-settings-general.php:523
|
1305 |
-
#: includes/functions-ur-core.php:
|
1306 |
#: templates/myaccount/form-login.php:41
|
1307 |
msgid "Password"
|
1308 |
msgstr ""
|
@@ -1418,52 +1437,52 @@ msgid "Import/Export"
|
|
1418 |
msgstr ""
|
1419 |
|
1420 |
#: includes/admin/settings/class-ur-settings-import-export.php:42
|
1421 |
-
#: includes/admin/views/html-admin-page-export-users.php:
|
1422 |
-
#: includes/admin/views/html-admin-page-export-users.php:
|
1423 |
msgid "Export Users"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
#: includes/admin/settings/class-ur-settings-import-export.php:43
|
1427 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:
|
1428 |
msgid "Import/Export Forms"
|
1429 |
msgstr ""
|
1430 |
|
1431 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1432 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1433 |
msgid "Integration"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1437 |
msgid "Version"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1441 |
msgid "Select the google reCaptcha version"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1445 |
msgid "Site Key (v2)"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1449 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1450 |
msgid "Get site key from google %1$s reCaptcha %2$s."
|
1451 |
msgstr ""
|
1452 |
|
1453 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1454 |
msgid "Secret Key (v2)"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1458 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1459 |
msgid "Get secret key from google %1$s reCaptcha %2$s."
|
1460 |
msgstr ""
|
1461 |
|
1462 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1463 |
msgid "Site Key (v3)"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#: includes/admin/settings/class-ur-settings-integration.php:
|
1467 |
msgid "Secret Key (v3)"
|
1468 |
msgstr ""
|
1469 |
|
@@ -1506,7 +1525,7 @@ msgstr ""
|
|
1506 |
msgid "Deactivate the license of User Registration plugin"
|
1507 |
msgstr ""
|
1508 |
|
1509 |
-
#: includes/admin/settings/class-ur-settings-license.php:
|
1510 |
msgid "Your license has already been activated. Enjoy using <strong>User Registration</strong>."
|
1511 |
msgstr ""
|
1512 |
|
@@ -1862,210 +1881,203 @@ msgid ""
|
|
1862 |
"Thank You!"
|
1863 |
msgstr ""
|
1864 |
|
1865 |
-
#: includes/admin/updater/class-ur-addon-updater.php:
|
1866 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
|
1867 |
msgstr ""
|
1868 |
|
1869 |
-
#: includes/admin/updater/class-ur-addon-updater.php:
|
1870 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s."
|
1871 |
msgstr ""
|
1872 |
|
1873 |
-
#: includes/admin/updater/class-ur-addon-updater.php:
|
1874 |
msgid "You do not have permission to install plugin updates"
|
1875 |
msgstr ""
|
1876 |
|
1877 |
-
#: includes/admin/updater/class-ur-addon-updater.php:
|
1878 |
msgid "Error"
|
1879 |
msgstr ""
|
1880 |
|
1881 |
-
#: includes/admin/views/html-admin-page-addons.php:
|
1882 |
-
msgid "
|
1883 |
msgstr ""
|
1884 |
|
1885 |
-
#: includes/admin/views/html-admin-page-addons.php:
|
1886 |
-
msgid "
|
1887 |
msgstr ""
|
1888 |
|
1889 |
-
#: includes/admin/views/html-admin-page-addons.php:
|
1890 |
-
msgid "
|
1891 |
msgstr ""
|
1892 |
|
1893 |
-
|
1894 |
-
|
|
|
1895 |
msgstr ""
|
1896 |
|
1897 |
-
#: includes/admin/views/html-admin-page-export-users.php:
|
1898 |
-
msgid "
|
1899 |
msgstr ""
|
1900 |
|
1901 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1902 |
msgid "Copy Shortcode!"
|
1903 |
msgstr ""
|
1904 |
|
1905 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1906 |
msgid "Copied!"
|
1907 |
msgstr ""
|
1908 |
|
1909 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1910 |
msgid "Fullscreen"
|
1911 |
msgstr ""
|
1912 |
|
1913 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1914 |
msgid "Preview Form"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1918 |
msgid "Fields"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1922 |
msgid "Field Options"
|
1923 |
msgstr ""
|
1924 |
|
1925 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1926 |
msgid "Form Setting"
|
1927 |
msgstr ""
|
1928 |
|
1929 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1930 |
msgid "Default User Fields"
|
1931 |
msgstr ""
|
1932 |
|
1933 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1934 |
msgid "Extra Fields"
|
1935 |
msgstr ""
|
1936 |
|
1937 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1938 |
msgid "Get Support"
|
1939 |
msgstr ""
|
1940 |
|
1941 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1942 |
msgid "Create Login Form"
|
1943 |
msgstr ""
|
1944 |
|
1945 |
-
#: includes/admin/views/html-admin-page-forms.php:
|
1946 |
msgid "Documentation"
|
1947 |
msgstr ""
|
1948 |
|
1949 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:
|
1950 |
msgid "EXPORT FORMS WITH SETTINGS"
|
1951 |
msgstr ""
|
1952 |
|
1953 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:
|
1954 |
-
msgid "Export your forms along with their settings as <strong>JSON</strong> file."
|
1955 |
-
msgstr ""
|
1956 |
-
|
1957 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:36
|
1958 |
msgid "Export Forms"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:
|
1962 |
msgid "IMPORT FORMS WITH SETTINGS"
|
1963 |
msgstr ""
|
1964 |
|
1965 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:
|
1966 |
-
msgid "Import your forms along with their settings from <strong>JSON</strong> file."
|
1967 |
-
msgstr ""
|
1968 |
-
|
1969 |
-
#: includes/admin/views/html-admin-page-import-export-forms.php:58
|
1970 |
msgid "Import Forms"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
-
#: includes/admin/views/html-admin-page-status-logs.php:
|
1974 |
msgid "Delete log"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
-
#: includes/admin/views/html-admin-page-status-logs.php:
|
1978 |
msgid "View"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
-
#: includes/admin/views/html-admin-page-status-logs.php:
|
1982 |
msgid "There are currently no logs to view."
|
1983 |
msgstr ""
|
1984 |
|
1985 |
-
#: includes/admin/views/html-admin-page-status.php:
|
1986 |
msgid "Logs"
|
1987 |
msgstr ""
|
1988 |
|
1989 |
-
#: includes/admin/views/html-admin-settings.php:
|
1990 |
msgid "Save Changes"
|
1991 |
msgstr ""
|
1992 |
|
1993 |
-
#: includes/admin/views/html-license-form.php:
|
1994 |
msgid "License:"
|
1995 |
msgstr ""
|
1996 |
|
1997 |
-
#: includes/admin/views/html-license-form.php:
|
|
|
|
|
|
|
|
|
1998 |
msgid "Enter your license key and hit return. A valid key is required for updates."
|
1999 |
msgstr ""
|
2000 |
|
2001 |
-
#: includes/admin/views/html-notice-custom.php:
|
2002 |
-
#: includes/admin/views/html-notice-registration.php:
|
2003 |
-
#: includes/admin/views/html-notice-updated.php:
|
2004 |
msgid "Dismiss"
|
2005 |
msgstr ""
|
2006 |
|
2007 |
-
#: includes/admin/views/html-notice-deactivation.php:
|
2008 |
msgid "Before we deactivate User Registration, would you care to <a href=\"%1$s\" target=\"_blank\">let us know why</a> so we can improve it for you? <a href=\"%2$s\">No, deactivate now</a>."
|
2009 |
msgstr ""
|
2010 |
|
2011 |
-
#: includes/admin/views/html-notice-install.php:
|
2012 |
msgid "<strong>Welcome to User Registration</strong> – You‘re almost ready to create registration :)"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
-
#: includes/admin/views/html-notice-install.php:
|
2016 |
msgid "Install User Registration Pages"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
-
#: includes/admin/views/html-notice-install.php:
|
2020 |
msgid "Skip setup"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
-
#: includes/admin/views/html-notice-key-activated.php:
|
2024 |
msgid "Your licence for <strong>%s</strong> has been activated. Thanks!"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
-
#: includes/admin/views/html-notice-key-deactivated.php:
|
2028 |
msgid "Your licence for <strong>%s</strong> has been deactivated."
|
2029 |
msgstr ""
|
2030 |
|
2031 |
-
#: includes/admin/views/html-notice-key-unvalidated.php:
|
2032 |
msgid "Hide notice"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
-
#: includes/admin/views/html-notice-
|
2036 |
-
msgid "%1$sPlease enter your license key%2$s in the plugin list below to get updates for <strong>%3$s</strong> Add-Ons."
|
2037 |
-
msgstr ""
|
2038 |
-
|
2039 |
-
#: includes/admin/views/html-notice-registration.php:14
|
2040 |
msgid "To allow users to register for your website via User registration, you must first enable user registration. Go to %1$sSettings > General%2$s tab, and under Membership make sure to check <strong>Anyone can register</strong>."
|
2041 |
msgstr ""
|
2042 |
|
2043 |
-
#: includes/admin/views/html-notice-update.php:
|
2044 |
-
#: includes/admin/views/html-notice-updating.php:
|
2045 |
msgid "User Registration Data Update"
|
2046 |
msgstr ""
|
2047 |
|
2048 |
-
#: includes/admin/views/html-notice-update.php:
|
2049 |
msgid "We need to update your site's database to the latest version."
|
2050 |
msgstr ""
|
2051 |
|
2052 |
-
#: includes/admin/views/html-notice-update.php:
|
2053 |
msgid "Run the updater"
|
2054 |
msgstr ""
|
2055 |
|
2056 |
-
#: includes/admin/views/html-notice-update.php:
|
2057 |
msgid "It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?"
|
2058 |
msgstr ""
|
2059 |
|
2060 |
-
#: includes/admin/views/html-notice-updated.php:
|
2061 |
msgid "User Registration data update complete. Thank you for updating to the latest version!"
|
2062 |
msgstr ""
|
2063 |
|
2064 |
-
#: includes/admin/views/html-notice-updating.php:
|
2065 |
msgid "Your database is being updated in the background."
|
2066 |
msgstr ""
|
2067 |
|
2068 |
-
#: includes/admin/views/html-notice-updating.php:
|
2069 |
msgid "Taking a while? Click here to run it now."
|
2070 |
msgstr ""
|
2071 |
|
@@ -2077,33 +2089,33 @@ msgstr ""
|
|
2077 |
#: includes/class-ur-ajax.php:120
|
2078 |
#: includes/class-ur-ajax.php:176
|
2079 |
#: includes/class-ur-ajax.php:340
|
2080 |
-
#: includes/class-ur-ajax.php:
|
2081 |
msgid "Nonce error, please reload."
|
2082 |
msgstr ""
|
2083 |
|
2084 |
#: includes/class-ur-ajax.php:104
|
2085 |
-
#: includes/class-ur-ajax.php:
|
2086 |
#: includes/class-ur-form-handler.php:388
|
2087 |
msgid "Error on google reCaptcha. Contact your site administrator."
|
2088 |
msgstr ""
|
2089 |
|
2090 |
#: includes/class-ur-ajax.php:132
|
2091 |
-
#: includes/class-ur-shortcodes.php:
|
2092 |
msgid "Only administrators can add new users."
|
2093 |
msgstr ""
|
2094 |
|
2095 |
#: includes/class-ur-ajax.php:150
|
2096 |
-
#: includes/class-ur-shortcodes.php:
|
2097 |
msgid "You are currently logged in as %1$1s. %2$2s"
|
2098 |
msgstr ""
|
2099 |
|
2100 |
#: includes/class-ur-ajax.php:150
|
2101 |
-
#: includes/class-ur-shortcodes.php:
|
2102 |
msgid "Log out of this account."
|
2103 |
msgstr ""
|
2104 |
|
2105 |
#: includes/class-ur-ajax.php:150
|
2106 |
-
#: includes/class-ur-shortcodes.php:
|
2107 |
#: includes/functions-ur-account.php:111
|
2108 |
msgid "Logout"
|
2109 |
msgstr ""
|
@@ -2128,20 +2140,20 @@ msgstr ""
|
|
2128 |
msgid "Something went wrong while uploading, please contact your site administrator."
|
2129 |
msgstr ""
|
2130 |
|
2131 |
-
#: includes/class-ur-ajax.php:
|
2132 |
#: includes/class-ur-form-handler.php:354
|
2133 |
msgid "Username is required."
|
2134 |
msgstr ""
|
2135 |
|
2136 |
-
#: includes/class-ur-ajax.php:
|
2137 |
#: includes/class-ur-form-handler.php:357
|
2138 |
msgid "A user could not be found with this email address."
|
2139 |
msgstr ""
|
2140 |
|
2141 |
-
#: includes/class-ur-ajax.php:
|
2142 |
-
#: includes/class-ur-ajax.php:
|
2143 |
-
#: includes/class-ur-ajax.php:
|
2144 |
-
#: includes/class-ur-ajax.php:
|
2145 |
#: includes/class-ur-form-handler.php:441
|
2146 |
#: includes/class-ur-form-handler.php:444
|
2147 |
#: includes/class-ur-form-handler.php:450
|
@@ -2149,28 +2161,28 @@ msgstr ""
|
|
2149 |
msgid "ERROR"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: includes/class-ur-ajax.php:
|
2153 |
msgid "Test email from %s"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
-
#: includes/class-ur-ajax.php:
|
2157 |
msgid "Test email was sent successfully! Please check your inbox to make sure it is delivered."
|
2158 |
msgstr ""
|
2159 |
|
2160 |
-
#: includes/class-ur-ajax.php:
|
2161 |
msgid "Test email was unsuccessful! Something went wrong."
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: includes/class-ur-ajax.php:
|
2165 |
-
#: includes/class-ur-ajax.php:
|
2166 |
msgid "post data not set"
|
2167 |
msgstr ""
|
2168 |
|
2169 |
-
#: includes/class-ur-ajax.php:
|
2170 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
-
#: includes/class-ur-ajax.php:
|
2174 |
msgid "Could not save form, "
|
2175 |
msgstr ""
|
2176 |
|
@@ -2255,7 +2267,7 @@ msgid "Email not verified! Verify your email by clicking on the link sent to you
|
|
2255 |
msgstr ""
|
2256 |
|
2257 |
#: includes/class-ur-emailer.php:589
|
2258 |
-
#: includes/functions-ur-core.php:
|
2259 |
msgid "Chosen Password"
|
2260 |
msgstr ""
|
2261 |
|
@@ -2276,7 +2288,7 @@ msgid "Form"
|
|
2276 |
msgstr ""
|
2277 |
|
2278 |
#: includes/class-ur-form-handler.php:184
|
2279 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
2280 |
msgid "%s is a required field."
|
2281 |
msgstr ""
|
2282 |
|
@@ -2390,22 +2402,22 @@ msgid "Please enter a stronger password."
|
|
2390 |
msgstr ""
|
2391 |
|
2392 |
#: includes/class-ur-frontend-scripts.php:395
|
2393 |
-
#: includes/functions-ur-core.php:
|
2394 |
msgid "Very Weak"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
#: includes/class-ur-frontend-scripts.php:396
|
2398 |
-
#: includes/functions-ur-core.php:
|
2399 |
msgid "Weak"
|
2400 |
msgstr ""
|
2401 |
|
2402 |
#: includes/class-ur-frontend-scripts.php:397
|
2403 |
-
#: includes/functions-ur-core.php:
|
2404 |
msgid "Medium"
|
2405 |
msgstr ""
|
2406 |
|
2407 |
#: includes/class-ur-frontend-scripts.php:398
|
2408 |
-
#: includes/functions-ur-core.php:
|
2409 |
msgid "Strong"
|
2410 |
msgstr ""
|
2411 |
|
@@ -2526,7 +2538,7 @@ msgstr ""
|
|
2526 |
|
2527 |
#: includes/class-ur-plugin-updater.php:534
|
2528 |
#: includes/class-ur-plugin-updater.php:540
|
2529 |
-
#: includes/class-ur-plugin-updater.php:
|
2530 |
#: templates/myaccount/dashboard.php:61
|
2531 |
msgid "%1$s"
|
2532 |
msgstr ""
|
@@ -2563,23 +2575,23 @@ msgstr ""
|
|
2563 |
msgid "Activate License Key"
|
2564 |
msgstr ""
|
2565 |
|
2566 |
-
#: includes/class-ur-plugin-updater.php:
|
2567 |
msgid "<strong> Update all addons of User Registration!!</strong>"
|
2568 |
msgstr ""
|
2569 |
|
2570 |
-
#: includes/class-ur-plugin-updater.php:
|
2571 |
msgid "It seems some of the <strong>User Registration</strong> Addons are outdated. Please update the outdated addons to the latest version for the <strong>User Registration Pro</strong> plugin to work correctly.<br>"
|
2572 |
msgstr ""
|
2573 |
|
2574 |
-
#: includes/class-ur-plugin-updater.php:
|
2575 |
msgid "<strong> Upgrade To PRO!!</strong>"
|
2576 |
msgstr ""
|
2577 |
|
2578 |
-
#: includes/class-ur-plugin-updater.php:
|
2579 |
msgid "It seems you are using some premium addons of User Registration plugin. <br>"
|
2580 |
msgstr ""
|
2581 |
|
2582 |
-
#: includes/class-ur-plugin-updater.php:
|
2583 |
msgid "User Registration Pro has been installed successfully."
|
2584 |
msgstr ""
|
2585 |
|
@@ -2788,7 +2800,8 @@ msgstr ""
|
|
2788 |
msgid "Profile Details"
|
2789 |
msgstr ""
|
2790 |
|
2791 |
-
|
|
|
2792 |
msgid "Please Login to edit profile. <a href=\"%s\">Login Here?</a>"
|
2793 |
msgstr ""
|
2794 |
|
@@ -2814,28 +2827,28 @@ msgstr ""
|
|
2814 |
|
2815 |
#: includes/form/class-ur-form-field-checkbox.php:35
|
2816 |
#: includes/form/class-ur-form-field-checkbox.php:40
|
2817 |
-
#: includes/functions-ur-core.php:
|
2818 |
msgid "Checkbox"
|
2819 |
msgstr ""
|
2820 |
|
2821 |
#: includes/form/class-ur-form-field-checkbox.php:43
|
2822 |
#: includes/form/class-ur-form-field-radio.php:46
|
2823 |
#: includes/form/class-ur-form-field-select.php:43
|
2824 |
-
#: includes/functions-ur-core.php:
|
2825 |
msgid "First Choice"
|
2826 |
msgstr ""
|
2827 |
|
2828 |
#: includes/form/class-ur-form-field-checkbox.php:44
|
2829 |
#: includes/form/class-ur-form-field-radio.php:47
|
2830 |
#: includes/form/class-ur-form-field-select.php:44
|
2831 |
-
#: includes/functions-ur-core.php:
|
2832 |
msgid "Second Choice"
|
2833 |
msgstr ""
|
2834 |
|
2835 |
#: includes/form/class-ur-form-field-checkbox.php:45
|
2836 |
#: includes/form/class-ur-form-field-radio.php:48
|
2837 |
#: includes/form/class-ur-form-field-select.php:45
|
2838 |
-
#: includes/functions-ur-core.php:
|
2839 |
msgid "Third Choice"
|
2840 |
msgstr ""
|
2841 |
|
@@ -3837,7 +3850,7 @@ msgstr ""
|
|
3837 |
|
3838 |
#: includes/form/class-ur-form-field-country.php:347
|
3839 |
#: includes/form/class-ur-form-field-country.php:352
|
3840 |
-
#: includes/functions-ur-core.php:
|
3841 |
msgid "Country"
|
3842 |
msgstr ""
|
3843 |
|
@@ -3848,7 +3861,7 @@ msgstr ""
|
|
3848 |
|
3849 |
#: includes/form/class-ur-form-field-display-name.php:35
|
3850 |
#: includes/form/class-ur-form-field-display-name.php:40
|
3851 |
-
#: includes/functions-ur-core.php:
|
3852 |
msgid "Display Name"
|
3853 |
msgstr ""
|
3854 |
|
@@ -3857,13 +3870,13 @@ msgid "Secondary Email "
|
|
3857 |
msgstr ""
|
3858 |
|
3859 |
#: includes/form/class-ur-form-field-email.php:40
|
3860 |
-
#: includes/functions-ur-core.php:
|
3861 |
msgid "Secondary Email"
|
3862 |
msgstr ""
|
3863 |
|
3864 |
#: includes/form/class-ur-form-field-first-name.php:35
|
3865 |
#: includes/form/class-ur-form-field-first-name.php:40
|
3866 |
-
#: includes/functions-ur-core.php:
|
3867 |
msgid "First Name"
|
3868 |
msgstr ""
|
3869 |
|
@@ -3872,25 +3885,25 @@ msgid "Last Name "
|
|
3872 |
msgstr ""
|
3873 |
|
3874 |
#: includes/form/class-ur-form-field-last-name.php:40
|
3875 |
-
#: includes/functions-ur-core.php:
|
3876 |
msgid "Last Name"
|
3877 |
msgstr ""
|
3878 |
|
3879 |
#: includes/form/class-ur-form-field-nickname.php:35
|
3880 |
#: includes/form/class-ur-form-field-nickname.php:40
|
3881 |
-
#: includes/functions-ur-core.php:
|
3882 |
msgid "Nickname"
|
3883 |
msgstr ""
|
3884 |
|
3885 |
#: includes/form/class-ur-form-field-privacy-policy.php:35
|
3886 |
#: includes/form/class-ur-form-field-privacy-policy.php:40
|
3887 |
-
#: includes/functions-ur-core.php:
|
3888 |
msgid "Privacy Policy"
|
3889 |
msgstr ""
|
3890 |
|
3891 |
#: includes/form/class-ur-form-field-radio.php:38
|
3892 |
#: includes/form/class-ur-form-field-radio.php:43
|
3893 |
-
#: includes/functions-ur-core.php:
|
3894 |
msgid "Radio"
|
3895 |
msgstr ""
|
3896 |
|
@@ -3901,7 +3914,7 @@ msgstr ""
|
|
3901 |
|
3902 |
#: includes/form/class-ur-form-field-textarea.php:35
|
3903 |
#: includes/form/class-ur-form-field-textarea.php:40
|
3904 |
-
#: includes/functions-ur-core.php:
|
3905 |
msgid "Textarea"
|
3906 |
msgstr ""
|
3907 |
|
@@ -3918,7 +3931,7 @@ msgid "Email "
|
|
3918 |
msgstr ""
|
3919 |
|
3920 |
#: includes/form/class-ur-form-field-user-email.php:40
|
3921 |
-
#: includes/functions-ur-core.php:
|
3922 |
msgid "User Email"
|
3923 |
msgstr ""
|
3924 |
|
@@ -3928,7 +3941,7 @@ msgstr ""
|
|
3928 |
|
3929 |
#: includes/form/class-ur-form-field-user-login.php:35
|
3930 |
#: includes/form/class-ur-form-field-user-login.php:40
|
3931 |
-
#: includes/functions-ur-core.php:
|
3932 |
msgid "Username"
|
3933 |
msgstr ""
|
3934 |
|
@@ -4038,15 +4051,15 @@ msgstr ""
|
|
4038 |
|
4039 |
#: includes/form/settings/class-ur-setting-checkbox.php:63
|
4040 |
#: includes/form/settings/class-ur-setting-user_login.php:63
|
4041 |
-
#: includes/functions-ur-core.php:
|
4042 |
-
#: includes/functions-ur-core.php:
|
4043 |
msgid "No"
|
4044 |
msgstr ""
|
4045 |
|
4046 |
#: includes/form/settings/class-ur-setting-checkbox.php:64
|
4047 |
#: includes/form/settings/class-ur-setting-user_login.php:64
|
4048 |
-
#: includes/functions-ur-core.php:
|
4049 |
-
#: includes/functions-ur-core.php:
|
4050 |
msgid "Yes"
|
4051 |
msgstr ""
|
4052 |
|
@@ -4195,35 +4208,35 @@ msgstr ""
|
|
4195 |
msgid "Check this option to validate the Username for Special Character"
|
4196 |
msgstr ""
|
4197 |
|
4198 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4199 |
msgid "Something went wrong! please try again"
|
4200 |
msgstr ""
|
4201 |
|
4202 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4203 |
msgid "Duplicate field key in form, please contact site administrator."
|
4204 |
msgstr ""
|
4205 |
|
4206 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4207 |
msgid "Required form field not found."
|
4208 |
msgstr ""
|
4209 |
|
4210 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4211 |
msgid "Empty confirm password"
|
4212 |
msgstr ""
|
4213 |
|
4214 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4215 |
msgid "Password and confirm password not matched"
|
4216 |
msgstr ""
|
4217 |
|
4218 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4219 |
msgid "Empty confirm email"
|
4220 |
msgstr ""
|
4221 |
|
4222 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4223 |
msgid "Email and confirm email not matched"
|
4224 |
msgstr ""
|
4225 |
|
4226 |
-
#: includes/frontend/class-ur-frontend-form-handler.php:
|
4227 |
msgid "Password should not match with Username or Email address."
|
4228 |
msgstr ""
|
4229 |
|
@@ -4244,220 +4257,220 @@ msgstr ""
|
|
4244 |
msgid "Dashboard"
|
4245 |
msgstr ""
|
4246 |
|
4247 |
-
#: includes/functions-ur-core.php:
|
4248 |
msgid "Username can not be changed."
|
4249 |
msgstr ""
|
4250 |
|
4251 |
-
#: includes/functions-ur-core.php:
|
4252 |
msgid "Passowrd can not be changed."
|
4253 |
msgstr ""
|
4254 |
|
4255 |
-
#: includes/functions-ur-core.php:
|
4256 |
msgid "Confirm password can not be changed."
|
4257 |
msgstr ""
|
4258 |
|
4259 |
-
#: includes/functions-ur-core.php:
|
4260 |
msgid "Confirm email can not be changed."
|
4261 |
msgstr ""
|
4262 |
|
4263 |
-
#: includes/functions-ur-core.php:
|
4264 |
msgid "User Confirm Email"
|
4265 |
msgstr ""
|
4266 |
|
4267 |
-
#: includes/functions-ur-core.php:
|
4268 |
msgid "User Pass"
|
4269 |
msgstr ""
|
4270 |
|
4271 |
-
#: includes/functions-ur-core.php:
|
4272 |
msgid "User Confirm Password"
|
4273 |
msgstr ""
|
4274 |
|
4275 |
-
#: includes/functions-ur-core.php:
|
4276 |
msgid "User Login"
|
4277 |
msgstr ""
|
4278 |
|
4279 |
-
#: includes/functions-ur-core.php:
|
4280 |
msgid "User URL"
|
4281 |
msgstr ""
|
4282 |
|
4283 |
-
#: includes/functions-ur-core.php:
|
4284 |
-
#: includes/functions-ur-core.php:
|
4285 |
-
#: includes/functions-ur-core.php:
|
4286 |
msgid "Description"
|
4287 |
msgstr ""
|
4288 |
|
4289 |
-
#: includes/functions-ur-core.php:
|
4290 |
msgid "Text"
|
4291 |
msgstr ""
|
4292 |
|
4293 |
-
#: includes/functions-ur-core.php:
|
4294 |
-
#: includes/functions-ur-core.php:
|
4295 |
msgid "Label"
|
4296 |
msgstr ""
|
4297 |
|
4298 |
-
#: includes/functions-ur-core.php:
|
4299 |
msgid "Enter text for the form field label. This is recommended and can be hidden in the Advanced Settings."
|
4300 |
msgstr ""
|
4301 |
|
4302 |
-
#: includes/functions-ur-core.php:
|
4303 |
msgid "Enter text for the form field description."
|
4304 |
msgstr ""
|
4305 |
|
4306 |
-
#: includes/functions-ur-core.php:
|
4307 |
-
#: includes/functions-ur-core.php:
|
4308 |
msgid "Field Name"
|
4309 |
msgstr ""
|
4310 |
|
4311 |
-
#: includes/functions-ur-core.php:
|
4312 |
msgid "Unique key for the field."
|
4313 |
msgstr ""
|
4314 |
|
4315 |
-
#: includes/functions-ur-core.php:
|
4316 |
-
#: includes/functions-ur-core.php:
|
4317 |
msgid "Placeholder"
|
4318 |
msgstr ""
|
4319 |
|
4320 |
-
#: includes/functions-ur-core.php:
|
4321 |
msgid "Enter placeholder for the field."
|
4322 |
msgstr ""
|
4323 |
|
4324 |
-
#: includes/functions-ur-core.php:
|
4325 |
msgid "Check this option to mark the field required. A form will not submit unless all required fields are provided."
|
4326 |
msgstr ""
|
4327 |
|
4328 |
-
#: includes/functions-ur-core.php:
|
4329 |
msgid "Hide Label"
|
4330 |
msgstr ""
|
4331 |
|
4332 |
-
#: includes/functions-ur-core.php:
|
4333 |
msgid "Check this option to hide the label of this field."
|
4334 |
msgstr ""
|
4335 |
|
4336 |
-
#: includes/functions-ur-core.php:
|
4337 |
msgid "Options"
|
4338 |
msgstr ""
|
4339 |
|
4340 |
-
#: includes/functions-ur-core.php:
|
4341 |
msgid "Login method that should be used by the users registered through this form."
|
4342 |
msgstr ""
|
4343 |
|
4344 |
-
#: includes/functions-ur-core.php:
|
4345 |
msgid "Default User Role"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
-
#: includes/functions-ur-core.php:
|
4349 |
msgid "Default role for the users registered through this form."
|
4350 |
msgstr ""
|
4351 |
|
4352 |
-
#: includes/functions-ur-core.php:
|
4353 |
msgid "Enable Strong Password"
|
4354 |
msgstr ""
|
4355 |
|
4356 |
-
#: includes/functions-ur-core.php:
|
4357 |
msgid "Make strong password compulsary."
|
4358 |
msgstr ""
|
4359 |
|
4360 |
-
#: includes/functions-ur-core.php:
|
4361 |
msgid "Minimum Password Strength"
|
4362 |
msgstr ""
|
4363 |
|
4364 |
-
#: includes/functions-ur-core.php:
|
4365 |
msgid "Set minimum required password strength."
|
4366 |
msgstr ""
|
4367 |
|
4368 |
-
#: includes/functions-ur-core.php:
|
4369 |
msgid "Redirect URL"
|
4370 |
msgstr ""
|
4371 |
|
4372 |
-
#: includes/functions-ur-core.php:
|
4373 |
msgid "This option lets you enter redirect path after successful user registration."
|
4374 |
msgstr ""
|
4375 |
|
4376 |
-
#: includes/functions-ur-core.php:
|
4377 |
msgid "URL to redirect to after registration."
|
4378 |
msgstr ""
|
4379 |
|
4380 |
-
#: includes/functions-ur-core.php:
|
4381 |
msgid "Form Submit Button Custom Class"
|
4382 |
msgstr ""
|
4383 |
|
4384 |
-
#: includes/functions-ur-core.php:
|
4385 |
msgid "Custom css class to embed in the submit button. You can enter multiple classes seperated with space."
|
4386 |
msgstr ""
|
4387 |
|
4388 |
-
#: includes/functions-ur-core.php:
|
4389 |
msgid "Form Submit Button Label"
|
4390 |
msgstr ""
|
4391 |
|
4392 |
-
#: includes/functions-ur-core.php:
|
4393 |
msgid "Set label for the submit button."
|
4394 |
msgstr ""
|
4395 |
|
4396 |
-
#: includes/functions-ur-core.php:
|
4397 |
msgid "Success message position"
|
4398 |
msgstr ""
|
4399 |
|
4400 |
-
#: includes/functions-ur-core.php:
|
4401 |
msgid "Top"
|
4402 |
msgstr ""
|
4403 |
|
4404 |
-
#: includes/functions-ur-core.php:
|
4405 |
msgid "Bottom"
|
4406 |
msgstr ""
|
4407 |
|
4408 |
-
#: includes/functions-ur-core.php:
|
4409 |
msgid "Display success message either at the top or bottom after successful registration."
|
4410 |
msgstr ""
|
4411 |
|
4412 |
-
#: includes/functions-ur-core.php:
|
4413 |
msgid "Enable %1$s %2$s reCaptcha %3$s Support"
|
4414 |
msgstr ""
|
4415 |
|
4416 |
-
#: includes/functions-ur-core.php:
|
4417 |
msgid "Enable reCaptcha for strong security from spams and bots."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
-
#: includes/functions-ur-core.php:
|
4421 |
msgid "Choose form template to use."
|
4422 |
msgstr ""
|
4423 |
|
4424 |
-
#: includes/functions-ur-core.php:
|
4425 |
msgid "Custom CSS class"
|
4426 |
msgstr ""
|
4427 |
|
4428 |
-
#: includes/functions-ur-core.php:
|
4429 |
msgid "Custom css class to embed in the registration form. You can enter multiple classes seperated with space."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
-
#: includes/functions-ur-core.php:
|
4433 |
msgid "Auto login after registration"
|
4434 |
msgstr ""
|
4435 |
|
4436 |
-
#: includes/functions-ur-core.php:
|
4437 |
msgid "The class <code>%s</code> provided by user_registration_logging_class filter must implement <code>UR_Logger_Interface</code>."
|
4438 |
msgstr ""
|
4439 |
|
4440 |
-
#: includes/functions-ur-core.php:
|
4441 |
msgid "Disable emails"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
-
#: includes/functions-ur-core.php:
|
4445 |
msgid "Disable all emails sent after registration."
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#: includes/functions-ur-core.php:
|
4449 |
msgid "Use conditional logic"
|
4450 |
msgstr ""
|
4451 |
|
4452 |
-
#: includes/functions-ur-core.php:
|
4453 |
msgid "Conditional Rules"
|
4454 |
msgstr ""
|
4455 |
|
4456 |
-
#: includes/functions-ur-core.php:
|
4457 |
msgid "Send data only if the following matches."
|
4458 |
msgstr ""
|
4459 |
|
4460 |
-
#: includes/functions-ur-core.php:
|
4461 |
msgid "Checked"
|
4462 |
msgstr ""
|
4463 |
|
@@ -4471,11 +4484,11 @@ msgstr ""
|
|
4471 |
msgid "This function should not be called before user_registration_init."
|
4472 |
msgstr ""
|
4473 |
|
4474 |
-
#: includes/functions-ur-template.php:
|
4475 |
msgid "required"
|
4476 |
msgstr ""
|
4477 |
|
4478 |
-
#: includes/functions-ur-template.php:
|
4479 |
msgid "Choose an option"
|
4480 |
msgstr ""
|
4481 |
|
@@ -4487,7 +4500,8 @@ msgstr ""
|
|
4487 |
msgid "This method should not be called before plugins_loaded."
|
4488 |
msgstr ""
|
4489 |
|
4490 |
-
|
|
|
4491 |
msgid "You are already logged in. <a href=\"%s\">Log out?</a>"
|
4492 |
msgstr ""
|
4493 |
|
@@ -4578,8 +4592,8 @@ msgid "Confirm new password"
|
|
4578 |
msgstr ""
|
4579 |
|
4580 |
#: templates/myaccount/form-edit-password.php:82
|
4581 |
-
#: templates/myaccount/form-edit-profile.php:
|
4582 |
-
#: templates/myaccount/form-edit-profile.php:
|
4583 |
msgid "Save changes"
|
4584 |
msgstr ""
|
4585 |
|
@@ -4599,6 +4613,10 @@ msgstr ""
|
|
4599 |
msgid "Remove"
|
4600 |
msgstr ""
|
4601 |
|
|
|
|
|
|
|
|
|
4602 |
#: templates/myaccount/form-edit-profile.php:104
|
4603 |
msgid "You can change your profile picture on"
|
4604 |
msgstr ""
|
@@ -4607,7 +4625,7 @@ msgstr ""
|
|
4607 |
msgid "Gravatar"
|
4608 |
msgstr ""
|
4609 |
|
4610 |
-
#: templates/myaccount/form-login.php:
|
4611 |
msgid "Show password"
|
4612 |
msgstr ""
|
4613 |
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: User Registration 2.1.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-12-31T11:52:17+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: user-registration\n"
|
65 |
|
66 |
#: includes/abstracts/abstract-ur-list-table.php:232
|
67 |
#: includes/abstracts/abstract-ur-list-table.php:272
|
68 |
+
#: includes/admin/class-ur-admin-export-users.php:51
|
69 |
#: includes/admin/class-ur-admin-import-export-forms.php:51
|
70 |
+
#: includes/admin/class-ur-admin-notices.php:119
|
71 |
#: includes/admin/class-ur-admin-settings.php:69
|
72 |
#: includes/admin/class-ur-admin-status.php:169
|
73 |
#: includes/class-ur-email-confirmation.php:246
|
107 |
msgid "Y/m/d"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/admin/class-ur-admin-addons.php:118
|
111 |
+
msgid "Could not verify nonce"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: includes/admin/class-ur-admin-assets.php:191
|
115 |
msgid "Upload Profile Picture"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/admin/class-ur-admin-assets.php:192
|
119 |
msgid "Select Image"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/admin/class-ur-admin-assets.php:215
|
123 |
msgctxt "enhanced select"
|
124 |
msgid "No matches found"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: includes/admin/class-ur-admin-assets.php:216
|
128 |
msgctxt "enhanced select"
|
129 |
msgid "Loading failed"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: includes/admin/class-ur-admin-assets.php:217
|
133 |
msgctxt "enhanced select"
|
134 |
msgid "Please enter 1 or more characters"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/admin/class-ur-admin-assets.php:218
|
138 |
msgctxt "enhanced select"
|
139 |
msgid "Please enter %qty% or more characters"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/admin/class-ur-admin-assets.php:219
|
143 |
msgctxt "enhanced select"
|
144 |
msgid "Please delete 1 character"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/admin/class-ur-admin-assets.php:220
|
148 |
msgctxt "enhanced select"
|
149 |
msgid "Please delete %qty% characters"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/admin/class-ur-admin-assets.php:221
|
153 |
msgctxt "enhanced select"
|
154 |
msgid "You can only select 1 item"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/admin/class-ur-admin-assets.php:222
|
158 |
msgctxt "enhanced select"
|
159 |
msgid "You can only select %qty% items"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/admin/class-ur-admin-assets.php:223
|
163 |
msgctxt "enhanced select"
|
164 |
msgid "Loading more results…"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/admin/class-ur-admin-assets.php:224
|
168 |
msgctxt "enhanced select"
|
169 |
msgid "Searching…"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/admin/class-ur-admin-assets.php:236
|
173 |
msgid "Could not install."
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/admin/class-ur-admin-assets.php:263
|
177 |
+
#: includes/admin/class-ur-admin-menus.php:418
|
178 |
+
#: includes/admin/class-ur-admin-menus.php:419
|
179 |
+
#: includes/admin/class-ur-admin-menus.php:756
|
180 |
+
#: includes/admin/class-ur-admin-registrations-table-list.php:162
|
181 |
+
msgid "Add New"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: includes/admin/class-ur-admin-assets.php:272
|
185 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:50
|
186 |
+
msgid "No file selected."
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: includes/admin/class-ur-admin-assets.php:284
|
190 |
msgid "Enabled"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/admin/class-ur-admin-assets.php:285
|
194 |
msgid "Disabled"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: includes/admin/class-ur-admin-assets.php:355
|
198 |
msgid "Clone"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: includes/admin/class-ur-admin-assets.php:355
|
202 |
#: includes/admin/class-ur-admin-registrations-table-list.php:107
|
203 |
msgid "Trash"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/admin/class-ur-admin-assets.php:376
|
207 |
msgid "Delete"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/admin/class-ur-admin-assets.php:377
|
211 |
+
#: includes/admin/class-ur-admin-form-modal.php:93
|
212 |
msgid "Cancel"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: includes/admin/class-ur-admin-assets.php:378
|
216 |
msgctxt "user-registration admin"
|
217 |
msgid "User Email"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/admin/class-ur-admin-assets.php:379
|
221 |
msgctxt "user-registration admin"
|
222 |
msgid "User Password"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: includes/admin/class-ur-admin-assets.php:380
|
226 |
msgctxt "user-registration admin"
|
227 |
msgid "Payment"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/admin/class-ur-admin-assets.php:381
|
231 |
msgctxt "user-registration admin"
|
232 |
msgid "Stripe Gateway"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: includes/admin/class-ur-admin-assets.php:382
|
236 |
msgctxt "user registration admin"
|
237 |
msgid "Are you sure want to delete this row?"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/admin/class-ur-admin-assets.php:383
|
241 |
msgctxt "user registration admin"
|
242 |
msgid "Are you sure want to delete this field?"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: includes/admin/class-ur-admin-assets.php:384
|
246 |
msgctxt "user registration admin"
|
247 |
msgid "At least one row is required to create a registration form."
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: includes/admin/class-ur-admin-assets.php:385
|
251 |
msgctxt "user registration admin"
|
252 |
msgid "Cannot delete row"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: includes/admin/class-ur-admin-assets.php:386
|
256 |
msgctxt "user registration admin"
|
257 |
msgid "This field is one time draggable."
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: includes/admin/class-ur-admin-assets.php:387
|
261 |
msgctxt "user registration admin"
|
262 |
msgid "Could not clone this field."
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: includes/admin/class-ur-admin-assets.php:388
|
266 |
msgctxt "user registration admin"
|
267 |
msgid "Form successfully saved."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/admin/class-ur-admin-assets.php:389
|
271 |
msgctxt "user registration admin"
|
272 |
msgid "Success"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: includes/admin/class-ur-admin-assets.php:390
|
276 |
msgctxt "user registration admin"
|
277 |
msgid "Error"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/admin/class-ur-admin-assets.php:391
|
281 |
msgid "Confirm Deletion"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: includes/admin/class-ur-admin-assets.php:392
|
285 |
msgctxt "user registration admin"
|
286 |
msgid "At least one field needs to be selected."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/admin/class-ur-admin-assets.php:393
|
290 |
msgctxt "user registration admin"
|
291 |
msgid "Empty form name."
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: includes/admin/class-ur-admin-assets.php:394
|
295 |
msgctxt "user registration admin"
|
296 |
msgid "Previous save action on going."
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: includes/admin/class-ur-admin-assets.php:395
|
300 |
msgctxt "user registration admin"
|
301 |
msgid "Duplicate field name."
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: includes/admin/class-ur-admin-assets.php:396
|
305 |
msgctxt "user registration admin"
|
306 |
msgid "Empty field label."
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: includes/admin/class-ur-admin-assets.php:397
|
310 |
msgctxt "user registration admin"
|
311 |
msgid "Invalid field name. Please do not use space, empty or special character, you can use underscore."
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/admin/class-ur-admin-assets.php:398
|
315 |
msgctxt "user registration admin"
|
316 |
msgid "Multiple field key "
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: includes/admin/class-ur-admin-assets.php:399
|
320 |
msgctxt "user registration admin"
|
321 |
msgid "field is required."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/admin/class-ur-admin-assets.php:400
|
325 |
msgctxt "user registration admin"
|
326 |
msgid "Drag your first form item here."
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: includes/admin/class-ur-admin-assets.php:401
|
330 |
msgctxt "user registration admin"
|
331 |
msgid "Please select at least one country."
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: includes/admin/class-ur-admin-assets.php:402
|
335 |
msgctxt "user registration admin"
|
336 |
msgid "input size must be greater than zero."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: includes/admin/class-ur-admin-assets.php:403
|
340 |
msgctxt "user registration admin"
|
341 |
msgid "input of min value must be less than max value."
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/admin/class-ur-admin-export-users.php:68
|
345 |
msgid "No users found with this form id."
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: includes/admin/class-ur-admin-export-users.php:123
|
349 |
msgid "User Role"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/admin/class-ur-admin-export-users.php:124
|
353 |
msgid "User Status"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/admin/class-ur-admin-export-users.php:125
|
357 |
msgid "User Registered"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/admin/class-ur-admin-export-users.php:126
|
361 |
msgid "User Registered GMT"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: includes/admin/class-ur-admin-export-users.php:132
|
365 |
msgid "User ID"
|
366 |
msgstr ""
|
367 |
|
373 |
msgid "Add Registration Form"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/admin/class-ur-admin-form-modal.php:67
|
377 |
msgid "Insert Form"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: includes/admin/class-ur-admin-form-modal.php:68
|
381 |
msgid "Close"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/admin/class-ur-admin-form-modal.php:76
|
385 |
msgid "Select a form below to insert"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/admin/class-ur-admin-form-modal.php:85
|
389 |
+
msgid "Whoops, you haven't created a form yet."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/admin/class-ur-admin-form-modal.php:97
|
393 |
msgid "Add Form"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/admin/class-ur-admin-import-export-forms.php:181
|
397 |
msgid "Imported Successfully."
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/admin/class-ur-admin-import-export-forms.php:189
|
401 |
+
#: includes/admin/class-ur-admin-import-export-forms.php:196
|
402 |
msgid "Invalid file content. Please export file from user registration plugin."
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/admin/class-ur-admin-import-export-forms.php:203
|
406 |
msgid "Invalid file format. Only Json File Allowed."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: includes/admin/class-ur-admin-import-export-forms.php:210
|
410 |
msgid "Please select json file to import form data."
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: includes/admin/class-ur-admin-menus.php:384
|
414 |
msgid "User Registration settings"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/admin/class-ur-admin-menus.php:385
|
418 |
#: includes/class-ur-install.php:638
|
419 |
msgid "Settings"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/admin/class-ur-admin-menus.php:401
|
423 |
msgid "User Registration Status"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: includes/admin/class-ur-admin-menus.php:402
|
427 |
#: includes/class-ur-email-confirmation.php:164
|
428 |
msgid "Status"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: includes/admin/class-ur-admin-menus.php:435
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
msgid "User Registration extensions"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: includes/admin/class-ur-admin-menus.php:436
|
436 |
msgid "Extensions"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: includes/admin/class-ur-admin-menus.php:476
|
440 |
msgid "Create Form"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: includes/admin/class-ur-admin-menus.php:478
|
444 |
msgid "Update form"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: includes/admin/class-ur-admin-menus.php:522
|
448 |
msgid "User Registration endpoints"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: includes/admin/class-ur-admin-menus.php:546
|
452 |
#: includes/admin/settings/class-ur-settings-general.php:195
|
453 |
#: includes/class-ur-query.php:78
|
454 |
msgid "Lost password"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/admin/class-ur-admin-menus.php:584
|
458 |
msgid "Select all"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/admin/class-ur-admin-menus.php:588
|
462 |
msgid "Add to menu"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/admin/class-ur-admin-menus.php:641
|
466 |
+
#: includes/admin/views/html-admin-page-forms.php:122
|
467 |
msgid "Untitled"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: includes/admin/class-ur-admin-menus.php:745
|
471 |
+
msgid "Drag your first form item here."
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: includes/admin/class-ur-admin-menus.php:771
|
475 |
msgid "Empty form data"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/admin/class-ur-admin-notices.php:123
|
479 |
#: user-registration.php:77
|
480 |
#: user-registration.php:86
|
481 |
msgid "Cheatin’ huh?"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: includes/admin/class-ur-admin-profile.php:54
|
485 |
msgid "User Extra Information %s"
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: includes/admin/class-ur-admin-profile.php:139
|
489 |
+
#: includes/admin/class-ur-admin-profile.php:151
|
490 |
#: includes/form/class-ur-form-field-select.php:35
|
491 |
#: includes/form/class-ur-form-field-select.php:40
|
492 |
+
#: includes/functions-ur-core.php:703
|
493 |
msgid "Select"
|
494 |
msgstr ""
|
495 |
|
512 |
#: includes/admin/class-ur-admin-registrations-table-list.php:54
|
513 |
#: includes/form/class-ur-form-field-date.php:37
|
514 |
#: includes/form/class-ur-form-field-date.php:42
|
515 |
+
#: includes/functions-ur-core.php:707
|
516 |
msgid "Date"
|
517 |
msgstr ""
|
518 |
|
538 |
msgstr ""
|
539 |
|
540 |
#: includes/admin/class-ur-admin-registrations-table-list.php:126
|
541 |
+
#: includes/admin/views/html-admin-page-forms.php:46
|
542 |
msgid "Preview"
|
543 |
msgstr ""
|
544 |
|
721 |
|
722 |
#: includes/admin/class-ur-admin.php:183
|
723 |
#: includes/admin/class-ur-admin.php:231
|
724 |
+
#: includes/class-ur-plugin-updater.php:671
|
725 |
+
#: includes/class-ur-plugin-updater.php:689
|
726 |
msgid "I have a query"
|
727 |
msgstr ""
|
728 |
|
770 |
msgid "General"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: includes/admin/settings/class-ur-settings-email.php:34
|
774 |
+
#: includes/admin/settings/class-ur-settings-email.php:70
|
775 |
#: includes/admin/settings/emails/class-ur-settings-admin-email.php:38
|
776 |
#: includes/admin/settings/emails/class-ur-settings-awaiting-admin-approval-email.php:39
|
777 |
#: includes/admin/settings/emails/class-ur-settings-email-confirmation.php:38
|
784 |
msgid "Emails"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: includes/admin/settings/class-ur-settings-email.php:73
|
788 |
msgid "Email notifications"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: includes/admin/settings/class-ur-settings-email.php:75
|
792 |
msgid "Email notifications sent from user registration are listed below. Click on an email to configure it."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: includes/admin/settings/class-ur-settings-email.php:85
|
796 |
msgid "Email Sender Options"
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: includes/admin/settings/class-ur-settings-email.php:90
|
800 |
msgid "\"From\" name"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: includes/admin/settings/class-ur-settings-email.php:91
|
804 |
msgid "How the sender name appears in outgoing user registration emails."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: includes/admin/settings/class-ur-settings-email.php:101
|
808 |
msgid "\"From\" address"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: includes/admin/settings/class-ur-settings-email.php:102
|
812 |
msgid "How the sender email appears in outgoing user registration emails."
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: includes/admin/settings/class-ur-settings-email.php:116
|
816 |
msgid "Send a Test Email"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: includes/admin/settings/class-ur-settings-email.php:121
|
820 |
msgid "Send To"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: includes/admin/settings/class-ur-settings-email.php:122
|
824 |
msgid "Enter email address where test email will be sent."
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: includes/admin/settings/class-ur-settings-email.php:134
|
828 |
+
#: includes/admin/settings/class-ur-settings-email.php:141
|
829 |
msgid "Send Email"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: includes/admin/settings/class-ur-settings-email.php:135
|
833 |
msgid "Click to send test email."
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: includes/admin/settings/class-ur-settings-email.php:180
|
837 |
#: includes/admin/settings/class-ur-settings-general.php:291
|
838 |
+
#: includes/functions-ur-core.php:1125
|
839 |
msgid "Email"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/admin/settings/class-ur-settings-email.php:181
|
843 |
+
#: includes/admin/settings/class-ur-settings-email.php:200
|
844 |
msgid "Configure"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: includes/admin/settings/class-ur-settings-email.php:253
|
848 |
msgid "Smart Tags Used"
|
849 |
msgstr ""
|
850 |
|
864 |
msgstr ""
|
865 |
|
866 |
#: includes/admin/settings/class-ur-settings-general.php:74
|
867 |
+
#: includes/functions-ur-core.php:939
|
868 |
msgid "User login option"
|
869 |
msgstr ""
|
870 |
|
871 |
#: includes/admin/settings/class-ur-settings-general.php:75
|
872 |
#: includes/admin/settings/class-ur-settings-general.php:392
|
873 |
+
#: includes/functions-ur-core.php:940
|
874 |
msgid "This option lets you choose login option after user registration."
|
875 |
msgstr ""
|
876 |
|
998 |
msgstr ""
|
999 |
|
1000 |
#: includes/admin/settings/class-ur-settings-general.php:237
|
1001 |
+
#: includes/functions-ur-core.php:1106
|
1002 |
msgid "Manual login after registration"
|
1003 |
msgstr ""
|
1004 |
|
1012 |
msgstr ""
|
1013 |
|
1014 |
#: includes/admin/settings/class-ur-settings-general.php:247
|
1015 |
+
#: includes/functions-ur-core.php:1107
|
1016 |
msgid "Email confirmation to login"
|
1017 |
msgstr ""
|
1018 |
|
1026 |
msgstr ""
|
1027 |
|
1028 |
#: includes/admin/settings/class-ur-settings-general.php:257
|
1029 |
+
#: includes/functions-ur-core.php:1109
|
1030 |
msgid "Admin approval after registration"
|
1031 |
msgstr ""
|
1032 |
|
1044 |
msgstr ""
|
1045 |
|
1046 |
#: includes/admin/settings/class-ur-settings-general.php:273
|
1047 |
+
#: includes/functions-ur-core.php:764
|
1048 |
msgid "Required"
|
1049 |
msgstr ""
|
1050 |
|
1094 |
#: includes/admin/settings/class-ur-settings-general.php:311
|
1095 |
#: includes/form/class-ur-form-field-number.php:37
|
1096 |
#: includes/form/class-ur-form-field-number.php:42
|
1097 |
+
#: includes/functions-ur-core.php:706
|
1098 |
msgid "Number"
|
1099 |
msgstr ""
|
1100 |
|
1136 |
msgstr ""
|
1137 |
|
1138 |
#: includes/admin/settings/class-ur-settings-general.php:341
|
1139 |
+
#: includes/admin/settings/class-ur-settings-integration.php:47
|
1140 |
msgid "Google reCaptcha"
|
1141 |
msgstr ""
|
1142 |
|
1146 |
|
1147 |
#: includes/admin/settings/class-ur-settings-general.php:347
|
1148 |
#: includes/class-ur-ajax.php:111
|
1149 |
+
#: includes/class-ur-ajax.php:496
|
1150 |
#: includes/class-ur-form-handler.php:391
|
1151 |
#: includes/class-ur-frontend-scripts.php:382
|
1152 |
msgid "Captcha code error, please try again."
|
1153 |
msgstr ""
|
1154 |
|
1155 |
#: includes/admin/settings/class-ur-settings-general.php:375
|
1156 |
+
#: includes/functions-ur-core.php:1059
|
1157 |
msgid "Form Template"
|
1158 |
msgstr ""
|
1159 |
|
1162 |
msgstr ""
|
1163 |
|
1164 |
#: includes/admin/settings/class-ur-settings-general.php:383
|
1165 |
+
#: includes/functions-ur-core.php:1066
|
1166 |
msgid "Default"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
#: includes/admin/settings/class-ur-settings-general.php:384
|
1170 |
+
#: includes/functions-ur-core.php:1067
|
1171 |
msgid "Bordered"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
#: includes/admin/settings/class-ur-settings-general.php:385
|
1175 |
+
#: includes/functions-ur-core.php:1068
|
1176 |
msgid "Flat"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
#: includes/admin/settings/class-ur-settings-general.php:386
|
1180 |
+
#: includes/functions-ur-core.php:1069
|
1181 |
msgid "Rounded"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
#: includes/admin/settings/class-ur-settings-general.php:387
|
1185 |
+
#: includes/functions-ur-core.php:1070
|
1186 |
msgid "Rounded Edge"
|
1187 |
msgstr ""
|
1188 |
|
1273 |
msgstr ""
|
1274 |
|
1275 |
#: includes/admin/settings/class-ur-settings-general.php:475
|
1276 |
+
#: templates/myaccount/form-login.php:174
|
1277 |
msgid "Not a member yet? Register now."
|
1278 |
msgstr ""
|
1279 |
|
1306 |
msgstr ""
|
1307 |
|
1308 |
#: includes/admin/settings/class-ur-settings-general.php:507
|
1309 |
+
#: includes/functions-ur-core.php:1123
|
1310 |
msgid "Username or Email"
|
1311 |
msgstr ""
|
1312 |
|
1321 |
|
1322 |
#: includes/admin/settings/class-ur-settings-general.php:517
|
1323 |
#: includes/admin/settings/class-ur-settings-general.php:523
|
1324 |
+
#: includes/functions-ur-core.php:701
|
1325 |
#: templates/myaccount/form-login.php:41
|
1326 |
msgid "Password"
|
1327 |
msgstr ""
|
1437 |
msgstr ""
|
1438 |
|
1439 |
#: includes/admin/settings/class-ur-settings-import-export.php:42
|
1440 |
+
#: includes/admin/views/html-admin-page-export-users.php:13
|
1441 |
+
#: includes/admin/views/html-admin-page-export-users.php:35
|
1442 |
msgid "Export Users"
|
1443 |
msgstr ""
|
1444 |
|
1445 |
#: includes/admin/settings/class-ur-settings-import-export.php:43
|
1446 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:13
|
1447 |
msgid "Import/Export Forms"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
+
#: includes/admin/settings/class-ur-settings-integration.php:27
|
1451 |
+
#: includes/admin/settings/class-ur-settings-integration.php:44
|
1452 |
msgid "Integration"
|
1453 |
msgstr ""
|
1454 |
|
1455 |
+
#: includes/admin/settings/class-ur-settings-integration.php:52
|
1456 |
msgid "Version"
|
1457 |
msgstr ""
|
1458 |
|
1459 |
+
#: includes/admin/settings/class-ur-settings-integration.php:53
|
1460 |
msgid "Select the google reCaptcha version"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
+
#: includes/admin/settings/class-ur-settings-integration.php:65
|
1464 |
msgid "Site Key (v2)"
|
1465 |
msgstr ""
|
1466 |
|
1467 |
+
#: includes/admin/settings/class-ur-settings-integration.php:66
|
1468 |
+
#: includes/admin/settings/class-ur-settings-integration.php:87
|
1469 |
msgid "Get site key from google %1$s reCaptcha %2$s."
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: includes/admin/settings/class-ur-settings-integration.php:76
|
1473 |
msgid "Secret Key (v2)"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: includes/admin/settings/class-ur-settings-integration.php:77
|
1477 |
+
#: includes/admin/settings/class-ur-settings-integration.php:98
|
1478 |
msgid "Get secret key from google %1$s reCaptcha %2$s."
|
1479 |
msgstr ""
|
1480 |
|
1481 |
+
#: includes/admin/settings/class-ur-settings-integration.php:86
|
1482 |
msgid "Site Key (v3)"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
+
#: includes/admin/settings/class-ur-settings-integration.php:97
|
1486 |
msgid "Secret Key (v3)"
|
1487 |
msgstr ""
|
1488 |
|
1525 |
msgid "Deactivate the license of User Registration plugin"
|
1526 |
msgstr ""
|
1527 |
|
1528 |
+
#: includes/admin/settings/class-ur-settings-license.php:100
|
1529 |
msgid "Your license has already been activated. Enjoy using <strong>User Registration</strong>."
|
1530 |
msgstr ""
|
1531 |
|
1881 |
"Thank You!"
|
1882 |
msgstr ""
|
1883 |
|
1884 |
+
#: includes/admin/updater/class-ur-addon-updater.php:261
|
1885 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
+
#: includes/admin/updater/class-ur-addon-updater.php:269
|
1889 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s."
|
1890 |
msgstr ""
|
1891 |
|
1892 |
+
#: includes/admin/updater/class-ur-addon-updater.php:468
|
1893 |
msgid "You do not have permission to install plugin updates"
|
1894 |
msgstr ""
|
1895 |
|
1896 |
+
#: includes/admin/updater/class-ur-addon-updater.php:468
|
1897 |
msgid "Error"
|
1898 |
msgstr ""
|
1899 |
|
1900 |
+
#: includes/admin/views/html-admin-page-addons.php:16
|
1901 |
+
msgid "User Registration Extensions"
|
1902 |
msgstr ""
|
1903 |
|
1904 |
+
#: includes/admin/views/html-admin-page-addons.php:19
|
1905 |
+
msgid "Refresh Extensions"
|
1906 |
msgstr ""
|
1907 |
|
1908 |
+
#: includes/admin/views/html-admin-page-addons.php:23
|
1909 |
+
msgid "Filter extensions list"
|
1910 |
msgstr ""
|
1911 |
|
1912 |
+
#. translators: %s - User Registration Extensions Catalog
|
1913 |
+
#: includes/admin/views/html-admin-page-addons.php:53
|
1914 |
+
msgid "Our catalog of User Registration Extensions can be found on WPEverest.com here: <a href=\"%s\">User Registration Extensions Catalog</a>"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
+
#: includes/admin/views/html-admin-page-export-users.php:18
|
1918 |
+
msgid "GENERAL"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
+
#: includes/admin/views/html-admin-page-forms.php:35
|
1922 |
msgid "Copy Shortcode!"
|
1923 |
msgstr ""
|
1924 |
|
1925 |
+
#: includes/admin/views/html-admin-page-forms.php:35
|
1926 |
msgid "Copied!"
|
1927 |
msgstr ""
|
1928 |
|
1929 |
+
#: includes/admin/views/html-admin-page-forms.php:44
|
1930 |
msgid "Fullscreen"
|
1931 |
msgstr ""
|
1932 |
|
1933 |
+
#: includes/admin/views/html-admin-page-forms.php:46
|
1934 |
msgid "Preview Form"
|
1935 |
msgstr ""
|
1936 |
|
1937 |
+
#: includes/admin/views/html-admin-page-forms.php:58
|
1938 |
msgid "Fields"
|
1939 |
msgstr ""
|
1940 |
|
1941 |
+
#: includes/admin/views/html-admin-page-forms.php:60
|
1942 |
msgid "Field Options"
|
1943 |
msgstr ""
|
1944 |
|
1945 |
+
#: includes/admin/views/html-admin-page-forms.php:68
|
1946 |
msgid "Form Setting"
|
1947 |
msgstr ""
|
1948 |
|
1949 |
+
#: includes/admin/views/html-admin-page-forms.php:84
|
1950 |
msgid "Default User Fields"
|
1951 |
msgstr ""
|
1952 |
|
1953 |
+
#: includes/admin/views/html-admin-page-forms.php:87
|
1954 |
msgid "Extra Fields"
|
1955 |
msgstr ""
|
1956 |
|
1957 |
+
#: includes/admin/views/html-admin-page-forms.php:134
|
1958 |
msgid "Get Support"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
+
#: includes/admin/views/html-admin-page-forms.php:135
|
1962 |
msgid "Create Login Form"
|
1963 |
msgstr ""
|
1964 |
|
1965 |
+
#: includes/admin/views/html-admin-page-forms.php:136
|
1966 |
msgid "Documentation"
|
1967 |
msgstr ""
|
1968 |
|
1969 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:18
|
1970 |
msgid "EXPORT FORMS WITH SETTINGS"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:35
|
|
|
|
|
|
|
|
|
1974 |
msgid "Export Forms"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:40
|
1978 |
msgid "IMPORT FORMS WITH SETTINGS"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#: includes/admin/views/html-admin-page-import-export-forms.php:57
|
|
|
|
|
|
|
|
|
1982 |
msgid "Import Forms"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
+
#: includes/admin/views/html-admin-page-status-logs.php:23
|
1986 |
msgid "Delete log"
|
1987 |
msgstr ""
|
1988 |
|
1989 |
+
#: includes/admin/views/html-admin-page-status-logs.php:38
|
1990 |
msgid "View"
|
1991 |
msgstr ""
|
1992 |
|
1993 |
+
#: includes/admin/views/html-admin-page-status-logs.php:51
|
1994 |
msgid "There are currently no logs to view."
|
1995 |
msgstr ""
|
1996 |
|
1997 |
+
#: includes/admin/views/html-admin-page-status.php:14
|
1998 |
msgid "Logs"
|
1999 |
msgstr ""
|
2000 |
|
2001 |
+
#: includes/admin/views/html-admin-settings.php:46
|
2002 |
msgid "Save Changes"
|
2003 |
msgstr ""
|
2004 |
|
2005 |
+
#: includes/admin/views/html-license-form.php:20
|
2006 |
msgid "License:"
|
2007 |
msgstr ""
|
2008 |
|
2009 |
+
#: includes/admin/views/html-license-form.php:21
|
2010 |
+
msgid "XXXX-XXXX-XXXX-XXXX"
|
2011 |
+
msgstr ""
|
2012 |
+
|
2013 |
+
#: includes/admin/views/html-license-form.php:22
|
2014 |
msgid "Enter your license key and hit return. A valid key is required for updates."
|
2015 |
msgstr ""
|
2016 |
|
2017 |
+
#: includes/admin/views/html-notice-custom.php:14
|
2018 |
+
#: includes/admin/views/html-notice-registration.php:14
|
2019 |
+
#: includes/admin/views/html-notice-updated.php:14
|
2020 |
msgid "Dismiss"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
+
#: includes/admin/views/html-notice-deactivation.php:23
|
2024 |
msgid "Before we deactivate User Registration, would you care to <a href=\"%1$s\" target=\"_blank\">let us know why</a> so we can improve it for you? <a href=\"%2$s\">No, deactivate now</a>."
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: includes/admin/views/html-notice-install.php:14
|
2028 |
msgid "<strong>Welcome to User Registration</strong> – You‘re almost ready to create registration :)"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
+
#: includes/admin/views/html-notice-install.php:15
|
2032 |
msgid "Install User Registration Pages"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
+
#: includes/admin/views/html-notice-install.php:15
|
2036 |
msgid "Skip setup"
|
2037 |
msgstr ""
|
2038 |
|
2039 |
+
#: includes/admin/views/html-notice-key-activated.php:14
|
2040 |
msgid "Your licence for <strong>%s</strong> has been activated. Thanks!"
|
2041 |
msgstr ""
|
2042 |
|
2043 |
+
#: includes/admin/views/html-notice-key-deactivated.php:14
|
2044 |
msgid "Your licence for <strong>%s</strong> has been deactivated."
|
2045 |
msgstr ""
|
2046 |
|
2047 |
+
#: includes/admin/views/html-notice-key-unvalidated.php:14
|
2048 |
msgid "Hide notice"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: includes/admin/views/html-notice-registration.php:16
|
|
|
|
|
|
|
|
|
2052 |
msgid "To allow users to register for your website via User registration, you must first enable user registration. Go to %1$sSettings > General%2$s tab, and under Membership make sure to check <strong>Anyone can register</strong>."
|
2053 |
msgstr ""
|
2054 |
|
2055 |
+
#: includes/admin/views/html-notice-update.php:14
|
2056 |
+
#: includes/admin/views/html-notice-updating.php:14
|
2057 |
msgid "User Registration Data Update"
|
2058 |
msgstr ""
|
2059 |
|
2060 |
+
#: includes/admin/views/html-notice-update.php:14
|
2061 |
msgid "We need to update your site's database to the latest version."
|
2062 |
msgstr ""
|
2063 |
|
2064 |
+
#: includes/admin/views/html-notice-update.php:15
|
2065 |
msgid "Run the updater"
|
2066 |
msgstr ""
|
2067 |
|
2068 |
+
#: includes/admin/views/html-notice-update.php:19
|
2069 |
msgid "It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?"
|
2070 |
msgstr ""
|
2071 |
|
2072 |
+
#: includes/admin/views/html-notice-updated.php:16
|
2073 |
msgid "User Registration data update complete. Thank you for updating to the latest version!"
|
2074 |
msgstr ""
|
2075 |
|
2076 |
+
#: includes/admin/views/html-notice-updating.php:14
|
2077 |
msgid "Your database is being updated in the background."
|
2078 |
msgstr ""
|
2079 |
|
2080 |
+
#: includes/admin/views/html-notice-updating.php:14
|
2081 |
msgid "Taking a while? Click here to run it now."
|
2082 |
msgstr ""
|
2083 |
|
2089 |
#: includes/class-ur-ajax.php:120
|
2090 |
#: includes/class-ur-ajax.php:176
|
2091 |
#: includes/class-ur-ajax.php:340
|
2092 |
+
#: includes/class-ur-ajax.php:466
|
2093 |
msgid "Nonce error, please reload."
|
2094 |
msgstr ""
|
2095 |
|
2096 |
#: includes/class-ur-ajax.php:104
|
2097 |
+
#: includes/class-ur-ajax.php:489
|
2098 |
#: includes/class-ur-form-handler.php:388
|
2099 |
msgid "Error on google reCaptcha. Contact your site administrator."
|
2100 |
msgstr ""
|
2101 |
|
2102 |
#: includes/class-ur-ajax.php:132
|
2103 |
+
#: includes/class-ur-shortcodes.php:178
|
2104 |
msgid "Only administrators can add new users."
|
2105 |
msgstr ""
|
2106 |
|
2107 |
#: includes/class-ur-ajax.php:150
|
2108 |
+
#: includes/class-ur-shortcodes.php:192
|
2109 |
msgid "You are currently logged in as %1$1s. %2$2s"
|
2110 |
msgstr ""
|
2111 |
|
2112 |
#: includes/class-ur-ajax.php:150
|
2113 |
+
#: includes/class-ur-shortcodes.php:192
|
2114 |
msgid "Log out of this account."
|
2115 |
msgstr ""
|
2116 |
|
2117 |
#: includes/class-ur-ajax.php:150
|
2118 |
+
#: includes/class-ur-shortcodes.php:192
|
2119 |
#: includes/functions-ur-account.php:111
|
2120 |
msgid "Logout"
|
2121 |
msgstr ""
|
2140 |
msgid "Something went wrong while uploading, please contact your site administrator."
|
2141 |
msgstr ""
|
2142 |
|
2143 |
+
#: includes/class-ur-ajax.php:448
|
2144 |
#: includes/class-ur-form-handler.php:354
|
2145 |
msgid "Username is required."
|
2146 |
msgstr ""
|
2147 |
|
2148 |
+
#: includes/class-ur-ajax.php:451
|
2149 |
#: includes/class-ur-form-handler.php:357
|
2150 |
msgid "A user could not be found with this email address."
|
2151 |
msgstr ""
|
2152 |
|
2153 |
+
#: includes/class-ur-ajax.php:520
|
2154 |
+
#: includes/class-ur-ajax.php:523
|
2155 |
+
#: includes/class-ur-ajax.php:529
|
2156 |
+
#: includes/class-ur-ajax.php:532
|
2157 |
#: includes/class-ur-form-handler.php:441
|
2158 |
#: includes/class-ur-form-handler.php:444
|
2159 |
#: includes/class-ur-form-handler.php:450
|
2161 |
msgid "ERROR"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: includes/class-ur-ajax.php:561
|
2165 |
msgid "Test email from %s"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: includes/class-ur-ajax.php:572
|
2169 |
msgid "Test email was sent successfully! Please check your inbox to make sure it is delivered."
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: includes/class-ur-ajax.php:574
|
2173 |
msgid "Test email was unsuccessful! Something went wrong."
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: includes/class-ur-ajax.php:643
|
2177 |
+
#: includes/class-ur-ajax.php:649
|
2178 |
msgid "post data not set"
|
2179 |
msgstr ""
|
2180 |
|
2181 |
+
#: includes/class-ur-ajax.php:666
|
2182 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
+
#: includes/class-ur-ajax.php:677
|
2186 |
msgid "Could not save form, "
|
2187 |
msgstr ""
|
2188 |
|
2267 |
msgstr ""
|
2268 |
|
2269 |
#: includes/class-ur-emailer.php:589
|
2270 |
+
#: includes/functions-ur-core.php:2026
|
2271 |
msgid "Chosen Password"
|
2272 |
msgstr ""
|
2273 |
|
2288 |
msgstr ""
|
2289 |
|
2290 |
#: includes/class-ur-form-handler.php:184
|
2291 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:471
|
2292 |
msgid "%s is a required field."
|
2293 |
msgstr ""
|
2294 |
|
2402 |
msgstr ""
|
2403 |
|
2404 |
#: includes/class-ur-frontend-scripts.php:395
|
2405 |
+
#: includes/functions-ur-core.php:985
|
2406 |
msgid "Very Weak"
|
2407 |
msgstr ""
|
2408 |
|
2409 |
#: includes/class-ur-frontend-scripts.php:396
|
2410 |
+
#: includes/functions-ur-core.php:986
|
2411 |
msgid "Weak"
|
2412 |
msgstr ""
|
2413 |
|
2414 |
#: includes/class-ur-frontend-scripts.php:397
|
2415 |
+
#: includes/functions-ur-core.php:987
|
2416 |
msgid "Medium"
|
2417 |
msgstr ""
|
2418 |
|
2419 |
#: includes/class-ur-frontend-scripts.php:398
|
2420 |
+
#: includes/functions-ur-core.php:988
|
2421 |
msgid "Strong"
|
2422 |
msgstr ""
|
2423 |
|
2538 |
|
2539 |
#: includes/class-ur-plugin-updater.php:534
|
2540 |
#: includes/class-ur-plugin-updater.php:540
|
2541 |
+
#: includes/class-ur-plugin-updater.php:669
|
2542 |
#: templates/myaccount/dashboard.php:61
|
2543 |
msgid "%1$s"
|
2544 |
msgstr ""
|
2575 |
msgid "Activate License Key"
|
2576 |
msgstr ""
|
2577 |
|
2578 |
+
#: includes/class-ur-plugin-updater.php:667
|
2579 |
msgid "<strong> Update all addons of User Registration!!</strong>"
|
2580 |
msgstr ""
|
2581 |
|
2582 |
+
#: includes/class-ur-plugin-updater.php:668
|
2583 |
msgid "It seems some of the <strong>User Registration</strong> Addons are outdated. Please update the outdated addons to the latest version for the <strong>User Registration Pro</strong> plugin to work correctly.<br>"
|
2584 |
msgstr ""
|
2585 |
|
2586 |
+
#: includes/class-ur-plugin-updater.php:684
|
2587 |
msgid "<strong> Upgrade To PRO!!</strong>"
|
2588 |
msgstr ""
|
2589 |
|
2590 |
+
#: includes/class-ur-plugin-updater.php:685
|
2591 |
msgid "It seems you are using some premium addons of User Registration plugin. <br>"
|
2592 |
msgstr ""
|
2593 |
|
2594 |
+
#: includes/class-ur-plugin-updater.php:703
|
2595 |
msgid "User Registration Pro has been installed successfully."
|
2596 |
msgstr ""
|
2597 |
|
2800 |
msgid "Profile Details"
|
2801 |
msgstr ""
|
2802 |
|
2803 |
+
#. translators: %s - Link to login form.
|
2804 |
+
#: includes/class-ur-shortcodes.php:156
|
2805 |
msgid "Please Login to edit profile. <a href=\"%s\">Login Here?</a>"
|
2806 |
msgstr ""
|
2807 |
|
2827 |
|
2828 |
#: includes/form/class-ur-form-field-checkbox.php:35
|
2829 |
#: includes/form/class-ur-form-field-checkbox.php:40
|
2830 |
+
#: includes/functions-ur-core.php:708
|
2831 |
msgid "Checkbox"
|
2832 |
msgstr ""
|
2833 |
|
2834 |
#: includes/form/class-ur-form-field-checkbox.php:43
|
2835 |
#: includes/form/class-ur-form-field-radio.php:46
|
2836 |
#: includes/form/class-ur-form-field-select.php:43
|
2837 |
+
#: includes/functions-ur-core.php:817
|
2838 |
msgid "First Choice"
|
2839 |
msgstr ""
|
2840 |
|
2841 |
#: includes/form/class-ur-form-field-checkbox.php:44
|
2842 |
#: includes/form/class-ur-form-field-radio.php:47
|
2843 |
#: includes/form/class-ur-form-field-select.php:44
|
2844 |
+
#: includes/functions-ur-core.php:818
|
2845 |
msgid "Second Choice"
|
2846 |
msgstr ""
|
2847 |
|
2848 |
#: includes/form/class-ur-form-field-checkbox.php:45
|
2849 |
#: includes/form/class-ur-form-field-radio.php:48
|
2850 |
#: includes/form/class-ur-form-field-select.php:45
|
2851 |
+
#: includes/functions-ur-core.php:819
|
2852 |
msgid "Third Choice"
|
2853 |
msgstr ""
|
2854 |
|
3850 |
|
3851 |
#: includes/form/class-ur-form-field-country.php:347
|
3852 |
#: includes/form/class-ur-form-field-country.php:352
|
3853 |
+
#: includes/functions-ur-core.php:704
|
3854 |
msgid "Country"
|
3855 |
msgstr ""
|
3856 |
|
3861 |
|
3862 |
#: includes/form/class-ur-form-field-display-name.php:35
|
3863 |
#: includes/form/class-ur-form-field-display-name.php:40
|
3864 |
+
#: includes/functions-ur-core.php:698
|
3865 |
msgid "Display Name"
|
3866 |
msgstr ""
|
3867 |
|
3870 |
msgstr ""
|
3871 |
|
3872 |
#: includes/form/class-ur-form-field-email.php:40
|
3873 |
+
#: includes/functions-ur-core.php:702
|
3874 |
msgid "Secondary Email"
|
3875 |
msgstr ""
|
3876 |
|
3877 |
#: includes/form/class-ur-form-field-first-name.php:35
|
3878 |
#: includes/form/class-ur-form-field-first-name.php:40
|
3879 |
+
#: includes/functions-ur-core.php:695
|
3880 |
msgid "First Name"
|
3881 |
msgstr ""
|
3882 |
|
3885 |
msgstr ""
|
3886 |
|
3887 |
#: includes/form/class-ur-form-field-last-name.php:40
|
3888 |
+
#: includes/functions-ur-core.php:696
|
3889 |
msgid "Last Name"
|
3890 |
msgstr ""
|
3891 |
|
3892 |
#: includes/form/class-ur-form-field-nickname.php:35
|
3893 |
#: includes/form/class-ur-form-field-nickname.php:40
|
3894 |
+
#: includes/functions-ur-core.php:694
|
3895 |
msgid "Nickname"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
#: includes/form/class-ur-form-field-privacy-policy.php:35
|
3899 |
#: includes/form/class-ur-form-field-privacy-policy.php:40
|
3900 |
+
#: includes/functions-ur-core.php:709
|
3901 |
msgid "Privacy Policy"
|
3902 |
msgstr ""
|
3903 |
|
3904 |
#: includes/form/class-ur-form-field-radio.php:38
|
3905 |
#: includes/form/class-ur-form-field-radio.php:43
|
3906 |
+
#: includes/functions-ur-core.php:710
|
3907 |
msgid "Radio"
|
3908 |
msgstr ""
|
3909 |
|
3914 |
|
3915 |
#: includes/form/class-ur-form-field-textarea.php:35
|
3916 |
#: includes/form/class-ur-form-field-textarea.php:40
|
3917 |
+
#: includes/functions-ur-core.php:705
|
3918 |
msgid "Textarea"
|
3919 |
msgstr ""
|
3920 |
|
3931 |
msgstr ""
|
3932 |
|
3933 |
#: includes/form/class-ur-form-field-user-email.php:40
|
3934 |
+
#: includes/functions-ur-core.php:689
|
3935 |
msgid "User Email"
|
3936 |
msgstr ""
|
3937 |
|
3941 |
|
3942 |
#: includes/form/class-ur-form-field-user-login.php:35
|
3943 |
#: includes/form/class-ur-form-field-user-login.php:40
|
3944 |
+
#: includes/functions-ur-core.php:1124
|
3945 |
msgid "Username"
|
3946 |
msgstr ""
|
3947 |
|
4051 |
|
4052 |
#: includes/form/settings/class-ur-setting-checkbox.php:63
|
4053 |
#: includes/form/settings/class-ur-setting-user_login.php:63
|
4054 |
+
#: includes/functions-ur-core.php:769
|
4055 |
+
#: includes/functions-ur-core.php:782
|
4056 |
msgid "No"
|
4057 |
msgstr ""
|
4058 |
|
4059 |
#: includes/form/settings/class-ur-setting-checkbox.php:64
|
4060 |
#: includes/form/settings/class-ur-setting-user_login.php:64
|
4061 |
+
#: includes/functions-ur-core.php:770
|
4062 |
+
#: includes/functions-ur-core.php:783
|
4063 |
msgid "Yes"
|
4064 |
msgstr ""
|
4065 |
|
4208 |
msgid "Check this option to validate the Username for Special Character"
|
4209 |
msgstr ""
|
4210 |
|
4211 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:138
|
4212 |
msgid "Something went wrong! please try again"
|
4213 |
msgstr ""
|
4214 |
|
4215 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:183
|
4216 |
msgid "Duplicate field key in form, please contact site administrator."
|
4217 |
msgstr ""
|
4218 |
|
4219 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:189
|
4220 |
msgid "Required form field not found."
|
4221 |
msgstr ""
|
4222 |
|
4223 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:398
|
4224 |
msgid "Empty confirm password"
|
4225 |
msgstr ""
|
4226 |
|
4227 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:400
|
4228 |
msgid "Password and confirm password not matched"
|
4229 |
msgstr ""
|
4230 |
|
4231 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:444
|
4232 |
msgid "Empty confirm email"
|
4233 |
msgstr ""
|
4234 |
|
4235 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:446
|
4236 |
msgid "Email and confirm email not matched"
|
4237 |
msgstr ""
|
4238 |
|
4239 |
+
#: includes/frontend/class-ur-frontend-form-handler.php:505
|
4240 |
msgid "Password should not match with Username or Email address."
|
4241 |
msgstr ""
|
4242 |
|
4257 |
msgid "Dashboard"
|
4258 |
msgstr ""
|
4259 |
|
4260 |
+
#: includes/functions-ur-core.php:545
|
4261 |
msgid "Username can not be changed."
|
4262 |
msgstr ""
|
4263 |
|
4264 |
+
#: includes/functions-ur-core.php:549
|
4265 |
msgid "Passowrd can not be changed."
|
4266 |
msgstr ""
|
4267 |
|
4268 |
+
#: includes/functions-ur-core.php:553
|
4269 |
msgid "Confirm password can not be changed."
|
4270 |
msgstr ""
|
4271 |
|
4272 |
+
#: includes/functions-ur-core.php:556
|
4273 |
msgid "Confirm email can not be changed."
|
4274 |
msgstr ""
|
4275 |
|
4276 |
+
#: includes/functions-ur-core.php:690
|
4277 |
msgid "User Confirm Email"
|
4278 |
msgstr ""
|
4279 |
|
4280 |
+
#: includes/functions-ur-core.php:691
|
4281 |
msgid "User Pass"
|
4282 |
msgstr ""
|
4283 |
|
4284 |
+
#: includes/functions-ur-core.php:692
|
4285 |
msgid "User Confirm Password"
|
4286 |
msgstr ""
|
4287 |
|
4288 |
+
#: includes/functions-ur-core.php:693
|
4289 |
msgid "User Login"
|
4290 |
msgstr ""
|
4291 |
|
4292 |
+
#: includes/functions-ur-core.php:697
|
4293 |
msgid "User URL"
|
4294 |
msgstr ""
|
4295 |
|
4296 |
+
#: includes/functions-ur-core.php:699
|
4297 |
+
#: includes/functions-ur-core.php:736
|
4298 |
+
#: includes/functions-ur-core.php:738
|
4299 |
msgid "Description"
|
4300 |
msgstr ""
|
4301 |
|
4302 |
+
#: includes/functions-ur-core.php:700
|
4303 |
msgid "Text"
|
4304 |
msgstr ""
|
4305 |
|
4306 |
+
#: includes/functions-ur-core.php:727
|
4307 |
+
#: includes/functions-ur-core.php:729
|
4308 |
msgid "Label"
|
4309 |
msgstr ""
|
4310 |
|
4311 |
+
#: includes/functions-ur-core.php:731
|
4312 |
msgid "Enter text for the form field label. This is recommended and can be hidden in the Advanced Settings."
|
4313 |
msgstr ""
|
4314 |
|
4315 |
+
#: includes/functions-ur-core.php:740
|
4316 |
msgid "Enter text for the form field description."
|
4317 |
msgstr ""
|
4318 |
|
4319 |
+
#: includes/functions-ur-core.php:745
|
4320 |
+
#: includes/functions-ur-core.php:747
|
4321 |
msgid "Field Name"
|
4322 |
msgstr ""
|
4323 |
|
4324 |
+
#: includes/functions-ur-core.php:749
|
4325 |
msgid "Unique key for the field."
|
4326 |
msgstr ""
|
4327 |
|
4328 |
+
#: includes/functions-ur-core.php:755
|
4329 |
+
#: includes/functions-ur-core.php:757
|
4330 |
msgid "Placeholder"
|
4331 |
msgstr ""
|
4332 |
|
4333 |
+
#: includes/functions-ur-core.php:759
|
4334 |
msgid "Enter placeholder for the field."
|
4335 |
msgstr ""
|
4336 |
|
4337 |
+
#: includes/functions-ur-core.php:772
|
4338 |
msgid "Check this option to mark the field required. A form will not submit unless all required fields are provided."
|
4339 |
msgstr ""
|
4340 |
|
4341 |
+
#: includes/functions-ur-core.php:777
|
4342 |
msgid "Hide Label"
|
4343 |
msgstr ""
|
4344 |
|
4345 |
+
#: includes/functions-ur-core.php:785
|
4346 |
msgid "Check this option to hide the label of this field."
|
4347 |
msgstr ""
|
4348 |
|
4349 |
+
#: includes/functions-ur-core.php:812
|
4350 |
msgid "Options"
|
4351 |
msgstr ""
|
4352 |
|
4353 |
+
#: includes/functions-ur-core.php:949
|
4354 |
msgid "Login method that should be used by the users registered through this form."
|
4355 |
msgstr ""
|
4356 |
|
4357 |
+
#: includes/functions-ur-core.php:953
|
4358 |
msgid "Default User Role"
|
4359 |
msgstr ""
|
4360 |
|
4361 |
+
#: includes/functions-ur-core.php:962
|
4362 |
msgid "Default role for the users registered through this form."
|
4363 |
msgstr ""
|
4364 |
|
4365 |
+
#: includes/functions-ur-core.php:966
|
4366 |
msgid "Enable Strong Password"
|
4367 |
msgstr ""
|
4368 |
|
4369 |
+
#: includes/functions-ur-core.php:974
|
4370 |
msgid "Make strong password compulsary."
|
4371 |
msgstr ""
|
4372 |
|
4373 |
+
#: includes/functions-ur-core.php:978
|
4374 |
msgid "Minimum Password Strength"
|
4375 |
msgstr ""
|
4376 |
|
4377 |
+
#: includes/functions-ur-core.php:992
|
4378 |
msgid "Set minimum required password strength."
|
4379 |
msgstr ""
|
4380 |
|
4381 |
+
#: includes/functions-ur-core.php:996
|
4382 |
msgid "Redirect URL"
|
4383 |
msgstr ""
|
4384 |
|
4385 |
+
#: includes/functions-ur-core.php:998
|
4386 |
msgid "This option lets you enter redirect path after successful user registration."
|
4387 |
msgstr ""
|
4388 |
|
4389 |
+
#: includes/functions-ur-core.php:1003
|
4390 |
msgid "URL to redirect to after registration."
|
4391 |
msgstr ""
|
4392 |
|
4393 |
+
#: includes/functions-ur-core.php:1007
|
4394 |
msgid "Form Submit Button Custom Class"
|
4395 |
msgstr ""
|
4396 |
|
4397 |
+
#: includes/functions-ur-core.php:1015
|
4398 |
msgid "Custom css class to embed in the submit button. You can enter multiple classes seperated with space."
|
4399 |
msgstr ""
|
4400 |
|
4401 |
+
#: includes/functions-ur-core.php:1019
|
4402 |
msgid "Form Submit Button Label"
|
4403 |
msgstr ""
|
4404 |
|
4405 |
+
#: includes/functions-ur-core.php:1027
|
4406 |
msgid "Set label for the submit button."
|
4407 |
msgstr ""
|
4408 |
|
4409 |
+
#: includes/functions-ur-core.php:1031
|
4410 |
msgid "Success message position"
|
4411 |
msgstr ""
|
4412 |
|
4413 |
+
#: includes/functions-ur-core.php:1038
|
4414 |
msgid "Top"
|
4415 |
msgstr ""
|
4416 |
|
4417 |
+
#: includes/functions-ur-core.php:1039
|
4418 |
msgid "Bottom"
|
4419 |
msgstr ""
|
4420 |
|
4421 |
+
#: includes/functions-ur-core.php:1043
|
4422 |
msgid "Display success message either at the top or bottom after successful registration."
|
4423 |
msgstr ""
|
4424 |
|
4425 |
+
#: includes/functions-ur-core.php:1047
|
4426 |
msgid "Enable %1$s %2$s reCaptcha %3$s Support"
|
4427 |
msgstr ""
|
4428 |
|
4429 |
+
#: includes/functions-ur-core.php:1055
|
4430 |
msgid "Enable reCaptcha for strong security from spams and bots."
|
4431 |
msgstr ""
|
4432 |
|
4433 |
+
#: includes/functions-ur-core.php:1074
|
4434 |
msgid "Choose form template to use."
|
4435 |
msgstr ""
|
4436 |
|
4437 |
+
#: includes/functions-ur-core.php:1078
|
4438 |
msgid "Custom CSS class"
|
4439 |
msgstr ""
|
4440 |
|
4441 |
+
#: includes/functions-ur-core.php:1086
|
4442 |
msgid "Custom css class to embed in the registration form. You can enter multiple classes seperated with space."
|
4443 |
msgstr ""
|
4444 |
|
4445 |
+
#: includes/functions-ur-core.php:1108
|
4446 |
msgid "Auto login after registration"
|
4447 |
msgstr ""
|
4448 |
|
4449 |
+
#: includes/functions-ur-core.php:1320
|
4450 |
msgid "The class <code>%s</code> provided by user_registration_logging_class filter must implement <code>UR_Logger_Interface</code>."
|
4451 |
msgstr ""
|
4452 |
|
4453 |
+
#: includes/functions-ur-core.php:1421
|
4454 |
msgid "Disable emails"
|
4455 |
msgstr ""
|
4456 |
|
4457 |
+
#: includes/functions-ur-core.php:1422
|
4458 |
msgid "Disable all emails sent after registration."
|
4459 |
msgstr ""
|
4460 |
|
4461 |
+
#: includes/functions-ur-core.php:2146
|
4462 |
msgid "Use conditional logic"
|
4463 |
msgstr ""
|
4464 |
|
4465 |
+
#: includes/functions-ur-core.php:2150
|
4466 |
msgid "Conditional Rules"
|
4467 |
msgstr ""
|
4468 |
|
4469 |
+
#: includes/functions-ur-core.php:2151
|
4470 |
msgid "Send data only if the following matches."
|
4471 |
msgstr ""
|
4472 |
|
4473 |
+
#: includes/functions-ur-core.php:2189
|
4474 |
msgid "Checked"
|
4475 |
msgstr ""
|
4476 |
|
4484 |
msgid "This function should not be called before user_registration_init."
|
4485 |
msgstr ""
|
4486 |
|
4487 |
+
#: includes/functions-ur-template.php:198
|
4488 |
msgid "required"
|
4489 |
msgstr ""
|
4490 |
|
4491 |
+
#: includes/functions-ur-template.php:501
|
4492 |
msgid "Choose an option"
|
4493 |
msgstr ""
|
4494 |
|
4500 |
msgid "This method should not be called before plugins_loaded."
|
4501 |
msgstr ""
|
4502 |
|
4503 |
+
#. translators: %s - Link to logout.
|
4504 |
+
#: includes/shortcodes/class-ur-shortcode-login.php:66
|
4505 |
msgid "You are already logged in. <a href=\"%s\">Log out?</a>"
|
4506 |
msgstr ""
|
4507 |
|
4592 |
msgstr ""
|
4593 |
|
4594 |
#: templates/myaccount/form-edit-password.php:82
|
4595 |
+
#: templates/myaccount/form-edit-profile.php:373
|
4596 |
+
#: templates/myaccount/form-edit-profile.php:378
|
4597 |
msgid "Save changes"
|
4598 |
msgstr ""
|
4599 |
|
4613 |
msgid "Remove"
|
4614 |
msgstr ""
|
4615 |
|
4616 |
+
#: templates/myaccount/form-edit-profile.php:89
|
4617 |
+
msgid "Upload Picture"
|
4618 |
+
msgstr ""
|
4619 |
+
|
4620 |
#: templates/myaccount/form-edit-profile.php:104
|
4621 |
msgid "You can change your profile picture on"
|
4622 |
msgstr ""
|
4625 |
msgid "Gravatar"
|
4626 |
msgstr ""
|
4627 |
|
4628 |
+
#: templates/myaccount/form-login.php:103
|
4629 |
msgid "Show password"
|
4630 |
msgstr ""
|
4631 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: user registration, registration, user profile, registration form, login fo
|
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.8.2
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -274,6 +274,10 @@ Yes, the plugin has a shortcode for the login form.
|
|
274 |
16. User Account Page - Vertical Layout
|
275 |
|
276 |
== Changelog ==
|
|
|
|
|
|
|
|
|
277 |
= 2.1.0.1 - 16/12/2021
|
278 |
* Dev - Added filter hook for success message after email confirmation.
|
279 |
* Tweak - Upgrade to pro notice.
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.8.2
|
7 |
+
Stable tag: 2.1.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
274 |
16. User Account Page - Vertical Layout
|
275 |
|
276 |
== Changelog ==
|
277 |
+
= 2.1.1 - 31/12/2021
|
278 |
+
* Fix - Sanitization and escaping issues.
|
279 |
+
* Tweak - Images/JSON files locally added.
|
280 |
+
|
281 |
= 2.1.0.1 - 16/12/2021
|
282 |
* Dev - Added filter hook for success message after email confirmation.
|
283 |
* Tweak - Upgrade to pro notice.
|
templates/form-login-registration.php
CHANGED
@@ -28,11 +28,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
28 |
<div class="ur-frontend-form login-registration">
|
29 |
<div class="ur-form-row">
|
30 |
<div class="ur-form-grid">
|
31 |
-
<h2 class="ur-form-title"><?php echo
|
32 |
<?php echo $login_form; ?>
|
33 |
</div>
|
34 |
<div class="ur-form-grid">
|
35 |
-
<h2 class="ur-form-title"><?php echo
|
36 |
<?php echo $registration_form; ?>
|
37 |
</div>
|
38 |
</div>
|
28 |
<div class="ur-frontend-form login-registration">
|
29 |
<div class="ur-form-row">
|
30 |
<div class="ur-form-grid">
|
31 |
+
<h2 class="ur-form-title"><?php echo esc_html__( 'Login', 'user-registration' ); ?></h2>
|
32 |
<?php echo $login_form; ?>
|
33 |
</div>
|
34 |
<div class="ur-form-grid">
|
35 |
+
<h2 class="ur-form-title"><?php echo esc_html__( get_the_title( $form_id ), 'user-registration' ); ?></h2>
|
36 |
<?php echo $registration_form; ?>
|
37 |
</div>
|
38 |
</div>
|
templates/form-registration.php
CHANGED
@@ -55,9 +55,9 @@ $custom_class = apply_filters( 'user_registration_form_custom_class', $custom_cl
|
|
55 |
do_action( 'user_registration_before_registration_form', $form_id );
|
56 |
|
57 |
?>
|
58 |
-
<div class='user-registration ur-frontend-form <?php echo $template_class . ' ' . $custom_class; ?>' id='user-registration-form-<?php echo absint( $form_id ); ?>'>
|
59 |
<form method='post' class='register' data-form-id="<?php echo absint( $form_id ); ?>"
|
60 |
-
data-enable-strength-password="<?php echo $enable_strong_password; ?>" data-minimum-password-strength="<?php echo $minimum_password_strength; ?>" <?php echo apply_filters( 'user_registration_form_params', '' ); ?> data-captcha-enabled="<?php echo esc_attr( $recaptcha_enabled ) ?>">
|
61 |
|
62 |
<?php
|
63 |
do_action( 'user_registration_before_form_fields', $form_data_array, $form_id );
|
@@ -98,7 +98,7 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
98 |
}
|
99 |
}
|
100 |
?>
|
101 |
-
<div <?php echo $cl_props; ?> data-field-id="<?php echo $field_id; ?>" class="ur-field-item field-<?php echo esc_attr( $single_item->field_key ); ?> <?php echo esc_attr( ! empty( $single_item->advance_setting->custom_class ) ? $single_item->advance_setting->custom_class : '' ); ?>">
|
102 |
<?php
|
103 |
$frontend->user_registration_frontend_form( $single_item, $form_id );
|
104 |
$is_field_exists = true;
|
@@ -138,7 +138,7 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
138 |
<span></span>
|
139 |
<?php
|
140 |
$submit = ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_form_submit_label' );
|
141 |
-
echo ur_string_translation( $form_id, 'user_registration_form_setting_form_submit_label', $submit );
|
142 |
?>
|
143 |
</button>
|
144 |
<?php do_action( 'user_registration_after_form_buttons', $form_id ); ?>
|
@@ -156,11 +156,11 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
156 |
?>
|
157 |
|
158 |
<div style="clear:both"></div>
|
159 |
-
<?php if ('1' === $enable_field_icon) { ?>
|
160 |
-
<input type="hidden" id="ur-form-field-icon" name="ur-field-icon" value="<?php echo $enable_field_icon; ?>"/>
|
161 |
<?php } ?>
|
162 |
<input type="hidden" name="ur-user-form-id" value="<?php echo absint( $form_id ); ?>"/>
|
163 |
-
<input type="hidden" name="ur-redirect-url" value="<?php echo ur_string_translation( $form_id, 'user_registration_form_setting_redirect_options', $redirect_url ); ?>"/>
|
164 |
<?php wp_nonce_field( 'ur_frontend_form_id-' . $form_id, 'ur_frontend_form_nonce', false ); ?>
|
165 |
|
166 |
<?php do_action( 'user_registration_form_registration_end', $form_id ); ?>
|
55 |
do_action( 'user_registration_before_registration_form', $form_id );
|
56 |
|
57 |
?>
|
58 |
+
<div class='user-registration ur-frontend-form <?php echo esc_attr( $template_class ) . ' ' . esc_attr( $custom_class ); ?>' id='user-registration-form-<?php echo absint( $form_id ); ?>'>
|
59 |
<form method='post' class='register' data-form-id="<?php echo absint( $form_id ); ?>"
|
60 |
+
data-enable-strength-password="<?php echo esc_attr( $enable_strong_password ); ?>" data-minimum-password-strength="<?php echo esc_attr( $minimum_password_strength ); ?>" <?php echo apply_filters( 'user_registration_form_params', '' ); ?> data-captcha-enabled="<?php echo esc_attr( $recaptcha_enabled ); ?>">
|
61 |
|
62 |
<?php
|
63 |
do_action( 'user_registration_before_form_fields', $form_data_array, $form_id );
|
98 |
}
|
99 |
}
|
100 |
?>
|
101 |
+
<div <?php echo $cl_props; ?> data-field-id="<?php echo esc_attr( $field_id ); ?>" class="ur-field-item field-<?php echo esc_attr( $single_item->field_key ); ?> <?php echo esc_attr( ! empty( $single_item->advance_setting->custom_class ) ? $single_item->advance_setting->custom_class : '' ); ?>">
|
102 |
<?php
|
103 |
$frontend->user_registration_frontend_form( $single_item, $form_id );
|
104 |
$is_field_exists = true;
|
138 |
<span></span>
|
139 |
<?php
|
140 |
$submit = ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_form_submit_label' );
|
141 |
+
echo esc_html( ur_string_translation( $form_id, 'user_registration_form_setting_form_submit_label', $submit ) );
|
142 |
?>
|
143 |
</button>
|
144 |
<?php do_action( 'user_registration_after_form_buttons', $form_id ); ?>
|
156 |
?>
|
157 |
|
158 |
<div style="clear:both"></div>
|
159 |
+
<?php if ( '1' === $enable_field_icon ) { ?>
|
160 |
+
<input type="hidden" id="ur-form-field-icon" name="ur-field-icon" value="<?php echo esc_attr( $enable_field_icon ); ?>"/>
|
161 |
<?php } ?>
|
162 |
<input type="hidden" name="ur-user-form-id" value="<?php echo absint( $form_id ); ?>"/>
|
163 |
+
<input type="hidden" name="ur-redirect-url" value="<?php echo esc_attr( ur_string_translation( $form_id, 'user_registration_form_setting_redirect_options', $redirect_url ) ); ?>"/>
|
164 |
<?php wp_nonce_field( 'ur_frontend_form_id-' . $form_id, 'ur_frontend_form_nonce', false ); ?>
|
165 |
|
166 |
<?php do_action( 'user_registration_form_registration_end', $form_id ); ?>
|
templates/myaccount/dashboard.php
CHANGED
@@ -39,10 +39,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
39 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
40 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
41 |
|
42 |
-
|
43 |
|
44 |
?>
|
45 |
-
<img class="profile-preview" alt="profile-picture" src="<?php echo $image; ?>">
|
46 |
<?php } ?>
|
47 |
|
48 |
</div>
|
39 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
40 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
41 |
|
42 |
+
if ( 'no' === get_option( 'user_registration_disable_profile_picture', 'no' ) ) {
|
43 |
|
44 |
?>
|
45 |
+
<img class="profile-preview" alt="profile-picture" src="<?php echo esc_url( $image ); ?>">
|
46 |
<?php } ?>
|
47 |
|
48 |
</div>
|
templates/myaccount/form-edit-password.php
CHANGED
@@ -24,7 +24,7 @@ ur_do_deprecated_action( 'user_registration_before_edit_account_form', array(),
|
|
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" data-enable-strength-password="<?php echo $enable_strong_password; ?>" data-minimum-password-strength="<?php echo $minimum_password_strength; ?>" >
|
28 |
<div class="ur-form-row">
|
29 |
<div class="ur-form-grid">
|
30 |
<?php
|
@@ -32,11 +32,11 @@ do_action( 'user_registration_before_change_password_form' );
|
|
32 |
do_action( 'user_registration_change_password_form_start' );
|
33 |
?>
|
34 |
<fieldset>
|
35 |
-
<legend><?php
|
36 |
|
37 |
<?php if ( apply_filters( 'user_registration_change_password_current_password_display', true ) ) { ?>
|
38 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
39 |
-
<label for="password_current"><?php
|
40 |
<span class="password-input-group">
|
41 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_current" id="password_current" />
|
42 |
<?php
|
@@ -48,7 +48,7 @@ do_action( 'user_registration_before_change_password_form' );
|
|
48 |
</p>
|
49 |
<?php } ?>
|
50 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
51 |
-
<label for="password_1"><?php
|
52 |
<span class="password-input-group">
|
53 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_1" id="password_1" />
|
54 |
<?php
|
@@ -59,7 +59,7 @@ do_action( 'user_registration_before_change_password_form' );
|
|
59 |
</span>
|
60 |
</p>
|
61 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
62 |
-
<label for="password_2"><?php
|
63 |
<span class="password-input-group">
|
64 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_2" id="password_2" />
|
65 |
<?php
|
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" data-enable-strength-password="<?php echo esc_attr( $enable_strong_password ); ?>" data-minimum-password-strength="<?php echo esc_attr( $minimum_password_strength ); ?>" >
|
28 |
<div class="ur-form-row">
|
29 |
<div class="ur-form-grid">
|
30 |
<?php
|
32 |
do_action( 'user_registration_change_password_form_start' );
|
33 |
?>
|
34 |
<fieldset>
|
35 |
+
<legend><?php esc_html_e( 'Change Password', 'user-registration' ); ?></legend>
|
36 |
|
37 |
<?php if ( apply_filters( 'user_registration_change_password_current_password_display', true ) ) { ?>
|
38 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
39 |
+
<label for="password_current"><?php esc_html_e( 'Current password', 'user-registration' ); ?></label>
|
40 |
<span class="password-input-group">
|
41 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_current" id="password_current" />
|
42 |
<?php
|
48 |
</p>
|
49 |
<?php } ?>
|
50 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
51 |
+
<label for="password_1"><?php esc_html_e( 'New password', 'user-registration' ); ?></label>
|
52 |
<span class="password-input-group">
|
53 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_1" id="password_1" />
|
54 |
<?php
|
59 |
</span>
|
60 |
</p>
|
61 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
62 |
+
<label for="password_2"><?php esc_html_e( 'Confirm new password', 'user-registration' ); ?></label>
|
63 |
<span class="password-input-group">
|
64 |
<input type="password" class="user-registration-Input user-registration-Input--password input-text" name="password_2" id="password_2" />
|
65 |
<?php
|
templates/myaccount/form-edit-profile.php
CHANGED
@@ -29,8 +29,8 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
29 |
<div class="user-registration-profile-fields">
|
30 |
<h2><?php _e( 'Profile Detail', 'user-registration' ); ?></h2>
|
31 |
<?php
|
32 |
-
if( 'no' === get_option( 'user_registration_disable_profile_picture', 'no' ) ) {
|
33 |
-
|
34 |
<div class="user-registration-profile-header">
|
35 |
<div class="user-registration-img-container" style="width:100%">
|
36 |
<?php
|
@@ -38,29 +38,29 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
38 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
39 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
40 |
|
41 |
-
foreach($form_data_array as $data){
|
42 |
foreach ( $data as $grid_key => $grid_data ) {
|
43 |
foreach ( $grid_data as $grid_data_key => $single_item ) {
|
44 |
$edit_profile_valid_file_type = 'image/jpeg,image/jpg,image/gif,image/png';
|
45 |
|
46 |
-
if(
|
47 |
if ( ! empty( $single_item->advance_setting->valid_file_type ) ) {
|
48 |
-
$edit_profile_valid_file_type = implode(', ', $single_item->advance_setting->valid_file_type);
|
49 |
}
|
50 |
}
|
51 |
}
|
52 |
}
|
53 |
}
|
54 |
-
|
55 |
-
<img class="profile-preview" alt="profile-picture" src="<?php echo $image; ?>" style='max-width:96px; max-height:96px;' >
|
56 |
<?php
|
57 |
$max_size = wp_max_upload_size();
|
58 |
$max_size = size_format( $max_size );
|
59 |
?>
|
60 |
-
<p class="user-registration-tips"><?php echo
|
61 |
</div>
|
62 |
<header>
|
63 |
-
<p><strong><?php echo apply_filters( 'user_registration_upload_new_profile_image_message',
|
64 |
<div class="button-group">
|
65 |
<?php
|
66 |
|
@@ -69,7 +69,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
69 |
<div class="uraf-profile-picture-upload">
|
70 |
<p class="form-row " id="profile_pic_url_field" data-priority="">
|
71 |
<span class="uraf-profile-picture-upload-node" style="height: 0;width: 0;margin: 0;padding: 0;float: left;border: 0;overflow: hidden;">
|
72 |
-
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="<?php echo $edit_profile_valid_file_type ?>" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" />
|
73 |
<?php echo '<input type="text" class="uraf-profile-picture-input input-text ur-frontend-field" name="profile_pic_url" id="profile_pic_url" value="' . esc_url( $profile_picture_url ) . '" />'; ?>
|
74 |
</span>
|
75 |
<?php do_action( 'uraf_profile_picture_buttons' ); ?>
|
@@ -77,21 +77,21 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
77 |
<div style="clear:both; margin-bottom: 20px"></div>
|
78 |
</div>
|
79 |
|
80 |
-
|
81 |
} else {
|
82 |
?>
|
83 |
<input type="hidden" name="profile-pic-url" id="profile_pic_url" value="<?php echo esc_attr( $profile_picture_url ); ?>" />
|
84 |
-
<input type="hidden" name="profile-default-image" value="<?php echo $gravatar_image; ?>" />
|
85 |
-
<button class="button profile-pic-remove" style="<?php echo ( $gravatar_image === $image ) ? 'display:none;' : ''; ?>"><?php echo
|
86 |
<?php
|
87 |
if ( 'yes' === get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ) ) {
|
88 |
?>
|
89 |
-
<button type="button" class="button user_registration_profile_picture_upload hide-if-no-js" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" ><?php echo
|
90 |
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="display:none" />
|
91 |
<?php
|
92 |
} else {
|
93 |
?>
|
94 |
-
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" />
|
95 |
<?php
|
96 |
}
|
97 |
}
|
@@ -100,9 +100,9 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
100 |
</div>
|
101 |
<?php
|
102 |
if ( ! $profile_picture_url ) {
|
103 |
-
|
104 |
-
<span><i><?php echo
|
105 |
-
<?php }
|
106 |
</header>
|
107 |
</div>
|
108 |
<?php } ?>
|
@@ -125,7 +125,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
125 |
}
|
126 |
if ( $found_field ) {
|
127 |
?>
|
128 |
-
<div class="ur-form-grid ur-grid-<?php echo( $grid_key + 1 ); ?>" style="width:<?php echo $width; ?>%;">
|
129 |
<?php
|
130 |
}
|
131 |
|
@@ -139,8 +139,8 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
139 |
$single_item = class_exists( 'URCL_Field_Settings' ) && method_exists( URCL_Field_Settings::class, 'migrate_to_logic_map_schema' ) ? URCL_Field_Settings::migrate_to_logic_map_schema( $single_item ) : $single_item;
|
140 |
}
|
141 |
|
142 |
-
$user_id
|
143 |
-
$form_id
|
144 |
$field = $profile[ $key ];
|
145 |
$field['input_class'] = array( 'ur-edit-profile-field ' );
|
146 |
$advance_data = array(
|
@@ -164,18 +164,18 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
164 |
$cl_props = sprintf( 'data-conditional-logic-enabled="%s" data-conditional-logic-map="%s"', esc_attr( $cl_enabled ), esc_attr( $cl_map ) );
|
165 |
}
|
166 |
}
|
167 |
-
// unset invite code
|
168 |
-
if ( 'invite_code' === $single_item->field_key) {
|
169 |
continue;
|
170 |
-
|
171 |
|
172 |
// Unset multiple choice and single item.
|
173 |
-
if ( 'multiple_choice' === $single_item->field_key || 'single_item' === $single_item->field_key) {
|
174 |
continue;
|
175 |
-
|
176 |
|
177 |
?>
|
178 |
-
<div class="ur-field-item field-<?php echo $single_item->field_key; ?>" <?php echo $cl_props; ?> data-field-id="<?php echo $field_id; ?>">
|
179 |
<?php
|
180 |
$readonly_fields = ur_readonly_profile_details_fields();
|
181 |
if ( array_key_exists( $field['field_key'], $readonly_fields ) ) {
|
@@ -195,24 +195,24 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
195 |
$field['step'] = isset( $advance_data['advance_setting']->step ) ? $advance_data['advance_setting']->step : '';
|
196 |
}
|
197 |
|
198 |
-
if( 'range' === $single_item->field_key ) {
|
199 |
-
$field['range_min'] =
|
200 |
-
$field['range_max'] =
|
201 |
-
$field['range_step'] =
|
202 |
-
$field['enable_payment_slider'] =
|
203 |
|
204 |
-
if(
|
205 |
-
if(
|
206 |
-
$field['range_prefix'] = isset( $advance_data['advance_setting']->range_prefix) ? $advance_data['advance_setting']->range_prefix :
|
207 |
-
$field['range_postfix'] = isset( $advance_data['advance_setting']->range_postfix) ? $advance_data['advance_setting']->range_postfix :
|
208 |
} else {
|
209 |
$field['range_prefix'] = $field['range_min'];
|
210 |
-
$field['range_postfix'] =
|
211 |
}
|
212 |
}
|
213 |
|
214 |
-
// to hide the range as payment slider in edit profile
|
215 |
-
if(
|
216 |
continue;
|
217 |
}
|
218 |
}
|
@@ -225,15 +225,15 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
225 |
}
|
226 |
|
227 |
if ( isset( $single_item->general_setting->hide_label ) ) {
|
228 |
-
|
229 |
-
|
|
|
230 |
}
|
231 |
-
}
|
232 |
|
233 |
if ( 'select' === $single_item->field_key ) {
|
234 |
-
$option_data
|
235 |
$option_advance_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $option_data;
|
236 |
-
|
237 |
|
238 |
if ( is_array( $option_advance_data ) ) {
|
239 |
foreach ( $option_advance_data as $index_data => $option ) {
|
@@ -250,7 +250,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
250 |
}
|
251 |
|
252 |
if ( 'radio' === $single_item->field_key ) {
|
253 |
-
$option_data
|
254 |
$option_advance_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $option_data;
|
255 |
$options = array();
|
256 |
|
@@ -260,7 +260,6 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
260 |
}
|
261 |
$field['options'] = $options;
|
262 |
}
|
263 |
-
|
264 |
}
|
265 |
|
266 |
if ( 'file' === $single_item->field_key ) {
|
@@ -270,11 +269,11 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
270 |
$field['max_files'] = 1;
|
271 |
}
|
272 |
|
273 |
-
if( isset( $advance_data['advance_setting']->max_upload_size)){
|
274 |
$field['max_upload_size'] = $advance_data['advance_setting']->max_upload_size;
|
275 |
}
|
276 |
|
277 |
-
if( isset( $advance_data['advance_setting']->valid_file_type)){
|
278 |
$field['valid_file_type'] = $advance_data['advance_setting']->valid_file_type;
|
279 |
}
|
280 |
}
|
@@ -288,51 +287,50 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
288 |
}
|
289 |
|
290 |
// Add choice_limit setting valur in order to limit choice fields.
|
291 |
-
if(
|
292 |
$choices = isset( $advance_data['advance_setting']->choices ) ? explode( ',', $advance_data['advance_setting']->choices ) : array();
|
293 |
$option_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $choices;
|
294 |
-
$options
|
295 |
|
296 |
if ( is_array( $option_data ) ) {
|
297 |
foreach ( $option_data as $index_data => $option ) {
|
298 |
-
$options[ $option ] = ur_string_translation( $form_id,'user_registration_' . $advance_data['general_setting']->field_name . '_option_' . ( ++$index_data ), $option );
|
299 |
}
|
300 |
|
301 |
$field['options'] = $options;
|
302 |
}
|
303 |
|
304 |
-
if( isset( $advance_data[
|
305 |
-
$field[
|
306 |
}
|
307 |
-
if( isset( $advance_data[
|
308 |
-
$field[
|
309 |
}
|
310 |
}
|
311 |
|
312 |
-
if( 'timepicker' === $single_item->field_key ) {
|
313 |
-
$field['current_time'] =
|
314 |
-
$field['time_interval'] =
|
315 |
-
$field['time_min']
|
316 |
-
$field['time_max']
|
317 |
-
$timemin
|
318 |
-
$timemax
|
319 |
-
|
320 |
-
$maxampm
|
321 |
-
|
322 |
-
//Handles the time format
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
if( 'am' === $timemax || 'pm' === $timemax ){
|
330 |
-
$field[ 'time_max' ] = $field["time_max"];
|
331 |
-
} else {
|
332 |
-
$field['time_max'] = $field['time_max'] .''. $maxampm;
|
333 |
-
}
|
334 |
|
|
|
|
|
|
|
|
|
335 |
}
|
|
|
336 |
|
337 |
$filter_data = array(
|
338 |
'form_data' => $field,
|
@@ -349,7 +347,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
349 |
* Embed the current country value to allow to remove it if it's not allowed.
|
350 |
*/
|
351 |
if ( 'country' === $single_item->field_key && ! empty( $value ) ) {
|
352 |
-
echo sprintf( '<span hidden class="ur-data-holder" data-option-value="%s" data-option-html="%s"></span>', $value, UR_Form_Field_Country::get_instance()->get_country()[ $value ] );
|
353 |
}
|
354 |
?>
|
355 |
</div>
|
29 |
<div class="user-registration-profile-fields">
|
30 |
<h2><?php _e( 'Profile Detail', 'user-registration' ); ?></h2>
|
31 |
<?php
|
32 |
+
if ( 'no' === get_option( 'user_registration_disable_profile_picture', 'no' ) ) {
|
33 |
+
?>
|
34 |
<div class="user-registration-profile-header">
|
35 |
<div class="user-registration-img-container" style="width:100%">
|
36 |
<?php
|
38 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
39 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
40 |
|
41 |
+
foreach ( $form_data_array as $data ) {
|
42 |
foreach ( $data as $grid_key => $grid_data ) {
|
43 |
foreach ( $grid_data as $grid_data_key => $single_item ) {
|
44 |
$edit_profile_valid_file_type = 'image/jpeg,image/jpg,image/gif,image/png';
|
45 |
|
46 |
+
if ( 'profile_picture' === $single_item->field_key ) {
|
47 |
if ( ! empty( $single_item->advance_setting->valid_file_type ) ) {
|
48 |
+
$edit_profile_valid_file_type = implode( ', ', $single_item->advance_setting->valid_file_type );
|
49 |
}
|
50 |
}
|
51 |
}
|
52 |
}
|
53 |
}
|
54 |
+
?>
|
55 |
+
<img class="profile-preview" alt="profile-picture" src="<?php echo esc_url( $image ); ?>" style='max-width:96px; max-height:96px;' >
|
56 |
<?php
|
57 |
$max_size = wp_max_upload_size();
|
58 |
$max_size = size_format( $max_size );
|
59 |
?>
|
60 |
+
<p class="user-registration-tips"><?php echo esc_html__( 'Max size: ', 'user-registration' ) . esc_attr( $max_size ); ?></p>
|
61 |
</div>
|
62 |
<header>
|
63 |
+
<p><strong><?php echo esc_html( apply_filters( 'user_registration_upload_new_profile_image_message', esc_html__( 'Upload your new profile image.', 'user-registration' ) ) ); ?></strong></p>
|
64 |
<div class="button-group">
|
65 |
<?php
|
66 |
|
69 |
<div class="uraf-profile-picture-upload">
|
70 |
<p class="form-row " id="profile_pic_url_field" data-priority="">
|
71 |
<span class="uraf-profile-picture-upload-node" style="height: 0;width: 0;margin: 0;padding: 0;float: left;border: 0;overflow: hidden;">
|
72 |
+
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="<?php echo esc_html( $edit_profile_valid_file_type ); ?>" style="<?php echo esc_attr( ( $gravatar_image !== $image ) ? 'display:none;' : '' ); ?>" />
|
73 |
<?php echo '<input type="text" class="uraf-profile-picture-input input-text ur-frontend-field" name="profile_pic_url" id="profile_pic_url" value="' . esc_url( $profile_picture_url ) . '" />'; ?>
|
74 |
</span>
|
75 |
<?php do_action( 'uraf_profile_picture_buttons' ); ?>
|
77 |
<div style="clear:both; margin-bottom: 20px"></div>
|
78 |
</div>
|
79 |
|
80 |
+
<?php
|
81 |
} else {
|
82 |
?>
|
83 |
<input type="hidden" name="profile-pic-url" id="profile_pic_url" value="<?php echo esc_attr( $profile_picture_url ); ?>" />
|
84 |
+
<input type="hidden" name="profile-default-image" value="<?php echo esc_url( $gravatar_image ); ?>" />
|
85 |
+
<button class="button profile-pic-remove" style="<?php echo esc_attr( ( $gravatar_image === $image ) ? 'display:none;' : '' ); ?>"><?php echo esc_html__( 'Remove', 'user-registration' ); ?></php></button>
|
86 |
<?php
|
87 |
if ( 'yes' === get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ) ) {
|
88 |
?>
|
89 |
+
<button type="button" class="button user_registration_profile_picture_upload hide-if-no-js" style="<?php echo esc_attr( ( $gravatar_image !== $image ) ? 'display:none;' : '' ); ?>" ><?php echo esc_html__( 'Upload Picture', 'user-registration' ); ?></button>
|
90 |
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="display:none" />
|
91 |
<?php
|
92 |
} else {
|
93 |
?>
|
94 |
+
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="<?php echo esc_attr( ( $gravatar_image !== $image ) ? 'display:none;' : '' ); ?>" />
|
95 |
<?php
|
96 |
}
|
97 |
}
|
100 |
</div>
|
101 |
<?php
|
102 |
if ( ! $profile_picture_url ) {
|
103 |
+
?>
|
104 |
+
<span><i><?php echo esc_html__( 'You can change your profile picture on', 'user-registration' ); ?> <a href="https://en.gravatar.com/"><?php esc_html_e( 'Gravatar', 'user-registration' ); ?></a></i></span>
|
105 |
+
<?php } ?>
|
106 |
</header>
|
107 |
</div>
|
108 |
<?php } ?>
|
125 |
}
|
126 |
if ( $found_field ) {
|
127 |
?>
|
128 |
+
<div class="ur-form-grid ur-grid-<?php echo esc_attr( ( $grid_key + 1 ) ); ?>" style="width:<?php echo esc_attr( $width ); ?>%;">
|
129 |
<?php
|
130 |
}
|
131 |
|
139 |
$single_item = class_exists( 'URCL_Field_Settings' ) && method_exists( URCL_Field_Settings::class, 'migrate_to_logic_map_schema' ) ? URCL_Field_Settings::migrate_to_logic_map_schema( $single_item ) : $single_item;
|
140 |
}
|
141 |
|
142 |
+
$user_id = get_current_user_id();
|
143 |
+
$form_id = ur_get_form_id_by_userid( $user_id );
|
144 |
$field = $profile[ $key ];
|
145 |
$field['input_class'] = array( 'ur-edit-profile-field ' );
|
146 |
$advance_data = array(
|
164 |
$cl_props = sprintf( 'data-conditional-logic-enabled="%s" data-conditional-logic-map="%s"', esc_attr( $cl_enabled ), esc_attr( $cl_map ) );
|
165 |
}
|
166 |
}
|
167 |
+
// unset invite code.
|
168 |
+
if ( 'invite_code' === $single_item->field_key ) {
|
169 |
continue;
|
170 |
+
}
|
171 |
|
172 |
// Unset multiple choice and single item.
|
173 |
+
if ( 'multiple_choice' === $single_item->field_key || 'single_item' === $single_item->field_key ) {
|
174 |
continue;
|
175 |
+
}
|
176 |
|
177 |
?>
|
178 |
+
<div class="ur-field-item field-<?php echo esc_attr( $single_item->field_key ); ?>" <?php echo $cl_props; ?> data-field-id="<?php echo esc_attr( $field_id ); ?>">
|
179 |
<?php
|
180 |
$readonly_fields = ur_readonly_profile_details_fields();
|
181 |
if ( array_key_exists( $field['field_key'], $readonly_fields ) ) {
|
195 |
$field['step'] = isset( $advance_data['advance_setting']->step ) ? $advance_data['advance_setting']->step : '';
|
196 |
}
|
197 |
|
198 |
+
if ( 'range' === $single_item->field_key ) {
|
199 |
+
$field['range_min'] = ( isset( $advance_data['advance_setting']->range_min ) && '' !== $advance_data['advance_setting']->range_min ) ? $advance_data['advance_setting']->range_min : '0';
|
200 |
+
$field['range_max'] = ( isset( $advance_data['advance_setting']->range_max ) && '' !== $advance_data['advance_setting']->range_max ) ? $advance_data['advance_setting']->range_max : '10';
|
201 |
+
$field['range_step'] = isset( $advance_data['advance_setting']->range_step ) ? $advance_data['advance_setting']->range_step : '1';
|
202 |
+
$field['enable_payment_slider'] = isset( $advance_data['advance_setting']->enable_payment_slider ) ? $advance_data['advance_setting']->enable_payment_slider : 'false';
|
203 |
|
204 |
+
if ( 'true' === $advance_data['advance_setting']->enable_prefix_postfix ) {
|
205 |
+
if ( 'true' === $advance_data['advance_setting']->enable_text_prefix_postfix ) {
|
206 |
+
$field['range_prefix'] = isset( $advance_data['advance_setting']->range_prefix ) ? $advance_data['advance_setting']->range_prefix : '';
|
207 |
+
$field['range_postfix'] = isset( $advance_data['advance_setting']->range_postfix ) ? $advance_data['advance_setting']->range_postfix : '';
|
208 |
} else {
|
209 |
$field['range_prefix'] = $field['range_min'];
|
210 |
+
$field['range_postfix'] = $field['range_max'];
|
211 |
}
|
212 |
}
|
213 |
|
214 |
+
// to hide the range as payment slider in edit profile.
|
215 |
+
if ( 'true' === $field['enable_payment_slider'] ) {
|
216 |
continue;
|
217 |
}
|
218 |
}
|
225 |
}
|
226 |
|
227 |
if ( isset( $single_item->general_setting->hide_label ) ) {
|
228 |
+
if ( 'yes' === $single_item->general_setting->hide_label ) {
|
229 |
+
unset( $field['label'] );
|
230 |
+
}
|
231 |
}
|
|
|
232 |
|
233 |
if ( 'select' === $single_item->field_key ) {
|
234 |
+
$option_data = isset( $advance_data['advance_setting']->options ) ? explode( ',', $advance_data['advance_setting']->options ) : array();
|
235 |
$option_advance_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $option_data;
|
236 |
+
$options = array();
|
237 |
|
238 |
if ( is_array( $option_advance_data ) ) {
|
239 |
foreach ( $option_advance_data as $index_data => $option ) {
|
250 |
}
|
251 |
|
252 |
if ( 'radio' === $single_item->field_key ) {
|
253 |
+
$option_data = isset( $advance_data['advance_setting']->options ) ? explode( ',', $advance_data['advance_setting']->options ) : array();
|
254 |
$option_advance_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $option_data;
|
255 |
$options = array();
|
256 |
|
260 |
}
|
261 |
$field['options'] = $options;
|
262 |
}
|
|
|
263 |
}
|
264 |
|
265 |
if ( 'file' === $single_item->field_key ) {
|
269 |
$field['max_files'] = 1;
|
270 |
}
|
271 |
|
272 |
+
if ( isset( $advance_data['advance_setting']->max_upload_size ) ) {
|
273 |
$field['max_upload_size'] = $advance_data['advance_setting']->max_upload_size;
|
274 |
}
|
275 |
|
276 |
+
if ( isset( $advance_data['advance_setting']->valid_file_type ) ) {
|
277 |
$field['valid_file_type'] = $advance_data['advance_setting']->valid_file_type;
|
278 |
}
|
279 |
}
|
287 |
}
|
288 |
|
289 |
// Add choice_limit setting valur in order to limit choice fields.
|
290 |
+
if ( 'checkbox' === $single_item->field_key || 'multi_select2' === $single_item->field_key ) {
|
291 |
$choices = isset( $advance_data['advance_setting']->choices ) ? explode( ',', $advance_data['advance_setting']->choices ) : array();
|
292 |
$option_data = isset( $advance_data['general_setting']->options ) ? $advance_data['general_setting']->options : $choices;
|
293 |
+
$options = array();
|
294 |
|
295 |
if ( is_array( $option_data ) ) {
|
296 |
foreach ( $option_data as $index_data => $option ) {
|
297 |
+
$options[ $option ] = ur_string_translation( $form_id, 'user_registration_' . $advance_data['general_setting']->field_name . '_option_' . ( ++$index_data ), $option );
|
298 |
}
|
299 |
|
300 |
$field['options'] = $options;
|
301 |
}
|
302 |
|
303 |
+
if ( isset( $advance_data['advance_setting']->choice_limit ) ) {
|
304 |
+
$field['choice_limit'] = $advance_data['advance_setting']->choice_limit;
|
305 |
}
|
306 |
+
if ( isset( $advance_data['advance_setting']->select_all ) ) {
|
307 |
+
$field['select_all'] = $advance_data['advance_setting']->select_all;
|
308 |
}
|
309 |
}
|
310 |
|
311 |
+
if ( 'timepicker' === $single_item->field_key ) {
|
312 |
+
$field['current_time'] = isset( $advance_data['advance_setting']->current_time ) ? $advance_data['advance_setting']->current_time : '';
|
313 |
+
$field['time_interval'] = isset( $advance_data['advance_setting']->time_interval ) ? $advance_data['advance_setting']->time_interval : '';
|
314 |
+
$field['time_min'] = ( isset( $advance_data['advance_setting']->time_min ) && '' !== $advance_data['advance_setting']->time_min ) ? $advance_data['advance_setting']->time_min : '';
|
315 |
+
$field['time_max'] = ( isset( $advance_data['advance_setting']->time_max ) && '' !== $advance_data['advance_setting']->time_max ) ? $advance_data['advance_setting']->time_max : '';
|
316 |
+
$timemin = isset( $field['time_min'] ) ? strtolower( substr( $field['time_min'], -2 ) ) : '';
|
317 |
+
$timemax = isset( $field['time_max'] ) ? strtolower( substr( $field['time_max'], -2 ) ) : '';
|
318 |
+
$minampm = intval( $field['time_min'] ) <= 12 ? 'AM' : 'PM';
|
319 |
+
$maxampm = intval( $field['time_max'] ) <= 12 ? 'AM' : 'PM';
|
320 |
+
|
321 |
+
// Handles the time format.
|
322 |
+
if ( 'am' === $timemin || 'pm' === $timemin ) {
|
323 |
+
$field['time_min'] = $field['time_min'];
|
324 |
+
} else {
|
325 |
+
$field['time_min'] = $field['time_min'] . '' . $minampm;
|
326 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
|
328 |
+
if ( 'am' === $timemax || 'pm' === $timemax ) {
|
329 |
+
$field['time_max'] = $field['time_max'];
|
330 |
+
} else {
|
331 |
+
$field['time_max'] = $field['time_max'] . '' . $maxampm;
|
332 |
}
|
333 |
+
}
|
334 |
|
335 |
$filter_data = array(
|
336 |
'form_data' => $field,
|
347 |
* Embed the current country value to allow to remove it if it's not allowed.
|
348 |
*/
|
349 |
if ( 'country' === $single_item->field_key && ! empty( $value ) ) {
|
350 |
+
echo sprintf( '<span hidden class="ur-data-holder" data-option-value="%s" data-option-html="%s"></span>', esc_attr( $value ), esc_attr( UR_Form_Field_Country::get_instance()->get_country()[ $value ] ) );
|
351 |
}
|
352 |
?>
|
353 |
</div>
|
templates/myaccount/form-login.php
CHANGED
@@ -53,7 +53,9 @@ $enable_ajax = 'yes' === get_option( 'ur_login_ajax_submission', 'no' );
|
|
53 |
|
54 |
$enable_field_icon = 'yes' === get_option( 'user_registration_pro_general_setting_login_form', 'no' );
|
55 |
|
56 |
-
$login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
|
|
|
57 |
|
58 |
?>
|
59 |
|
@@ -61,14 +63,16 @@ $login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
61 |
|
62 |
<?php do_action( 'user_registration_before_customer_login_form' ); ?>
|
63 |
|
64 |
-
<div class="ur-frontend-form login <?php echo $template_class; ?>" id="ur-frontend-form">
|
65 |
|
66 |
<form class="user-registration-form user-registration-form-login login" method="post">
|
67 |
<div class="ur-form-row">
|
68 |
<div class="ur-form-grid">
|
69 |
-
<?php
|
70 |
-
|
71 |
-
|
|
|
|
|
72 |
<?php do_action( 'user_registration_login_form_start' ); ?>
|
73 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
74 |
<?php
|
@@ -78,7 +82,7 @@ $login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
78 |
?>
|
79 |
<span class="input-wrapper">
|
80 |
<input placeholder="<?php echo esc_attr( $placeholders['username'] ); ?>" type="text" class="user-registration-Input user-registration-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
81 |
-
<?php if($enable_field_icon) { ?>
|
82 |
<span class="ur-icon ur-icon-user"></span>
|
83 |
<?php } ?>
|
84 |
</span>
|
@@ -101,7 +105,7 @@ $login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
101 |
<?php
|
102 |
}
|
103 |
?>
|
104 |
-
<?php if($enable_field_icon) { ?>
|
105 |
<span class="ur-icon ur-icon-password"></span>
|
106 |
<?php } ?>
|
107 |
</span>
|
@@ -118,7 +122,7 @@ $login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
118 |
<p class="form-row">
|
119 |
<?php wp_nonce_field( 'user-registration-login', 'user-registration-login-nonce' ); ?>
|
120 |
<div>
|
121 |
-
<?php if($enable_ajax) { ?>
|
122 |
<input type="submit" class="user-registration-Button button ur-submit-button" id="user_registration_ajax_login_submit" name="login" value="<?php echo esc_html( $labels['login'] ); ?>" />
|
123 |
<span></span>
|
124 |
<?php } else { ?>
|
@@ -154,28 +158,28 @@ $login_title = 'yes' === get_option('user_registration_login_title', 'no' );
|
|
154 |
<?php
|
155 |
$users_can_register = get_option( 'users_can_register', 'yes' );
|
156 |
|
157 |
-
|
158 |
$url_options = get_option( 'user_registration_general_setting_registration_url_options' );
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
|
164 |
-
|
165 |
-
|
166 |
<a href="<?php echo get_option( 'user_registration_general_setting_registration_url_options' ); ?>"> <?php echo get_option( 'user_registration_general_setting_registration_label' ); ?>
|
167 |
</a>
|
168 |
<?php
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
<a href="<?php echo get_option( 'user_registration_general_setting_registration_url_options' ); ?>"> <?php echo get_option( 'user_registration_general_setting_registration_label' ); ?>
|
173 |
</a>
|
174 |
<?php
|
|
|
|
|
175 |
}
|
176 |
-
echo '</p>';
|
177 |
}
|
178 |
-
}
|
179 |
?>
|
180 |
<?php do_action( 'user_registration_login_form_end' ); ?>
|
181 |
</div>
|
53 |
|
54 |
$enable_field_icon = 'yes' === get_option( 'user_registration_pro_general_setting_login_form', 'no' );
|
55 |
|
56 |
+
$login_title = 'yes' === get_option( 'user_registration_login_title', 'no' );
|
57 |
+
|
58 |
+
$login_title = 'yes' === get_option( 'user_registration_login_title', 'no' );
|
59 |
|
60 |
?>
|
61 |
|
63 |
|
64 |
<?php do_action( 'user_registration_before_customer_login_form' ); ?>
|
65 |
|
66 |
+
<div class="ur-frontend-form login <?php echo esc_attr( $template_class ); ?>" id="ur-frontend-form">
|
67 |
|
68 |
<form class="user-registration-form user-registration-form-login login" method="post">
|
69 |
<div class="ur-form-row">
|
70 |
<div class="ur-form-grid">
|
71 |
+
<?php
|
72 |
+
if ( $login_title ) {
|
73 |
+
echo esc_html( apply_filters( 'ur_login_title', esc_html__( $labels['login'], 'user-registration' ) ) );
|
74 |
+
}
|
75 |
+
?>
|
76 |
<?php do_action( 'user_registration_login_form_start' ); ?>
|
77 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide">
|
78 |
<?php
|
82 |
?>
|
83 |
<span class="input-wrapper">
|
84 |
<input placeholder="<?php echo esc_attr( $placeholders['username'] ); ?>" type="text" class="user-registration-Input user-registration-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
85 |
+
<?php if ( $enable_field_icon ) { ?>
|
86 |
<span class="ur-icon ur-icon-user"></span>
|
87 |
<?php } ?>
|
88 |
</span>
|
105 |
<?php
|
106 |
}
|
107 |
?>
|
108 |
+
<?php if ( $enable_field_icon ) { ?>
|
109 |
<span class="ur-icon ur-icon-password"></span>
|
110 |
<?php } ?>
|
111 |
</span>
|
122 |
<p class="form-row">
|
123 |
<?php wp_nonce_field( 'user-registration-login', 'user-registration-login-nonce' ); ?>
|
124 |
<div>
|
125 |
+
<?php if ( $enable_ajax ) { ?>
|
126 |
<input type="submit" class="user-registration-Button button ur-submit-button" id="user_registration_ajax_login_submit" name="login" value="<?php echo esc_html( $labels['login'] ); ?>" />
|
127 |
<span></span>
|
128 |
<?php } else { ?>
|
158 |
<?php
|
159 |
$users_can_register = get_option( 'users_can_register', 'yes' );
|
160 |
|
161 |
+
if ( $users_can_register ) {
|
162 |
$url_options = get_option( 'user_registration_general_setting_registration_url_options' );
|
163 |
|
164 |
+
if ( ! empty( $url_options ) ) {
|
165 |
+
echo '<p class="user-registration-register register">';
|
166 |
+
$label = get_option( 'user_registration_general_setting_registration_label' );
|
167 |
|
168 |
+
if ( ! empty( $label ) ) {
|
169 |
+
?>
|
170 |
<a href="<?php echo get_option( 'user_registration_general_setting_registration_url_options' ); ?>"> <?php echo get_option( 'user_registration_general_setting_registration_label' ); ?>
|
171 |
</a>
|
172 |
<?php
|
173 |
+
} else {
|
174 |
+
update_option( 'user_registration_general_setting_registration_label', __( 'Not a member yet? Register now.', 'user-registration' ) );
|
175 |
+
?>
|
176 |
<a href="<?php echo get_option( 'user_registration_general_setting_registration_url_options' ); ?>"> <?php echo get_option( 'user_registration_general_setting_registration_label' ); ?>
|
177 |
</a>
|
178 |
<?php
|
179 |
+
}
|
180 |
+
echo '</p>';
|
181 |
}
|
|
|
182 |
}
|
|
|
183 |
?>
|
184 |
<?php do_action( 'user_registration_login_form_end' ); ?>
|
185 |
</div>
|
templates/myaccount/form-lost-password.php
CHANGED
@@ -26,10 +26,10 @@ ur_print_notices(); ?>
|
|
26 |
<form method="post" class="user-registration-ResetPassword lost_reset_password">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
-
<p><?php echo apply_filters( 'user_registration_lost_password_message',
|
30 |
|
31 |
<p class="user-registration-form-row user-registration-form-row--first form-row form-row-first">
|
32 |
-
<label for="user_login"><?php
|
33 |
<input class="user-registration-Input user-registration-Input--text input-text" type="text" name="user_login" id="user_login" />
|
34 |
</p>
|
35 |
|
26 |
<form method="post" class="user-registration-ResetPassword lost_reset_password">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
+
<p><?php echo esc_html( apply_filters( 'user_registration_lost_password_message', esc_html__( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'user-registration' ) ) ); ?></p>
|
30 |
|
31 |
<p class="user-registration-form-row user-registration-form-row--first form-row form-row-first">
|
32 |
+
<label for="user_login"><?php esc_html_e( 'Username or email', 'user-registration' ); ?></label>
|
33 |
<input class="user-registration-Input user-registration-Input--text input-text" type="text" name="user_login" id="user_login" />
|
34 |
</p>
|
35 |
|
templates/myaccount/form-reset-password.php
CHANGED
@@ -23,30 +23,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
ur_print_notices(); ?>
|
24 |
|
25 |
<div class="ur-frontend-form login" id="ur-frontend-form">
|
26 |
-
<form method="post" class="user-registration-ResetPassword lost_reset_password" data-enable-strength-password="<?php echo $enable_strong_password; ?>" data-minimum-password-strength="<?php echo $minimum_password_strength; ?>">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
-
<p><?php echo apply_filters( 'user_registration_reset_password_message',
|
30 |
|
31 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
32 |
-
<label for="password_1"><?php
|
33 |
<span class="password-input-group">
|
34 |
<input type="password" class="user-registration-Input user-registration-Input--text input-text" name="password_1" id="password_1" />
|
35 |
<?php
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
?>
|
40 |
</span>
|
41 |
</p>
|
42 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
43 |
-
<label for="password_2"><?php
|
44 |
<span class="password-input-group">
|
45 |
<input type="password" class="user-registration-Input user-registration-Input--text input-text" name="password_2" id="password_2" />
|
46 |
<?php
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
?>
|
51 |
</span>
|
52 |
</p>
|
23 |
ur_print_notices(); ?>
|
24 |
|
25 |
<div class="ur-frontend-form login" id="ur-frontend-form">
|
26 |
+
<form method="post" class="user-registration-ResetPassword lost_reset_password" data-enable-strength-password="<?php echo esc_attr( $enable_strong_password ); ?>" data-minimum-password-strength="<?php echo esc_attr( $minimum_password_strength ); ?>">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
29 |
+
<p><?php echo esc_html( apply_filters( 'user_registration_reset_password_message', esc_html__( 'Enter a new password below.', 'user-registration' ) ) ); ?></p>
|
30 |
|
31 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
32 |
+
<label for="password_1"><?php esc_html_e( 'New password', 'user-registration' ); ?> <span class="required">*</span></label>
|
33 |
<span class="password-input-group">
|
34 |
<input type="password" class="user-registration-Input user-registration-Input--text input-text" name="password_1" id="password_1" />
|
35 |
<?php
|
36 |
+
if ( 'yes' === get_option( 'user_registration_login_option_hide_show_password', 'no' ) ) {
|
37 |
+
echo '<a href="javaScript:void(0)" class="password_preview dashicons dashicons-hidden" title="' . esc_attr__( 'Show Password', 'user-registration' ) . '"></a>';
|
38 |
+
}
|
39 |
?>
|
40 |
</span>
|
41 |
</p>
|
42 |
<p class="user-registration-form-row user-registration-form-row--wide form-row form-row-wide hide_show_password">
|
43 |
+
<label for="password_2"><?php esc_html_e( 'Re-enter new password', 'user-registration' ); ?> <span class="required">*</span></label>
|
44 |
<span class="password-input-group">
|
45 |
<input type="password" class="user-registration-Input user-registration-Input--text input-text" name="password_2" id="password_2" />
|
46 |
<?php
|
47 |
+
if ( 'yes' === get_option( 'user_registration_login_option_hide_show_password', 'no' ) ) {
|
48 |
+
echo '<a href="javaScript:void(0)" class="password_preview dashicons dashicons-hidden" title="' . esc_attr__( 'Show Password', 'user-registration' ) . '"></a>';
|
49 |
+
}
|
50 |
?>
|
51 |
</span>
|
52 |
</p>
|
templates/myaccount/lost-password-confirmation.php
CHANGED
@@ -24,4 +24,4 @@ ur_print_notices();
|
|
24 |
ur_print_notice( __( 'Password reset email has been sent.', 'user-registration' ) );
|
25 |
?>
|
26 |
|
27 |
-
<p><?php echo apply_filters( 'user_registration_lost_password_message',
|
24 |
ur_print_notice( __( 'Password reset email has been sent.', 'user-registration' ) );
|
25 |
?>
|
26 |
|
27 |
+
<p><?php echo esc_html( apply_filters( 'user_registration_lost_password_message', esc_html__( 'A password reset email has been sent to the email address on file for your account, but may take several minutes to show up in your inbox. Please wait at least 10 minutes before attempting another reset.', 'user-registration' ) ) ); ?></p>
|
user-registration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
@@ -31,7 +31,7 @@ if ( ! class_exists( 'UserRegistration' ) ) :
|
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
-
public $version = '2.1.
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|
@@ -343,7 +343,6 @@ if ( ! function_exists( 'UR' ) ) {
|
|
343 |
function UR() {
|
344 |
return UserRegistration::instance();
|
345 |
}
|
346 |
-
|
347 |
} else {
|
348 |
|
349 |
if ( ! function_exists( 'user_registration_pro_activated' ) ) {
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
+
* Version: 2.1.1
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
+
public $version = '2.1.1';
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|
343 |
function UR() {
|
344 |
return UserRegistration::instance();
|
345 |
}
|
|
|
346 |
} else {
|
347 |
|
348 |
if ( ! function_exists( 'user_registration_pro_activated' ) ) {
|