wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



backslashit › WordPress Function

Od0.71
Przestarzałyn/a
backslashit ( $value )
Parametry:
  • (string) $value Value to which backslashes will be added.
    Wymagane: Tak
Powrót:
  • (string) String with backslashes inserted.
Zdefiniowane na:
Codex:

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



Źródło

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