2026-10-08 16:59:02 +00:00

51 lines
1.8 KiB
PHP

<?php
if (! defined('ABSPATH')) {
exit;
}
$title = dekart_family_get('family_compare_title');
$text = dekart_family_get('family_compare_text');
$rows = dekart_family_get('family_compare_rows');
$rows = array_values(array_filter((array) $rows, function ($r) {
return is_array($r) && trim((string) ($r['param'] ?? '')) !== '';
}));
if (! $rows) {
return;
}
?>
<section class="section-bg reveal family-block family-compare" data-bg="family-compare">
<div class="container">
<div class="section-header--left">
<?php if ($title) : ?><h2 class="bento-h2"><?php echo esc_html($title); ?></h2><?php endif; ?>
<?php if ($text) : ?><p class="bento-p"><?php echo esc_html($text); ?></p><?php endif; ?>
</div>
<div class="family-compare__wrap">
<table class="family-compare__table">
<thead>
<tr>
<th scope="col">Параметр</th>
<th scope="col">Школа</th>
<th scope="col" class="is-hl">Семейный класс</th>
<th scope="col">Онлайн</th>
</tr>
</thead>
<tbody>
<?php foreach ($rows as $r) : ?>
<tr>
<th scope="row"><?php echo esc_html($r['param'] ?? ''); ?></th>
<td><?php echo esc_html($r['school'] ?? ''); ?></td>
<td class="is-hl"><?php echo esc_html($r['family'] ?? ''); ?></td>
<td><?php echo esc_html($r['online'] ?? ''); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</section>