Say you run a WordPress site and want an assistant in the dashboard that answers questions like “Which drafts did Maya write last month?” or “What timezone is this site set to?” The assistant needs to read site data. It should not get the keys to everything, such as other users’ emails or the API key your payment plugin stores in its settings.
WordPress 7.2 adds three read-only abilities for exactly this: one for content, one for users and one for settings. A developer note dated November 24, 2026 describes them. Core abilities in WordPress 7.2
WordPress 7.2 was not final when this was written. Release Candidate 3 (RC3, a near-final test build) was announced on November 24, 2026, and the scheduled release date is December 8, 2026. Test on a staging site, not production. WordPress 7.2 RC3
The words you need
- Abilities API: a WordPress API, introduced in 6.9, where each “ability” is a named action with a defined input, output and permission check. Code calls it by name, for example
core/content-query. - Agent: a program, often driven by an AI model, that decides which actions to call to complete a task. Here the abilities are the actions it may call.
- Capability: a WordPress permission, such as
manage_options(manage site settings, normally administrators only) oredit_posts. WP_Error: the object WordPress returns instead of a result when something goes wrong.- Opt in: nothing is exposed until a developer explicitly turns it on.
What the three abilities do
core/content-query and core/users-query take the same input shape: where for filters, fields for the fields to return, and pagination for page and per_page. The note lists these rules:
- For content,
where.typeis required. Other content filters areids,slugs,status,authorandparent. - Users can be filtered by
ids,slugs,usernames,rolesandhas_published_posts. - Filters are exact matches. There is no text search.
- Without
status, only published posts are returned, unless the query listsidsorslugs. per_pageis 10 by default and can go up to 100.idis always included.- Some fields depend on who is asking. The raw title, excerpt and content come back only for posts the user can edit. Email and roles come back only for the user’s own account and users they can edit.
core/settings-get returns settings as name and value pairs and requires the manage_options capability. You can ask for specific fields or a group (general, writing, reading or discussion). By default only a core set of settings is exposed, such as site title, timezone and posts per page.
Step by step: call an ability from PHP
The code below runs inside WordPress, for example in your plugin, after the abilities are registered. I could not run it for this article because there was no WordPress 7.2 install available; it follows the developer note’s examples, with a null check added.
Step 1: get the ability and check that it exists
$ability = wp_get_ability( 'core/content-query' );
if ( null === $ability ) {
// Not registered: WordPress older than 7.2, or called too early.
return;
}
wp_get_ability() returns the ability object, or null if no ability with that name is registered. wp_get_ability() reference The note’s own examples chain ->execute() directly, which would cause a PHP error if the result were null. The check keeps your plugin working on older sites.
Step 2: run a query
$result = $ability->execute(
array(
'where' => array(
'type' => 'post',
'status' => array( 'draft' ),
),
'fields' => array( 'title', 'date', 'author' ),
)
);
This asks for draft posts and three fields. Leave out type and the input is not valid.
Step 3: handle errors, then use the result
if ( is_wp_error( $result ) ) {
// Invalid input, or the current user cannot run this query.
error_log( $result->get_error_message() );
return;
}
foreach ( $result['items'] as $item ) {
// Each item has an id plus the fields you asked for.
}
The note says $result is a WP_Error if the input is not valid or the user cannot run the query. Otherwise it contains items and pagination, with total and total_pages. Each item’s title has raw and rendered versions, and author has an id, name and slug.
Step by step: expose your own post type or setting
By default only posts, pages and the core settings are exposed. A custom post type or a plugin setting needs the new show_in_abilities argument.
- Register on the
inithook. The note says exposed types and settings are read when the abilities are registered. A setting registered only onadmin_initorrest_api_initmay not be available. - Set
show_in_abilitiesexplicitly. It isfalseby default and is not inherited frompublicorshow_in_rest. An existing REST exposure does not leak into abilities. - Never set it for settings that store secrets, such as API keys.
add_action(
'init',
static function () {
register_post_type(
'book',
array(
'label' => __( 'Books', 'my-plugin' ),
'public' => true,
'show_in_abilities' => true,
)
);
register_setting(
'my_plugin',
'my_plugin_items_per_page',
array(
'type' => 'integer',
'default' => 12,
'show_in_abilities' => true,
)
);
}
);
For post types the value is a boolean. For settings it can be true, which reuses the name and schema from show_in_rest when they exist, or an array with its own name and schema.
Letting a model call the abilities
The note also shows the WordPress AI Client passing these abilities to a model as tools, with using_abilities(). A loop sends the conversation, runs the abilities the model asks for with WP_AI_Client_Ability_Function_Resolver, adds the results, and repeats until the model stops asking. The model only gets data the current user can see.
Two points from the note matter here. First, the loop runs as the current user, so the permissions above are applied to that user. Second, the note says production code should “limit how many times the loop can run.” A simple counter that stops after a few rounds is enough to avoid a runaway loop.
If you want to block certain calls before they happen, the same idea as hooks that check a coding agent’s actions at the right moment applies: check the request at the boundary, not after the fact. If an agent outside WordPress will call the abilities over HTTP, the note says the client-side call is a GET request to /wp-abilities/v1/abilities/core/users-query/run, so the REST API can be used directly. If you wrap these endpoints in your own MCP (Model Context Protocol) server for an external agent, what stateless MCP changes for server deployment explains the session and request changes that server will need to handle.
Common mistakes
- Forgetting
where.type. Content queries need it; without it you get aWP_Error. - Expecting text search. Filters are exact matches. Searching titles for a word is not supported.
- Expecting drafts by default. Without
status, you only get published posts. - Registering too late. Registering a type or setting on
admin_initcan mean it never appears. - Assuming
show_in_restis enough. It is not inherited; setshow_in_abilities. - Exposing a secret. A setting with an API key must never opt in.
- Trusting post content. A post can contain text written to manipulate an assistant. Reading it through a permission-aware API does not make those instructions trustworthy.
Test the boundary
On a staging site running 7.2 RC3:
- Log in as an Author and run a content query. Confirm raw fields appear only for that author’s own posts.
- Run a users query as the same Author. Confirm emails and roles appear only for their own account.
- Run
core/settings-getas a user withoutmanage_options. Expect aWP_Error. - Run it as an administrator. Confirm your secret settings are absent.
- Send a content query without
where.type. Expect aWP_Error.
What comes next
These three abilities are read-only. The note says more abilities are being worked on for WordPress 7.3, tracked in the WordPress/abilities repository. Do not assume write abilities exist in 7.2.
Conclusion
WordPress 7.2 lets plugins and agents read content, users and settings through abilities that check permissions per user. Check that wp_get_ability() did not return null, always pass where.type for content, opt in custom types and settings on init, never expose secrets, and cap the number of model calls. Recheck the final 7.2 documentation after the December 8 release before shipping.