Changeset 10762
- Timestamp:
- 03/10/2009 07:02:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r10731 r10762 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 ) … … 1547 1554 * @subpackage Cache 1548 1555 * 1549 * @param int $id Comment ID to remove from cache 1550 */ 1551 function clean_comment_cache($id) { 1552 wp_cache_delete($id, 'comment'); 1556 * @param int|array $id Comment ID or array of comment IDs to remove from cache 1557 */ 1558 function clean_comment_cache($ids) { 1559 foreach ( (array) $ids as $id ) 1560 wp_cache_delete($id, 'comment'); 1553 1561 } 1554 1562
Note: See TracChangeset
for help on using the changeset viewer.