REST APIeasy-svg-pro/v1/icon-field/icons

easy-svg-pro/v1/icon-field/icons

Returns this site's whole icon inventory with markup, for the pickers in field builders and the editor.

REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/integrations/icon-field.php

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

Usage

GET /wp-json/easy-svg-pro/v1/icon-field/icons

Example

curl -X GET "https://example.com/wp-json/easy-svg-pro/v1/icon-field/icons" \
	-H "X-WP-Nonce: $NONCE" -b "$COOKIES"

Description

The one inventory route the ACF tab, the Lazy Blocks control, the Meta Box field, the WPBakery element, Quick insert and the Styles screen all read. Each row is a reference value, a label, the collection and the markup. An unlicensed site gets an empty list rather than an error.

Permission: edit_posts, plus at least one of these features switched on with an active licence: ACF icon picker, Lazy Blocks icon control, Meta Box icon field, WPBakery icon element, Quick insert, Styles & theme colors.

Return value

returnobject

{icons: [{value, label, collection, markup}], total}.

Response

{icons: [{value, label, collection, markup}], total}.

{
  "icons": [
    {
      "value": "acme/arrow",
      "label": "Arrow",
      "collection": "acme",
      "markup": "<svg ...></svg>"
    }
  ],
  "total": 1
}
Any user with edit_posts can read every icon's markup while one of those features is on.