boot(); } ); /** * Activation hook — create DB tables and set defaults. */ register_activation_hook( __FILE__, static function (): void { ( new Database\Schema() )->install(); ( new Admin\SettingsPage() )->set_defaults(); set_transient( 'pulseviews_activation_redirect', true, 30 ); } ); /** * Deactivation hook — clean up scheduled events. */ register_deactivation_hook( __FILE__, static function (): void { wp_clear_scheduled_hook( 'pulseviews_daily_aggregate' ); wp_clear_scheduled_hook( 'pulseviews_cleanup_old_views' ); } ); /** * Uninstall — handled via uninstall.php to avoid loading full plugin. */