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

Top ↑

See also


Top ↑

Parameters

$value

(mixed)(Required)


Top ↑

Return

(mixed)


Top ↑

Source

File: wp-includes/deprecated.php

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

Top ↑

Changelog

Changelog
VersionDescription
5.6.0This function has been deprecated. Use wp_slash() instead.
5.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More