*/ declare (strict_types=1); namespace WindPressPackages; use WindPress\WindPress\Plugin; use WindPress\WindPress\Utils\Requirement; \defined('ABSPATH') || exit; if (\file_exists(__DIR__ . '/vendor/autoload.php')) { if (\file_exists(__DIR__ . '/vendor/scoper-autoload.php')) { require_once __DIR__ . '/vendor/scoper-autoload.php'; } else { require_once __DIR__ . '/vendor/autoload.php'; } $requirement = new Requirement(); $requirement->php('7.4')->wp('6.0'); if ($requirement->met()) { Plugin::get_instance()->boot(); } else { \add_action('admin_notices', fn() => $requirement->printNotice(), 0, 0); // Deactivate the plugin if the requirements are not met. // This is to ensure the activation process is executed at least once when the requirements are met. \add_action('admin_init', fn() => \deactivate_plugins(\plugin_basename(__FILE__)), 0, 0); } }