Dataeasy_svg_sanitize_settings()

easy_svg_sanitize_settings()

Normalises a settings array: booleans as booleans, max_mb clamped to 1 through the ceiling.

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

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

Usage

easy_svg_sanitize_settings( mixed $input ): array

Example

update_option(
	EASY_SVG_SETTINGS_OPTION,
	easy_svg_sanitize_settings( array_merge( easy_svg_settings(), array( 'icons' => true ) ) )
);

Description

A missing key keeps its default, which means off for the two features. Unknown keys are dropped. Non-array input returns the defaults.

Parameters

body
$inputmixed

Raw settings.

Return value

returnarray

svg_upload, icons and max_mb.

Merge onto easy_svg_settings() first, as the example does; a partial array switches omitted features off.