Make WordPress Core


Ignore:
Timestamp:
10/11/2022 04:30:40 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Comments: Consistently normalize user_ID to user_id in wp_new_comment().

For backward compatibility, the user_id parameter of wp_new_comment() can be spelled as user_ID, and plugins utilizing the preprocess_comment filter or the comment_post action should be able to receive both variations.

Follow-up to [12267], [12300], [28915], [36038], [53729].

Props peterwilsoncc, SergeyBiryukov.
Fixes #56244.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment-submission.php

    r54368 r54489  
    846846     */
    847847    public function test_comment_submission_sends_all_expected_parameters_to_preprocess_comment_filter() {
    848 
    849848        $user = get_userdata( self::$author_id );
    850849        wp_set_current_user( $user->ID );
Note: See TracChangeset for help on using the changeset viewer.