You appear to be a bot. Output may be restricted
Description
Add slashes to a string or array of strings, in a recursive manner.
This should be used when preparing data for core API that expects slashed data. This should not be used to escape data going directly into an SQL query.
Usage
$string|string[] = wp_slash( $value );
Parameters
- $value
- ( string|string[] ) required – String or array of strings to slash.
Returns
string|string[] Slashed $value.
Source
File name: wordpress/wp-includes/formatting.php
Lines:
1 to 11 of 11
function wp_slash( $value ) { if ( is_array( $value ) ) { $value = array_map( 'wp_slash', $value ); } if ( is_string( $value ) ) { return addslashes( $value ); } return $value; }