- wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
-
- $_POST['comment_author'] = $_POST['newcomment_author'];
- $_POST['comment_author_email'] = $_POST['newcomment_author_email'];
- $_POST['comment_author_url'] = $_POST['newcomment_author_url'];
- $_POST['comment_approved'] = $_POST['comment_status'];
- $_POST['comment_content'] = $_POST['content'];
- $_POST['comment_ID'] = (int) $_POST['comment_ID'];
+ wp_die ( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
+
+ if ( isset( $_POST['newcomment_author'] ) )
+ $_POST['comment_author'] = $_POST['newcomment_author'];
+ if ( isset( $_POST['newcomment_author_email'] ) )
+ $_POST['comment_author_email'] = $_POST['newcomment_author_email'];
+ if ( isset( $_POST['newcomment_author_url'] ) )
+ $_POST['comment_author_url'] = $_POST['newcomment_author_url'];
+ if ( isset( $_POST['comment_status'] ) )
+ $_POST['comment_approved'] = $_POST['comment_status'];
+ if ( isset( $_POST['content'] ) )
+ $_POST['comment_content'] = $_POST['content'];
+ if ( isset( $_POST['comment_ID'] ) )
+ $_POST['comment_ID'] = (int) $_POST['comment_ID'];