Adds slashes to only string values in an array of values.
Description
This should be used when preparing data for core APIs that expect slashed data.This should not be used to escape data going directly into an SQL query.
Parameters
$valuemixed
Scalar or array of scalars.
Return
mixed
Slashes $value
Uses · 1
map_deep()Maps a function to all non-iterable elements of an array or an object.
Signature, return type and hooks compared across 5 parsed releases.
5.6.0
Deprecated. Use wp_slash()from the docblock
5.3.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/deprecated.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.