Index: wp-admin/edit-form-comment.php
===================================================================
--- wp-admin/edit-form-comment.php (revision 20271)
+++ wp-admin/edit-form-comment.php (working copy)
@@ -105,6 +105,14 @@
} ?>
|
+
+
+
+ |
+
+
+ |
+
Index: wp-admin/includes/comment.php
===================================================================
--- wp-admin/includes/comment.php (revision 20271)
+++ wp-admin/includes/comment.php (working copy)
@@ -42,6 +42,7 @@
$_POST['comment_approved'] = $_POST['comment_status'];
$_POST['comment_content'] = $_POST['content'];
$_POST['comment_ID'] = (int) $_POST['comment_ID'];
+ $_POST['comment_parent'] = (int) $_POST['newcomment_parent'];
foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
@@ -89,6 +90,7 @@
$comment->comment_author_email = format_to_edit( $comment->comment_author_email );
$comment->comment_author_url = format_to_edit( $comment->comment_author_url );
$comment->comment_author_url = esc_url($comment->comment_author_url);
+ $comment->comment_parent =(int) $comment->comment_parent;
return $comment;
}
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php (revision 20271)
+++ wp-includes/comment.php (working copy)
@@ -1335,6 +1335,7 @@
* @uses wp_filter_comment() Used to filter comment before adding comment.
* @uses wp_allow_comment() checks to see if comment is approved.
* @uses wp_insert_comment() Does the actual comment insertion to the database.
+ * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
*
* @param array $commentdata Contains information on the comment.
* @return int The ID of the comment after adding.
@@ -1365,6 +1366,7 @@
$comment_ID = wp_insert_comment($commentdata);
do_action('comment_post', $comment_ID, $commentdata['comment_approved']);
+ wp_transition_comment_status($commentdata['comment_approved'], 'new', (object)$commentdata);
if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching
if ( '0' == $commentdata['comment_approved'] )
@@ -1483,7 +1485,7 @@
else if ( 'approve' == $comment_approved )
$comment_approved = 1;
- $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt');
+ $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent');
$rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
clean_comment_cache($comment_ID);