easy-svg-pro/v1/quick-insert/favourite
Toggles an icon in the current user's favourites.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/editor/quick-insert.php
Internal: not part of the promised public surface. It may change without notice.
Usage
POST /wp-json/easy-svg-pro/v1/quick-insert/favourite
Example
curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/quick-insert/favourite" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
-H "Content-Type: application/json" \
-d '{"icon": "easy-svg/heart"}'
Description
An icon already in the list is removed; otherwise it is added at the front and the list is cut to 24. An invalid reference changes nothing.
Permission: edit_posts and an active licence with Quick insert switched on.
Parameters
body
iconstring
RequiredThe icon reference, as collection/slug.
Return value
returnobject
The user's state after the write, same shape as GET /quick-insert/state.
Response
The user's state after the write, same shape as GET /quick-insert/state.
{
"recent": [
"acme/arrow"
],
"favourite": [
"easy-svg/heart"
],
"can_create": true
}
Related
Was this page helpful?