59 lines
2.6 KiB
PHP
59 lines
2.6 KiB
PHP
<?php
|
|
// ─── Готовность к школе (CF school_readiness_*) ───
|
|
if (! defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
$post_id = get_the_ID();
|
|
$rc_title = crb_get_post_meta($post_id, 'school_readiness_title');
|
|
$rc_text = crb_get_post_meta($post_id, 'school_readiness_text');
|
|
$rc_btn_label = crb_get_post_meta($post_id, 'school_readiness_btn_label');
|
|
$rc_btn_url = crb_get_post_meta($post_id, 'school_readiness_btn_url');
|
|
$rc_time = crb_get_post_meta($post_id, 'school_readiness_time', '~5 минут · 12 вопросов · Бесплатно');
|
|
|
|
// Дефолты CF
|
|
if (empty($rc_title)) {
|
|
$rc_title = 'Готов ли ребёнок к школе?';
|
|
}
|
|
if (empty($rc_text)) {
|
|
$rc_text = 'Пройдите короткий тест из 12 вопросов и получите персональные рекомендации по подготовке ребёнка к 1 классу. Это бесплатно и займёт 5 минут.';
|
|
}
|
|
if (empty($rc_btn_label)) {
|
|
$rc_btn_label = 'Пройти тест';
|
|
}
|
|
if (empty($rc_btn_url)) {
|
|
$rc_btn_url = '/test-gotovnost-k-shkole/';
|
|
}
|
|
?>
|
|
<section class="school-readiness section-bg reveal" data-bg="readiness" aria-label="Готовность к школе">
|
|
<div class="container">
|
|
|
|
<div class="school-readiness__inner">
|
|
<div class="school-readiness__icon" aria-hidden="true">
|
|
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M9 11l3 3L22 4"/>
|
|
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>
|
|
</svg>
|
|
</div>
|
|
|
|
<h2 class="bento-h2 school-readiness__title"><?php echo esc_html($rc_title); ?></h2>
|
|
|
|
<p class="bento-p school-readiness__text"><?php echo esc_html($rc_text); ?></p>
|
|
|
|
<a class="btn-write btn-primary school-readiness__btn"
|
|
href="<?php echo esc_url($rc_btn_url); ?>"
|
|
data-track="readiness-test">
|
|
<?php echo esc_html($rc_btn_label); ?>
|
|
</a>
|
|
|
|
<p class="school-readiness__time">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<circle cx="12" cy="12" r="10"/>
|
|
<polyline points="12 6 12 12 16 14"/>
|
|
</svg>
|
|
<?php echo esc_html($rc_time); ?>
|
|
</p> </div>
|
|
|
|
</div>
|
|
</section>
|