19409ac062
Add wpmc_main_town_slug() wrapper function to wpmc-functions.php, delegating to Helpers::main_town_slug(). The function was documented in the Hook API README but was missing from the codebase. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
40 lines
963 B
PHP
40 lines
963 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use WPMultiCity\Helpers;
|
|
|
|
if (!function_exists('wpmc_current_town')) {
|
|
function wpmc_current_town(): ?string
|
|
{
|
|
return Helpers::current_town();
|
|
}
|
|
}
|
|
|
|
if (!function_exists('wpmc_get_term_by_slug')) {
|
|
function wpmc_get_term_by_slug(string $slug, string $taxonomy = 'town'): ?\WP_Term
|
|
{
|
|
return Helpers::get_term_by_slug($slug, $taxonomy);
|
|
}
|
|
}
|
|
|
|
if (!function_exists('wpmc_alt_get_field')) {
|
|
function wpmc_alt_get_field(string $selector, $post_id = false, bool $format_value = true)
|
|
{
|
|
return Helpers::alt_get_field($selector, $post_id, $format_value);
|
|
}
|
|
}
|
|
|
|
if (!function_exists('wpmc_remove_domain_link')) {
|
|
function wpmc_remove_domain_link(string $url): string
|
|
{
|
|
return Helpers::remove_domain_link($url);
|
|
}
|
|
}
|
|
|
|
if (!function_exists('wpmc_main_town_slug')) {
|
|
function wpmc_main_town_slug(): ?string
|
|
{
|
|
return Helpers::main_town_slug();
|
|
}
|
|
}
|