mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Comments: When a comment is submitted, ensure the user_ID element in the array that's passed to the preprocess_comment filter gets populated.
Fixes #34997 git-svn-id: https://develop.svn.wordpress.org/trunk@36038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2747,7 +2747,7 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||
$comment_author = $user->display_name;
|
||||
$comment_author_email = $user->user_email;
|
||||
$comment_author_url = $user->user_url;
|
||||
$user_id = $user->ID;
|
||||
$user_ID = $user->ID;
|
||||
if ( current_user_can( 'unfiltered_html' ) ) {
|
||||
if ( ! isset( $comment_data['_wp_unfiltered_html_comment'] )
|
||||
|| ! wp_verify_nonce( $comment_data['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID )
|
||||
@@ -2784,7 +2784,7 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||
'comment_content',
|
||||
'comment_type',
|
||||
'comment_parent',
|
||||
'user_id'
|
||||
'user_ID'
|
||||
);
|
||||
|
||||
$comment_id = wp_new_comment( wp_slash( $commentdata ) );
|
||||
|
||||
Reference in New Issue
Block a user