easy-svg-pro/v1/styles
Liefert die Stilvorlagen, die Zuweisungen pro Icon, die Theme-Palette und die erlaubten Abstandsstufen.
REST-Endpunkt · Easy SVG Pro · Status: Intern · Definiert in includes/styles/styles.php
Verwendung
GET /wp-json/easy-svg-pro/v1/styles
Beispiel
curl -X GET "https://example.com/wp-json/easy-svg-pro/v1/styles" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES"
Beschreibung
Liest die Option easy_svg_pro_icon_styles, bei jedem Lesen bereinigt, und ergänzt die Theme-Palette aus wp_get_global_settings(). Ein Theme ohne Palette liefert eine leere palette, dann sind nur Hex-Farben möglich. registrable sagt dir, ob das freie Plugin die Icons-API bereitstellt, von der das Styling im Icon-Block abhängt.
Rückgabewert
Die Stil-Einstellungen: {templates: {name: {label, size, colour, spacing}}, icons: {reference: {template, colours}}, palette: {slug: {label, color}}, spacing: [0,2,4,8,12,16,24,32], registrable: bool}.
Antwort
{
"templates": {
"brand": {
"label": "Brand",
"size": 24,
"colour": "primary",
"spacing": 4
}
},
"icons": {
"acme/arrow": {
"template": "brand",
"colours": {}
}
},
"palette": {
"primary": {
"label": "Primary",
"color": "#0a2540"
}
},
"spacing": [
0,
2,
4,
8,
12,
16,
24,
32
],
"registrable": true
}