Files
Romhack-Plaza---WordPress-P…/romhackplaza.php

60 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2026-01-11 19:39:55 +01:00
<?php
/**
* Plugin Name: RomhackPlaza Plugin
* Plugin URI: https://example.com
* Description: Plugin created for the Romhack Plaza website.
* Version: 0.0.1a
* Requires at least: 6.8
* Requires PHP: 8.5
* Author: Benjamin, Spike (Original)
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Update URI: https://example.com/my-plugin/
* Text Domain: romhackplaza
* Domain path: /languages
* Requires Plugins: advanced-custom-fields-pro
*/
defined( 'ABSPATH' ) || exit;
require_once __DIR__ . '/vendor/autoload.php';
function _romhackplaza_define_constants() {
if( !defined( 'ROMHACKPLAZA' ) )
define( 'ROMHACKPLAZA', '0.0.1' );
if( !defined( 'ROMHACKPLAZA_PLUGIN_URI' ) )
define( 'ROMHACKPLAZA_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
if( !defined( 'ROMHACKPLAZA_PLUGIN_DIR' ) )
define( 'ROMHACKPLAZA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
function _romhackplaza_read_env() {
$dotenv = Dotenv\Dotenv::createImmutable( __DIR__ );
$dotenv->load();
}
function _romhackplaza_plugin_activate() {
// Verify tables.
\RomhackPlaza\Extenders\Post\Hashes_Table::verify_table();
\RomhackPlaza\Extenders\User_Notifications::verify_table();
}
_romhackplaza_define_constants();
_romhackplaza_read_env();
register_activation_hook( __FILE__, '_romhackplaza_plugin_activate' );
use RomhackPlaza\Plugin;
$_romhackplaza = new Plugin()
->setup_extenders_direct();
do_action( 'RomhackPlaza\\Init' );