schema = new Schema(); $this->renderer = new Renderer( $this->schema ); // Setup layer (data model). ( new PostType() )->register(); ( new Taxonomy() )->register(); ( new Meta() )->register(); // Frontend. ( new Assets() )->register(); ( new Shortcode( $this->renderer ) )->register(); ( new Submission() )->register(); $this->schema->register(); // Block (renders through the shared renderer). ( new Block( $this->renderer ) )->register(); // REST API (analytics, search, submissions, AI) — needed on front + admin. ( new Controller() )->register(); // Email the admin when a visitor submits a question (front + admin: the // submission hook fires during a REST request that may be either). ( new \AccordionFaq\Notifications\SubmissionEmail() )->register(); // Integrations (self-guarded when the host plugin is inactive). ( new Elementor() )->register(); ( new WooCommerce() )->register(); ( new WPBakery() )->register(); ( new Divi() )->register(); ( new Bricks() )->register(); ( new BeaverBuilder() )->register(); // Admin. if ( is_admin() ) { // Idempotent schema/data upgrade for installs updated in place. add_action( 'admin_init', array( '\AccordionFaq\Setup\Activator', 'maybe_upgrade' ) ); ( new Menu() )->register(); ( new AdminAssets() )->register(); ( new MetaBoxes() )->register(); ( new Columns() )->register(); ( new ImportExport() )->register(); ( new \AccordionFaq\Admin\OrderList() )->register(); } /** * Fires once all core modules are wired. * * @param Plugin $plugin The plugin instance. */ do_action( 'accordion_faq_loaded', $this ); } /** * Access the shared renderer. * * @return Renderer */ public function renderer() { return $this->renderer; } /** * Access the schema service. * * @return Schema */ public function schema() { return $this->schema; } }