Changeset 10763
- Timestamp:
- 03/10/2009 07:03:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-includes/comment.php
r10454 r10763 740 740 return false; 741 741 742 // Move children up a level. 743 $children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) ); 744 if ( !empty($children) ) { 745 $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id)); 746 clean_comment_cache($children); 747 } 748 742 749 $post_id = $comment->comment_post_ID; 743 750 if ( $post_id && $comment->comment_approved == 1 ) … … 1543 1550 * @subpackage Cache 1544 1551 * 1545 * @param int $id Comment ID to remove from cache 1546 */ 1547 function clean_comment_cache($id) { 1548 wp_cache_delete($id, 'comment'); 1552 * @param int|array $id Comment ID or array of comment IDs to remove from cache 1553 */ 1554 function clean_comment_cache($ids) { 1555 foreach ( (array) $ids as $id ) 1556 wp_cache_delete($id, 'comment'); 1549 1557 } 1550 1558
Note: See TracChangeset
for help on using the changeset viewer.