Adds slashes only if the provided value is a string.
(mixed) (Required)
(mixed)
File: wp-includes/formatting.php
function addslashes_strings_only( $value ) { return is_string( $value ) ? addslashes( $value ) : $value; }
Version | Description |
---|---|
5.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/addslashes_strings_only