diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 482ee81586..0478caf79c 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -964,15 +964,10 @@ class WP_Widget_Recent_Comments extends WP_Widget { } /** - * @global array $comments - * @global object $comment - * * @param array $args * @param array $instance */ public function widget( $args, $instance ) { - global $comments, $comment; - $cache = array(); if ( ! $this->is_preview() ) { $cache = wp_cache_get('widget_recent_comments', 'widget'); @@ -1026,11 +1021,11 @@ class WP_Widget_Recent_Comments extends WP_Widget { $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); - foreach ( (array) $comments as $comment) { + foreach ( (array) $comments as $comment ) { $output .= '
  • '; /* translators: comments widget: 1: comment author, 2: post link */ $output .= sprintf( _x( '%1$s on %2$s', 'widgets' ), - '' . get_comment_author_link() . '', + '' . get_comment_author_link( $comment->comment_ID ) . '', '' . get_the_title( $comment->comment_post_ID ) . '' ); $output .= '
  • '; diff --git a/wp-includes/version.php b/wp-includes/version.php index 69ba595be7..427e88a088 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33823'; +$wp_version = '4.4-alpha-33824'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.