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
This commit is contained in:
Ryan Boren 2012-07-25 16:27:48 +00:00
parent dd15327790
commit c4b8b6b42a
1 changed files with 1 additions and 1 deletions

View File

@ -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'] ) {