Replace all uses of like_escape() with $wpdb->esc_like().
Props miqrogroove. See #10041. Built from https://develop.svn.wordpress.org/trunk@28712 git-svn-id: http://core.svn.wordpress.org/trunk@28528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -479,7 +479,7 @@ function do_enclose( $content, $post_ID ) {
|
||||
|
||||
foreach ( $pung as $link_test ) {
|
||||
if ( ! in_array( $link_test, $post_links_temp ) ) { // link no longer in post
|
||||
$mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $link_test ) . '%') );
|
||||
$mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $link_test ) . '%') );
|
||||
foreach ( $mids as $mid )
|
||||
delete_metadata_by_mid( 'post', $mid );
|
||||
}
|
||||
@@ -498,7 +498,7 @@ function do_enclose( $content, $post_ID ) {
|
||||
}
|
||||
|
||||
foreach ( (array) $post_links as $url ) {
|
||||
if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $url ) . '%' ) ) ) {
|
||||
if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $url ) . '%' ) ) ) {
|
||||
|
||||
if ( $headers = wp_get_http_headers( $url) ) {
|
||||
$len = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0;
|
||||
|
||||
Reference in New Issue
Block a user