wp_list_comments function not pulling in custom walker

[ad_1]

So trying to use a custom walker for the comments section of my theme and this is the code?

<?php
wp_list_comments(array(
‘walker’ => new MarcoL_Comment_Walker(),
‘style’ => ‘ol’,
‘short_ping’ => true,
‘avatar_size’ => 70,
));
?>

class MarcoL_Comment_Walker extends Walker_Comment
{

protected function html5_comment($comment, $depth, $args)
{
?>
<li id=”comment-<?php comment_ID(); ?>” <?php comment_class($this->has_children ? ‘parent’ : ”); ?>>
<article id=”div-comment-<?php comment_ID(); ?>” class=”comment-body”>
<?php
if (0 != $args[‘avatar_size’] && get_option(‘show_avatars’))
printf(‘<div class=”comment-avatar”>%s</div>’, get_avatar($comment, $args[‘avatar_size’]));
?>
<div class=”comment-info d-flex”>

<?php printf(‘<div class=”comment-author vcard”>%s <span class=”says screen-reader-text”>%s</span></div>’, sprintf(‘<b class=”fn”>%s</b>’, get_comment_author_link()), esc_html__(‘says:’, ‘unblock’)); ?>
<div class=”comment-metadata”>
<time class=”comment-meta” datetime=”<?php comment_time(‘c’); ?>”><?php printf(_x(‘%1$s at %2$s’, ‘1: date, 2: time’, ‘unblock’), get_comment_date(), get_comment_time()); ?></time>
<?php edit_comment_link(esc_html__(‘Edit’, ‘unblock’), ‘<span class=”edit-link comment-meta”>’, ‘</span>’); ?>
</div><!– .comment-metadata –>
<?php
comment_reply_link(array_merge($args, array(
‘add_below’ => ‘div-comment’,
‘depth’ => $depth,
‘max_depth’ => $args[‘max_depth’],
‘before’ => ‘<div class=”comment-reply”>’,
‘after’ => ‘</div>’
)));
?>

</div>

<div class=”comment-content”>
<?php comment_text();
if (‘0’ == $comment->comment_approved) : ?>
<p class=”comment-awaiting-moderation”><?php esc_html_e(‘Your comment is awaiting moderation.’, ‘unblock’); ?></p>
<?php endif; ?>
</div><!– .comment-content –>

</article><!– .comment-body –>
<?php
}
}

Only thing is that the function does not seem to be pulling from the custom walker at all but rather retains it’s default structure, anything I am missing?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer