Un motore di ricerca WordPress per sviluppatori e autori di temi



like_escape ›

Da2.5.0
Deprecato4.0.0
like_escape ( $text )
Parametri:
  • (string) $text The text to be escaped.
    Richiesto:
Vedi:
  • wpdb::esc_like()
Ritorna:
  • (string) text, safe for inclusion in LIKE query.
Definito a:
Codex:

Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.



Sorgenti

function like_escape($text) {
	_deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
	return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
}