feat: change log table with retention cron and limits option
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP;
|
||||
|
||||
use LIT\MCP\ChangeLog\ChangeLog;
|
||||
use LIT\MCP\ChangeLog\ChangeLogCleanup;
|
||||
use LIT\MCP\ChangeLog\ChangeLogInstaller;
|
||||
|
||||
/**
|
||||
* Activation and deactivation hooks (registered in wp-lit-mcp.php).
|
||||
*/
|
||||
final class Lifecycle
|
||||
{
|
||||
public static function activate(): void
|
||||
{
|
||||
$log = new ChangeLog();
|
||||
(new ChangeLogInstaller($log))->install();
|
||||
(new ChangeLogCleanup($log, new Limits()))->ensureScheduled();
|
||||
}
|
||||
|
||||
public static function deactivate(): void
|
||||
{
|
||||
wp_clear_scheduled_hook(ChangeLogCleanup::HOOK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user