PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.86
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.86
51.1.87 51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 All 41 releases
← All changes | includes/features/Protected_Content/password-form.js +11 -3 51.1.44 → 51.1.86 View file →
@@ -27,10 +27,18 @@
27 27 const scope = $form.data('scope');
28 28 const globalKey = $form.data('global-key');
29 29 const days = $form.data('days') || 7;
30 30
31 + const strings = (window.kingAddonsProtectedContent && window.kingAddonsProtectedContent.strings)
32 + ? window.kingAddonsProtectedContent.strings
33 + : {};
34 +
35 + const enterPasswordText = strings.enterPassword || 'Please enter a password';
36 + const incorrectPasswordText = strings.incorrectPassword || 'Incorrect password';
37 + const errorOccurredText = strings.errorOccurred || 'An error occurred. Please try again.';
38 +
31 39 if (!password) {
32 - $error.text('Please enter a password').show();
40 + $error.text(enterPasswordText).show();
33 41 return;
34 42 }
35 43
36 44 // Show loading state.
@@ -56,9 +64,9 @@
56 64 if (response.success) {
57 65 // Reload page to show unlocked content.
58 66 window.location.reload();
59 67 } else {
60 - $error.text(response.data.message || 'Incorrect password').show();
68 + $error.text(response.data.message || incorrectPasswordText).show();
61 69 $input.prop('disabled', false).val('').focus();
62 70 $submitText.show();
63 71 $submitLoading.hide();
64 72 }
@@ -63,9 +71,9 @@
63 71 $submitLoading.hide();
64 72 }
65 73 },
66 74 error: function () {
67 - $error.text('An error occurred. Please try again.').show();
75 + $error.text(errorOccurredText).show();
68 76 $input.prop('disabled', false);
69 77 $submitText.show();
70 78 $submitLoading.hide();
71 79 }