stripslashes_deep() WordPress Function

The stripslashes_deep() function in WordPress is used to remove all slashes from a string or array of strings. This function is recursive, so it will also remove slashes from any sub-strings or sub-arrays.

stripslashes_deep( mixed $value ) #

Navigates through an array, object, or scalar, and removes slashes from the values.


Parameters

$value

(mixed)(Required)The value to be stripped.


Top ↑

Return

(mixed) Stripped value.


Top ↑

More Information

If an array is passed, the array_map() function causes a callback to pass the value back to the function. The slashes from each value will be removed using the stripslashes() function.


Top ↑

Source

File: wp-includes/formatting.php

function stripslashes_deep( $value ) {
	return map_deep( $value, 'stripslashes_from_strings_only' );
}


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More