Ticket #6840: fix_stale_enclosures-rebased.patch
File fix_stale_enclosures-rebased.patch, 1.1 KB (added by , 16 years ago) |
---|
-
wp-includes/functions.php
1060 1060 /** 1061 1061 * Check content for video and audio links to add as enclosures. 1062 1062 * 1063 * Will not add enclosures that have already been added. This is called as 1063 * Will not add enclosures that have already been added and will 1064 * remove enclosures that are no longer in the post. This is called as 1064 1065 * pingbacks and trackbacks. 1065 1066 * 1066 1067 * @package WordPress … … 1091 1092 debug_fwrite( $log, 'Post contents:' ); 1092 1093 debug_fwrite( $log, $content . "\n" ); 1093 1094 1095 foreach ( $pung as $link_test ) { 1096 if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post 1097 $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 . '%') ); 1098 } 1099 } 1100 1094 1101 foreach ( (array) $post_links_temp[0] as $link_test ) { 1095 1102 if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already 1096 1103 $test = parse_url( $link_test );