PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / 4.7.0
WP STAGING – WordPress Backups, Restore, Migration & Clone v4.7.0
4.11.2 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 / staging / setup.php
wp-staging / views / staging Last commit date
_partials 5 months ago setup 1 year ago staging-site 1 year ago wordpress-com 5 months ago confirm-delete.php 5 months ago free-version.php 1 year ago index.php 6 months ago listing.php 6 months ago reset-setup.php 6 months ago setup.php 6 months ago staging-site-list-item.php 6 months ago
setup.php
118 lines
1 <?php
2
3 use WPStaging\Framework\Facades\Escape;
4 use WPStaging\Staging\Dto\StagingSiteDto;
5 use WPStaging\Staging\Service\DirectoryScanner;
6 use WPStaging\Staging\Service\AbstractStagingSetup;
7 use WPStaging\Staging\Service\TableScanner;
8
9 /**
10 * @var AbstractStagingSetup $stagingSetup
11 * @var StagingSiteDto $stagingSiteDto
12 * @var DirectoryScanner $directoryScanner
13 * @var TableScanner $tableScanner
14 */
15
16 include WPSTG_VIEWS_DIR . 'job/modal/success.php';
17 include WPSTG_VIEWS_DIR . 'job/modal/process.php';
18 ?>
19 <label id="wpstg-clone-label" for="wpstg-new-clone-id">
20 <input type="text" id="wpstg-new-clone-id" class="wpstg-textbox"
21 placeholder="<?php esc_html_e('Enter Site Name (Optional)', 'wp-staging') ?>"
22 data-clone="<?php echo esc_attr($stagingSiteDto->getCloneId()); ?>"
23 <?php if (!$stagingSetup->isNewStagingSite()) {
24 echo ' value="' . esc_attr($stagingSiteDto->getCloneName()) . '"';
25 echo " disabled='disabled'";
26 } ?> />
27 </label>
28
29 <span class="wpstg-error-msg" id="wpstg-clone-id-error" style="display:none;">
30 <?php
31 echo Escape::escapeHtml(__(
32 "<br>Probably not enough free disk space to create a staging site. " .
33 "<br> You can continue but its likely that the copying process will fail.",
34 "wp-staging"
35 ))
36 ?>
37 </span>
38 <?php require_once WPSTG_VIEWS_DIR . 'staging/_partials/file-size-notice.php';?>
39 <div class="wpstg-tabs-wrapper">
40 <p class="wpstg-tables-selection-note">
41 <b class="wpstg--red"><?php esc_html_e("Note: ", "wp-staging") ?></b>
42 <?php esc_html_e("The tables and folder selection will be saved and preselected for the next update or reset on this staging site.", "wp-staging") ?>
43 </p>
44 <?php $stagingSetup->renderNetworkCloneSettings(); ?>
45 <a href="#" class="wpstg-tab-header active" data-id="#wpstg-setup-tables">
46 <span class="wpstg-tab-triangle"></span>
47 <?php esc_html_e("Database Tables", "wp-staging") ?>
48 <span id="wpstg-tables-count" class="wpstg-selection-preview"></span>
49 </a>
50
51 <fieldset class="wpstg-tab-section" id="wpstg-setup-tables">
52 <?php $tableScanner->renderTablesSelection() ?>
53 </fieldset>
54
55 <a href="#" class="wpstg-tab-header" data-id="#wpstg-setup-files">
56 <span class="wpstg-tab-triangle"></span>
57 <?php esc_html_e("Files", "wp-staging") ?>
58 <span id="wpstg-files-count" class="wpstg-selection-preview"></span>
59 </a>
60
61 <fieldset class="wpstg-tab-section" id="wpstg-setup-files">
62 <?php $directoryScanner->renderFilesSelection() ?>
63 </fieldset>
64
65 <a href="#" class="wpstg-tab-header" data-id="#wpstg-advanced-settings">
66 <span class="wpstg-tab-triangle"></span>
67 <?php echo esc_html($stagingSetup->getAdvanceSettingsTitle()); ?>
68 </a>
69
70 <div class="wpstg-tab-section" id="wpstg-advanced-settings">
71 <?php
72 $stagingSetup->renderAdvanceSettingsHeader();
73 if (!$stagingSetup->isUpdateJob()) {
74 require_once(WPSTG_VIEWS_DIR . 'staging/setup/login-data.php');
75 require_once(WPSTG_VIEWS_DIR . 'staging/setup/external-database.php');
76 require_once(WPSTG_VIEWS_DIR . 'staging/setup/custom-directory.php');
77 $stagingSetup->renderAdvanceSettings('wpstg_symlink_upload', esc_html__('Symlink Uploads Folder', 'wp-staging'), $stagingSetup->getSymlinkUploadDescription());
78 }
79
80 if ($stagingSetup->isNewStagingSite()) {
81 $stagingSetup->renderAdvanceSettings('wpstg_enable_cron', esc_html__('Enable Cron Jobs', 'wp-staging'), esc_html__('Will enable WordPress cron on the staging site.', 'wp-staging'));
82 }
83
84 $stagingSetup->renderAdvanceSettings('wpstg_allow_emails', esc_html__('Allow Emails Sending', 'wp-staging'), esc_html__('Allow emails sending for this staging site.', 'wp-staging') . '<br /> <br /> <b>' . esc_html__('Note', 'wp-staging') . ': </b>' . sprintf(esc_html__('Even if email sending is disabled, some plugins might still be able to send out mails if they don\'t depend upon %s.', 'wp-staging'), '<code>wp_mail()</code>'), true);
85 $stagingSetup->renderAdvanceSettings('wpstg_reminder_emails', esc_html__('Get Reminder Email', 'wp-staging'), esc_html__('You will receive an email reminder every two weeks about your active staging site. This helps you manage and delete unused staging sites, ensuring safety and preventing multiple unnecessary test environments.', 'wp-staging'));
86 $stagingSetup->renderEnableWooSchedulerSettings();
87 ?>
88 </div>
89 </div>
90
91 <?php if ($stagingSetup->isUpdateJob()) : ?>
92 <fieldset class="wpstg-fieldset" style="margin-left: 16px;">
93 <?php
94 $stagingSetup->renderSettings('wpstg-clean-plugins-themes', esc_html__('Clean Plugins/Themes', 'wp-staging'), esc_html__('Delete all plugins & themes on staging site before starting update process.', 'wp-staging'));
95 $stagingSetup->renderSettings('wpstg-clean-uploads', esc_html__('Clean Uploads', 'wp-staging'), esc_html__('Delete entire folder wp-content/uploads on staging site including all images before starting update process.', 'wp-staging') . ($stagingSiteDto->getUploadsSymlinked() ? "<br/><br/><b>" . esc_html__("Note: This option is disabled as uploads directory is symlinked", "wp-staging") . "</b>" : ''));
96 ?>
97 </fieldset>
98 <hr/>
99 <?php endif; ?>
100
101 <button type="button" class="wpstg-prev-step-link wpstg-button--primary wpstg-button-back-arrow">
102 <i class="wpstg-back-arrow"></i>
103 <?php esc_html_e("Back", "wp-staging") ?>
104 </button>
105
106 <?php
107 $label = esc_html__("Start Cloning", "wp-staging");
108 $btnClass = 'wpstg--create--staging-site';
109 if ($stagingSetup->isUpdateJob()) {
110 $label = esc_html__("Update Staging Site", "wp-staging");
111 $btnClass = 'wpstg--update--staging-site';
112 }
113 ?>
114
115 <button type="button" class="wpstg-button--primary wpstg-button--blue <?php echo esc_attr($btnClass); ?>" data-url="<?php echo esc_attr($stagingSiteDto->getUrl()); ?>"><?php echo esc_html($label); ?></button>
116
117 <a href="#" id="wpstg-check-space"><?php esc_html_e('Check required disk space', 'wp-staging'); ?></a>
118