39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?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
|
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
* Update URI: https://repo.anhonesthost.net/wp-plugins/wp-donations
|
|
* Text Domain: streamgoals-donate
|
|
* Domain Path: /languages
|
|
*/
|
|
|
|
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' ) );
|
|
register_deactivation_hook( __FILE__, array( \StreamGoals\Core\Maintenance::class, 'unschedule' ) );
|
|
add_action( 'plugins_loaded', array( \StreamGoals\Core\Plugin::class, 'boot' ) );
|