PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | includes/setup-wizard/assets/js/setup-wizard.js +33 -0 4.5.4 → 4.5.6 View file →
@@ -124,8 +124,9 @@
124 124
125 125 this.saveSettingsSubmit();
126 126 this.installPlugins();
127 127 this.onChangedPluginSliderCheckbox();
128 + this.subscribeSubmit();
128 129
129 130 const featureItems = document.querySelectorAll('.bdt-feature-item');
130 131 featureItems.forEach(item => {
131 132 item.addEventListener('mouseenter', () => {
@@ -325,8 +326,40 @@
325 326 widgetItem.classList.add('item-highlight');
326 327 setTimeout(() => {
327 328 widgetItem.classList.remove('item-highlight');
328 329 }, 600);
330 + });
331 + },
332 +
333 + /**
334 + * The newsletter opt-in sits in the welcome step and has no submit
335 + * button of its own: the choice is sent when the user moves on with
336 + * "Get Started".
337 + *
338 + * Fire and forget — the step change is never delayed and shows no
339 + * status. The box is unticked by default and gates the subscription
340 + * server side; an unticked box sends nothing to the newsletter list.
341 + */
342 + subscribeSubmit: function () {
343 + $(document).on('click', '.bdt-wizard-step[data-step="welcome"] .bdt-wizard-next', function () {
344 + const $email = $('#bdt-subscribe-email');
345 +
346 + if (!$email.length) {
347 + return;
348 + }
349 +
350 + $.ajax({
351 + url: UPK_SetupWizard.ajax_url,
352 + type: 'POST',
353 + data: {
354 + action: 'ultimate_post_kit_setup_wizard_subscribe',
355 + nonce: UPK_SetupWizard.nonce,
356 + email: ($email.val() || '').trim(),
357 + consent: $('#bdt-subscribe-consent').is(':checked') ? 'yes' : 'no'
358 + }
359 + });
360 +
361 + // No preventDefault: the step change proceeds immediately.
329 362 });
330 363 },
331 364
332 365 saveSettingsSubmit: function () {