wp_unslash

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

WordPress Version: 6.1

/**
 * Removes slashes from a string or recursively removes slashes from strings within an array.
 *
 * This should be used to remove slashes from data passed to core API that
 * expects data to be unslashed.
 *
 * @since 3.6.0
 *
 * @param string|array $value String or array of data to unslash.
 * @return string|array Unslashed `$value`, in the same type as supplied.
 */
function wp_unslash($value)
{
    return stripslashes_deep($value);
}

WordPress Version: 5.9

/**
 * Removes slashes from a string or recursively removes slashes from strings within an array.
 *
 * This should be used to remove slashes from data passed to core API that
 * expects data to be unslashed.
 *
 * @since 3.6.0
 *
 * @param string|array $value String or array of data to unslash.
 * @return string|array Unslashed `$value`.
 */
function wp_unslash($value)
{
    return stripslashes_deep($value);
}

WordPress Version: 5.7

/**
 * Removes slashes from a string or recursively removes slashes from strings within an array.
 *
 * This should be used to remove slashes from data passed to core API that
 * expects data to be unslashed.
 *
 * @since 3.6.0
 *
 * @param string|array $value String or array of data to unslash.
 * @return string|array Unslashed $value.
 */
function wp_unslash($value)
{
    return stripslashes_deep($value);
}

WordPress Version: 5.4

/**
 * Remove slashes from a string or array of strings.
 *
 * This should be used to remove slashes from data passed to core API that
 * expects data to be unslashed.
 *
 * @since 3.6.0
 *
 * @param string|string[] $value String or array of strings to unslash.
 * @return string|string[] Unslashed $value
 */
function wp_unslash($value)
{
    return stripslashes_deep($value);
}

WordPress Version: 3.7

/**
 * Remove slashes from a string or array of strings.
 *
 * This should be used to remove slashes from data passed to core API that
 * expects data to be unslashed.
 *
 * @since 3.6.0
 *
 * @param string|array $value String or array of strings to unslash.
 * @return string|array Unslashed $value
 */
function wp_unslash($value)
{
    return stripslashes_deep($value);
}