WP_REST_Font_Faces_Controller::sanitize_src( string $value ): string

In this article

Sanitizes a single src value for a font face.

Parameters

$valuestringrequired
Font face src that is a URL or the key for a $_FILES array item.

Return

string Sanitized value.

Source

protected function sanitize_src( $value ) {
	$value = ltrim( $value );
	return false === wp_http_validate_url( $value ) ? (string) $value : sanitize_url( $value );
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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