PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / trunk
WP STAGING – WordPress Backups, Restore, Migration & Clone vtrunk
4.11.1 4.11.0 4.10.0 4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / views / onboarding / update-protection.php
wp-staging / views / onboarding Last commit date
backup-next.php 2 weeks ago capability-icon.php 6 days ago first-run.php 6 days ago next-step.php 6 days ago open-staging-site.php 2 weeks ago pre-consent.php 6 days ago progress.php 6 days ago update-protection.php 6 days ago
update-protection.php
89 lines
1 <?php
2
3 /**
4 * Update Protection status line, shown between the lede and the three actions.
5 *
6 * Deliberately not a card: it is not a fourth thing to choose, only a sentence
7 * saying the feature is already on before the user meets it on the plugins
8 * screen. Rendering it also counts as the modal's introduction, so the same
9 * explanation is not repeated the first time an update is intercepted.
10 *
11 * @see \WPStaging\Backup\Service\UpdateProtectionSettings
12 */
13
14 use WPStaging\Backup\Service\UpdateProtectionSettings;
15 use WPStaging\Core\WPStaging;
16
17 $updateProtection = WPStaging::make(UpdateProtectionSettings::class);
18 $updateProtection->markIntroSeen('modal');
19
20 $isProtectionEnabled = $updateProtection->isEnabled();
21 ?>
22 <div
23 class="wpstg-onboarding-protection"
24 data-wpstg-update-protection
25 data-state="<?php echo $isProtectionEnabled ? 'on' : 'off'; ?>"
26 aria-live="polite"
27 >
28 <p class="wpstg-onboarding-protection__line">
29 <svg class="wpstg-onboarding-protection__shield" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
30 <path d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"></path>
31 </svg>
32
33 <span data-wpstg-update-protection-on>
34 <strong><?php esc_html_e('Plugin updates are now protected', 'wp-staging'); ?></strong>
35 <?php esc_html_e('WP STAGING checks for a recent backup before plugin updates and offers to create one when needed.', 'wp-staging'); ?>
36 </span>
37
38 <span data-wpstg-update-protection-off>
39 <strong><?php esc_html_e('Update Protection is off', 'wp-staging'); ?></strong>
40 <?php esc_html_e('Plugin updates will run normally without WP STAGING checking for a recent backup first.', 'wp-staging'); ?>
41 </span>
42
43 <span data-wpstg-update-protection-confirm>
44 <strong><?php esc_html_e('Turn off Update Protection?', 'wp-staging'); ?></strong>
45 <?php esc_html_e('Plugin updates will work normally without this backup prompt. WP STAGING will remain active.', 'wp-staging'); ?>
46 </span>
47 </p>
48
49 <p class="wpstg-onboarding-protection__actions">
50 <span class="wpstg-onboarding-protection__state" data-wpstg-update-protection-on>
51 <?php esc_html_e('Update Protection is on', 'wp-staging'); ?>
52 </span>
53 <button
54 type="button"
55 class="wpstg-onboarding-protection__link"
56 data-wpstg-update-protection-action="confirm-disable"
57 data-wpstg-update-protection-on
58 >
59 <?php esc_html_e('Turn off', 'wp-staging'); ?>
60 </button>
61
62 <button
63 type="button"
64 class="wpstg-onboarding-protection__link"
65 data-wpstg-update-protection-action="enable"
66 data-wpstg-update-protection-off
67 >
68 <?php esc_html_e('Turn on', 'wp-staging'); ?>
69 </button>
70
71 <button
72 type="button"
73 class="wpstg-onboarding-protection__link wpstg-onboarding-protection__link--strong"
74 data-wpstg-update-protection-action="disable"
75 data-wpstg-update-protection-confirm
76 >
77 <?php esc_html_e('Turn Off Update Protection', 'wp-staging'); ?>
78 </button>
79 <button
80 type="button"
81 class="wpstg-onboarding-protection__link"
82 data-wpstg-update-protection-action="keep"
83 data-wpstg-update-protection-confirm
84 >
85 <?php esc_html_e('Keep Protection', 'wp-staging'); ?>
86 </button>
87 </p>
88 </div>
89