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

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


Description

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


Top ↑

Parameters

$gpc string|array Required
String or array of data to slash.

Top ↑

Return

string|array Slashed $gpc.


Top ↑

Source

File: wp-includes/formatting.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
0.71 Introduced.

Top ↑

User Contributed Notes

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