Add 1.0.1 release notes documenting the three hotfixes: procedural wrapper,
WP 6.7 textdomain notice fix, and ACF early-call guard.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add private Helpers::acf_ready() that checks did_action('acf/init') > 0,
then guard the five ACF-dependent methods (alt_get_field, index_town_alt_page_id,
main_town_slug, page_unic_swap, is_routable_path) so they return safe defaults
(null/true) before ACF initialises. Fixes the acf_get_value "called too early"
notice triggered when home_url filter fires before acf/init.
Update existing tests in HelpersTest, LinkFilterTest, RedirectTest, RouterTest
to stub did_action => 1 where ACF-ready behaviour is expected. Add four new
guard tests covering before/after acf/init for main_town_slug and is_routable_path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace all __('...', 'wp-multi-city') calls in CPT, taxonomy, ACF field group,
and options page label arrays with literal Russian strings. The plugin ships no
.mo translation files, so wrapping labels in __() was YAGNI and triggered the
WP 6.7+ _load_textdomain_just_in_time notice.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
First release где версия уже = target (bump no-op) ранее падал на
git commit. --allow-empty создаёт release-маркер в истории даже без diff;
на bump-релизах флаг не мешает (diff не пустой).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Also: add acf_add_options_page to acf-stubs.php; add translation-function
stubs to acf-stubs.php; fix TestCase::tearDown to call Patchwork::restoreAll()
in a finally block so that when('function_exists') routes are always cleaned up
even when Mockery::close() throws InvalidCountException.
Re-add ->never() to both noop tests so Brain Monkey/Mockery actively asserts
acf_add_local_field_group is never called when ACF is absent. Order matters:
expect() must precede when('function_exists')->alias() so FunctionStub sees the
real function_exists and skips the eval() path (function already declared in
acf-stubs.php). Also tighten stub signature to match real ACF ($field_group,
no type hint, no default).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add acf-stubs.php + TestCase::setUp() require-after-Patchwork pattern so
acf_add_local_field_group is Patchwork-instrumented and re-interceptable
across FieldGroupTest and TermMetaTest in the same PHP process.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>