Abilitieseasy-svg-pro/export-icon-plugin

easy-svg-pro/export-icon-plugin

Export collections as a plugin.

Ability · Easy SVG Pro · Defined in includes/abilities/packs.php

Usage

wp_get_ability( 'easy-svg-pro/export-icon-plugin' )->execute( array $input ): array|WP_Error

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/export-icon-plugin' );
if ( $ability ) {
	$result = $ability->execute( array(
		'collections' => array(
			'brand',
		),
		'name'        => 'Brand',
	) );
}

Description

Builds an installable WordPress plugin that carries the named collections to any site with Easy SVG Pro.

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

body
collectionsstring[]

Required. The collection slugs to put into one installable icon plugin. At most 25.

body
namestring

Required. The plugin name, shown on the Plugins screen of every site it is installed on.

Return value

returnarray|WP_Error

An array on success, a WP_Error with the route's code and status on failure.