WordPress at a glance
function is not described

addslashes_strings_only() WP 5.3.0

Deprecated from version 5.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Adds slashes only if the provided value is a string.

No Hooks.

Return

Mixed. Null. Nothing.

Usage

addslashes_strings_only( $value );
$value(mixed) (required)
-

Notes

  • See: wp_slash()

Changelog

Since 5.3.0 Introduced.
Deprecated 5.6.0

Code of addslashes_strings_only() WP 5.7.1

<?php
function addslashes_strings_only( $value ) {
	return is_string( $value ) ? addslashes( $value ) : $value;
}