addslashes_gpc( string|array $gpc ): string|array

This function has been deprecated since 7.0.0. Use wp_slash() instead.

Adds slashes to a string or recursively adds slashes to strings within an array.

Description

This function is just a wrapper for wp_slash(). It was originally related to magic quotes functionality which was deprecated in PHP 5.3.0 and removed in PHP 5.4.0.

See also

Parameters

$gpcstring|arrayrequired
String or array of data to slash.

Return

string|array Slashed $gpc.

Source

function addslashes_gpc( $gpc ) {
	_deprecated_function( __FUNCTION__, '7.0.0', 'wp_slash()' );
	return wp_slash( $gpc );
}

Changelog

VersionDescription
7.0.0Deprecated. Use wp_slash() instead.
0.71Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.