backslashit( string $value ): string
Adds backslashes before letters and before a number at the start of a string.
Parameters
-
$value
string Required -
Value to which backslashes will be added.
Return
string String with backslashes inserted.
Source
File: wp-includes/formatting.php
.
View all references
function backslashit( $value ) {
if ( isset( $value[0] ) && $value[0] >= '0' && $value[0] <= '9' ) {
$value = '\\\\' . $value;
}
return addcslashes( $value, 'A..Za..z' );
}
Changelog
Version | Description |
---|---|
0.71 | Introduced. |