WordPress.org

Make WordPress Core

Ticket #12074: 12074.diff

File 12074.diff, 761 bytes (added by mtdewvirus, 6 years ago)
  • functions.php

     
    11221122                if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post 
    11231123                        $mid = $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, $link_test . '%') ); 
    11241124                        do_action( 'delete_postmeta', $mid ); 
    1125                         $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id IN(%s)", implode( ',', $mid ) ) ); 
     1125                        $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id IN(%s)", implode( ',', $mid ) ) ); 
    11261126                        do_action( 'deleted_postmeta', $mid ); 
    11271127                } 
    11281128        }