stripslashes_from_strings_only()WP 4.4.0

Callback function for stripslashes_deep() strips slashes from strings.

No Hooks.

Return

Mixed. The stripped value.

Usage

stripslashes_from_strings_only( $value );
$value(mixed) (required)
The array or string to be stripped.

Changelog

Since 4.4.0 Introduced.

stripslashes_from_strings_only() code WP 6.5.2

function stripslashes_from_strings_only( $value ) {
	return is_string( $value ) ? stripslashes( $value ) : $value;
}