2026-10-08 GLOBAL
This commit is contained in:
parent
a65268edd3
commit
ff012cc533
@ -12415,3 +12415,17 @@ main > .pksh-section:first-child {
|
||||
.header .menu-wrapper a:focus-visible,
|
||||
.header .menu-wrapper button:focus-visible,
|
||||
.header .btn-close-header-menu:focus-visible { outline: 3px solid #6FB6E8; outline-offset: 2px; }
|
||||
|
||||
/* Личный кабинет в главном меню (десктоп) */
|
||||
.header-menu .menu-item-lk { display: flex; align-items: center; }
|
||||
.header-menu .menu-item-lk a { display: flex; align-items: center; gap: 6px; color: #fff; white-space: nowrap; transition: .3s; }
|
||||
.header-menu .menu-item-lk a:hover { color: #BBBBBB; }
|
||||
.header-menu .menu-item-lk .menu-lk__icon { flex: 0 0 auto; }
|
||||
@media (max-width: 860px) { .header-menu .menu-item-lk { display: none; } }
|
||||
|
||||
/* Узкий десктоп: главное меню в одну строку */
|
||||
@media (min-width: 861px) and (max-width: 1366px) {
|
||||
.header-menu { gap: 10px; font-size: 13px; }
|
||||
.header-menu .menu-item-lk a { gap: 4px; }
|
||||
.header-menu .menu-lk__icon { width: 16px; height: 16px; }
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -3628,6 +3628,17 @@ function dekart_assoc_ids($val): array
|
||||
return array_values(array_filter($out));
|
||||
}
|
||||
|
||||
// ─── Пункт «Личный кабинет» в главное меню шапки ───
|
||||
add_filter('wp_nav_menu_items', function ($items, $args) {
|
||||
if (empty($args->theme_location) || $args->theme_location !== 'top') {
|
||||
return $items;
|
||||
}
|
||||
$url = carbon_get_theme_option('site_lk_url') ?: 'https://lk.dekart-school.ru/';
|
||||
$ico = '<svg class="menu-lk__icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>';
|
||||
$items .= '<li class="menu-item menu-item-lk"><a href="' . esc_url($url) . '" target="_blank" rel="noopener noreferrer">' . $ico . '<span>' . esc_html__('Личный кабинет', 'dekart') . '</span></a></li>';
|
||||
return $items;
|
||||
}, 10, 2);
|
||||
|
||||
// Лендинг «Семейные классы»: снять конкурирующий head-скрипт Custom CSS & JS (open-bitrix-form)
|
||||
add_action('wp', function () {
|
||||
if (! is_page_template('page-semejnye-klassy.php')) {
|
||||
|
||||
@ -177,12 +177,6 @@ if (is_front_page()) {
|
||||
<?php esc_html_e('ЗАКРЫТЬ МЕНЮ', 'dekart'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<a class="inter-lk desktop" href="<?php echo esc_url(carbon_get_theme_option('site_lk_url') ?: 'https://lk.dekart-school.ru/'); ?>" target="_blank" rel="noopener noreferrer">
|
||||
<img width="18" height="23"
|
||||
src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/icon-user.svg"
|
||||
alt="" loading="lazy">
|
||||
<span><?php esc_html_e('Личный кабинет', 'dekart'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
@ -1,25 +1,29 @@
|
||||
<?php
|
||||
|
||||
// Стоимость — школьный тариф (единый источник со страницей школы)
|
||||
// Стоимость — из CF главной (price_cards, как секция «Стоимость обучения…»)
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$school_id = function_exists('dekart_page_id_by_template') ? dekart_page_id_by_template('page-elementary-school.php') : 0;
|
||||
$f_title = carbon_get_theme_option('family_price_title');
|
||||
$f_note = carbon_get_theme_option('family_price_note');
|
||||
$f_title = carbon_get_theme_option('family_price_title');
|
||||
$f_note = carbon_get_theme_option('family_price_note');
|
||||
|
||||
if (! $school_id) {
|
||||
return;
|
||||
// Источник: страница главной (page_on_front); фолбэк — страница школы
|
||||
$src_id = (int) get_option('page_on_front');
|
||||
$cards = $src_id ? carbon_get_post_meta($src_id, 'price_cards') : array();
|
||||
|
||||
if (empty($cards) || ! is_array($cards)) {
|
||||
$src_id = function_exists('dekart_page_id_by_template') ? dekart_page_id_by_template('page-elementary-school.php') : 0;
|
||||
$cards = $src_id ? carbon_get_post_meta($src_id, 'price_cards') : array();
|
||||
}
|
||||
$school_cards = carbon_get_post_meta($school_id, 'price_cards');
|
||||
if (empty($school_cards) || ! is_array($school_cards)) {
|
||||
|
||||
if (empty($cards) || ! is_array($cards)) {
|
||||
return;
|
||||
}
|
||||
|
||||
get_template_part('template-parts/price-front', null, array(
|
||||
'post_id' => $school_id,
|
||||
'post_id' => $src_id,
|
||||
'label' => 'Стоимость',
|
||||
'title' => $f_title ?: 'Стоимость обучения в семейном классе',
|
||||
'desc' => '',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user