41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
// FAQ
|
|
|
|
if (! defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
$f_title = dekart_family_get('family_faq_title');
|
|
$f_items = (array) dekart_family_get('family_faq');
|
|
|
|
if (! $f_items) {
|
|
return;
|
|
}
|
|
|
|
// только заполненные
|
|
$f_items = array_values(array_filter($f_items, function ($it) {
|
|
return ! empty($it['question']) && ! empty($it['answer']);
|
|
}));
|
|
|
|
if (! $f_items) {
|
|
return;
|
|
}
|
|
?>
|
|
<section class="section-bg reveal family-block family-faq" data-bg="family-faq" id="faq">
|
|
<div class="container">
|
|
<?php if ($f_title) : ?>
|
|
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
|
<?php endif; ?>
|
|
|
|
<div class="family-faq__list">
|
|
<?php foreach ($f_items as $f_it) : ?>
|
|
<details class="family-faq__item">
|
|
<summary class="family-faq__q"><?php echo esc_html($f_it['question']); ?></summary>
|
|
<div class="family-faq__a"><?php echo wp_kses_post(wpautop($f_it['answer'])); ?></div>
|
|
</details>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|