改变buddypress插件的注释结构


change comment structure in buddypress plugin

我尝试用自己的插件更改好友出版社的默认评论结构,并添加一些自定义编辑。为此,我发现我们应该使用wp_list_comments和回调函数。我使用下面的示例函数:

function my_blog_comments( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment;
    if ( 'pingback' == $comment->comment_type )
        return false;
    if ( 1 == $depth )
        $avatar_size = 50;
    else
        $avatar_size = 25;
     ...
 }
wp_list_comments( array( 'callback' => 'my_blog_comments', 'type' => 'comment' ) );

但是不能显示任何注释结构的变化我的代码有什么问题

wp_list_comments放到模板文件中