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
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
Required. The icon set post id to remove from.
Required, at least one. The icon names to remove.
Return value
set_id, slug and report, one row per name with state removed or not_found.