Hestia and Super Socializer
-
Hi guys,
Is there a way to fix the problem of showing user’s avatar that logged in via Super Socializer?
if ( ! function_exists( ‘hestia_comments_template’ ) ) { /** * Custom list of comments for the theme. * * @since Hestia 1.0 */ function hestia_comments_template() { if ( is_user_logged_in() ) { $current_user = get_avatar( wp_get_current_user(), 64 ); } else { $current_user = ‘‘; } $args = array( ‘class_form’ => ‘form media-body’, ‘class_submit’ => ‘btn btn-primary pull-right’, ‘title_reply_before’ => ‘<h3 class=”hestia-title text-center”>’, ‘title_reply_after’ => ‘</h3> <span class=”pull-left author”> <div class=”avatar”>’ . $current_user . ‘</div> </span>’, ‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( wp_kses( /* translators: %s is Link to login */ __( ‘You must be logged in to post a comment.’, ‘hestia’ ), array( ‘a’ => array( ‘href’ => array(), ), ) ), esc_url( wp_login_url( apply_filters( ‘the_permalink’, esc_url( get_permalink() ) ) ) ) ) . ‘</p>’, ‘comment_field’ => ‘<div class=”form-group label-floating is-empty”> <label class=”control-label”>’ . esc_html__( ‘What\’s on your mind?’, ‘hestia’ ) . ‘</label><textarea id=”comment” name=”comment” class=”form-control” rows=”6″ aria-required=”true”></textarea><span class=”hestia-input”></span> </div>’, ); return $args; } }
But it’s picking it up after comment was placed next to the comment, but not in the form when you logged in.
if ( ! function_exists( ‘hestia_comments_list’ ) ) { /** * Custom list of comments for the theme. * * @since Hestia 1.0 * * @param string $comment comment. * @param array $args arguments. * @param integer $depth depth. */ function hestia_comments_list( $comment, $args, $depth ) { ?> <div <?php comment_class( empty( $args[‘has_children’] ) ? ‘media’ : ‘parent media’ ); ?> id=”comment-<?php comment_ID(); ?>”> <?php if ( $args[‘type’] != ‘pings’ ) : ?> “> <div class=”comment-author avatar vcard”> <?php if ( $args[‘avatar_size’] != 0 ) { echo get_avatar( $comment, 64 ); } ?> </div> <?php endif; ?> <div class=”media-body”> <h4 class=”media-heading”> <?php echo get_comment_author_link(); ?> <small> <?php printf( /* translators: %1$s is Date, %2$s is Time */ esc_html__( ‘· %1$s at %2$s’, ‘hestia’ ), get_comment_date(), get_comment_time() ); edit_comment_link( esc_html__( ‘(Edit)’, ‘hestia’ ), ‘ ‘, ” ); ?> </small> </h4> <?php comment_text(); ?> <div class=”media-footer”> <?php echo get_comment_reply_link( array( ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’], ‘reply_text’ => sprintf( ‘%s’, esc_html__( ‘Reply’, ‘hestia’ ) ), ), $comment->comment_ID, $comment->comment_post_ID ); ?> </div> </div> </div> <?php } }
Screenshots:
https://www.picshare.ru/view/10013227/
https://www.picshare.ru/view/10013234/
- The topic ‘Hestia and Super Socializer’ is closed to new replies.