From 73a51cf6f449d631fa2c4db1dc1621ec6e5222c7 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Thu, 15 Oct 2026 16:41:06 +0300 Subject: [PATCH] =?UTF-8?q?task=2017075=20|=20=D1=81=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=BF=D0=BE=D0=B4=D1=81=D1=87=D0=B5=D1=82=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B2=20=D1=81=D1=82=D0=B0=D1=82=D1=8C=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/inc/acf.php | 8 ++++++++ wp-content/themes/hantico/single-article.php | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/hantico/inc/acf.php b/wp-content/themes/hantico/inc/acf.php index 72d0470..7002642 100644 --- a/wp-content/themes/hantico/inc/acf.php +++ b/wp-content/themes/hantico/inc/acf.php @@ -3,6 +3,14 @@ // Отключить табы в редакторе групп полей ACF add_filter('acf/field_group/disable_field_settings_tabs', '__return_true'); +// Просмотры изменяются автоматически, поле в админке доступно только для просмотра. +add_filter('acf/prepare_field/name=viewers', function ($field) { + if (is_admin()) { + $field['disabled'] = 1; + } + return $field; +}); + // Страница опций ACF if (function_exists('acf_add_options_page')) { diff --git a/wp-content/themes/hantico/single-article.php b/wp-content/themes/hantico/single-article.php index 3a64421..d03a237 100644 --- a/wp-content/themes/hantico/single-article.php +++ b/wp-content/themes/hantico/single-article.php @@ -5,6 +5,13 @@ - Просмотры: — + Просмотры: