REST APIeasy-svg-pro/v1/audit/originals/discard

easy-svg-pro/v1/audit/originals/discard

Deletes one kept original for good.

REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/core/rest.php

Internal: not part of the promised public surface. It may change without notice.

Usage

POST /wp-json/easy-svg-pro/v1/audit/originals/discard

Example

curl -u admin:app-password -H 'Content-Type: application/json' -d '{"ref":"media:101"}' https://example.com/wp-json/easy-svg-pro/v1/audit/originals/discard

Description

Removes the stored original and its note from the post's meta. The cleaned file or icon stays as it is. Use it once you are sure the cleaned version is what you want. Permission: Requires manage_options, an active licence and the audit feature (SVG cleaner) switched on.

Permission: Requires manage_options, an active licence and the audit feature (SVG cleaner) switched on.

Parameters

body
refstring
Required

Which kept original: media:<id>, icon:<id> or set:<id>.

Return value

returnWP_REST_Response|WP_Error

discarded: true when an original was deleted, else false. 404 easy_svg_pro_no_original for an unknown ref.

Response

discarded: true when an original was deleted, else false. 404 easy_svg_pro_no_original for an unknown ref.

{
  "discarded": true
}
There is no undo: once discarded, the untouched original is gone.