WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2014 12:43:32 AM (7 years ago)
Author:
wonderboymusic
Message:

Replace all uses of like_escape() with $wpdb->esc_like().

Props miqrogroove.
See #10041.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r28665 r28712  
    10481048                $meta_value = array_slice( $meta_value, 0, 2 );
    10491049                $meta_compare_string = '%s AND %s';
    1050             } elseif ( 'LIKE' == substr( $meta_compare, -4 ) ) {
    1051                 $meta_value = '%' . like_escape( $meta_value ) . '%';
     1050            } elseif ( 'LIKE' == $meta_compare || 'NOT LIKE' == $meta_compare ) {
     1051                $meta_value = '%' . $wpdb->esc_like( $meta_value ) . '%';
    10521052                $meta_compare_string = '%s';
    10531053            } else {
Note: See TracChangeset for help on using the changeset viewer.