REST APIeasy_svg_panel_library_payload()

easy_svg_panel_library_payload()

Builds the library response: items, total and truncated.

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

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

Usage

easy_svg_panel_library_payload( string $search = '' ): array

Example

$payload = easy_svg_panel_library_payload( 'arrow' );

Description

At most EASY_SVG_PANEL_LIBRARY_MAX items. Without a search, total is the published icon count from wp_count_posts(); with one, it is the match count, and truncated means the page was full.

Parameters

body
$searchstring

Search term.

Return value

returnarray{items:array, total:int, truncated:bool}

The payload.