store = new Store($widgets); $this->kits = new Kits($widgets, $settings); $this->site_kit = new SiteKit($widgets, $settings, $this->store); $this->api = new LibraryController($widgets, $this->store, $this->kits); $this->settings = $settings; } public function register(): void { add_action('init', [Store::class, 'register_post_type']); $this->api->register(); if (is_admin()) { (new ImportExport($this->site_kit, $this->settings, $this->kits))->register(); } } }