Abilitieseasy-svg-pro/remove-icon-from-set

easy-svg-pro/remove-icon-from-set

Removes icons from an icon set by name, leaving every other icon in place.

Ability · Easy SVG Pro · Status: Internal · Defined in includes/abilities/abilities.php

Internal: not part of the promised public surface. It may change without notice.

Usage

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

Example

<?php
$ability = wp_get_ability( 'easy-svg-pro/remove-icon-from-set' );
if ( $ability ) {
	$result = $ability->execute(
		array(
			'set_id' => 42,
			'slugs'  => array( 'arrow' ),
		)
	);
}

Description

Runs the same path as POST /sets/{id}/icons/remove. A name the set does not hold is reported as not_found rather than failing the call. Needs the Icon set editor feature too. Annotated destructive and idempotent, so the REST run endpoint routes it as DELETE. Registered only when the Abilities API exists, the licence is active and the AI agent abilities feature is on. Permission: the user must have manage_options.

Parameters

body
set_idinteger

Required. The icon set post id to remove from.

body
slugsstring[]

Required, at least one. The icon names to remove.

Return value

returnobject|WP_Error

set_id, slug and report, one row per name with state removed or not_found.

Removed markup has no undo in the ability itself; with the Icon history feature on, a revision of the set is kept.