A WordPress-centric search engine for devs and theme authors



addslashes_gpc ›

Since0.71
Deprecatedn/a
addslashes_gpc ( $gpc )
Parameters:
  • (string) $gpc The string returned from HTTP request data.
    Required: Yes
Returns:
  • (string) Returns a string escaped with slashes.
Defined at:
Codex:

Adds slashes to escape strings.

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



Source

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

	return wp_slash( $gpc );
}