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



like_escape › WordPress Function

Od2.5.0
Przestarzały4.0.0
like_escape ( $text )
Parametry:
  • (string) $text The text to be escaped.
    Wymagane: Tak
Zobacz:
  • wpdb::esc_like()
Powrót:
  • (string) text, safe for inclusion in LIKE query.
Zdefiniowane na:
Codex:

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



Źródło

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