Blockseasy_svg_register_icons()

easy_svg_register_icons()

Hands icons to core's registry and returns how many core accepted.

Function · Easy SVG · Status: Internal · Defined in includes/icons.php

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

Usage

easy_svg_register_icons( array $icons, callable $register_collection, callable $register_icon ): int

Example

$taken = easy_svg_register_icons( $icons, 'wp_register_icon_collection', 'wp_register_icon' );

Description

Skips invalid slugs, converts each icon with easy_svg_core_icon(), registers the easy-svg collection only when at least one icon is ready, counts what core answered true to, and latches the stroke stylesheet when a stroked icon was taken.

Parameters

body
$iconsarray

slug, label, content per icon.

Return value

returnint

Icons accepted.