Abilitieseasy-svg-pro/install-preset

easy-svg-pro/install-preset

Install an icon preset.

Ability, Easy SVG Pro, defined in includes/abilities/manage.php

Usage

wp_get_ability( 'easy-svg-pro/install-preset' )->execute( array $input ): array|WP_Error

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/install-preset' );
if ( $ability ) {
	$result = $ability->execute( array(
		'slug' => 'lucide',
	) );
}

Description

Installs one ready-made icon set from UnleashWP as an icon set on this site.

Runs through the plugin's own REST handler, so its permission check, argument schema and handler do the work. The ability adds no write path of its own.

Registered while the AI agents (MCP) switch and the Templates feature are on. Permission: the user needs manage_options, and every call asks the route's own check again.

Writes to the site.

Parameters

body
slugstring

Required. Which preset set to install, as the catalog names it.

Return value

returnarray|WP_Error

What the matching Icons panel screen receives for the same action. An array on success, a WP_Error with the route's code and status on failure.