From e2399e236083a90605ff21441d715fee2de79287 Mon Sep 17 00:00:00 2001 From: Vladimir Bryzgalov Date: Tue, 12 May 2026 17:53:58 +0500 Subject: [PATCH] feat(wpmc S2): Plugin::boot() wires Taxonomy + PostType + FieldGroup Co-Authored-By: Claude Sonnet 4.6 --- includes/class-plugin.php | 4 +++- tests/PluginBootTest.php | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/PluginBootTest.php diff --git a/includes/class-plugin.php b/includes/class-plugin.php index ef17b8b..06a8087 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -41,7 +41,9 @@ final class Plugin return; } - // Stage 2-5 hooks register here. Stage 1 (skeleton) intentionally empty. + Taxonomy::register(); + PostType::register(); + FieldGroup::register(); } private function dependencies_satisfied(): bool diff --git a/tests/PluginBootTest.php b/tests/PluginBootTest.php new file mode 100644 index 0000000..1c94174 --- /dev/null +++ b/tests/PluginBootTest.php @@ -0,0 +1,32 @@ +boot(); + + self::assertNotFalse( + has_action('init', ['WPMultiCity\\Taxonomy', 'do_register']), + 'boot() must register Taxonomy on init' + ); + self::assertNotFalse( + has_action('init', ['WPMultiCity\\PostType', 'do_register']), + 'boot() must register PostType on init' + ); + self::assertNotFalse( + has_action('acf/init', ['WPMultiCity\\FieldGroup', 'do_register']), + 'boot() must register FieldGroup on acf/init' + ); + } +}