easy-svg-pro/v1/bulk/rename/preview
Shows what a rename rule would do to each chosen icon, without changing anything.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/bulk/bulk.php
Usage
POST /wp-json/easy-svg-pro/v1/bulk/rename/preview
Example
curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/bulk/rename/preview" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
-H "Content-Type: application/json" \
-d '{"icons": ["acme/arrow"], "rule": {"prefix": "UI "}}'
Description
Builds the rename plan from the site's whole icon inventory and returns one row per chosen icon, including the ones nothing happens to. The rule is a plain find and replace plus optional prefix and suffix, never a regular expression. Only the label changes; the slug, which pages call, stays. At most 500 icons are planned per call.
Permission: manage_options and an active licence with the Bulk editing feature switched on under Icons, Features.
Parameters
The icon references to act on, as collection/slug.
The rename rule: find, replace, prefix and suffix. Plain text, never a pattern; each field is cut at 200 characters and not trimmed.
Return value
{plan: [{icon, from, to, state}]}. state is rename, same (the rule changes nothing), empty (no name left), too_long (over 200 characters) or unknown (no such icon).
Response
{plan: [{icon, from, to, state}]}. state is rename, same (the rule changes nothing), empty (no name left), too_long (over 200 characters) or unknown (no such icon).
{
"plan": [
{
"icon": "acme/arrow",
"from": "Arrow",
"to": "UI Arrow",
"state": "rename"
}
]
}