%s

', esc_html__( 'SummitCite could not start because its Composer autoloader is missing. Run "composer install --no-dev --optimize-autoloader" in the plugin directory, or install the packaged release ZIP instead of a source checkout.', 'summitcite' ) ); } } // Load the Composer PSR-4 autoloader, degrading to an admin notice when absent. if ( ! is_readable( AIVE_PLUGIN_DIR . 'vendor/autoload.php' ) ) { add_action( 'admin_notices', 'aive_render_missing_autoloader_notice' ); add_action( 'network_admin_notices', 'aive_render_missing_autoloader_notice' ); return; } require_once AIVE_PLUGIN_DIR . 'vendor/autoload.php'; register_activation_hook( __FILE__, array( Activator::class, 'activate' ) ); register_deactivation_hook( __FILE__, array( Deactivator::class, 'deactivate' ) ); /* * Composition root. Modules and the admin screens are built here and nowhere * else, so the object graph is readable in one place and Core stays free of any * knowledge of the individual modules. * * The store is shared rather than instantiated twice: the module writes rows and * the admin screens read them, and one owner of the table's SQL is the point of * the class. * * Guarded on the registry, because this file can be included more than once in * a single request - WordPress' plugin_sandbox_scrape() does it, and so does the * PHPUnit harness. Core::register_module() and Core::register_hooks() are both * idempotent; composing a second Admin instance would not be, because its hook * callbacks would belong to a different object and so register alongside the * first set rather than replacing it. */ if ( null === Core::instance()->module( CrawlerLog::SLUG ) ) { $aive_crawler_log_store = new CrawlerLogStore(); $aive_robots_policy = new RobotsPolicy(); $aive_density_store = new AnswerDensityStore(); Core::instance()->register_module( new CrawlerLog( $aive_crawler_log_store ) ); Core::instance()->register_module( $aive_robots_policy ); Core::instance()->register_module( new SchemaEngine() ); Core::instance()->register_module( new LlmsTxt() ); Core::instance()->register_module( new AnswerDensity( $aive_density_store ) ); Core::instance()->register_module( new ConflictDetector() ); ( new Admin( $aive_crawler_log_store, $aive_robots_policy, $aive_density_store ) )->register_hooks(); unset( $aive_crawler_log_store, $aive_robots_policy, $aive_density_store ); } /* * Hooks are registered at include time rather than on plugins_loaded. WordPress * includes the plugin file during activate_plugin(), which runs long after * plugins_loaded has fired; registering later would leave the custom cron * intervals unavailable to Activator::activate() and the scheduling would fail. */ Core::instance()->register_hooks();