Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( !function_exists('mars_theme_comment_style') ){
- function mars_theme_comment_style( $comment, $args, $depth ){
- error_reporting(0);
- $GLOBALS['comment'] = $comment;
- extract($args, EXTR_SKIP);
- ?>
- <li <?php comment_class();?> id="comment-<?php print $comment->comment_ID;?>">
- <div class="the-comment">
- <?php if ( '0' == $comment->comment_approved ) : ?>
- <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'mars' ); ?></p>
- <?php endif; ?>
- <div class="avatar"><?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?></div>
- <div class="comment-content">
- <?php if( !$comment->user_id || $comment->user_id == 0 ):?>
- <span class="author">
- <?php if( get_comment_author_url() ):?>
- <a href="<?php echo esc_url( get_comment_author_url() );?>"><?php print $comment->comment_author;?></a> <small><?php printf( __('%s ago','mars') , human_time_diff( get_comment_time('U'), current_time('timestamp') ) );?></small>
- <?php else:?>
- <?php print $comment->comment_author;?> <small><?php printf( __('%s ago','mars') , human_time_diff( get_comment_time('U'), current_time('timestamp') ) );?></small>
- <?php endif;?>
- </span>
- <?php else:?>
- <span class="author"><a href="<?php print get_author_posts_url( $comment->user_id );?>"><?php print $comment->comment_author;?></a> <small><?php printf( __('%s ago','mars') , human_time_diff( get_comment_time('U'), current_time('timestamp') ) );?></small></span>
- <?php endif;?>
- <?php comment_text() ?>
- <?php
- print get_comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => '<i class="fa fa-reply"></i> ' . esc_html__( 'Reply', 'mars' ) )), $comment->comment_ID);
- ?>
- <?php if( current_user_can('add_users') ):?>
- <a href="<?php print get_edit_comment_link( $comment->comment_ID );?>" class="edit"><i class="fa fa-edit"></i> <?php _e('Edit','mars');?></a>
- <?php endif;?>
- </div>
- </div>
- <?php
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement