easy-svg-pro/export-pack
Export a collection as a pack.
Ability · Easy SVG Pro · Defined in includes/abilities/packs.php
Usage
wp_get_ability( 'easy-svg-pro/export-pack' )->execute( array $input ): array|WP_Error
Example
<?php
$ability = wp_get_ability( 'easy-svg-pro/export-pack' );
if ( $ability ) {
$result = $ability->execute( array(
'collection' => 'brand',
) );
}
Description
Exports one collection as a pack zip that import-pack, or the Icons panel of any site, can read.
Hands its work to the same builder or importer the Templates screen (Easy SVG, Templates) uses. Archives travel as base64 in both directions.
Registered while the AI agents (MCP) switch is on, which it is out of the box.
Permission: the user needs manage_options and an active license.
Read only: it changes nothing.
Parameters
Required. The registered collection slug to export as a ZIP.
Return value
An array on success, a WP_Error with the route's code and status on failure. The array holds file (the file name the Icons panel would download it as), mime, bytes (the size of the zip before base64) and base64 (the zip itself). Pass base64 unchanged to import-pack, which takes it under the same name.