PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 4.9.2
WP STAGING – WordPress Backup, Restore, Migration & Clone v4.9.2
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 / backup / modal / upload.php
wp-staging / views / backup / modal Last commit date
partials 2 weeks ago advanced-exclude-options.php 11 months ago backup-parts.php 10 months ago backup-scheduling-options.php 1 day ago backup-storages.php 1 day ago backup.php 1 day ago confirm-restore.php 2 weeks ago download-modal.php 10 months ago edit-schedule-modal.php 2 weeks ago manage-schedules.php 2 weeks ago remote-upload.php 3 months ago restore.php 2 weeks ago upload.php 2 weeks ago
upload.php
103 lines
1 <?php
2
3 /**
4 * @var \WPStaging\Framework\Adapter\Directory $directory
5 */
6
7 use WPStaging\Core\WPStaging;
8 use WPStaging\Framework\Facades\Escape;
9 use WPStaging\Backup\Service\BackupsFinder;
10
11 try {
12 $uploadDirectory = str_replace(wp_normalize_path(ABSPATH), '', WPStaging::make(BackupsFinder::class)->getBackupsDirectory());
13 } catch (\Throwable $e) {
14 ob_end_clean();
15 if (wp_doing_ajax()) {
16 wp_send_json_error($e->getMessage());
17 }
18 }
19
20 ?>
21 <div
22 id="wpstg--modal--backup--upload"
23 data-cancelButtonText="<?php esc_attr_e('CANCEL', 'wp-staging'); ?>"
24 data-uploadSuccessMessage="<?php esc_attr_e('The backup file has been successfully uploaded. You can restore your website with this backup.', 'wp-staging'); ?>"
25 style="display: none"
26 >
27 <h2 class="wpstg--modal--backup--upload--title wpstg-modal-title">
28 <?php esc_html_e('Upload Backup', 'wp-staging') ?>
29 <div class="wpstg--tooltip">
30 <img class="wpstg--dashicons wpstg-dashicons-19" src="<?php echo esc_url($urlAssets); ?>svg/info-outline.svg"></img>
31 <p class="wpstg--tooltiptext wpstg--tooltiptext-backups">
32 <?php esc_html_e("Upload a WP STAGING backup file (*.wpstg) and use it to restore your website at any time. This backup may have been created from this website or from another website. You can move a website in this way.", "wp-staging")?>
33 <br><br>
34 <?php esc_html_e("Videos:", "wp-staging")?>
35 <br>
36 <?php echo sprintf(
37 Escape::escapeHtml(__('&#8226; <a href="%s" target="_blank">How to backup WordPress</a>', 'wp-staging')),
38 'https://www.youtube.com/watch?v=q352aYduOUY'
39 ); ?>
40 <br>
41 <?php echo sprintf(
42 Escape::escapeHtml(__('&#8226; <a href="%s" target="_blank">How to migrate WordPress</a>', 'wp-staging')),
43 'https://www.youtube.com/watch?v=DBaZQg1Efq4'
44 ); ?>
45 </p>
46 </div>
47 </h2>
48 <div class="wpstg--modal--backup--upload--content">
49 <div class="wpstg-linear-loader">
50 <span class="wpstg-linear-loader-item"></span>
51 <span class="wpstg-linear-loader-item"></span>
52 <span class="wpstg-linear-loader-item"></span>
53 <span class="wpstg-linear-loader-item"></span>
54 <span class="wpstg-linear-loader-item"></span>
55 <span class="wpstg-linear-loader-item"></span>
56 </div>
57 <?php
58 /**
59 * @var string $urlAssets
60 */
61 ?>
62 <div class="wpstg--modal--backup--upload">
63 <div id="wpstg-upload-select">
64 <div class="wpstg--modal--backup--upload--container resumable-drop resumable-browse">
65 <img src="<?php echo esc_url($urlAssets . 'img/upload.svg'); ?>" alt="Upload Image"/>
66 <div class="wpstg-upload-text">
67 <?php
68 echo Escape::escapeHtml(__('Drop the backup file here to upload or <br><a>select from your computer</a>', 'wp-staging'));
69 ?>
70 </div>
71 <div class="wpstg-dragover-text">
72 <strong><?php echo esc_html__('Drop here to start the upload!', 'wp-staging') ?></strong>
73 </div>
74 </div>
75 <div class="wpstg-backup-url-container" >
76 <label for="wpstg-backup-url"><?php esc_html_e('Or upload a backup file from a URL:', 'wp-staging'); ?></label>
77 <input id="wpstg-backup-url" class="wpstg-input wpstg-input-md" name="wpstg-backup-url" type="text" placeholder="https://example.com/.../backups/your-backup.wpstg"/>
78 <div class="wpstg-backup-url-container-desc"><?php esc_html_e("Get the link from Backup &#10132; Actions &#10132; Copy Backup Link.", "wp-staging"); ?></div>
79 </div>
80 <p class="wpstg-backup-direct-upload-notice">
81 <?php esc_html_e('Or upload a backup file via FTP to:', 'wp-staging'); ?><br>
82 <code><?php echo esc_html($uploadDirectory) ?></code>
83 </p>
84 <span class="wpstg-backup-direct-upload-reload-notice">
85 <?php echo sprintf(
86 esc_html__('%s this page after uploading via FTP!', 'wp-staging'),
87 '<a href="' . esc_url(get_admin_url() . 'admin.php?page=wpstg_backup') . '" target="_self">' . esc_html__('Reload', 'wp-staging') . '</a>'
88 ); ?>
89 </span>
90 </div>
91 </div>
92 <div id="wpstg-upload-progress">
93 <div class="wpstg--modal--upload--process">
94 <div class="wpstg--modal--upload--progress"></div>
95 <h4 class="wpstg--modal--upload--progress--title">
96 <span><small><?php esc_html_e('Discovering optimal upload speed... This may take a while...', 'wp-staging'); ?></small></span>
97 </h4>
98 </div>
99 <p class="wpstg-backup-upload-dont-close-notice"><?php esc_html_e('If you close this window the upload will be aborted.', 'wp-staging') ?></p>
100 </div>
101 </div>
102 </div>
103