settings = new AgizoAI_Agentic_Settings(); $this->integrations = new AgizoAI_Agentic_Integrations( $this->settings ); $this->llms = new AgizoAI_Agentic_LLMS( $this->settings, $this->integrations ); $this->forms = new AgizoAI_Agentic_Forms( $this->settings ); $this->tools = new AgizoAI_Agentic_Tools( $this->settings, $this->llms, $this->integrations ); $this->accessibility = new AgizoAI_Agentic_Accessibility( $this->settings ); $this->layout = new AgizoAI_Agentic_Layout( $this->settings ); $this->woocommerce = new AgizoAI_Agentic_WooCommerce( $this->settings ); $this->scanner = new AgizoAI_Agentic_Scanner( $this->settings, $this->llms, $this->forms, $this->tools, $this->accessibility, $this->layout, $this->woocommerce, $this->integrations ); $this->abilities = new AgizoAI_Agentic_Abilities( $this->settings, $this->tools, $this->scanner ); $this->profile = new AgizoAI_Agentic_Profile( $this->settings, $this->tools, $this->abilities ); $this->site_health = new AgizoAI_Agentic_Site_Health( $this->settings, $this->abilities, $this->profile ); add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); add_action( 'init', array( $this->llms, 'register_rewrite_rules' ) ); add_filter( 'query_vars', array( $this->llms, 'register_query_vars' ) ); add_action( 'template_redirect', array( $this->llms, 'maybe_render_endpoint' ) ); add_filter( 'robots_txt', array( $this->llms, 'append_robots_txt' ), 10, 2 ); $this->integrations->init(); $this->forms->init(); $this->tools->init(); $this->layout->init(); $this->woocommerce->init(); $this->abilities->init(); $this->profile->init(); $this->site_health->init(); if ( is_admin() ) { $this->admin = new AgizoAI_Agentic_Admin( $this->settings, $this->llms, $this->scanner, $this->forms, $this->tools, $this->accessibility, $this->layout, $this->woocommerce, $this->integrations ); $this->admin->init(); } } /** * Load translations. * * @return void */ public function load_textdomain() { } /** * Plugin activation. * * @return void */ public static function activate() { $settings = new AgizoAI_Agentic_Settings(); $settings->ensure_defaults(); $integrations = new AgizoAI_Agentic_Integrations( $settings ); $llms = new AgizoAI_Agentic_LLMS( $settings, $integrations ); $llms->register_rewrite_rules(); add_rewrite_rule( '^ai\.json$', 'index.php?agizoai_ai_profile=1', 'top' ); flush_rewrite_rules(); } /** * Plugin deactivation. * * @return void */ public static function deactivate() { flush_rewrite_rules(); } }