Ticket #2528: 2528.1.diff
File 2528.1.diff, 1.6 KB (added by , 10 years ago) |
---|
-
src/includes/topics/functions.php
1270 1270 // Sticky 1271 1271 bbp_unstick_topic( $source_topic->ID ); 1272 1272 1273 // Delete source topic's last and count meta data 1274 delete_post_meta( $source_topic->ID, '_bbp_last_reply_id' ); 1275 delete_post_meta( $source_topic->ID, '_bbp_last_active_id' ); 1276 delete_post_meta( $source_topic->ID, '_bbp_last_active_time' ); 1277 delete_post_meta( $source_topic->ID, '_bbp_voice_count' ); 1278 delete_post_meta( $source_topic->ID, '_bbp_reply_count' ); 1279 delete_post_meta( $source_topic->ID, '_bbp_reply_count_hidden' ); 1280 1273 1281 // Get the replies of the source topic 1274 1282 $replies = (array) get_posts( array( 1275 1283 'post_parent' => $source_topic->ID, … … 1291 1299 // Update the reply 1292 1300 wp_update_post( array( 1293 1301 'ID' => $reply->ID, 1294 'post_title' => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),1295 'post_name' => false,1302 'post_title' => '', 1303 'post_name' => $reply->ID, 1296 1304 'post_type' => bbp_get_reply_post_type(), 1297 1305 'post_parent' => $destination_topic->ID, 1298 'menu_order' => bbp_get_reply_position_raw( $reply->ID, $destination_topic->ID ),1299 1306 'guid' => '' 1300 1307 ) ); 1301 1308 … … 1309 1316 bbp_update_reply_to( $reply->ID, $source_topic->ID ); 1310 1317 } 1311 1318 1319 // Update the reply position 1320 bbp_update_reply_position( $reply->ID ); 1321 1312 1322 // Do additional actions per merged reply 1313 1323 do_action( 'bbp_merged_topic_reply', $reply->ID, $destination_topic->ID ); 1314 1324 }