Iconseasy_svg_collect_icons()

easy_svg_collect_icons()

Reads every icon page by page until a page comes back short.

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_collect_icons( callable $fetch_page, int $per_page ): array

Example

$icons = easy_svg_collect_icons( 'easy_svg_icon_page', 100 );

Description

Stops early when a page repeats the first id it already saw, which protects against a query that ignores paged.

Parameters

body
$fetch_pagecallable

( int $page, int $per_page ) returning icons with id.

Return value

returnarray

All icons.