WordPress Version: 5.6
/**
* Adds slashes only if the provided value is a string.
*
* @since 5.3.0
* @deprecated 5.6.0
*
* @see wp_slash()
*
* @param mixed $value
* @return mixed
*/
function addslashes_strings_only($value)
{
return is_string($value) ? addslashes($value) : $value;
}