Sources and collectionseasy_svg_pro_registered_collection

easy_svg_pro_registered_collection

Fires after a source collection (theme, drop-in or registered in code) is added to the registry.

Action · Easy SVG Pro · Status: Internal · Defined in includes/sources/sources.php

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

Usage

do_action( 'easy_svg_pro_registered_collection', string $slug, string $label, int $count, string $source )

Example

add_action( 'easy_svg_pro_registered_collection', function ( $slug, $label, $count ) {
	if ( 0 === $count ) {
		return;
	}
	acme_known_collections( $slug, $label );
}, 10, 3 );

Description

Fires on every request where the sources feature is on, once per source collection that ended up with at least one icon. A folder whose manifest is broken, or that yields no icons, registers nothing and does not fire it. Icon sets do not fire it.

Parameters

body
$slugstring

The collection slug.

body
$labelstring

The collection label.

body
$countint

How many icons were registered.

body
$sourcestring

The folder it came from, or '' for an array registered in code.