Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




stripslashes_deep [ ]

stripslashes_deep ( $value )
Parameters:
  • (mixed) $value The value to be stripped.
Returns:
  • (mixed) Stripped value.
Defined at:
Codex



Navigates through an array and removes slashes from the values.

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

Source

function stripslashes_deep($value) {
	if ( is_array($value) ) {
		$value = array_map('stripslashes_deep', $value);
	} elseif ( is_object($value) ) {
		$vars = get_object_vars( $value );
		foreach ($vars as $key=>$data) {
			$value->{$key} = stripslashes_deep( $data );
		}
	} elseif ( is_string( $value ) ) {
		$value = stripslashes($value);
	}

	return $value;
}

Top Google Search Results

More ...

User Note(s)