logger = new AIT_AIRCE_Logger(); $extractor = new AIT_AIRCE_Content_Extractor(); $ai = new AIT_AIRCE_AI_Embeddings( $this->logger ); $this->indexer = new AIT_AIRCE_Indexer( $this->logger, $extractor, $ai ); $this->recommender = new AIT_AIRCE_Recommender( $this->logger ); $this->cache = new AIT_AIRCE_Cache( $this->logger, $this->recommender ); // Hook indexing. $this->indexer->init(); // Tools endpoints (AJAX). $this->cache->init_admin_tools_ajax(); // Front-end rendering & insertion (Phase 4). $this->renderer = new AIT_AIRCE_Renderer( $this->logger, $this->cache ); $inserter = new AIT_AIRCE_Inserter( $this->logger, $this->renderer ); $inserter->init(); // Per-post controls (Phase 4). $metabox = new AIT_AIRCE_Metabox(); $metabox->init(); // Shortcode + Block (Phase 4/5). $shortcode = new AIT_AIRCE_Shortcode( $this->renderer ); $shortcode->init(); $block = new AIT_AIRCE_Block( $this->renderer ); $block->init(); } } /** * Accessor for the live plugin instance (Lite). * * @return AIT_AIRCE_Plugin|null */ function AIT_AIRCE() { return isset( $GLOBALS['ait_airce_plugin'] ) && $GLOBALS['ait_airce_plugin'] instanceof AIT_AIRCE_Plugin ? $GLOBALS['ait_airce_plugin'] : null; } $GLOBALS['ait_airce_plugin'] = new AIT_AIRCE_Plugin(); $GLOBALS['ait_airce_plugin']->init();