W3cubDocs

/WordPress

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

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

Parameters

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

Return

string|array Slashed $gpc.

Source

function addslashes_gpc( $gpc ) {
	return wp_slash( $gpc );
}

Changelog

Version Description
0.71 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/addslashes_gpc