Skip to main content

Filter: gk/gravityboard/card/update-card

Allow plugins to add additional changes to the card.

Card::update_from_request() above has already saved the core fields by the time this runs, and there is no transaction to roll it back with. A callback that returns a WP_Error therefore fails the request, not the save: the core fields it names stay persisted, and this method merges them into the WP_Error's data under persisted_changes before returning it, so a caller can reconcile rather than assume nothing was written.

Parameters​

NameTypeDescription
$changesstring[]Always passed empty; a callback returns the field or meta keys it changed.
$request\WP_REST_RequestThe REST request object.
$entryarray<string,mixed>The entry as it was before the update, keyed by field ID alongside the entry properties.
$feed\FeedRowThe feed.

Source​

Defined in src/Ajax.php at line 528

Returns​

The extra changed keys, or a WP_Error to fail the whole update.