45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
// Классы и форматы
|
|
|
|
if (! defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
$f_title = dekart_family_get('family_classes_title');
|
|
$f_text = dekart_family_get('family_classes_text');
|
|
$f_items = (array) dekart_family_get('family_classes');
|
|
|
|
if (! $f_title && ! $f_text && ! $f_items) {
|
|
return;
|
|
}
|
|
?>
|
|
<section class="section-bg reveal family-block" data-bg="family-classes">
|
|
<div class="container">
|
|
<?php if ($f_title) : ?>
|
|
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
|
<?php endif; ?>
|
|
<?php if ($f_text) : ?>
|
|
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($f_items) : ?>
|
|
<div class="family-grid family-grid--3">
|
|
<?php foreach ($f_items as $f_it) : ?>
|
|
<div class="family-class-card">
|
|
<?php if (! empty($f_it['class_name'])) : ?>
|
|
<h3 class="family-class-card__name"><?php echo esc_html($f_it['class_name']); ?></h3>
|
|
<?php endif; ?>
|
|
<?php if (! empty($f_it['class_desc'])) : ?>
|
|
<p class="family-class-card__text"><?php echo esc_html($f_it['class_desc']); ?></p>
|
|
<?php endif; ?>
|
|
<?php if (! empty($f_it['class_places'])) : ?>
|
|
<span class="family-class-card__places"><?php echo esc_html($f_it['class_places']); ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|