Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
$textstringrequired
function like_escape($text) {
_deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/like_escape