wp_kses_stripslashes() WordPress Function
The wp_kses_stripslashes() function is used to remove slashes from a string. This function is typically used to remove slashes added by the addslashes() function.
wp_kses_stripslashes( string $string ) #
Strips slashes from in front of quotes.
Description
This function changes the character sequence \"
to just "
. It leaves all other slashes alone. The quoting from preg_replace(//e)
requires this.
Parameters
- $string
(string)(Required)String to strip slashes from.
Return
(string) Fixed string with quoted slashes.
Source
File: wp-includes/kses.php
function wp_kses_stripslashes( $string ) { return preg_replace( '%\\\\"%', '"', $string ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |