wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



like_escape › WordPress Function

Seit2.5.0
Veraltet4.0.0
like_escape ( $text )
Parameter:
  • (string) $text The text to be escaped.
    Erforderlich: Ja
Siehe:
  • wpdb::esc_like()
Gibt zurück:
  • (string) text, safe for inclusion in LIKE query.
Definiert in:
Codex:

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



Quellcode

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