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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user