backup-next.php
4 days ago
capability-icon.php
4 days ago
first-run.php
4 days ago
next-step.php
4 days ago
open-staging-site.php
4 days ago
pre-consent.php
4 days ago
progress.php
4 days ago
backup-next.php
58 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * The deferred backup offer, rendered hidden and injected into the process modal |
| 5 | * by js/src/modules/onboarding.js once a staging site starts being created. |
| 6 | * Carries no id: it is cloned while the template stays in the page. |
| 7 | * |
| 8 | * @see \WPStaging\Framework\Onboarding\QueuedBackup |
| 9 | * |
| 10 | * @var string $queuedBackupStatus Current state of the request, empty when none. |
| 11 | * @var bool $isFirstRunOffer Whether the first run is making this offer. |
| 12 | */ |
| 13 | |
| 14 | use WPStaging\Framework\Onboarding\OnboardingJourney; |
| 15 | use WPStaging\Framework\Onboarding\QueuedBackup; |
| 16 | |
| 17 | $isQueued = in_array($queuedBackupStatus, [QueuedBackup::STATUS_QUEUED, QueuedBackup::STATUS_RUNNING], true); |
| 18 | |
| 19 | $offerText = empty($isFirstRunOffer) |
| 20 | ? __('Optional. WP STAGING can make a complete backup of your live site, to run after this.', 'wp-staging') |
| 21 | : __('Optional. WP STAGING can also make a complete backup of your live site, to run after this.', 'wp-staging'); |
| 22 | ?> |
| 23 | <div class="wpstg-backup-next" data-state="<?php echo $isQueued ? 'queued' : 'idle'; ?>"> |
| 24 | <div class="wpstg-icon-box wpstg-icon-box-green wpstg-backup-next__icon"> |
| 25 | <?php |
| 26 | $capability = OnboardingJourney::CAPABILITY_BACKUP; |
| 27 | $iconSize = 20; |
| 28 | include WPSTG_VIEWS_DIR . 'onboarding/capability-icon.php'; |
| 29 | ?> |
| 30 | </div> |
| 31 | |
| 32 | <div class="wpstg-backup-next__body"> |
| 33 | <div class="wpstg-backup-next__offer"> |
| 34 | <p class="wpstg-backup-next__title"><?php esc_html_e('Protect your live site while you\'re here', 'wp-staging'); ?></p> |
| 35 | <p class="wpstg-backup-next__text"><?php echo esc_html($offerText); ?></p> |
| 36 | <button |
| 37 | type="button" |
| 38 | class="wpstg-btn wpstg-btn-md wpstg-btn-tint wpstg-backup-next__cta" |
| 39 | data-wpstg-onboarding-queue-backup |
| 40 | data-busy-label="<?php esc_attr_e('Queueing…', 'wp-staging'); ?>" |
| 41 | > |
| 42 | <?php esc_html_e('Create Backup After This', 'wp-staging'); ?> |
| 43 | </button> |
| 44 | <p class="wpstg-backup-next__hint"><?php esc_html_e('Nothing starts until you click. Your backup then runs on its own once the staging site is finished.', 'wp-staging'); ?></p> |
| 45 | </div> |
| 46 | |
| 47 | <div class="wpstg-backup-next__confirmed"> |
| 48 | <p class="wpstg-backup-next__title"> |
| 49 | <svg class="wpstg-backup-next__check" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"> |
| 50 | <path d="M20 6 9 17l-5-5"></path> |
| 51 | </svg> |
| 52 | <?php esc_html_e('Backup will be created after this', 'wp-staging'); ?> |
| 53 | </p> |
| 54 | <p class="wpstg-backup-next__hint"><?php esc_html_e('It will start automatically when your staging site is ready.', 'wp-staging'); ?></p> |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 |