$enabled ) { if ( ! array_key_exists( $slug, $settings['tracked_bots'] ) ) { $settings['tracked_bots'][ $slug ] = $enabled; } } } update_option( 'ai_o_optimiser_settings', $settings ); } /** * Retention/size guardrail wrapper for the daily cron hook. * * @return void */ function ai_o_optimiser_core_daily_cleanup() { ai_o_optimiser_core_load_db(); AI_O_Optimiser_DB::cleanup_old_rows(); } /** * Durable aggregate backfill wrapper for cron/external-cron execution. * * @return void */ function ai_o_optimiser_core_process_aggregate_backfill() { ai_o_optimiser_core_load_db(); AI_O_Optimiser_DB::process_aggregate_backfill(); } /* * The canonical component/compatibility layer is admin-only. Keep the class out * of ordinary public requests; the frontend pays only for this cheap branch. */ if ( is_admin() ) { require_once AI_O_Optimiser_PLUGIN_DIR . 'includes/class-ai-o-optimiser-admin-ui-system.php'; AI_O_Optimiser_Admin_UI_System::boot(); }