Changeset 11741 for trunk/wp-includes/comment.php
- Timestamp:
- 07/24/2009 07:23:11 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r11734 r11741 744 744 do_action('delete_comment', $comment_id); 745 745 746 wp_unschedule_comment_de struction($comment_id);746 wp_unschedule_comment_delete($comment_id); 747 747 748 748 $comment = get_comment($comment_id); … … 1038 1038 function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) { 1039 1039 global $wpdb; 1040 wp_unschedule_comment_de struction($comment_id);1040 wp_unschedule_comment_delete($comment_id); 1041 1041 1042 1042 $status = '0'; … … 1059 1059 return wp_delete_comment($comment_id); 1060 1060 $status = 'deleted'; 1061 wp_schedule_comment_de struction($comment_id);1061 wp_schedule_comment_delete($comment_id); 1062 1062 break; 1063 1063 default: … … 1092 1092 * @return void 1093 1093 */ 1094 function wp_schedule_comment_de struction($comment_id) {1095 $to_de stroy = get_option('to_destroy');1096 if ( !is_array($to_destroy))1097 $to_de stroy= array();1094 function wp_schedule_comment_delete($comment_id) { 1095 $to_delete = get_option('wp_scheduled_delete'); 1096 if ( !is_array($to_delete) ) 1097 $to_delete = array(); 1098 1098 1099 $to_de stroy['comments'][$comment_id] = time();1099 $to_delete['comments'][$comment_id] = time(); 1100 1100 1101 update_option(' to_destroy', $to_destroy);1101 update_option('wp_scheduled_delete', $to_delete); 1102 1102 } 1103 1103 … … 1110 1110 * @return void 1111 1111 */ 1112 function wp_unschedule_comment_de struction($comment_id) {1113 $to_de stroy = get_option('to_destroy');1114 if ( !is_array($to_destroy))1112 function wp_unschedule_comment_delete($comment_id) { 1113 $to_delete = get_option('wp_scheduled_delete'); 1114 if ( !is_array($to_delete) ) 1115 1115 return; 1116 1116 1117 unset($to_de stroy['comments'][$comment_id]);1117 unset($to_delete['comments'][$comment_id]); 1118 1118 1119 update_option(' to_destroy', $to_destroy);1119 update_option('wp_scheduled_delete', $to_delete); 1120 1120 } 1121 1121
Note: See TracChangeset
for help on using the changeset viewer.