Warning: This function has been deprecated. Use wp_slash() instead.
addslashes_strings_only() WordPress Function
The addslashes_strings_only() function is a utility function that is used to add slashes to a string. This function is similar to the addslashes() function, but it only adds slashes to strings, not to other data types.
addslashes_strings_only( mixed $value ) #
Adds slashes only if the provided value is a string.
Description
See also
Parameters
- $value
(mixed)(Required)
Return
(mixed)
Source
File: wp-includes/deprecated.php
function addslashes_strings_only( $value ) { return is_string( $value ) ? addslashes( $value ) : $value; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.6.0 | This function has been deprecated. Use wp_slash() instead. |
5.3.0 | Introduced. |