function mydesign($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $users = get_users(); ?> <li id="comment-<?php echo comment_id(); ?> " class="compost"> <?php // ユーザーIDを引っ張る foreach ($users as $user) { //echo $user->display_name.'<br />'; //echo get_comment_author(); if ($user->display_name == get_comment_author()) { break; } } ?> <span class="trick_rounded-img icon_image" style="background: url(<?php echo ps_get_user_profile_image_src($user->ID, 'standard'); ?> ) no-repeat center center; width: 50px; height: 50px;></span> <span class="trick_thumbnail_Image"> <?php ps_user_profile_image($user->ID, 'thumbnail'); ?> </span> <?php ?> <div class="commentarea"> <?php //改行表示 $commentstr = '<p>' . get_comment_text() . '</p>'; $commentstr = preg_replace("/\n/", "<br />", $commentstr); echo $commentstr; //comment_text(); ?> </div> <p class="cominfo"> <?php comment_date(); ?> <?php comment_time(); ?> | <?php comment_author_link(); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'reply_text' => '返信', 'before' => ' | ', 'after' => ''))); ?> </p> </li> <?php }
<!-- <?php if (comments_open()) { ?> <section class="comments"> <?php if (has_comments()) { ?> <ul class="commentlist"> <?php $i = 0; while (comments()) { $i++; ?> <li class="comment" id="comment-<?php echo comment_id(); ?> "> <div class="wrap"> <h2><?php echo comment_name(); ?> </h2> <time><?php echo relative_time(comment_time()); ?> </time> <div class="content"> <?php echo comment_text();
/** * Prints out comments */ function cobalt_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) { case 'pingback': case 'trackback': ?> <li <?php comment_class(); ?> > <p><?php _e('Pingback:', 'cobalt'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'cobalt'), '<span class="comment-edit-link">', '</span>'); ?> </p> </li> <?php break; default: global $post; ?> <li <?php comment_class(); ?> id="comment-<?php comment_id(); ?> "> <p class="comment-reply"> <?php edit_comment_link(__('Edit', 'cobalt'), '', ' '); ?> <?php comment_reply_link(array_merge($args, array('reply_text' => __('Responder', 'cobalt'), 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </p> <header class="comment-meta comment-author vcard"> <?php echo get_avatar($comment, 40); ?> <?php printf('<cite class="fn comment-author">%1$s%2$s</cite>', get_comment_author_link(), $comment->user_id === $post->post_author ? '<span class="bypostauthor"> ' . __('Post author', 'cobalt') . '</span>' : ''); ?> <?php printf('<a href="%1$s"><time datetime="%2$s" class="comment-time">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'), sprintf(__('%1$s at %2$s', 'cobalt'), get_comment_date(), get_comment_time())); ?> </header> <?php if ('0' == $comment->comment_approved) { ?> <p class="comment-awaiting-moderation">Your comment is awaiting moderation</p> <?php } ?> <section class="comment-content comment"> <?php comment_text(); ?> </section> </li> <?php break; } }
<?php global $comment, $args, $depth; // note the closing li is removed from the template // as it is automatically inserted by wp // http://codex.wordpress.org/Function_Reference/wp_list_comments ?> <li id="<?php comment_id(); ?> " <?php comment_class(); ?> > <cite> On <?php comment_date('M. j, Y'); ?> at <?php comment_time(); ?> , <?php comment_author_link(); ?> said: <?php edit_comment_link('Edit'); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>