Exposure and Ownership
Exposure#
An ability can be reached through the REST API and through MCP. Ability Auditor works out the effective value for each channel:
| Channel | Effective value |
|---|---|
| REST | meta.show_in_rest, else meta.public, else false |
| MCP | meta.mcp.public, else meta.public, else false |
- An explicit
falsealways wins overpublic: true. - Before WordPress 7.1,
meta.publicis ignored because core did not support it yet. - Each value shows where it comes from: explicit, from public, default, or set by core. The plugin records every ability’s raw registration arguments as abilities register, before core merges
publicintoshow_in_rest; that is the only way to tell explicit from inherited. - MCP exposure is computed by the plugin. Core never reads
meta.mcp.public; it is a convention that MCP adapters follow.
If some abilities registered before Ability Auditor loaded, the Report tab shows a notice and their exposure is reported as set by core rather than explicit or inherited.
Ownership#
The auditor uses PHP Reflection to find where each ability’s code is defined and maps that file to an installed component. Nothing is called.
- Evidence, strongest first: the custom
ability_class, then the execute callback, then the permission callback. - Mapping: the file is matched to a plugin folder, a single-file plugin, an mu-plugin, a theme or core. Symlinked plugins are handled.
- Core functions do not count. A named core function such as
__return_trueoris_user_logged_inas the permission callback proves nothing about who registered the ability. Core only owns an ability through a closure or class defined in core. - Unknown locations give an Unknown owner that still shows the source file.
- Name fallback. With no file evidence at all, the namespace is matched against plugin folders and text domains. The
corenamespace is never trusted on its own. - Spoofing warning. An ability named
core/...that is not defined in core is flagged.
Was this article helpful?
Tell us what was missing
