Ticket #22000: 22000.patch
| File 22000.patch, 1.2 KB (added by trepmal, 8 months ago) |
|---|
-
wp-admin/includes/ajax-actions.php
749 749 $comment_auto_approved = false; 750 750 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); 751 751 752 $comment_id = wp_new_comment( $commentdata );753 $comment = get_comment($comment_id);754 if ( ! $comment ) wp_die( 1 );755 756 $position = ( isset($_POST['position']) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1';757 758 752 // automatically approve parent comment 759 753 if ( !empty($_POST['approve_parent']) ) { 760 754 $parent = get_comment( $comment_parent ); … … 765 759 } 766 760 } 767 761 762 $comment_id = wp_new_comment( $commentdata ); 763 $comment = get_comment($comment_id); 764 if ( ! $comment ) wp_die( 1 ); 765 766 $position = ( isset($_POST['position']) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1'; 767 768 768 ob_start(); 769 769 if ( 'dashboard' == $_REQUEST['mode'] ) { 770 770 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );