Abilitieseasy-svg-pro/list-presets

easy-svg-pro/list-presets

List the icon presets.

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

Usage

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

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/list-presets' );
if ( $ability ) {
	$result = $ability->execute( array(
		'refresh' => true,
	) );
}

Description

Lists the ready-made icon sets UnleashWP offers, and which are installed here. The sample icons the gallery in the panel draws are not included.

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.

Read only: it changes nothing.

Parameters

body
refreshboolean

Optional. Ask UnleashWP again rather than using the hour-old answer.

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.