Run a plugin ability
run_abilityExecute a registered WordPress ability to write plugin-owned data, ensuring validation, hooks, and cache invalidation run.
Instructions
Execute an ability registered through the WordPress Abilities API. This is the preferred way to write data a plugin owns — the plugin's own validation, hooks and cache invalidation all run, which raw SQL would bypass. Check get_ability_info for the input schema first. The Abilities API maps intent onto HTTP methods: read-only abilities use GET, ordinary ones POST, and destructive ones DELETE; this is chosen automatically unless you override it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Fully qualified ability name from discover_abilities, in the form "namespace/ability". | |
| input | No | Arguments matching the ability's input_schema. | |
| method | No | HTTP method. "auto" reads the ability's definition and picks GET for read-only, DELETE for destructive, POST otherwise. | auto |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. |