Set the global comment var before invoking callbacks in wp_list_comments(). Props sirzooro. fixes #21184
git-svn-id: http://core.svn.wordpress.org/trunk@21324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
73addbbd24
commit
ef95736bce
|
@ -1331,13 +1331,13 @@ class Walker_Comment extends Walker {
|
||||||
function start_el( &$output, $comment, $depth, $args, $id = 0 ) {
|
function start_el( &$output, $comment, $depth, $args, $id = 0 ) {
|
||||||
$depth++;
|
$depth++;
|
||||||
$GLOBALS['comment_depth'] = $depth;
|
$GLOBALS['comment_depth'] = $depth;
|
||||||
|
$GLOBALS['comment'] = $comment;
|
||||||
|
|
||||||
if ( !empty($args['callback']) ) {
|
if ( !empty($args['callback']) ) {
|
||||||
call_user_func($args['callback'], $comment, $args, $depth);
|
call_user_func($args['callback'], $comment, $args, $depth);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['comment'] = $comment;
|
|
||||||
extract($args, EXTR_SKIP);
|
extract($args, EXTR_SKIP);
|
||||||
|
|
||||||
if ( 'div' == $args['style'] ) {
|
if ( 'div' == $args['style'] ) {
|
||||||
|
|
Loading…
Reference in New Issue