Docs

evf_sanitize_textarea_field( string $string ): string

Sanitize a string, that can be a multiline.

Description

If WP core sanitize_textarea_field() exists (after 4.7.0) – use it.
Otherwise – split onto separate lines, sanitize each one, merge again.

Parameters

$stringstringrequired
Raw string to sanitize.

Return

string If empty var is passed, or not a string – return unmodified. Otherwise – sanitize.

Changelog

VersionDescription
1.4.1Introduced.