Make WordPress Core

Ticket #46747: 46747.diff

File 46747.diff, 737 bytes (added by justinahinon, 6 years ago)

Change the hard coded widget ID of recent comments widget

  • src/wp-includes/widgets/class-wp-widget-recent-comments.php

     
    112112                        $output .= $args['before_title'] . $title . $args['after_title'];
    113113                }
    114114
    115                 $output .= '<ul id="recentcomments">';
     115                $output .= '<ul id="' . $args['widget_id'] . '" class="recentcomments">';
    116116                if ( is_array( $comments ) && $comments ) {
    117117                        // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.)
    118118                        $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );