WordPress.org

Make WordPress Core

Ticket #11222: comment.php.diff

File comment.php.diff, 899 bytes (added by sirzooro, 9 years ago)

workaround

  • comment.php

    old new  
    10761076 * @return array Parsed comment information.
    10771077 */
    10781078function wp_filter_comment($commentdata) {
    1079         $commentdata['user_id']              = apply_filters('pre_user_id', $commentdata['user_ID']);
     1079        if ( isset( $commentdata['user_ID'] ) ) {
     1080                $commentdata['user_id']      = apply_filters('pre_user_id', $commentdata['user_ID']);
     1081        } else {
     1082                $commentdata['user_id']      = apply_filters('pre_user_id', $commentdata['user_id']);
     1083        }
    10801084        $commentdata['comment_agent']        = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']);
    10811085        $commentdata['comment_author']       = apply_filters('pre_comment_author_name', $commentdata['comment_author']);
    10821086        $commentdata['comment_content']      = apply_filters('pre_comment_content', $commentdata['comment_content']);