Making WordPress.org


Ignore:
Timestamp:
05/08/2015 07:07:58 PM (10 years ago)
Author:
iandunn
Message:

WordPress.tv: Replace deprecated like_escape with wpdb::esc_like.

See #974
Props BrashRebel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/functions.php

    r1390 r1556  
    269269
    270270            foreach ( (array) $query->query_vars['search_terms'] as $term ) {
    271                 $term = esc_sql( like_escape( $term ) );
     271                $term = esc_sql( $wpdb->esc_like( $term ) );
    272272                $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))";
    273273                $searchand = ' AND ';
Note: See TracChangeset for help on using the changeset viewer.