Changeset 11305 for trunk/wp-includes/post.php
- Timestamp:
- 05/12/2009 05:10:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r11284 r11305 685 685 686 686 global $wpdb; 687 if ( $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key)) ) { 688 /** @todo Get post_ids and delete cache */ 689 // wp_cache_delete($post_id, 'post_meta'); 687 $post_ids = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key)); 688 if ( $post_ids ) { 689 $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key)); 690 foreach ( $post_ids as $post_id ) 691 wp_cache_delete($post_id, 'post_meta'); 690 692 return true; 691 693 }
Note: See TracChangeset
for help on using the changeset viewer.