WordPress at a glance
function is not described

addslashes_gpc() WP 0.71

Adds slashes to escape strings.

Slashes will first be removed if magic_quotes_gpc is set, see https://secure.php.net/magic_quotes for more details.

No Hooks.


String. Returns a string escaped with slashes.


addslashes_gpc( $gpc );
$gpc(string) (required)
The string returned from HTTP request data.

Code of addslashes gpc: wp-includes/formatting.php WP 5.2.2

function addslashes_gpc( $gpc ) {
	if ( get_magic_quotes_gpc() ) {
		$gpc = stripslashes( $gpc );

	return wp_slash( $gpc );