Files
wp-donations/includes/Core/Plugin.php
T
shadowdaoandClaude Sonnet 5.5 4cec93067c
Test and Release / test (push) Successful in 1m15s
Test and Release / release (push) Successful in 7s
Add in-WordPress updater: checks Gitea releases, one-click and auto updates
- Update\ReleaseParser (pure, host-pinned, https only) and Update\Updater (WP hooks, cached, failure-safe)
- Settings: optional access token for a private repo, 'Check for updates now'

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 11:53:42 -08:00

30 lines
763 B
PHP

<?php
declare( strict_types=1 );
namespace StreamGoals\Core;
/**
* Boots feature modules. Each module exposes a static register() that adds its own hooks;
* classes that do not exist yet are skipped so modules can land independently.
*/
final class Plugin {
private const MODULES = array(
\StreamGoals\Rest\DonateController::class,
\StreamGoals\Rest\WebhookController::class,
\StreamGoals\Rest\OverlayController::class,
\StreamGoals\Admin\Admin::class,
\StreamGoals\Update\Updater::class,
);
public static function boot(): void {
Installer::maybe_upgrade();
Maintenance::register();
foreach ( self::MODULES as $module ) {
if ( class_exists( $module ) && method_exists( $module, 'register' ) ) {
$module::register();
}
}
}
}