easy_svg_pro_collection_icons
Filters the icons of one source collection (theme, drop-in or registered in code) just before it is added to the registry.
Filter · Easy SVG Pro · Status: Internal · Defined in includes/sources/sources.php
Usage
apply_filters( 'easy_svg_pro_collection_icons', array $icons, string $slug, string $source )
Example
add_filter( 'easy_svg_pro_collection_icons', function ( $icons, $slug ) {
if ( 'theme' === $slug ) {
unset( $icons['old-logo'] );
}
return $icons;
}, 10, 2 );
Description
Runs for every source collection on each request where the sources feature is on, including calls to easy_svg_register_icon_collection(). Icon sets are not sources and do not pass through here. Problems found while scanning are recorded before this filter, so they are reported even if you empty the list.
Parameters
Icon slug => sanitized and hardened markup.
The collection slug being registered.
The folder the icons came from, or '' for an array passed in code.
Return value
The icons to register. An empty array registers no collection.
Default: The scanned icons