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 / selections / files.php
wp-staging / views / selections Last commit date
database-tables.php 1 year ago files.php 1 year ago
files.php
114 lines
1 <?php
2
3 /**
4 * @var stdClass $options
5 * @var $scan Object
6 * @var $excludeUtils Object
7 * @see src/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") ?>
19 </p>
20 <div id="wpstg-directories-listing" data-existing-excludes="<?php echo (($options->mainJob === Job::UPDATE || $options->mainJob === Job::RESET) && isset($options->currentClone['excludedDirectories'])) ? esc_html(implode(',', $options->currentClone['excludedDirectories'])) : '' ?>">
21 <div class="wpstg-mb-8px">
22 <button type="button" class="wpstg-unselect-dirs button"><?php esc_html_e('Unselect All', 'wp-staging'); ?></button>
23 <button type="button" class="wpstg-select-dirs-default button"> <?php esc_html_e('Select Default', 'wp-staging'); ?></button>
24 </div>
25 <?php echo $scan->directoryListing(); // phpcs:ignore ?>
26 </div>
27 <!-- Exclusion Rules Table -->
28 <div class="wpstg-excluded-filters-container" id="wpstg-exclude-filters-container">
29 <table>
30 <tbody>
31 <?php
32 $hasRules = false;
33 if ($options->mainJob === Job::UPDATE || $options->mainJob === Job::RESET) :
34 foreach ($options->currentClone['excludeSizeRules'] as $rule) :
35 $hasRules = true;
36 echo $excludeUtils->renderSizeExclude($rule); // phpcs:ignore
37 endforeach;
38 foreach ($options->currentClone['excludeGlobRules'] as $rule) :
39 $hasRules = true;
40 echo $excludeUtils->renderGlobExclude($rule); // phpcs:ignore
41 endforeach;
42 endif; ?>
43 </tbody>
44 </table>
45 <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>
46 <div class="wpstg-exclude-filters-foot">
47 <div class="wpstg-dropdown wpstg-exclude-filter-dropdown" id="wpstg-exclude-filter-dropdown">
48 <button class="wpstg-dropdown-toggler wpstg-button--secondary wpstg-button--blue">
49 <?php esc_html_e("Add Exclude Rule + ", "wp-staging"); ?>
50 </button>
51 <div class="wpstg-dropdown-menu wpstg-menu-dropup" id="wpstg-exclude-filter-dropdown-menu">
52 <button class="wpstg-dropdown-action wpstg-file-size-rule"><?php esc_html_e('File Size', 'wp-staging'); ?></button>
53 <button class="wpstg-dropdown-action wpstg-file-ext-rule"><?php esc_html_e('File Extension', 'wp-staging'); ?></button>
54 <button class="wpstg-dropdown-action wpstg-file-name-rule"><?php esc_html_e('File Name', 'wp-staging'); ?></button>
55 <button class="wpstg-dropdown-action wpstg-dir-name-rule"><?php esc_html_e('Folder Name', 'wp-staging'); ?></button>
56 </div>
57 </div>
58 <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">
59 <?php esc_html_e("Clear All Rules", "wp-staging"); ?>
60 </button>
61 </div>
62 </div>
63 <?php
64 if ($options->current !== null && $options->mainJob === 'updating') {
65 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>';
66 }
67 ?>
68 <!-- End Exclusion Rules Table -->
69
70 <!-- Templates for exclusion filters. These will never be rendered until added to exclusion rule table -->
71 <?php unset($rule); ?>
72 <template id="wpstg-file-ext-exclude-filter-template">
73 <?php require(WPSTG_VIEWS_DIR . 'exclude-filters/file-ext-exclude-filter.php'); ?>
74 </template>
75 <template id="wpstg-file-size-exclude-filter-template">
76 <?php require(WPSTG_VIEWS_DIR . 'exclude-filters/file-size-exclude-filter.php'); ?>
77 </template>
78 <template id="wpstg-file-name-exclude-filter-template">
79 <?php require(WPSTG_VIEWS_DIR . 'exclude-filters/file-name-exclude-filter.php'); ?>
80 </template>
81 <template id="wpstg-dir-name-exclude-filter-template">
82 <?php require(WPSTG_VIEWS_DIR . 'exclude-filters/dir-name-exclude-filter.php'); ?>
83 </template>
84 <!-- End - Templates for exclusion filters -->
85
86 <?php if (defined('WPSTG_ALLOW_EXTRA_DIRECTORIES') && WPSTG_ALLOW_EXTRA_DIRECTORIES) { ?>
87 <h4 style="margin:10px 0 10px 0">
88 <?php echo esc_html__("Extra directories to copy", "wp-staging") ?>
89 </h4>
90
91 <textarea id="wpstg_extraDirectories" name="wpstg_extraDirectories" style="width:100%;height:100px;"></textarea>
92 <p>
93 <span>
94 <?php
95 echo sprintf(
96 Escape::escapeHtml(__("Enter one folder path per line.<br>Folders must be relative to the path: %s", 'wp-staging')),
97 esc_html($options->root)
98 );
99 ?>
100 </span>
101 </p>
102 <?php } ?>
103
104 <p>
105 <span>
106 <?php
107 if (isset($options->current)) {
108 $destination = isset($options->currentClone['cloneDir']) ? $options->currentClone['cloneDir'] : $options->currentClone['path'];
109 echo esc_html__("All files will be copied to: ", "wp-staging") . "<code>" . esc_html($destination) . "</code>";
110 }
111 ?>
112 </span>
113 </p>
114