Register read-only WordPress abilities with wp_register_ability, lock them down with permission callbacks and strict schemas, then hand them to an LLM as safe tool definitions.
Build a Provider-Agnostic AI Client for WordPress: Anthropic, OpenAI and Gemini Behind One wp_remote_post Wrapper
One PHP class, three AI providers. Normalise OpenAI, Anthropic and Gemini chat calls through wp_remote_post, keep keys in wp-config, and swap models with a filter.
Stop Leaking OpenAI Keys in WordPress: Build a REST Proxy with Capability Checks, Rate Limits and Logging
Keep your OpenAI key in wp-config, then expose a locked-down WordPress REST proxy with capability checks, nonce validation, transient rate limits and secret-free logging.
Prompt-Injection Hygiene for WordPress AI Plugins: Sanitising User Input, Locking Tool Boundaries and Validating Model Output
Build a reusable guard class for WordPress plugins that call an LLM: sanitise user text, delimit untrusted data, whitelist tools, validate JSON output and log every prompt.