WP_Font_Utils::apply_sanitizer( mixed $value, callable $sanitizer ): mixed

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Applies a sanitizer function to a value.

Parameters

$valuemixedrequired
The value to sanitize.
$sanitizercallablerequired
The sanitizer function to apply.

Return

mixed The sanitized value.

Source

private static function apply_sanitizer( $value, $sanitizer ) {
	if ( null === $sanitizer ) {
		return $value;

	}
	return call_user_func( $sanitizer, $value );
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.