Skip to main content
Home
GrN.dk

Main navigation

  • Articles
  • Cases
  • Services
  • Your Digital Project Manager
  • About Greg Nowak
  • Image Gallery
  • Contact
User account menu
  • Log in

Join my community / free newsletter — sign up here

Breadcrumb

  1. Home

WordPress 7.0 Gave Plugins an AI Client. Guardrails Are Still Your Job

Illustrated infographic summarizing: WordPress 7.0 Has an AI Client. Plugins Need Their Own Guardrails

By Greg Nowak. Updated 19 August 2026.

WordPress 7.0 removed a frustrating piece of work from AI-enabled plugin development. Instead of building a separate integration for every model provider, a plugin can use a WordPress-native PHP client and let the site’s configured providers handle the connection.

That is useful infrastructure. It is not an AI product strategy, a permission system or a cost-control policy.

For business owners, operations leads and agencies, the important question is therefore not “Can our plugin call AI?” It is “Which task should AI perform, for whom, using what data, at what cost, and what happens when it fails?” Those decisions still belong to the plugin and the team operating it.

The client solves plumbing, not product risk

The AI Client provides a common prompt builder, model selection, normalized responses, structured JSON options and familiar WP_Error handling. Provider credentials are managed through WordPress Connectors rather than copied into every feature plugin.

WordPress Core deliberately ships without a model provider. The site administrator chooses and configures provider plugins, so your feature cannot assume that a particular model, modality or option will be available. A model preference is a preference, not a guarantee.

Use the client’s support checks before presenting an AI action. If the configured providers cannot satisfy the request, hide or disable the control before someone spends time preparing input.

Decision Plugin responsibility Safe default
Job Define the one task AI may perform Use a feature-specific endpoint
Access Decide which users and records are eligible Check the narrowest relevant capability
Input Limit accepted content and request size Validate against an explicit schema
Output Decide what may be suggested or changed Require approval before publishing
Consumption Control requests, tokens and commercial exposure Set per-request and per-user limits
Failure Preserve the underlying workflow Keep the original input and offer retry
A practical decision matrix for the first production AI feature in a WordPress plugin.

Put a business action behind every endpoint

The separately distributed JavaScript client can accept arbitrary browser-side prompts through REST endpoints. WordPress restricts that interface to a high-privilege capability by default and does not recommend it as the foundation for a distributed plugin.

A better contract describes the business action, not the prompt. For example, an endpoint might accept a post ID and return a proposed editorial summary, approved taxonomy terms or related internal content. It should not accept unrestricted instructions from the browser.

Prompt construction, model preferences and output schemas remain on the server. The endpoint should:

  • authenticate the request and verify a nonce where appropriate;
  • check a capability that matches the content and proposed action;
  • confirm that the user may access the specific object;
  • validate length, type and allowed values before creating a prompt;
  • return a defined response shape rather than raw provider output.

This smaller contract is easier to explain, test and audit. It also lets you change prompts or providers later without breaking the interface used by the editor.

Use schemas as boundaries, not decoration

Structured output is valuable only when the surrounding workflow treats the schema as a hard boundary. Reject missing fields, unexpected values and malformed JSON instead of guessing what the model intended. A plausible response is not necessarily a valid one.

WordPress 7.1 improves schema preparation for AI function declarations and adds execution filters around the Abilities API. These filters can support additional authorization policy, rate limiting, maintenance mode, input transformation and controlled recovery. They are useful extension points, but they do not replace the ability’s own permission callback or input and output validation.

Provider differences still matter. Some providers accept a smaller JSON Schema vocabulary or interpret options differently. Test the actual provider combinations your customers use, including fallback models, rather than validating against one successful development setup.

Make consumption and failure visible

using_max_tokens() can limit an individual generation, while the full result methods expose token usage plus provider and model metadata. Capture those details where they are available. They help answer operational questions: Which feature is consuming requests? Did a fallback model respond? Is usage growing faster than the value delivered?

Token limits alone are not a budget. Add application-level rules such as requests per user, maximum input size, daily or monthly allowances and a site-wide disable switch. The wp_ai_client_prevent_prompt filter can stop selected calls before they reach a provider, returning WP_Error and allowing the interface to fail cleanly.

Design the non-AI path at the same time as the successful path. Timeouts, unavailable credentials, unsupported providers and invalid structured output should never erase a draft or block the ordinary editorial workflow. Show a useful error, preserve the input and let the user continue manually.

New capabilities create new operating work

The underlying PHP client now documents embedding generation for meaning-based retrieval. That makes related-content discovery and semantic search more approachable, but an embedding call is only one step. A production feature still needs rules for chunking, storage, re-indexing, deletion, access filtering and provider changes.

The same principle applies to streamed generation: faster visual feedback does not alter authorization, data handling or cost exposure. Hosting timeouts and interrupted requests also need to be tested before streaming becomes part of a promised user experience.

Existing integrations need a deliberate migration

The standalone wordpress/wp-ai-client package is deprecated in favor of the client built into WordPress 7.0. A plugin requiring WordPress 7.0 or later can normally remove redundant PHP client dependencies and replace direct client calls with wp_ai_client_prompt().

If older WordPress versions must remain supported, do not load a second copy of the SDK on 7.0 or later. The official migration guidance uses a conditional autoloader:

if ( ! function_exists( 'wp_get_wp_version' ) || version_compare( wp_get_wp_version(), '7.0', '<' ) ) {
    require_once __DIR__ . '/vendor/autoload.php';
}

Test this as a compatibility change, not a mechanical rename. Duplicate or mismatched client classes can interfere with provider discovery and credential validation.

Start with one controlled win

A sensible first release is narrow: one useful task, one endpoint, one permission model and one human approval point. Measure whether it saves time or improves a business outcome before widening the surface area.

If you are deciding where AI belongs in a WordPress workflow, Greg can help define the feature, map its data and permissions, implement the guarded endpoint and run a contained production rollout.

Related on GrN.dk

  • When Google can call the business, your local data stops being cosmetic
  • Agentic AI: What It Is, How It Works, and When to Use It
  • AI Crawler Control for Business Websites: Protect Content Without Vanishing from Search

Need help with this kind of work?

Plan a guarded WordPress AI feature Get in touch with Greg.

Sources

  • Introducing the AI Client in WordPress 7.0
  • New execution lifecycle filters for the Abilities API in WordPress 7.1
  • PHP AI Client
  • WordPress AI Client
Last modified
2026-08-19

Tags

  • wordpress
  • AI Client
  • plugin development
  • AI governance

Review Greg on Google

Greg Nowak Google Reviews

 

Written recommendations from Trafik og Veje, Aarhus Municipality (2011) and AgroTech (2010) — read them on LinkedIn.

Illustrated infographic summarizing: Your AI workflow has logs. Can they explain one bad decision?
Your AI workflow has logs. Can they explain one bad decision?
2026-08-22

Logs can show that every service worked while leaving a bad AI decision unexplained. See how connected traces and careful redaction close the gap.

Illustrated infographic summarizing: Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
2026-08-21

NIS 2 is generating more supplier questionnaires. A controlled AI assistant can find approved answers and sources—and route uncertain cases for review.

Illustrated infographic summarizing: Locked out of your Apple developer account? Fix it before October 1
Locked out of your Apple developer account? Fix it before October 1
2026-08-20

Apple's updated developer agreement must be accepted by October 1, 2026, and many small app owners cannot even log in. Here is where Apple's two-factor codes really go, and how to fix your access before the deadline.

Illustrated infographic summarizing: Cloudflare Workflows Now Charges by the Step—Price the Outcome
Cloudflare Workflows Now Charges by the Step—Price the Outcome
2026-08-20

Cloudflare Workflows now bills paid plans for steps and stored state. Here is how to track cost per completed outcome without weakening reliability.

Illustrated infographic summarizing: Google’s AI Search Toggle Is a Publishing Decision, Not an SEO Setting
Google’s AI Search Toggle Is a Publishing Decision, Not an SEO Setting
2026-08-19

Google’s AI Search toggle forces a commercial choice about visibility, attribution and content use. Here’s how to make that choice responsibly.

Illustrated infographic summarizing: From Supplier Invoice to Bookkeeping: AI with a Control Checkpoint
From Supplier Invoice to Bookkeeping: AI with a Control Checkpoint
2026-08-18

AI can reduce the work involved in processing supplier invoices, but reliable bookkeeping requires validation, duplicate checks, approval and a clear audit trail.

Illustrated infographic summarizing: Nginx 1.30 Changed the Upstream Defaults—Test Before You Upgrade
Nginx 1.30 Changed the Upstream Defaults—Test Before You Upgrade
2026-08-17

Nginx 1.30 defaults upstream proxying to HTTP/1.1 with keepalive enabled. Here is what to inspect, model and test before upgrading.

Illustrated infographic summarizing: OpenAI’s Assistants API Shuts Down in Ten Days. Is Your App Ready?
OpenAI’s Assistants API Shuts Down in Ten Days. Is Your App Ready?
2026-08-16

OpenAI’s Assistants API shuts down on August 26, 2026. Learn what to inventory, how to preserve state and how to cut over without breaking the product.

Illustrated infographic summarizing: WordPress 7.1 Forces the Editor Into an iframe—Test Your Custom Blocks
WordPress 7.1 Forces the Editor Into an iframe—Test Your Custom Blocks
2026-08-15

WordPress 7.1 removes the non-iframe editor fallback. Learn how to audit custom blocks, test real workflows and fix compatibility issues before launch.

Illustrated infographic summarizing: GitHub will stop sending jobs to stale self-hosted runners
GitHub will stop sending jobs to stale self-hosted runners
2026-08-14

GitHub starts enforcing runner versions on August 24, 2026. Audit and upgrade self-hosted runners before builds and deployments start stalling.

More articles

Built by AI — available for your business. The daily articles on this site are researched, written and illustrated by an autonomous AI pipeline. At nowa.dk I install the same kind of AI automation in businesses at fixed prices — site in Danish, English version here, and web/marketing agencies have a dedicated page.

RSS feed

Footer

  • All articles
  • Contact

GrN.dk — AI automation, web platforms, web optimization, data handling and logistics.

© 2026 GrN.dk · LinkedIn · Contact · AI automation in Danish: nowa.dk

Behind GrN.dk: Individual Entrepreneur Codecrafter · Tax ID 305669096 · Bakhtrioni St. 22, 0194 Tbilisi, Georgia · official business register