diff --git a/wp-content/themes/dekart/functions.php b/wp-content/themes/dekart/functions.php
index 261c142..4b077ad 100644
--- a/wp-content/themes/dekart/functions.php
+++ b/wp-content/themes/dekart/functions.php
@@ -1966,14 +1966,14 @@ function add_carbon()
->set_help_text('Короткая суть статьи 2–3 предложения. Выводится сразу под заголовком и в разметке. Пусто — берётся лид записи.'),
Field::make('complex', 'post_faq', 'FAQ статьи')
->set_layout('tabbed-horizontal')
- ->set_help_text('Вопросы и ответы → блок FAQ + разметка FAQPage.')
+ ->set_help_text('Вопросы и ответы → блок FAQ + разметка FAQPage. Ключи подполей: faq_q / faq_a (принимаются также question / answer).')
->add_fields(array(
Field::make('text', 'faq_q', 'Вопрос')->set_width(40),
Field::make('textarea', 'faq_a', 'Ответ')->set_width(60),
)),
Field::make('complex', 'post_sources', 'Источники')
->set_layout('tabbed-horizontal')
- ->set_help_text('Ссылки на источники/исследования → блок «Источники».')
+ ->set_help_text('Ссылки на источники/исследования → блок «Источники». Ключи подполей: source_title / source_url (принимаются также name / link).')
->add_fields(array(
Field::make('text', 'source_title', 'Название')->set_width(55),
Field::make('text', 'source_url', 'Ссылка')->set_width(45),
@@ -5972,10 +5972,20 @@ function dekart_cf_rows(int $post_id, string $field, array $order): array
$lookup = array();
foreach ($order as $i => $key) {
- $lookup[ strtolower((string) $key) ] = $key;
- $lookup[ (string) $i ] = $key;
+ $lookup[ strtolower((string) $key) ] = $key;
+ $lookup[ (string) $i ] = $key;
}
+ $syn = array(
+ 'question' => 'q', 'answer' => 'a', 'q' => 'q', 'a' => 'a',
+ 'faq_q' => 'q', 'faq_a' => 'a',
+ 'name' => 'name', 'platform_name' => 'name',
+ 'title' => 'title', 'source_title' => 'title',
+ 'url' => 'url', 'link' => 'url', 'source_url' => 'url', 'platform_url' => 'url',
+ 'icon' => 'icon', 'platform_icon' => 'icon',
+ 'rating' => 'rating', 'platform_rating' => 'rating',
+ );
+
foreach ($rows as $r) {
$parts = explode('|', (string) $r->meta_key);
array_shift($parts);
@@ -6012,8 +6022,12 @@ function dekart_cf_rows(int $post_id, string $field, array $order): array
$key = $lookup[ $short ];
break;
}
- if (ctype_digit($seg) && isset($lookup[ $seg ])) {
- $key = $lookup[ $seg ];
+ if (isset($syn[ $short ]) && isset($lookup[ $syn[ $short ] ])) {
+ $key = $lookup[ $syn[ $short ] ];
+ break;
+ }
+ if (isset($syn[ $seg ]) && isset($lookup[ $syn[ $seg ] ])) {
+ $key = $lookup[ $syn[ $seg ] ];
break;
}
}
diff --git a/wp-content/themes/dekart/header.php b/wp-content/themes/dekart/header.php
index a937f72..7b4ad60 100644
--- a/wp-content/themes/dekart/header.php
+++ b/wp-content/themes/dekart/header.php
@@ -133,12 +133,6 @@ if (file_exists($fonts_css)) {
href="tel:">
-
-
-