Ticket #6840: fix_stale_enclosures.patch
File fix_stale_enclosures.patch, 758 bytes (added by , 17 years ago) |
---|
-
wp-includes/functions.php
510 510 debug_fwrite( $log, 'Post contents:' ); 511 511 debug_fwrite( $log, $content . "\n" ); 512 512 513 foreach ( $pung as $link_test ) { 514 if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post 515 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $link_test . '%') ); 516 } 517 } 518 513 519 foreach ( $post_links_temp[0] as $link_test ) { 514 520 if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already 515 521 $test = parse_url( $link_test );