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/canonical.php

    r28610 r28712  
    505505
    506506    if ( get_query_var('name') ) {
    507         $where = $wpdb->prepare("post_name LIKE %s", like_escape( get_query_var('name') ) . '%');
     507        $where = $wpdb->prepare("post_name LIKE %s", $wpdb->esc_like( get_query_var('name') ) . '%');
    508508
    509509        // if any of post_type, year, monthnum, or day are set, use them to refine the query
Note: See TracChangeset for help on using the changeset viewer.