events/trash-event moves an event to the trash. It refuses without confirm: true.
Trash, never permanent deletion — and that distinction is not a preference here, it is a correctness requirement.
Before you run it
This takes the event off the calendar. It goes to the trash and can be restored from the WordPress admin, but anyone holding a link to it gets a 404 from the moment the call returns, and any page listing it stops listing it. The gate is on the word, not the outcome — the event is recoverable from the trash. It exists because “cancel the November workshop” and “remove the November workshop from the site” are different requests, and an assistant cannot always tell which one it heard.
At a glance
| Ability | events/trash-event |
| Toolset | The Events Calendar — toolset/events-calendar |
| Group | The Events Calendar › Events |
| Requires | The Events Calendar, active on the site |
| Capability | manage_options |
| Safety | Destructive — moves the post to the trash, and refuses to run without confirm: true. Recoverable from the WordPress trash. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
WordPress only auto-trashes ordinary posts and pages. Hand any other post type to wp_delete_post() with default arguments and it is removed outright, meta and all, with nothing in the trash to restore. An event is a custom post type. So the obvious implementation of “delete this event” deletes it permanently, and the obvious way to test that — checking the trash — shows nothing there because nothing was trashed.
This ability moves the post to the trash explicitly. There is no permanent-delete variant, and adding one would mean building an irreversible operation on top of an API whose default behaviour is already the dangerous one.
If the site has the trash disabled — some do, with EMPTY_TRASH_DAYS set to zero — there is no trash to move the event into, and the call is refused rather than falling back to deletion.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | The event ID. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
id | integer | The event ID. |
trashed | boolean | Whether the move succeeded. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Take the cancelled November workshop off the calendar.
It resolves to one call:
{
"ability": "events/trash-event",
"parameters": {
"id": 1840,
"confirm": true
}
}Worth knowing
- Restore from Events › Events › Trash in the admin. This suite does not un-trash.
- Tickets sold against the event are not touched. Trashing an event people have paid to attend is a business decision, not a cleanup.
- Refused outright on a site with the trash disabled.
- A draft that was never published can be trashed the same way. The confirmation is still required.
Related abilities
- Get Event — confirm which event this is first
- Update Event — unpublish instead of trashing
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category