Discard an undo point
wp_undo_discardPermanently discard an undo point and its snapshot without restoring anything once a change is confirmed good, or drop all account undo points with all=true.
Instructions
Throw away an undo point and its snapshot without restoring anything; this is permanent, the change it covered can then no longer be undone. Meant for a change confirmed good; all=true drops all of the account's own undo points at once. Discarding needs the same permission and access level as undoing the original tool: a token that is malformed, no longer stored or not the account's own, or one this connection may not act on, is refused; with all=true such points are kept and counted in kept. Returns discarded (the count) and token, or all. Other users' undo points are never touched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | true discards all of the account's own undo points; token is then ignored. | |
| token | No | The undo token to discard (undo_…), as wp_undo_list or the original result shows it. Needed unless all=true. |