wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



add_magic_quotes › WordPress Function

Desde0.71
Obsoleton/a
add_magic_quotes ( $input_array )
Parâmetros:
  • (array) $input_array Array to walk while sanitizing contents.
    Required: Yes
Retorna:
  • (array) Sanitized $input_array.
Definido em:
Codex:
Log de mudanças:
  • 5.5.0

Walks the array while sanitizing the contents.



Fonte

function add_magic_quotes( $input_array ) {
	foreach ( (array) $input_array as $k => $v ) {
		if ( is_array( $v ) ) {
			$input_array[ $k ] = add_magic_quotes( $v );
		} elseif ( is_string( $v ) ) {
			$input_array[ $k ] = addslashes( $v );
		}
	}

	return $input_array;
}