easy_svg_pro_parse_manifest
Filters a source folder's manifest.json after it is parsed and validated, before the folder is scanned.
Filter · Easy SVG Pro · Status: Internal · Defined in includes/sources/sources.php
Usage
apply_filters( 'easy_svg_pro_parse_manifest', array $manifest, string $dir )
Example
add_filter( 'easy_svg_pro_parse_manifest', function ( $manifest, $dir ) {
if ( null === $manifest['license'] ) {
$manifest['license'] = 'CC0-1.0';
}
return $manifest;
}, 10, 2 );
Description
Fires only for folders that have a valid manifest; a broken or too new manifest fails before this point. You get the canonical shape, so you can rename icons, add keywords or set license, author and source. The result feeds the folder scan, which is cached in a transient keyed by the folder signature, so a change to your callback shows after the folder changes or the transient expires.
Parameters
The validated manifest: ok, slug, label, icons (list of file, name, label, keywords), license, author, source, error.
The folder the manifest.json was read from.
Return value
The manifest the folder scan uses.
Default: The output of validate_manifest()