stripslashes_from_strings_only

The timeline below displays how wordpress function stripslashes_from_strings_only has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Callback function for `stripslashes_deep()` which strips slashes from strings.
 *
 * @since 4.4.0
 *
 * @param mixed $value The array or string to be stripped.
 * @return mixed The stripped value.
 */
function stripslashes_from_strings_only($value)
{
    return is_string($value) ? stripslashes($value) : $value;
}

WordPress Version: 4.4

/**
 * Callback function for `stripslashes_deep()` which strips slashes from strings.
 *
 * @since 4.4.0
 *
 * @param mixed $value The array or string to be stripped.
 * @return mixed $value The stripped value.
 */
function stripslashes_from_strings_only($value)
{
    return is_string($value) ? stripslashes($value) : $value;
}