Changeset 11968 for trunk/wp-includes/functions.php
- Timestamp:
- 09/24/2009 05:10:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r11961 r11968 1164 1164 foreach ( $pung as $link_test ) { 1165 1165 if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post 1166 $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 . '%') ); 1166 $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 . '%') ); 1167 do_action( 'delete_postmeta', $mid ); 1168 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id IN(%s)", implode( ',', $mid ) ) ); 1169 do_action( 'deleted_postmeta', $mid ); 1167 1170 } 1168 1171 } … … 1187 1190 $meta_value = "$url\n$len\n$type\n"; 1188 1191 $wpdb->insert($wpdb->postmeta, array('post_id' => $post_ID, 'meta_key' => 'enclosure', 'meta_value' => $meta_value) ); 1192 do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, 'enclosure', $meta_value ); 1189 1193 } 1190 1194 }
Note: See TracChangeset
for help on using the changeset viewer.