Sprache wechseln
wpseek auf Twitter


Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren




stripslashes_deep [ ]

stripslashes_deep ( $value )
Parameter:
  • (mixed) $value The value to be stripped.
Gibt zurück:
  • (mixed) Stripped value.
Definiert in:
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.

Quellcode

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;
}

Beispiele [ wp-snippets.com ]

Top Google Suchergebnisse

Mehr ...

0 Nutzerkommentare

Noch keine. Sei der Erste!

Neu hinzufügen ...