From c4b8b6b42a40094ace7755ead217b4c8aeb3000f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 25 Jul 2012 16:27:48 +0000 Subject: [PATCH] Set the global comment var before invoking callbacks in wp_list_comments(). Props sirzooro. fixes #21184 git-svn-id: https://develop.svn.wordpress.org/trunk@21324 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 5bacda18d3..3d9e1d5603 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1331,13 +1331,13 @@ class Walker_Comment extends Walker { function start_el( &$output, $comment, $depth, $args, $id = 0 ) { $depth++; $GLOBALS['comment_depth'] = $depth; + $GLOBALS['comment'] = $comment; if ( !empty($args['callback']) ) { call_user_func($args['callback'], $comment, $args, $depth); return; } - $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); if ( 'div' == $args['style'] ) {