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:
parent
dd15327790
commit
c4b8b6b42a
@ -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'] ) {
|
||||
|
Loading…
Reference in New Issue
Block a user