Scaffold plugin: architecture contract, schema, settings, fee math

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 08:42:30 -08:00
commit 939193f258
12 files changed
+2081

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* Plugin Name: StreamGoals Donate
* Description: PayPal donations with multiple goals, fee coverage, and OBS stream overlays (goal bar, subathon timer, counters, alerts).
* Version: 0.1.0
* Requires at least: 6.8
* Requires PHP: 8.1
* License: GPL-2.0-or-later
* Text Domain: streamgoals-donate
*/
defined( 'ABSPATH' ) || exit;
define( 'STREAMGOALS_VERSION', '0.1.0' );
define( 'STREAMGOALS_FILE', __FILE__ );
define( 'STREAMGOALS_DIR', plugin_dir_path( __FILE__ ) );
define( 'STREAMGOALS_URL', plugin_dir_url( __FILE__ ) );
// PSR-4 autoloader (no Composer needed at runtime, so the zip is drop-in installable).
spl_autoload_register(
static function ( string $class ): void {
$prefix = 'StreamGoals\\';
if ( strncmp( $class, $prefix, strlen( $prefix ) ) !== 0 ) {
return;
}
$path = STREAMGOALS_DIR . 'includes/' . str_replace( '\\', '/', substr( $class, strlen( $prefix ) ) ) . '.php';
if ( is_readable( $path ) ) {
require $path;
}
}
);
register_activation_hook( __FILE__, array( \StreamGoals\Core\Installer::class, 'activate' ) );
add_action( 'plugins_loaded', array( \StreamGoals\Core\Plugin::class, 'boot' ) );