REST APIeasy-svg-pro/v1/bulk/rename

easy-svg-pro/v1/bulk/rename

Renames many icons by one rule and reports the result per icon.

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

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

Usage

POST /wp-json/easy-svg-pro/v1/bulk/rename

Example

curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/bulk/rename" \
	-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
	-H "Content-Type: application/json" \
	-d '{"icons": ["acme/arrow"], "rule": {"find": "Arrow", "replace": "Pfeil"}}'

Description

Computes the same plan as the preview route, then applies every row in state rename. Set icons are written through the shared set write, so easy_svg_pro_set_icons_written fires once per touched set; free library icons are renamed through the free plugin's own rename function. Only labels change, never slugs.

Permission: manage_options and an active licence with the Bulk editing feature switched on under Icons, Features.

Parameters

body
iconsstring[]
Required

The icon references to act on, as collection/slug.

body
ruleobject
Required

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

returnobject

{report: [{icon, state}]}. state is rename for a done rename, too_old when the installed Easy SVG Support cannot rename a library icon, or the plan state that stopped it (same, empty, too_long, unknown).

Response

{report: [{icon, state}]}. state is rename for a done rename, too_old when the installed Easy SVG Support cannot rename a library icon, or the plan state that stopped it (same, empty, too_long, unknown).

{
  "report": [
    {
      "icon": "acme/arrow",
      "state": "rename"
    }
  ]
}