public function esc_like($text)
{
return addcslashes($text, '_%\\');
}
function posts_where($where, &$wp_query) { global $wpdb; if ($title = $wp_query->get('like_title')) { $where .= " AND " . $wpdb->posts . ".post_title LIKE '%" . esc_sql(wpdb::esc_like($title)) . "%'"; } return $where; }