我修改了我的代码。现在用户可以看到他们的评论,管理员可以看到所有用户的评论。但是用户仍然看不到管理员的评论。他们只看到他们的..我怎样才能做到这一点..
<?php
/**
* Used as a callback by wp_list_comments() for displaying the comments.
*/
function _s_comment( $comment, $args, $depth )
{
$GLOBALS['comment'] = $comment;
$current_user_id = get_current_user_id();
$current_user = wp_get_current_user();
if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
<div class="comment-body">
</div>
<?php elseif ( $current_user_id == $comment->user_id || ($current_user->roles[0] == 'administrator' ) : ?>
<li id="comment-<?php comment_ID(); ?>"