PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / trunk
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! vtrunk
3.8.0 3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 All 112 releases
templately / modules / full-site-import / Cleanup / CleanupTasks.php

CleanupTasks.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! trunk, at modules/full-site-import/Cleanup/CleanupTasks.php

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * FSI's contribution to the shared cleanup service.
4 *
5 * @package Templately
6 */
7
8 namespace Templately\Modules\FullSiteImport\Cleanup;
9
10 use Templately\Modules\Utilities\Cleanup\TaskRegistry;
11
12 /**
13 * The one place this module names its cleanup tasks.
14 *
15 * Contribution is inverted: `modules/utilities/` never refers to full-site-import,
16 * so removing or disabling this module removes its cleanups with it and the
17 * engine needs no edit. This module declares `'utilities'` as a dependency;
18 * the arrow points one way only.
19 *
20 * Four tasks, deliberately separate rather than one "clean up FSI" blob: each
21 * reclaims a different kind of thing, each can fail independently without
22 * costing the others their run, and the UI can estimate and offer them
23 * individually.
24 */
25 final class CleanupTasks {
26
27 public static function register(): void {
28 add_action(
29 TaskRegistry::COLLECT_ACTION,
30 static function ( TaskRegistry $registry ) {
31 $registry->register_classes(
32 [
33 SessionsTask::class,
34 TmpDirsTask::class,
35 PreviewDirsTask::class,
36 LogsTask::class,
37 ]
38 );
39 }
40 );
41 }
42 }
43