PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.8.0
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.8.0
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 / elementor-kit-settings / module.php

module.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 3.8.0, at modules/elementor-kit-settings/module.php

54 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor Kit & Settings module (spec 031-elementor-kit-settings).
4 *
5 * PHP-only utility module, no REST routes, no JS — matches the
6 * modules/ai-content-merger/ shape. Two static utilities, each with genuinely
7 * independent, multi-spec consumers (the exact reason this warrants its own
8 * module rather than staying embedded in full-site-import or settings):
9 *
10 * - ElementorSettingsMerger: resolves `__globals__` references in element
11 * settings to concrete kit values. Relocated from
12 * modules/full-site-import/Utils/ElementorSettingsMerger.php — behavior
13 * byte-identical. Consumed by modules/full-site-import/ (FSI pipeline) AND
14 * includes/Core/Platform/Elementor.php (single-template import, not yet
15 * extracted — future spec 032's territory).
16 * - KitApplier: writes customizer-output color/font assignments into the
17 * active Elementor kit. Surgically extracted from
18 * modules/settings/REST/Settings.php::update_elementor_settings() —
19 * behavior byte-identical; the REST route/param-parsing stays in
20 * modules/settings/, only the "write into the kit" logic moved.
21 *
22 * SCOPE NOTE: the kit-import runner logic (backup-active-kit-id,
23 * create-new-kit-and-activate, apply theme_style) lives inline inside
24 * modules/full-site-import/Runners/ElementorContent.php's import() method,
25 * interleaved with that runner's OTHER job (Elementor page/post content
26 * import — same class, same pipeline slot as GutenbergContent). It was NOT
27 * extracted: the FSI Loop trait derives per-item resume keys from the
28 * runner's `Class::method` call identity (see
29 * modules/full-site-import/Runners/CLAUDE.md), so relocating the runner
30 * class itself would change that identity and could strand an in-flight
31 * import's resume position across a plugin update. The 3 private kit-manager
32 * fallback/compat helper methods on that class
33 * (get_kit_with_fallback/create_new_kit_with_fallback/
34 * create_default_kit_with_fallback) have no consumer outside that one file,
35 * so extracting them into this module would add indirection without a
36 * reuse benefit. Manual kit-revert-on-failure lives in
37 * modules/import-revert/RevertController.php as one line within a
38 * GENERIC options-restore loop covering the whole FSI revert surface (not
39 * kit-specific code) — also stays put.
40 *
41 * @package Templately
42 */
43
44 namespace Templately\Modules\ElementorKitSettings;
45
46 use Templately\Core\Module_Base;
47
48 class Module extends Module_Base {
49
50 public function get_name(): string {
51 return 'elementor-kit-settings';
52 }
53 }
54