easy-svg-pro/v1/packs/export-plugin
Downloads several icon collections as one installable WordPress plugin, for agencies that put the same sets on many sites.
REST endpoint, Easy SVG Pro, Status: Public, defined in includes/core/rest/packs.php
Usage
GET /wp-json/easy-svg-pro/v1/packs/export-plugin?collections[]=<slug>&name=<name>
Example
curl -G "https://example.com/wp-json/easy-svg-pro/v1/packs/export-plugin" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
--data-urlencode "collections[]=brand-icons" \
--data-urlencode "collections[]=ui-icons" \
--data-urlencode "name=Agency Icons" \
-o agency-icons.zip
Description
A GET, like the single export, so the browser can follow it as a download link. The answer is a ZIP holding one plugin folder:
agency-icons/
├── agency-icons.php
└── icons/
├── brand-icons/ manifest.json + one SVG per icon
└── ui-icons/
The main file registers every folder under icons/ through easy_svg_pro_source_dirs, raises easy_svg_pro_source_max_icons to the largest set, and shows an admin notice when Easy SVG Pro is not active. Its header carries the cleaned name, Version set to the export time (Y.m.d.Hi in UTC), a text domain equal to the folder, Update URI: false and a license line: the code is GPL-2.0-or-later, the icons keep their own licenses. Each manifest keeps the set's recorded origin, as in wp easy-svg pack export.
Only the cleaned name reaches PHP: letters, digits, spaces and . , - & ( ), at most 80 characters. The folder is the name in lowercase ASCII, ending in -icons. A name without Latin letters gets icons- plus a short hash, so two such plugins never replace each other.
On the target site the Collections feature must be on for the sets to appear.
Permission: Requires manage_options and an active license. No feature switch is needed. WordPress checks the required parameters before the permission callback, so a request that lacks one answers 400 rest_missing_callback_param, a guest's request too, not 401.
Parameters
Collection slugs, 1 to 25.
The plugin name, shown on the Plugins screen of every site it is installed on.
Default false. Build nothing; answer only version, the version this export would carry, and same, whether it holds the same icons as the last one.
Return value
The plugin as <folder>.zip. Errors come as JSON with code easy_svg_pro_plugin_export: 400 for no or too many collections, or a collection whose slug cannot be a folder name; 404 No such collection: ...; 500 when the file could not be written; 501 when the PHP extension ZipArchive is missing.