PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 3.3.1
WP STAGING – WordPress Backup, Restore, Migration & Clone v3.3.1
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 / Backend / views / selections / files.php
wp-staging / Backend / views / selections Last commit date
database-tables.php 2 years ago files.php 2 years ago
files.php
118 lines
1 <?php
2
3 /**
4 * @var stdClass $options
5 * @var $scan Object
6 * @var $excludeUtils Object
7 * @see src/Backend/views/clone/ajax/scan.php Context where this is included.
8 * @see \WPStaging\Backend\Modules\Jobs\Scan::start For details on $options.
9 */
10
11 use WPStaging\Backend\Modules\Jobs\Job;
12 use WPStaging\Framework\Facades\Escape;
13
14 ?>
15 <p>
16 <strong><?php esc_html_e("Select Folders to Copy", "wp-staging") ?></strong>
17 <br>
18 <?php esc_html_e("Click on a folder name to expand it.", "wp-staging") ?> <br/> <br/>
19 <b class="wpstg--red"><?php esc_html_e("Note: ", "wp-staging") ?></b>
20 <?php esc_html_e("This folder selection will be automatically saved", "wp-staging") ?>
21 <br/>
22 <?php esc_html_e("and preselected the next time you update this staging site.", "wp-staging") ?>
23 </p>
24 <div id="wpstg-directories-listing" wpstg-data-existing-excludes="<?php echo (($options->mainJob === Job::UPDATE || $options->mainJob === Job::RESET) && isset($options->currentClone['excludedDirectories'])) ? esc_html(implode(',', $options->currentClone['excludedDirectories'])) : '' ?>">
25 <div class="wpstg-mb-8px">
26 <button type="button" class="wpstg-unselect-dirs button"><?php esc_html_e('Unselect All', 'wp-staging'); ?></button>
27 <button type="button" class="wpstg-select-dirs-default button"> <?php esc_html_e('Select Default', 'wp-staging'); ?></button>
28 </div>
29 <?php echo $scan->directoryListing(); // phpcs:ignore ?>
30 </div>
31 <!-- Exclusion Rules Table -->
32 <div class="wpstg-excluded-filters-container" id="wpstg-exclude-filters-container">
33 <table>
34 <tbody>
35 <?php
36 $hasRules = false;
37 if ($options->mainJob === Job::UPDATE || $options->mainJob === Job::RESET) :
38 foreach ($options->currentClone['excludeSizeRules'] as $rule) :
39 $hasRules = true;
40 echo $excludeUtils->renderSizeExclude($rule); // phpcs:ignore
41 endforeach;
42 foreach ($options->currentClone['excludeGlobRules'] as $rule) :
43 $hasRules = true;
44 echo $excludeUtils->renderGlobExclude($rule); // phpcs:ignore
45 endforeach;
46 endif; ?>
47 </tbody>
48 </table>
49 <p <?php echo !$hasRules ? 'style="display: none;"' : '' ?> class="wpstg-has-exclude-rules"><b><?php esc_html_e('Note', 'wp-staging'); ?>:</b> <?php esc_html_e('These rules will not affect wp-admin and wp-includes directories!', 'wp-staging')?></p>
50 <div class="wpstg-exclude-filters-foot">
51 <div class="wpstg-dropdown wpstg-exclude-filter-dropdown" id="wpstg-exclude-filter-dropdown">
52 <button class="wpstg-dropdown-toggler wpstg-button--secondary wpstg-button--blue">
53 <?php esc_html_e("Add Exclude Rule + ", "wp-staging"); ?>
54 </button>
55 <div class="wpstg-dropdown-menu wpstg-menu-dropup" id="wpstg-exclude-filter-dropdown-menu">
56 <button class="wpstg-dropdown-action wpstg-file-size-rule"><?php esc_html_e('File Size', 'wp-staging'); ?></button>
57 <button class="wpstg-dropdown-action wpstg-file-ext-rule"><?php esc_html_e('File Extension', 'wp-staging'); ?></button>
58 <button class="wpstg-dropdown-action wpstg-file-name-rule"><?php esc_html_e('File Name', 'wp-staging'); ?></button>
59 <button class="wpstg-dropdown-action wpstg-dir-name-rule"><?php esc_html_e('Folder Name', 'wp-staging'); ?></button>
60 </div>
61 </div>
62 <button <?php echo !$hasRules ? 'style="display: none;"' : '' ?> class="wpstg-ml-8px wpstg-button--secondary wpstg-clear-all-rules wpstg-has-exclude-rules wpstg-button--red">
63 <?php esc_html_e("Clear All Rules", "wp-staging"); ?>
64 </button>
65 </div>
66 </div>
67 <?php
68 if ($options->current !== null && $options->mainJob === 'updating') {
69 echo '<p>' . esc_html__("Applying an exclude rule will not effect existing files on the staging site if you don't clean up the wp-content folder before updating. Existing files will not be deleted afterwards automatically!", 'wp-staging') . '</p>';
70 }
71 ?>
72 <!-- End Exclusion Rules Table -->
73
74 <!-- Templates for exclusion filters. These will never be rendered until added to exclusion rule table -->
75 <?php unset($rule); ?>
76 <template id="wpstg-file-ext-exclude-filter-template">
77 <?php require(WPSTG_PLUGIN_DIR . 'Backend/views/templates/exclude-filters/file-ext-exclude-filter.php') ?>
78 </template>
79 <template id="wpstg-file-size-exclude-filter-template">
80 <?php require(WPSTG_PLUGIN_DIR . 'Backend/views/templates/exclude-filters/file-size-exclude-filter.php') ?>
81 </template>
82 <template id="wpstg-file-name-exclude-filter-template">
83 <?php require(WPSTG_PLUGIN_DIR . 'Backend/views/templates/exclude-filters/file-name-exclude-filter.php') ?>
84 </template>
85 <template id="wpstg-dir-name-exclude-filter-template">
86 <?php require(WPSTG_PLUGIN_DIR . 'Backend/views/templates/exclude-filters/dir-name-exclude-filter.php') ?>
87 </template>
88 <!-- End - Templates for exclusion filters -->
89
90 <?php if (defined('WPSTG_ALLOW_EXTRA_DIRECTORIES') && WPSTG_ALLOW_EXTRA_DIRECTORIES) { ?>
91 <h4 style="margin:10px 0 10px 0">
92 <?php echo esc_html__("Extra directories to copy", "wp-staging") ?>
93 </h4>
94
95 <textarea id="wpstg_extraDirectories" name="wpstg_extraDirectories" style="width:100%;height:100px;"></textarea>
96 <p>
97 <span>
98 <?php
99 echo sprintf(
100 Escape::escapeHtml(__("Enter one folder path per line.<br>Folders must be relative to the path: %s", 'wp-staging')),
101 esc_html($options->root)
102 );
103 ?>
104 </span>
105 </p>
106 <?php } ?>
107
108 <p>
109 <span>
110 <?php
111 if (isset($options->current)) {
112 $destination = isset($options->currentClone['cloneDir']) ? $options->currentClone['cloneDir'] : $options->currentClone['path'];
113 echo esc_html__("All files will be copied to: ", "wp-staging") . "<code>" . esc_html($destination) . "</code>";
114 }
115 ?>
116 </span>
117 </p>
118