简体   繁体   English

更改buddypress插件中的注释结构

[英]change comment structure in buddypress plugin

I try to change default comment structure of buddy press with my own plugin and add some custom edit . 我尝试使用我自己的插件更改伙伴新闻的默认评论结构,并添加一些自定义编辑。 for that i found we should use wp_list_comments and in callback function . 为此,我发现我们应该在回调函数中使用wp_list_comments i use below example function: 我使用以下示例函数:

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' ) );

but cant show any change on comment structure what's wrong in my code 但是无法显示注释结构的任何更改我的代码有什么问题

wp_list_comments放在模板文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM