| 开发者 | PerS |
|---|---|
| 更新时间 | 2026年5月26日 16:01 |
| PHP版本: | 8.3 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
soderlind-aivalve.zip via Plugins → Add New → Upload Plugin.Tokens are the units AI models use to measure input and output. Roughly 1 token ≈ ¾ of a word. Both the text you send (prompt tokens) and the text the AI returns (completion tokens) count toward your usage.
A limit of 0 means unlimited — no cap is enforced. Set a positive number to restrict token usage.
It walks the PHP call stack (debug_backtrace()) and matches file paths against the plugins directory to determine the originating plugin slug.
Yes. AI Valve relies only on the stable public hooks (wp_ai_client_prevent_prompt, wp_ai_client_before_generate_result, wp_ai_client_after_generate_result) provided by the WordPress AI connector API.
Yes. See the developer hooks documentation for available filters and actions.
Yes. Each subsite has its own log table, settings, and budgets.
The plugin receives a WP_Error with code prompt_prevented instead of an AI response. The denied request is logged with the reason. See how-blocking-works.md for the full explanation.
ai-valve text domain.ai-valve to soderlind-aivalve.soderlind-aivalve consistently across PHP, JavaScript, and generated assets.soderlind_aivalve prefix.aivalve/ai_valve installs while keeping active identifiers uniquely prefixed.soderlind_aivalve_plugin_policy filter to override allow/deny policy programmatically.soderlind_aivalve_request_denied action, fired when a request is blocked.soderlind_aivalve_request_completed action, fired after every successful request.GET /settings for reading all plugin settings.by_context, recent, and known_slugs fields in the GET /usage response.date_from and date_to filter parameters on the GET /logs endpoint.wp_supports_ai filter as a global kill switch.