PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.2.0
Kirki – Freeform Page Builder, Website Builder & Customizer v6.2.0
6.2.0 6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / libraries / framework / View / layout-wrapper.php
kirki / libraries / framework / View Last commit date
TemplateEngine.php 5 days ago View.php 5 days ago ViewContext.php 5 days ago layout-wrapper.php 5 days ago
layout-wrapper.php
30 lines
1 <?php
2
3 namespace {
4 /**
5 * Layout wrapper for template_include views that use theme header/footer.
6 *
7 * WordPress includes this file via template_include. The active ViewContext
8 * holds the real view path and data; this stub renders content and wraps it.
9 *
10 * @package Framework
11 * @subpackage View
12 * @since 2.1.2
13 */
14 \defined('ABSPATH') || exit;
15 use Kirki\Framework\View\TemplateEngine;
16 use Kirki\Framework\View\ViewContext;
17 use function Kirki\Framework\app;
18 $context = app(ViewContext::class);
19 $active = $context->get_active();
20 if ($active === null || empty($active['resolved_path'])) {
21 return;
22 }
23 $path = $active['resolved_path'];
24 \ob_start();
25 require $path;
26 $content = (string) \ob_get_clean();
27 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Assembled layout HTML; dynamic data is escaped in view templates via esc_*.
28 echo app(TemplateEngine::class)->wrap_layout($content);
29 }
30