Uses
Uses | Description |
---|---|
wp-includes/formatting.php: map_deep() | Maps a function to all non-iterable elements of an array or an object. |
Adds slashes to only string values in an array of values.
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.
(mixed) (Required) Scalar or array of scalars.
(mixed) Slashes $value
File: wp-includes/formatting.php
function wp_slash_strings_only( $value ) { return map_deep( $value, 'addslashes_strings_only' ); }
Version | Description |
---|---|
5.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_slash_strings_only