REST APIeasy-svg-pro/v1/sets/list

easy-svg-pro/v1/sets/list

Lists every icon set with its icon count and a ready template call, optionally filtered by a search term.

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

GET /wp-json/easy-svg-pro/v1/sets/list

Example

curl -u admin:app-password 'https://example.com/wp-json/easy-svg-pro/v1/sets/list?search=acme'

Description

Covers published, draft and private sets, sorted by title. search matches the set name or its slug, never the icons' markup. Each row's slug is the registered collection slug, and template_call is easy_svg_icon( 'slug/icon-slug' ), empty when the set has no slug. An empty search result is an empty array. Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.

Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.

Parameters

Return value

returnWP_REST_Response|WP_Error

A list, one row per set: id, title, slug (registered collection slug), status, count and template_call.

Response

A list, one row per set: id, title, slug (registered collection slug), status, count and template_call.

[
  {
    "id": 42,
    "title": "ACME",
    "slug": "acme",
    "status": "publish",
    "count": 12,
    "template_call": "easy_svg_icon( 'acme/icon-slug' )"
  }
]