| @@ -2,13 +2,16 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * OpenStation — AI Copilot WP-Cron jobs. |
| 4 | 4 | * |
| 5 | 5 | * Registers the async comment-analysis hook that scores a comment for |
| 6 | - * spam/harmful content and stores the verdict in comment meta. The job is | |
| 7 | - * scheduled by the Comments-window moderation feature (which is opt-in and | |
| 8 | - * off by default) with a short delay so it runs outside the HTTP request that | |
| 9 | - * triggered the comment. | |
| 6 | + * spam/harmful content and stores the verdict in comment meta. | |
| 10 | 7 | * |
| 8 | + * Nothing in the plugin schedules this hook: automatic comment scoring was | |
| 9 | + * removed (`docs/migration-comments-ai-scoring.md`). The callback is kept | |
| 10 | + * because the hook name is a frozen identifier that a site may still have | |
| 11 | + * queued events for, and because an external plugin re-implementing the | |
| 12 | + * feature can schedule it rather than re-deriving the prompt and schema. | |
| 13 | + * | |
| 11 | 14 | * Generation routes through the WordPress AI Client (`wp_ai_client_prompt()`), |
| 12 | 15 | * which sources credentials from Settings → Connectors — the copilot never |
| 13 | 16 | * handles an API key. |
| 14 | 17 | * |
| @@ -34,10 +37,10 @@ | ||
| 34 | 37 | $comment_id = (int) $comment_id; |
| 35 | 38 | $user_id = (int) $user_id; |
| 36 | 39 | |
| 37 | 40 | // No usable text-generation provider is configured in Connectors — nothing |
| 38 | - // to do. The scheduler already checks this, but the job runs async so we | |
| 39 | - // re-check to avoid emitting failed requests if the provider was removed. | |
| 41 | + // to do. Whoever queued the event may have checked already, but the job runs | |
| 42 | + // async, so re-check to avoid failed requests if the provider was removed. | |
| 40 | 43 | if ( ! openstation_ai_provider_configured() ) { |
| 41 | 44 | return; |
| 42 | 45 | } |
| 43 | 46 | |