wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



backslashit › WordPress Function

Da0.71
Deprecaton/a
› backslashit ( $value )
Parametri:
  • (string) $value Value to which backslashes will be added.
    Richiesto: Sì
Ritorna:
  • (string) String with backslashes inserted.
Definito a:
Codex:

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



Sorgenti

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