easy-svg-pro/v1/styles
Returns the style templates, per icon assignments, the theme palette and the allowed spacing steps.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/styles/styles.php
Usage
GET /wp-json/easy-svg-pro/v1/styles
Example
curl -X GET "https://example.com/wp-json/easy-svg-pro/v1/styles" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES"
Description
Reads the easy_svg_pro_icon_styles option, cleaned on every read, and adds the theme palette from wp_get_global_settings(). A theme with no palette returns an empty palette, so only hex colours are possible then. registrable says whether the free plugin exposes the icons API the Icon block styling depends on.
Permission: manage_options and an active licence with the Styles & theme colors feature switched on under Icons, Features.
Return value
The style settings: {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}.
Response
The style settings: {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}.
{
"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
}