Title: Add support for new `meta.public` flag · Issue #9 · wp-cli/ability-command · GitHub
Open Graph Title: Add support for new `meta.public` flag · Issue #9 · wp-cli/ability-command
X Title: Add support for new `meta.public` flag · Issue #9 · wp-cli/ability-command
Description: WordPress Core ticket #65568 introduces in version 7.1 meta.public as the high-level client-exposure setting, with channel-specific settings taking precedence. In 7.1 WP Core resolves the cascade before get_meta_item() returns, so show_i...
Open Graph Description: WordPress Core ticket #65568 introduces in version 7.1 meta.public as the high-level client-exposure setting, with channel-specific settings taking precedence. In 7.1 WP Core resolves the cascade b...
X Description: WordPress Core ticket #65568 introduces in version 7.1 meta.public as the high-level client-exposure setting, with channel-specific settings taking precedence. In 7.1 WP Core resolves the cascade b...
Opengraph URL: https://github.com/wp-cli/ability-command/issues/9
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for new `meta.public` flag","articleBody":"[WordPress Core ticket #65568](https://core.trac.wordpress.org/ticket/65568) introduces in version 7.1 `meta.public` as the high-level client-exposure setting, with channel-specific settings taking precedence.\n\nIn 7.1 WP Core resolves the cascade before `get_meta_item()` returns, so `show_in_rest` already reports effective REST exposure and the command stays correct as is. The gap is that `meta.public` itself is invisible. There is no `public` field and no way to tell whether REST exposure came from the high-level flag or the channel flag, which matters as soon as an operator needs to change it. On 6.9 and 7.0 the flag is inert in WP Core, so an ability written against 7.1 produces identical CLI output on every supported version while its actual reachability differs.\n\n## Affected surface\n\nExposure shows up in three documented places today. [`wp ability list`](https://developer.wordpress.org/cli/commands/ability/list/) offers `show_in_rest` as an optional field and a `--show-in-rest=\u003cbool>` filter. [`wp ability get`](https://developer.wordpress.org/cli/commands/ability/get/) includes it among the default fields, so it prints on every call. The [parent `wp ability` page](https://developer.wordpress.org/cli/commands/ability/) also carries an example that names the field explicitly.\n\nThose pages are generated from the inline command documentation, so the reference updates land in the same PR as the code.\n\n[`run`](https://developer.wordpress.org/cli/commands/ability/run/), [`exists`](https://developer.wordpress.org/cli/commands/ability/exists/), [`can-run`](https://developer.wordpress.org/cli/commands/ability/can-run/), and [`validate`](https://developer.wordpress.org/cli/commands/ability/validate/) expose nothing about REST or client channels and should stay that way. `can-run` answers a permission question, which is separate from client exposure.\n\n\n## Scope\n\nAdd `public` as an optional field on `list` and a default field on `get`, ordered before `show_in_rest`. Add a `--public=\u003cbool>` filter to `list`.\n\nCore resolves `meta.public` into the channel flags at registration, so `--show-in-rest` keeps working against effective exposure without extra logic here. Nothing in this package should reimplement the precedence rules.\n\n`wp ability list` keeps listing every registered ability regardless of exposure. WP-CLI runs with full trust and its job is to report what is registered, including abilities deliberately hidden from REST and MCP. These flags are display and filter concerns here, not access control.\n\n## Open questions\n\n1. Should `public` render tri-state (`1`/`0`/empty) the way `readonly` and friends already do through `format_annotation()`? Empty would mean the ability never declared the flag. Note that `show_in_rest` cannot carry the same distinction anymore, since Core collapses declared and inherited into one resolved value before the command reads it.\n2. `meta.public` only exists in 7.1. On 6.9 and 7.0 the field renders whatever the ability declared while REST exposure does not follow it, which is the confusing case. A `WP_CLI::debug()` note on those versions may be worth it.\n3. Worth adding a raw `meta` field to `wp ability get`, mirroring the one `wp ability category get` already has? It is the only way to see channel-specific settings like `meta.mcp.public`.\n\n## References\n\nSlack thread starting from [this message](https://wordpress.slack.com/archives/C08TJ8BPULS/p1784806800996839?thread_ts=1783365523.986029&cid=C08TJ8BPULS). Related PR in MCP Adapter showing how this hits plugins built on the Abilities API: [WordPress/mcp-adapter#254](https://github.com/WordPress/mcp-adapter/pull/254), which also documents a flag resolution ordering trap.","author":{"url":"https://github.com/gziolo","@type":"Person","name":"gziolo"},"datePublished":"2026-07-24T08:16:45Z","url":"https://github.com/wp-cli/ability-command/issues/9"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4aadc076-7a48-c0ef-128d-aa6d3b6744a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB1C:14467D:6E22AD:9AE0E9:6AFB678D |
| html-safe-nonce | 12e178254f4df0820e8088526cfdc72b42fec470d3f5fd24a6e20bb8f48366a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjFDOjE0NDY3RDo2RTIyQUQ6OUFFMEU5OjZBRkI2NzhEIiwidmlzaXRvcl9pZCI6IjgyOTEzNzE0MzY4NjIwMzk5NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 478dd6c88f53e806b11ee171c075d5b69e7691bf2cc11e1de34ae39a96d127d1 |
| hovercard-subject-tag | issue:4966612145 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/ability-command/9/issue_layout |
| twitter:image | https://opengraph.githubassets.com/10dbd6e8d6870e5fb62c2044567d8c70ea89957ec63c419f5f093210d780fa3c/wp-cli/ability-command/issues/9 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/10dbd6e8d6870e5fb62c2044567d8c70ea89957ec63c419f5f093210d780fa3c/wp-cli/ability-command/issues/9 |
| og:image:alt | WordPress Core ticket #65568 introduces in version 7.1 meta.public as the high-level client-exposure setting, with channel-specific settings taking precedence. In 7.1 WP Core resolves the cascade b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gziolo |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| go-import | github.com/wp-cli/ability-command git https://github.com/wp-cli/ability-command.git |
| octolytics-dimension-user_id | 1570774 |
| octolytics-dimension-user_login | wp-cli |
| octolytics-dimension-repository_id | 1113185972 |
| octolytics-dimension-repository_nwo | wp-cli/ability-command |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1113185972 |
| octolytics-dimension-repository_network_root_nwo | wp-cli/ability-command |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width