Warning: This function has been deprecated. Use wp_slash() instead.

wp_slash_strings_only( mixed $value )

Adds slashes to only string values in an array of values.


Description 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.

See also See also


Top ↑

Parameters Parameters

$value

(mixed) (Required) Scalar or array of scalars.


Top ↑

Return Return

(mixed) Slashes $value


Top ↑

Source Source

File: wp-includes/deprecated.php

function wp_slash_strings_only( $value ) {
	return map_deep( $value, 'addslashes_strings_only' );
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.6.0 Use wp_slash()
5.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.