Abilitieseasy-svg-pro/create-set

easy-svg-pro/create-set

Create an icon set.

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

Usage

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

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/create-set' );
if ( $ability ) {
	$result = $ability->execute( array(
		'label' => 'Brand',
	) );
}

Description

Creates an empty icon set. Its slug is made from the name once and never changes.

Runs POST /wp-json/easy-svg-pro/v1/sets/create through rest_do_request(), so the route's own 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 Collections 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
labelstring

Required. The name of the new set. Its slug, the address pages call, is made from it once.

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.