feat(wpmc S4): Helpers::index_town_alt_page_id reads ACF option

This commit is contained in:
Vladimir Bryzgalov
2026-05-16 19:22:59 +05:00
parent d724089b2d
commit b967a3a59f
2 changed files with 30 additions and 0 deletions
+10
View File
@@ -102,6 +102,16 @@ final class Helpers
return $path . $query . $fragment;
}
public static function index_town_alt_page_id(): ?int
{
if (!\function_exists('get_field')) {
return null;
}
$value = \get_field('index_town_alt', 'option');
$id = (int) $value;
return $id > 0 ? $id : null;
}
public static function main_town_slug(): ?string
{
if (!\function_exists('get_field')) {