Un motore di ricerca WordPress per sviluppatori e autori di temi



maybe_unserialize ›

Da2.0.0
Deprecaton/a
maybe_unserialize ( $original )
Parametri:
  • (string) $original Maybe unserialized original, if is needed.
    Richiesto:
Ritorna:
  • (mixed) Unserialized data can be any type.
Definito a:
Codex:

Unserialize value only if it was serialized.



Sorgenti

function maybe_unserialize( $original ) {
	if ( is_serialized( $original ) ) { // don't attempt to unserialize data that wasn't serialized going in
		return @unserialize( $original );
	}
	return $original;
}