Commit Graph

91 Commits

Author SHA1 Message Date
Vladimir Bryzgalov d36408a4a6 release: 1.0.1
tests / phpunit (push) Has been cancelled
v1.0.1
2026-05-17 17:02:11 +05:00
Vladimir Bryzgalov c002b08275 docs(wpmc 1.0.1): changelog entries in readme.txt + CHANGELOG.md
tests / phpunit (push) Has been cancelled
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>
2026-05-17 17:01:23 +05:00
Vladimir Bryzgalov 82d2345d12 fix(wpmc 1.0.1): guard ACF helpers with did_action('acf/init')
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>
2026-05-17 17:01:19 +05:00
Vladimir Bryzgalov 949fb19e95 fix(wpmc 1.0.1): remove __() from labels (no translations, fixes WP 6.7 notice)
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>
2026-05-17 17:01:11 +05:00
Vladimir Bryzgalov 19409ac062 feat(wpmc 1.0.1): wpmc_main_town_slug procedural wrapper
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>
2026-05-17 17:01:05 +05:00
Vladimir Bryzgalov 4c6173619b wp-plugin-info.json: update for 1.0.0
tests / phpunit (push) Has been cancelled
2026-05-17 12:49:33 +05:00
Vladimir Bryzgalov 1e6514b114 release: 1.0.0
tests / phpunit (push) Has been cancelled
v1.0.0
2026-05-17 12:49:33 +05:00
Vladimir Bryzgalov 5f77c5e742 fix(wpmc S7): release.sh allow empty release commit
tests / phpunit (push) Has been cancelled
First release где версия уже = target (bump no-op) ранее падал на
git commit. --allow-empty создаёт release-маркер в истории даже без diff;
на bump-релизах флаг не мешает (diff не пустой).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:49:27 +05:00
Vladimir Bryzgalov 43815dea2d refactor(wpmc S7): tighten tests + cleanup bootstrap shims
tests / phpunit (push) Has been cancelled
- PluginBootS7Test idempotency: assertTrue(class_exists) instead of assertTrue(true)
- ZipArchiveBuildTest: try/finally cleanup + unzip exit-code check
- bootstrap.php: drop unused PUC shims (wp_remote_post, transient*)
- CHANGELOG.md: header references Keep a Changelog (was: mirrors readme.txt)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:31:07 +05:00
Vladimir Bryzgalov 3f08bf6a5e feat(wpmc S7): release.sh Gitea release helper (mirror cf7stg flow)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:24:16 +05:00
Vladimir Bryzgalov 37e604e01e test(wpmc S7): ZipArchiveBuildTest verifies git archive integrity
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:23:01 +05:00
Vladimir Bryzgalov bff3339803 docs(wpmc S7): README expand with Quick Start + Hook API + Migration guide
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:22:34 +05:00
Vladimir Bryzgalov 18ffd94240 docs(wpmc S7): CHANGELOG.md mirror of readme.txt changelog
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:21:55 +05:00
Vladimir Bryzgalov 0ef61a6303 docs(wpmc S7): readme.txt WP.org format with 1.0.0 changelog
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:21:47 +05:00
Vladimir Bryzgalov fa7384dbff feat(wpmc S7): .gitattributes export-ignore for git archive build
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:21:01 +05:00
Vladimir Bryzgalov 72c93bdd98 feat(wpmc S7): bump version to 1.0.0 + Tested up to 6.9
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:20:49 +05:00
Vladimir Bryzgalov 25d50912f6 feat(wpmc S7): Plugin::register_update_checker wires PUC v5.6
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:20:31 +05:00
Vladimir Bryzgalov 17ac243a1a feat(wpmc S7): wp-plugin-info.json metadata for PUC
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:15:59 +05:00
Vladimir Bryzgalov c264bc433a feat(wpmc S7): vendor Plugin Update Checker v5.6
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:15:44 +05:00
Vladimir Bryzgalov 011ccb8dbf docs(wpmc S7): implementation plan for release flow + PUC
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:00:47 +05:00
Vladimir Bryzgalov 831a8d46cf spec(wpmc S7): README + Gitea release + PUC v5.6 (mirror cf7stg flow)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 00:48:44 +05:00
Vladimir Bryzgalov 6499620e38 docs(wpmc S6): README Testing section + mark S6 done in roadmap
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 00:11:32 +05:00
Vladimir Bryzgalov 7918c92d88 docs(wpmc S6): manual QA checklist covering 13 cp-cw4 acceptance areas
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 00:11:13 +05:00
Vladimir Bryzgalov fba5c8a976 ci(wpmc S6): Gitea Actions workflow for PHPUnit on push/PR
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 00:09:59 +05:00
Vladimir Bryzgalov 015ba57ab0 docs(wpmc S6): implementation plan for CI + QA checklist 2026-05-17 00:07:57 +05:00
Vladimir Bryzgalov 0a3e299c7f spec(wpmc S6): CI workflow + manual QA checklist (minimal scope) 2026-05-16 23:57:56 +05:00
Vladimir Bryzgalov dfcadc5339 fix(wpmc S5): wrap Redirect get_permalink + safe rest_url replacement
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:40:46 +05:00
Vladimir Bryzgalov bd0edfe01f docs(wpmc): mark S5 done in README roadmap 2026-05-16 22:36:33 +05:00
Vladimir Bryzgalov 2d3b52e928 feat(wpmc S5): Plugin::boot wires TitleFilter + LinkFilter + RestUrlFilter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:35:52 +05:00
Vladimir Bryzgalov f05ae24882 feat(wpmc S5): RestUrlFilter forces HTTPS + preserves HTTP_HOST
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:35:23 +05:00
Vladimir Bryzgalov 6fe73465be feat(wpmc S5): LinkFilter::add_town_prefix path-only + full URL handling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:33:59 +05:00
Vladimir Bryzgalov b7fb46ea38 feat(wpmc S5): LinkFilter scaffold + register 3 URL filters
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:33:39 +05:00
Vladimir Bryzgalov ca8a0a8b43 feat(wpmc S5): TitleFilter hooks the_title + single_cat_title do_shortcode
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:31:34 +05:00
Vladimir Bryzgalov a835ba3662 feat(wpmc S5): Helpers::without_url_filters bypass counter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 22:31:00 +05:00
Vladimir Bryzgalov 3824e28933 docs(wpmc S5): implementation plan for URL filters 2026-05-16 22:29:27 +05:00
Vladimir Bryzgalov 441feea191 spec(wpmc S5): URL filters design — town prefix + rest_url + without_url_filters 2026-05-16 21:10:31 +05:00
Vladimir Bryzgalov 26c4a8d9a0 docs(wpmc): mark S4 done in README roadmap 2026-05-16 20:06:51 +05:00
Vladimir Bryzgalov c800297c8c test(wpmc S4): lock reset_cache invalidation for page_unic_cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 20:06:03 +05:00
Vladimir Bryzgalov 3da1db1ccc feat(wpmc S4): Plugin::boot wires OptionsPage + TermMeta + Router + Redirect
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 20:05:43 +05:00
Vladimir Bryzgalov eb84bb8274 feat(wpmc S4): Redirect class 301s on page_unic clone access
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 20:03:04 +05:00
Vladimir Bryzgalov 004a8517e4 feat(wpmc S4): Router::route internal page + page_unic swap 2026-05-16 19:59:00 +05:00
Vladimir Bryzgalov 98e16fce7c test(wpmc S4): Router root URL index_town_alt fallback + no-data behaviors 2026-05-16 19:58:21 +05:00
Vladimir Bryzgalov 9af4c2976e feat(wpmc S4): Router::route root URL uses main_page_alt term meta 2026-05-16 19:58:04 +05:00
Vladimir Bryzgalov b218f5588b test(wpmc S4): Router::route skip-condition invariants 2026-05-16 19:57:28 +05:00
Vladimir Bryzgalov d30a039a73 feat(wpmc S4): Router scaffold + query_vars filter for town 2026-05-16 19:57:12 +05:00
Vladimir Bryzgalov fc21fd1f06 feat(wpmc S4): OptionsPage::do_register registers routing field group
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.
2026-05-16 19:54:23 +05:00
Vladimir Bryzgalov 79de284f53 feat(wpmc S4): OptionsPage scaffold + main_town_slug filter wiring 2026-05-16 19:39:18 +05:00
Vladimir Bryzgalov 11bfaa08a0 test(wpmc S4): restore ACF-missing guard assertions + tighten stub signature
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>
2026-05-16 19:37:30 +05:00
Vladimir Bryzgalov 494061e39f feat(wpmc S4): TermMeta registers ACF main_page_alt on taxonomy town
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>
2026-05-16 19:33:39 +05:00
Vladimir Bryzgalov b967a3a59f feat(wpmc S4): Helpers::index_town_alt_page_id reads ACF option 2026-05-16 19:22:59 +05:00