有读者留言反应 comments 不能正确显示。经检查,前一段时间 WordPress 升级之后导致 comment_type 有所改变,在旧的 Theme 里加入一个新的 case 貌似可以解决。
function choco_print_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
case 'comment' :