WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/addslashes gpc

Description

Adds slashes to escape strings.

Slashes will first be removed if magic-quotes-gpc is set, see magic_quotes for more details.

Usage

<?php addslashes_gpc$gpc ?>

Parameters

$gpc
(string) (required) The string returned from HTTP request data.
Default: None

Return Values

(string) 
Returns a string escaped with slashes.

Examples

Notes

  • Uses global: (object) $wpdb
  • In this context, this: '\' is a slash.

Change Log

Since: 0.71

Source File

addslashes_gpc() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.