wpseek.com
A WordPress-centric search engine for devs and theme authors



backslashit › WordPress Function

Since0.71
Deprecatedn/a
backslashit ( $value )
Parameters:
  • (string) $value Value to which backslashes will be added.
    Required: Yes
Returns:
  • (string) String with backslashes inserted.
Defined at:
Codex:

Adds backslashes before letters and before a number at the start of a string.



Source

function backslashit( $value ) {
	if ( isset( $value[0] ) && $value[0] >= '0' && $value[0] <= '9' ) {
		$value = '\\\\' . $value;
	}
	return addcslashes( $value, 'A..Za..z' );
}