load_dependencies(); $this->define_admin_hooks(); $this->define_security_hooks(); } /** * Load all required class files for the plugin. */ private function load_dependencies() { // Core Engine Modules require_once TT24_PLUGIN_DIR . 'includes/class-tt24-brander.php'; require_once TT24_PLUGIN_DIR . 'includes/class-tt24-limit-login.php'; require_once TT24_PLUGIN_DIR . 'includes/class-tt24-obfuscator.php'; require_once TT24_PLUGIN_DIR . 'includes/class-tt24-perimeter.php'; require_once TT24_PLUGIN_DIR . 'includes/class-tt24-redirects.php'; // Admin Interface (Only load if we are in the dashboard area) if ( is_admin() ) { require_once TT24_PLUGIN_DIR . 'admin/class-tt24-admin-settings.php'; } } /** * Instantiate the admin UI settings. */ private function define_admin_hooks() { if ( is_admin() ) { $plugin_admin = new TT24_Admin_Settings(); // The TT24_Admin_Settings class will handle its own add_action hooks in its constructor. } } /** * Instantiate the security, routing, and branding modules. */ private function define_security_hooks() { // We instantiate each class here. // The individual constructors of these classes will safely hook into WordPress core. $plugin_brander = new TT24_Brander(); $plugin_limit_login = new TT24_Limit_Login(); $plugin_obfuscator = new TT24_Obfuscator(); $plugin_perimeter = new TT24_Perimeter(); $plugin_redirects = new TT24_Redirects(); } /** * Run the plugin. * Triggered from the main plugin file after plugins_loaded. */ public function run() { // Execution is handled via the __construct method wiring up the dependencies. // This method remains available if we need to execute specific runtime checks later. } }