30 lines
688 B
PHP
30 lines
688 B
PHP
<?php
|
|
/**
|
|
* Home Module · HTML
|
|
*
|
|
* config: { html, title? }
|
|
*
|
|
* 已通过 wp_kses_post 在写入时清洗,渲染时直接输出。
|
|
*/
|
|
defined('ABSPATH') || exit;
|
|
|
|
$cfg = get_query_var('aksrt_module_config', []);
|
|
if (!is_array($cfg)) $cfg = [];
|
|
|
|
$html = (string) ($cfg['html'] ?? '');
|
|
$title = (string) ($cfg['title'] ?? '');
|
|
|
|
if ($html === '') return;
|
|
?>
|
|
|
|
<section class="home-module home-module--html container">
|
|
<?php if ($title !== '') : ?>
|
|
<header class="home-module__header">
|
|
<h2 class="home-module__title"><?php echo esc_html($title); ?></h2>
|
|
</header>
|
|
<?php endif; ?>
|
|
<div class="home-module__html-body">
|
|
<?php echo wp_kses_post($html); ?>
|
|
</div>
|
|
</section>
|