easy-svg-pro/v1/library/collections
Gibt jede registrierte Icon-Collection mit ihren Icons zurück, passend für das Raster der Icon-Bibliothek.
REST-Endpunkt · Easy SVG Pro · Status: Intern · Definiert in includes/core/rest.php
Verwendung
GET /wp-json/easy-svg-pro/v1/library/collections
Beispiel
curl -u admin:app-password https://example.com/wp-json/easy-svg-pro/v1/library/collections
Beschreibung
Jede Collection sagt, ob sie readonly ist (alles, was kein Set ist), und bei einem Set dessen set_id. Leere veröffentlichte Sets kommen auch mit, damit ein neues Set sichtbar ist, bevor es Icons hat. Das passiert nur, solange die Funktion editor an ist. Die Antwort trägt insgesamt höchstens 2000 Icons und setzt darüber truncated. Berechtigung: Braucht manage_options und eine aktive Lizenz. Ein einzelnes Feature-Flag ist nicht nötig.
Rückgabewert
collections, je Collection id, label, readonly, set_id und icons mit key, slug, ref, label und content, dazu truncated ab 2000 Icons.
Antwort
{
"collections": [
{
"id": "acme",
"label": "ACME",
"readonly": false,
"set_id": 42,
"icons": [
{
"key": "acme/arrow",
"slug": "arrow",
"ref": "acme/arrow",
"label": "Arrow",
"content": "<svg ...></svg>"
}
]
}
],
"truncated": false
}