easy-svg-pro/list-icons
Lists the icons on the site from the free library, Pro collections and published icon sets, paged.
Ability · Easy SVG Pro · Status: Internal · Defined in includes/abilities/abilities.php
Usage
wp_get_ability( 'easy-svg-pro/list-icons' )->execute( array $input ): array
Example
<?php
$ability = wp_get_ability( 'easy-svg-pro/list-icons' );
if ( $ability ) {
$result = $ability->execute(
array(
'source' => 'set',
'search' => 'arrow',
)
);
}
Description
Each source is only read when it is switched on: the free library when its icons feature is on, collections with the Multiple collections feature, sets with the Icon set editor. Drafts are left out. The set scan stops at 2000 sets and then reports truncated true, so total is a lower bound. Annotated readonly and idempotent, so the REST run endpoint accepts GET. 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
all (default), library, collection or set. An unknown word matches nothing.
Restrict the result to one collection or icon set slug.
Case-insensitive substring matched against slug and label.
Include each icon's sanitized SVG markup. Default false; only a real true counts.
Page of results, starting at 1.
Icons per page, 1 to 500, default 100.
Return value
items (slug, label, collection, source, optional markup), total, page, per_page, has_more and truncated.