feat(wpmc S3): procedural wpmc_* API + smoke test

Also fixes PluginBootTest to be order-independent (reset booted flag)
and to expect ShortcodeDmr hook that boot() now wires.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vladimir Bryzgalov
2026-05-12 20:11:47 +05:00
parent 3dbca34234
commit d8b0d01f1c
4 changed files with 60 additions and 1 deletions
+32
View File
@@ -0,0 +1,32 @@
<?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);
}
}