PluginProbe ʕ •ᴥ•ʔ
UpdraftPlus: WP Backup & Migration Plugin / 1.26.4
UpdraftPlus: WP Backup & Migration Plugin v1.26.4
1.26.4 1.26.3 1.9.19 1.9.25 1.9.26 1.9.30 1.9.31 1.9.32 1.9.4 1.9.40 1.9.41 1.9.42 1.9.43 1.9.44 1.9.45 1.9.46 1.9.5 1.9.50 1.9.51 1.9.60 1.9.62 1.9.63 1.9.64 1.11.12 1.4.8 1.11.15 1.4.9 1.11.17 1.5.16 1.11.18 1.5.20 1.11.2 1.5.21 1.11.20 1.5.22 1.11.23 1.5.5 1.11.24 1.5.6 1.11.25 1.5.7 1.11.26 1.5.8 1.11.27 1.5.9 1.11.28 1.6.1 1.11.3 1.6.17 1.11.4 1.6.2 1.11.5 1.6.46 1.11.8 1.7.0 1.11.9 1.7.1 1.12.0 1.7.18 1.12.1 1.7.20 1.12.12 1.7.3 1.12.13 1.7.34 1.12.15 1.7.35 1.12.17 1.7.39 1.12.2 1.7.40 1.12.20 1.7.41 1.12.23 1.8.1 1.12.24 1.8.11 1.12.25 1.8.12 1.12.28 1.8.13 1.12.29 1.8.2 1.12.30 1.8.5 1.12.32 1.8.8 1.12.34 1.9.0 1.12.35 1.9.13 1.12.37 1.9.15 1.12.39 1.9.17 1.12.4 1.12.40 1.12.6 1.13.1 1.13.11 1.13.12 1.13.15 1.13.16 1.13.2 1.13.3 1.13.4 1.13.5 1.13.6 1.13.7 1.13.8 1.13.9 1.14.10 1.14.11 1.14.12 1.14.13 1.14.2 1.14.3 1.14.4 1.14.5 1.14.7 1.14.9 1.15.0 1.15.2 1.15.3 1.15.5 1.15.6 1.15.7 1.16.0 1.16.10 1.16.11 1.16.12 1.16.13 1.16.14 1.16.15 1.16.16 1.16.17 1.16.20 1.16.21 1.16.22 1.16.23 1.16.24 1.16.25 1.16.26 1.16.28 1.16.29 1.16.32 1.16.34 1.16.35 1.16.36 1.16.37 1.16.4 1.16.40 1.16.41 1.16.42 1.16.43 1.16.44 1.16.45 1.16.46 1.16.47 1.16.48 1.16.49 1.16.5 1.16.50 1.16.51 1.16.53 1.16.55 1.16.56 1.16.59 1.16.6 1.16.60 1.16.61 1.16.62 1.16.63 1.16.64 1.16.65 1.16.66 1.16.67 1.16.68 1.16.69 1.16.7 1.16.8 1.16.9 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.14 1.2.15 1.2.16 1.2.17 1.2.19 1.2.2 1.2.20 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.33 1.2.35 1.2.36 1.2.38 1.2.39 1.2.4 1.2.40 1.2.41 1.2.42 1.2.43 1.2.44 1.2.45 1.2.46 1.2.5 1.2.7 1.2.8 1.2.9 1.22.1 1.22.10 1.22.11 1.22.12 1.22.14 1.22.15 1.22.16 1.22.17 1.22.18 1.22.19 1.22.20 1.22.21 1.22.22 1.22.23 1.22.24 1.22.3 1.22.4 1.22.5 1.22.6 1.22.7 1.22.8 1.22.9 1.23.1 1.23.10 1.23.11 1.23.12 1.23.13 1.23.15 1.23.16 1.23.2 1.23.3 1.23.4 1.23.5 1.23.6 1.23.7 1.23.8 1.23.9 1.24.1 1.24.10 1.24.11 1.24.12 1.24.2 trunk 1.24.3 0.7.4 1.24.4 0.7.7 1.24.5 0.8.28 1.24.6 0.8.29 1.24.7 0.8.30 1.24.8 0.8.31 1.24.9 0.8.32 1.25.1 0.8.33 1.25.2 0.8.36 1.25.3 0.8.37 1.25.5 0.8.50 1.25.6 0.8.51 1.25.7 0.9.1 1.25.8 0.9.10 1.25.9 0.9.11 1.26.1 0.9.12 1.26.2 0.9.2 1.3.10 0.9.20 1.3.12 0.9.21 1.3.14 0.9.22 1.3.15 1.0.10 1.3.17 1.0.11 1.3.18 1.0.12 1.3.19 1.0.15 1.3.2 1.0.16 1.3.20 1.0.18 1.3.22 1.0.20 1.3.23 1.0.3 1.3.24 1.0.4 1.3.25 1.0.5 1.3.3 1.0.6 1.3.4 1.0.7 1.3.6 1.0.8 1.3.7 1.0.9 1.3.8 1.1.0 1.3.9 1.1.10 1.4.0 1.1.11 1.4.10 1.1.12 1.4.11 1.1.13 1.4.12 1.1.14 1.4.13 1.1.15 1.4.14 1.1.16 1.4.15 1.1.17 1.4.2 1.1.2 1.4.27 1.1.3 1.4.28 1.1.5 1.4.29 1.1.6 1.4.30 1.1.8 1.4.4 1.1.9 1.4.48 1.10.1 1.4.5 1.10.3 1.4.6 1.11.1 1.4.7
updraftplus / js / tour.js
updraftplus / js Last commit date
tour-1-26-4.min.js 3 weeks ago tour.js 2 years ago updraft-admin-restore-1-26-4.min.js 3 weeks ago updraft-admin-restore.js 1 month ago updraftplus-deactivation-1-26-4.min.js 3 weeks ago updraftplus-deactivation.js 2 months ago
tour.js
602 lines
1 (function ($) {
2
3 $(function() {
4 /*
5 Plugins page
6 splash screen on activation
7 */
8
9 $('.updraftplus-welcome .close').on('click', function(e) {
10 e.preventDefault();
11 $(this).closest('.updraftplus-welcome').remove();
12 });
13
14 /*
15 Updraftplus page tour
16 */
17
18 // if Shepherd is undefined, exit.
19 if (!window.Shepherd) return;
20
21 var button_classes = 'button button-primary';
22 var plugins_page_tour = window.updraft_plugins_page_tour = new Shepherd.Tour();
23 var main_tour = window.updraft_main_tour = new Shepherd.Tour();
24
25 // Set up the defaults for each step
26 main_tour.options.defaults = plugins_page_tour.options.defaults = {
27 classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour',
28 showCancelLink: true,
29 scrollTo: false,
30 tetherOptions: {
31 constraints: [
32 {
33 to: 'scrollParent',
34 attachment: 'together',
35 pin: false
36 }
37 ]
38 }
39 };
40
41 /*
42 Plugins page
43 */
44
45 plugins_page_tour.addStep('intro', {
46 title: updraftplus_tour_i18n.plugins_page.title,
47 text: updraftplus_tour_i18n.plugins_page.text,
48 attachTo: '.js-updraftplus-settings top',
49 buttons: [
50 {
51 classes: button_classes,
52 text: updraftplus_tour_i18n.plugins_page.button.text,
53 action: function() {
54 window.location = updraftplus_tour_i18n.plugins_page.button.url;
55 }
56 }
57 ],
58 tetherOptions: {
59 constraints: [
60 {
61 to: 'scrollParent',
62 attachment: 'together',
63 pin: false
64 }
65 ],
66 offset: '20px 0'
67 },
68 when: {
69 show: function() {
70 $('body').addClass('highlight-udp');
71 var popup = $(this.el);
72 // var target = $(this.tether.target);
73 $('body, html').animate({
74 scrollTop: popup.offset().top - 50
75 }, 500, function() {
76 window.scrollTo(0, popup.offset().top - 50);
77 });
78 },
79 hide: function() {
80 $('body').removeClass('highlight-udp');
81 }
82 }
83 });
84
85 /*
86 Main Tour steps
87 */
88
89 // 1. Your first backup
90 main_tour.addStep('backup_now', {
91 title: updraftplus_tour_i18n.backup_now.title,
92 text: updraftplus_tour_i18n.backup_now.text,
93 attachTo: '#updraft-backupnow-button bottom',
94 buttons: [
95 {
96 classes: 'udp-tour-end',
97 text: updraftplus_tour_i18n.end_tour,
98 action: main_tour.cancel
99 },
100 {
101 classes: button_classes,
102 text: updraftplus_tour_i18n.next,
103 action: function() {
104 $('#updraft-navtab-settings').trigger('click');
105 }
106 }
107 ]
108 });
109
110 // Manual backup options
111 main_tour.addStep('backup_options', {
112 title: updraftplus_tour_i18n.backup_options.title,
113 text: updraftplus_tour_i18n.backup_options.text,
114 classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
115 attachTo: '#backupnow_includedb left',
116 tetherOptions: {
117 offset: '-15px 25px'
118 },
119 buttons: [
120 {
121 classes: 'udp-tour-back',
122 text: updraftplus_tour_i18n.back,
123 action: function() {
124 $('#updraft-backupnow-modal').dialog('close');
125 }
126 },
127 {
128 classes: button_classes,
129 text: updraftplus_tour_i18n.next,
130 action: main_tour.next
131 }
132 ]
133 });
134
135 // Backup Now button
136 main_tour.addStep('backup_now_btn', {
137 title: updraftplus_tour_i18n.backup_now_btn.title,
138 text: updraftplus_tour_i18n.backup_now_btn.text,
139 classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
140 attachTo: '.js-tour-backup-now-button top',
141 buttons: [
142 {
143 classes: 'udp-tour-back',
144 text: updraftplus_tour_i18n.back,
145 action: function() {
146 main_tour.back();
147 }
148 },
149 {
150 classes: button_classes,
151 text: updraftplus_tour_i18n.backup_now_btn.btn_text,
152 action: function() {
153 $('#updraft-backupnow-modal').dialog('close');
154 $('#updraft-navtab-settings').trigger('click');
155 }
156 }
157 ]
158 });
159
160 // Congratulations - Shows when a user clicks "backup now" in the modal
161 main_tour.addStep('backup_now_btn_success', {
162 title: updraftplus_tour_i18n.backup_now_btn_success.title,
163 text: updraftplus_tour_i18n.backup_now_btn_success.text,
164 attachTo: '#updraft_activejobs_table top',
165 buttons: [
166 {
167 classes: 'udp-tour-back',
168 text: updraftplus_tour_i18n.back,
169 action: function() {
170 $('#updraft-backupnow-button').trigger('click');
171 main_tour.show('backup_now_btn');
172 }
173 },
174 {
175 classes: button_classes,
176 text: updraftplus_tour_i18n.backup_now_btn_success.btn_text,
177 action: function() {
178 $('#updraft-navtab-settings').trigger('click');
179 }
180 }
181 ],
182 when: {
183 show: function() {
184 setTimeout(function() {
185 $(window).trigger('scroll');
186 })
187
188 }
189 }
190 })
191
192 // Settings - timing
193 main_tour.addStep('settings_timing', {
194 title: updraftplus_tour_i18n.settings_timing.title,
195 text: updraftplus_tour_i18n.settings_timing.text,
196 attachTo: '.retain-files right',
197 buttons: [
198 {
199 classes: 'udp-tour-back',
200 text: updraftplus_tour_i18n.back,
201 action: function() {
202 $('#updraft-navtab-backups').trigger('click');
203 }
204 },
205 {
206 classes: button_classes,
207 text: updraftplus_tour_i18n.next,
208 action: main_tour.next
209 }
210 ],
211 tetherOptions: $.extend({}, main_tour.options.defaults.tetherOptions, {
212 offset: '-33px -15px'
213 }),
214 when: {
215 show: function() {
216 scroll_to_popup();
217 }
218 }
219 });
220
221 // Settings - Remote storage + vault
222 main_tour.addStep('settings_remote_storage', {
223 title: updraftplus_tour_i18n.settings_remote_storage.title,
224 text: updraftplus_tour_i18n.settings_remote_storage.text,
225 attachTo: {
226 element: 'label[for=updraft_servicecheckbox_updraftvault]',
227 on: 'top'
228 },
229 buttons: [
230 {
231 classes: 'udp-tour-back',
232 text: updraftplus_tour_i18n.back,
233 action: function() {
234 main_tour.back();
235 }
236 },
237 {
238 classes: button_classes,
239 text: updraftplus_tour_i18n.next,
240 action: function() {
241 if ($('#updraft_servicecheckbox_updraftvault').is(':checked')) {
242 main_tour.show('vault_selected')
243 } else {
244 main_tour.next();
245 }
246 }
247 }
248 ],
249 when: {
250 show: function(p) {
251 $('label[for=updraft_servicecheckbox_updraftvault]').addClass('emphasize');
252 scroll_to_popup();
253 },
254 hide: function(p) {
255 $('label[for=updraft_servicecheckbox_updraftvault]').removeClass('emphasize');
256 }
257 }
258 });
259
260 // Settings - more + updraftcentral
261 main_tour.addStep('settings_more', {
262 title: updraftplus_tour_i18n.settings_more.title,
263 text: updraftplus_tour_i18n.settings_more.text,
264 attachTo: '.js-tour-settings-more top',
265 scrollTo: false,
266 tetherOptions: {},
267 buttons: [
268 {
269 classes: 'udp-tour-back',
270 text: updraftplus_tour_i18n.back,
271 action: function() {
272 main_tour.back();
273 }
274 },
275 {
276 classes: button_classes,
277 text: updraftplus_tour_i18n.next,
278 action: main_tour.next
279 }
280 ],
281 when: {
282 show: function() {
283 scroll_to_popup();
284 }
285 }
286 });
287
288 // Save settings
289 main_tour.addStep('settings_save', {
290 title: updraftplus_tour_i18n.settings_save.title,
291 text: updraftplus_tour_i18n.settings_save.text,
292 attachTo: '#updraftplus-settings-save top',
293 scrollTo: false,
294 buttons: [
295 {
296 classes: 'udp-tour-back',
297 text: updraftplus_tour_i18n.back,
298 action: function() {
299 main_tour.back();
300 }
301 },
302 {
303 classes: button_classes,
304 text: updraftplus_tour_i18n.next,
305 action: function() {
306 if ($('#updraftcentral_cloud_connect_container').length) {
307 main_tour.show('updraft_central');
308 } else {
309 $('#updraft-navtab-addons').trigger('click');
310 }
311 }
312 }
313 ],
314 when: {
315 show: function() {
316 scroll_to_popup();
317 }
318 }
319 });
320
321 // UDCentral
322 main_tour.addStep('updraft_central', {
323 title: updraftplus_tour_i18n.updraft_central.title,
324 text: updraftplus_tour_i18n.updraft_central.text,
325 attachTo: '#updraftcentral_cloud_connect_container top',
326 scrollTo: false,
327 buttons: [
328 {
329 classes: 'udp-tour-back',
330 text: updraftplus_tour_i18n.back,
331 action: function() {
332 main_tour.back();
333 }
334 },
335 {
336 classes: button_classes,
337 text: updraftplus_tour_i18n.next,
338 action: function() {
339 $('#updraft-navtab-addons').trigger('click');
340 }
341 }
342 ],
343 when: {
344 show: function() {
345 scroll_to_popup();
346 }
347 }
348 });
349
350 // Premium + addons
351 main_tour.addStep('premium', {
352 title: updraftplus_tour_i18n.premium.title,
353 text: updraftplus_tour_i18n.premium.text,
354 attachTo: updraftplus_tour_i18n.premium.attach_to,
355 scrollTo: false,
356 buttons: [
357 {
358 classes: 'udp-tour-back',
359 text: updraftplus_tour_i18n.back,
360 action: function() {
361 main_tour.going_somewhere = true;
362 $('#updraft-navtab-settings').trigger('click');
363 if ($('#updraftcentral_cloud_connect_container').length) {
364 main_tour.show('updraft_central');
365 } else {
366 main_tour.show('settings_save');
367 }
368 scroll_to_popup();
369
370 }
371 },
372 {
373 classes: button_classes,
374 text: updraftplus_tour_i18n.premium.button,
375 action: main_tour.cancel
376 }
377 ],
378 when: {
379 show: function() {
380 window.scroll(0, 0)
381 }
382 }
383 });
384
385 // EXTRA STEPS
386
387 // Premium + addons
388 main_tour.addStep('vault_selected', {
389 title: updraftplus_tour_i18n.vault_selected.title,
390 text: updraftplus_tour_i18n.vault_selected.text,
391 attachTo: '#updraftvault_settings_cell top',
392 scrollTo: false,
393 buttons: [
394 {
395 classes: 'udp-tour-back',
396 text: updraftplus_tour_i18n.back,
397 action: function() {
398 main_tour.show('settings_remote_storage');
399 }
400 },
401 {
402 classes: button_classes,
403 text: updraftplus_tour_i18n.next,
404 action: function() {
405 main_tour.show('settings_more');
406 }
407 }
408 ],
409 when: {
410 show: function(p) {
411 scroll_to_popup();
412 }
413 }
414 });
415
416 // Saved settings
417 main_tour.addStep('settings_saved', {
418 title: updraftplus_tour_i18n.settings_saved.title,
419 text: updraftplus_tour_i18n.settings_saved.text,
420 attachTo: '#updraftplus-settings-save top',
421 scrollTo: false,
422 buttons: [
423 {
424 classes: 'udp-tour-back',
425 text: updraftplus_tour_i18n.back,
426 action: function() {
427 main_tour.show('settings_more');
428 }
429 },
430 {
431 classes: button_classes,
432 text: updraftplus_tour_i18n.next,
433 action: function() {
434 if ($('#updraftcentral_cloud_connect_container').length) {
435 main_tour.show('updraft_central');
436 } else {
437 $('#updraft-navtab-addons').trigger('click');
438 }
439 }
440 }
441 ],
442 when: {
443 show: function() {
444 scroll_to_popup();
445 }
446 }
447 });
448
449 main_tour.steps.forEach(function(step) {
450 step.once('show', function() {
451 // Adds a Close label near the (x)
452 var close_btn = $(this.el).find('header .shepherd-cancel-link');
453 close_btn.attr('data-btntext', updraftplus_tour_i18n.close);
454
455 // opens the settings tab
456 $(this.el).find('.js--go-to-settings').on('click', function(e) {
457 e.preventDefault();
458 $('#updraft-navtab-settings').trigger('click');
459 });
460 })
461 });
462
463 // on Cancel
464 main_tour.on('cancel', cancel_tour);
465 plugins_page_tour.on('cancel', cancel_tour);
466
467 /**
468 * Cancel tour
469 */
470 function cancel_tour() {
471 // The tour is either finished or [x] was clicked
472 main_tour.canceled = true;
473 var data = {
474 current_step: this.getCurrentStep().id
475 };
476
477 if ('function' === typeof updraft_send_command) {
478 updraft_send_command(
479 'set_tour_status',
480 data,
481 function(response) {
482 console.log('Successfully deactivated tour');
483 },
484 { alert_on_error: false }
485 );
486 } else {
487 jQuery.ajax({
488 url: ajaxurl,
489 type: 'POST',
490 data: {
491 action: 'updraft_ajax',
492 subaction: 'set_tour_status',
493 nonce: updraftplus_tour_i18n.nonce,
494 current_step: this.getCurrentStep().id
495 }
496 });
497 }
498 };
499
500 /**
501 * Scroll to Popup
502 *
503 * @param {Object} step
504 */
505 var scroll_to_popup = function(step) {
506 main_tour.going_somewhere = false;
507 if (!step) {
508 step = main_tour.getCurrentStep();
509 }
510 var popup = $(step.el);
511 var target = $(step.tether.target);
512 $('body, html').animate({
513 scrollTop: popup.offset().top - 50
514 }, 500, function() {
515 window.scrollTo(0, popup.offset().top - 50);
516 });
517
518 }
519
520 // If $('#updraft-backupnow-button'), start tour
521 if ($('#updraft-backupnow-button').length) {
522 /*
523 Setup other events
524 */
525
526 // Backup now
527 $('#updraft-backupnow-button').on('click', function(e) {
528 if (!main_tour.canceled) {
529 main_tour.show('backup_options');
530 }
531 });
532
533 // Click on status tab
534 $('#updraft-navtab-backups').on('click', function(e) {
535 if (!main_tour.canceled) {
536 main_tour.show('backup_now');
537 }
538 });
539
540 $(document).on('click', 'label[for=updraft_servicecheckbox_updraftvault]', function(e) {
541 if (!main_tour.canceled && !$('#updraft_servicecheckbox_updraftvault').is(':checked')) {
542 setTimeout(function() {
543 main_tour.show('vault_selected');
544 }, 200);
545 }
546 });
547
548 // close backup backupnow modal
549 $('#updraft-backupnow-modal').on("dialogclose", function(event, ui) {
550 if (!main_tour.canceled) {
551 main_tour.show('backup_now');
552 }
553 });
554
555 // Backup now - manual backup is starting
556 $('.js-tour-backup-now-button').on('click', function(e) {
557 if (!main_tour.canceled) {
558 main_tour.show('backup_now_btn_success');
559 }
560 })
561
562 // settings tab
563 $('#updraft-navtab-settings').on('click', function(e) {
564 if (!main_tour.canceled && !main_tour.going_somewhere) {
565 main_tour.show('settings_timing');
566 }
567 });
568
569 // addons tab
570 $('#updraft-navtab-addons').on('click', function(e) {
571 if (!main_tour.canceled) {
572 main_tour.show('premium');
573 }
574 });
575
576 // Tabs without guide
577 $('#updraft-navtab-migrate, #updraft-navtab-expert').on('click', function(e) {
578 if (!main_tour.canceled) {
579 main_tour.hide();
580 }
581 });
582 // start tour
583 main_tour.start();
584
585 // go back to first tab
586 if (updraftplus_tour_i18n.show_tab_on_load) {
587 $(updraftplus_tour_i18n.show_tab_on_load).trigger('click');
588 } else {
589 $('#updraft-navtab-backups').trigger('click');
590 }
591
592 }
593
594 // start plugins page tour
595 if ($('.js-updraftplus-settings').length) {
596 plugins_page_tour.start();
597 }
598
599 });
600
601 })(jQuery);
602