PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / trunk
WP STAGING – WordPress Backups, Restore, Migration & Clone vtrunk
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 / Backup / Ajax / Restore.php
wp-staging / Backup / Ajax Last commit date
Backup 6 days ago FileList 6 days ago Restore 6 days ago Backup.php 6 days ago BackupDownloader.php 6 days ago BackupSizeCalculator.php 6 days ago BackupSpeedIndex.php 6 days ago BaseFileList.php 6 days ago BaseListing.php 6 days ago Delete.php 6 days ago Edit.php 2 days ago Explore.php 6 days ago ExploreCache.php 6 days ago FileInfo.php 6 days ago FileList.php 6 days ago Listing.php 6 days ago Parts.php 6 days ago Restore.php 6 days ago ScheduleList.php 6 days ago Upload.php 6 days ago
Restore.php
41 lines
1 <?php
2
3
4
5
6 namespace WPStaging\Backup\Ajax;
7
8 use WPStaging\Backup\Job\JobRestoreProvider;
9 use WPStaging\Core\WPStaging;
10 use WPStaging\Framework\Component\AbstractTemplateComponent;
11 use WPStaging\Framework\Traits\MemoryExhaustTrait;
12 use WPStaging\Framework\Traits\JobResponseTrait;
13
14 class Restore extends AbstractTemplateComponent
15 {
16 use JobResponseTrait;
17 use MemoryExhaustTrait;
18
19
20
21
22 const WPSTG_REQUEST = 'wpstg_restore';
23
24
25
26
27 public function render()
28 {
29 if (!$this->canRenderAjax()) {
30 return;
31 }
32
33 $tmpFileToDelete = $this->getMemoryExhaustErrorTmpFile(self::WPSTG_REQUEST);
34
35 $jobRestore = WPStaging::make(JobRestoreProvider::class)->getJob();
36 $jobRestore->setMemoryExhaustErrorTmpFile($tmpFileToDelete);
37
38 $this->sendJobResponse($jobRestore);
39 }
40 }
41