fix(2meet-data-optimizer): default misc bucket and garbage filter to off

- Both term/comment filters now default to disabled for new installs, so
  activating the plugin no longer reroutes or drops other plugins' meta
- One-time maybe_upgrade() migration keeps the misc bucket on for sites
  that already hold misc rows and never set the toggle (data stays readable)
- Admin toggles show the same defaults as the filters

Verify: phpunit-integration --filter 'defaults_false|preserve_default';
  unit 600 OK, integration 420 OK
PR: PR-006
This commit is contained in:
2026-09-25 21:39:38 +08:00
parent d3b72bd1af
commit 151aadd661
6 changed files with 89 additions and 9 deletions
@@ -152,9 +152,9 @@ class TermCommentGarbageFilterTest extends TestCase {
// ── is_enabled toggle ───────────────────────────────────────────────────
public function test_is_enabled_defaults_true(): void {
public function test_is_enabled_defaults_false(): void {
delete_option( WPDO_Term_Comment_Garbage_Filter::OPT_ENABLED );
$this->assertTrue( WPDO_Term_Comment_Garbage_Filter::is_enabled() );
$this->assertFalse( WPDO_Term_Comment_Garbage_Filter::is_enabled() );
}
public function test_is_enabled_respects_zero_value(): void {