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 / partials / invalid-backup.php
wp-staging / views / backup / partials Last commit date
invalid-backup.php 7 months ago
invalid-backup.php
81 lines
1 <?php
2
3 use WPStaging\Core\WPStaging;
4 use WPStaging\Framework\Utils\Strings;
5
6 /**
7 * @var string $id
8 * @var array $missingParts
9 * @var array $sizeIssues
10 * @var array $existingBackupParts
11 *
12 * Used src/views/backup/listing-single-backup.php
13 */
14
15 if (!isset($urlAssets)) {
16 $urlAssets = trailingslashit(WPSTG_PLUGIN_URL) . 'assets/';
17 }
18
19 /** @var Strings $strings */
20 $strings = WPStaging::make(Strings::class);
21
22 ?>
23
24 <a href="javascript:void(0)" class="wpstg-tab-header" data-id="#wpstg-invalid-backup-<?php echo esc_attr($id); ?>">
25 <?php if (empty($sizeIssues) && empty($missingParts)) : ?>
26 <span class="wpstg-tab-triangle"></span>
27 <span class="wpstg-backup-parts-heading"><?php esc_html_e("Show available backup parts", "wp-staging") ?></span>
28 <?php else : ?>
29 <span class="wpstg-tab-triangle wpstg--red"></span>
30 <span class="wpstg--text--danger"><?php esc_html_e("This is a multipart backup with issues!", "wp-staging") ?> </span>
31 <div class="wpstg--tooltip">
32 <img class="wpstg--dashicons wpstg-dashicons-19 wpstg--grey" src="<?php echo esc_url($urlAssets); ?>svg/info-outline.svg" alt="info"/>
33 <span class="wpstg--tooltiptext wpstg--tooltiptext-backups">
34 <?php esc_html_e("This backup contains missing or invalid parts.", 'wp-staging') ?>
35 </span>
36 </div>
37 <?php endif; ?>
38 </a>
39
40 <fieldset class="wpstg-tab-section" id="wpstg-invalid-backup-<?php echo esc_attr($id); ?>">
41
42 <h5>
43 <?php esc_html_e('Multipart backup contains these parts', 'wp-staging') ?>
44 </h5>
45 <ol>
46 <?php foreach ($existingBackupParts as $existingPart) : ?>
47 <li><?php echo esc_html($strings->maskBackupFilename($existingPart)); ?></li>
48 <?php endforeach; ?>
49 </ol>
50
51
52 <?php if (!empty($missingParts)) : ?>
53 <h5>
54 <?php if (empty($sizeIssues)) : ?>
55 <?php
56 if (count($missingParts) === 1) {
57 esc_html_e('Part below is missing but you can still restore the other backup files!', 'wp-staging');
58 } else {
59 esc_html_e('Parts below are missing but you can still restore the other backup files!', 'wp-staging');
60 }
61 ?>
62 <?php else : ?>
63 <?php esc_html_e('Missing Parts', 'wp-staging') ?>
64 <?php endif; ?>
65 </h5>
66 <ol>
67 <?php foreach ($missingParts as $part) : ?>
68 <li><?php echo esc_html($strings->maskBackupFilename($part['name'])); ?></li>
69 <?php endforeach; ?>
70 </ol>
71 <?php endif; ?>
72 <?php if (!empty($sizeIssues)) : ?>
73 <h5><?php esc_html_e('Parts with invalid size that should be uploaded again:', 'wp-staging') ?></h5>
74 <ol>
75 <?php foreach ($sizeIssues as $part) : ?>
76 <li><?php echo esc_html($strings->maskBackupFilename($part)); ?></li>
77 <?php endforeach; ?>
78 </ol>
79 <?php endif; ?>
80 </fieldset>
81