Uma área de pesquisa sobre o WordPress para devs e autores do tema



like_escape ›

Desde2.5.0
Obsoleto4.0.0
like_escape ( $text )
Parâmetros:
  • (string) $text The text to be escaped.
    Required: Yes
Ver:
  • wpdb::esc_like()
Retorna:
  • (string) text, safe for inclusion in LIKE query.
Definido em:
Codex:

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



Fonte

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