acf_esc_html() │ ACF 5.9.6

Sanitizes text content and strips out disallowed HTML.

This function emulates wp_kses_post() a context of "acf" for extensibility.

No Hooks.

Returns

string|false.

Usage

acf_esc_html( $string );
$string(string)
The string to be escaped.
Default: ''

Changelog

Since 5.9.6 Introduced.

acf_esc_html() code ACF 6.8.8

function acf_esc_html( $string = '' ) {

	if ( ! is_scalar( $string ) ) {
		return false;
	}

	return wp_kses( (string) $string, 'acf' );
}