$class){ if(strstr($class,'comment-author-')) : $classes[$key] = 'comment-author'; endif; }// endforeach if(get_comment_author() !== get_the_author()){ unset($classes['byuser']); $classes[] = 'guest'; }// endif return $classes; }// Method endif; add_filter('wp_list_comments_args','__hook_wp_list_comments_args'); /** @since 1.0.1 Filters the arguments used in retrieving the comment list. @link https://developer.wordpress.org/reference/hooks/wp_list_comments_args/ */ if(function_exists('__hook_wp_list_comments_args') === FALSE) : function __hook_wp_list_comments_args($r) { return apply_filters('uikit_starter_wp_list_comments_args',wp_parse_args(array( 'style' => 'ol', 'short_ping' => TRUE, //'per_page' => 3, 'avatar_size' => 75, 'reverse_top_level' => TRUE, 'callback' => '__extra_get_comment_callback', 'echo' => TRUE, ),$r)); }// Method endif; /** @since 1.0.1 Callback function for wp_list_comments(). @link https://developer.wordpress.org/reference/functions/wp_list_comments/ */ if(function_exists('__extra_get_comment_callback') === FALSE) : function __extra_get_comment_callback($comment,$args,$depth) { $GLOBALS['comment'] = $comment; extract($args,EXTR_SKIP); /** @description Render the opening
  • tag. */ $comment_class = empty($args['has_children']) ? '' : 'parent'; printf( '
  • ', (int)get_comment_ID(), comment_class($comment_class,$comment,NULL,FALSE) ); ?>
    %s','uikit-starter'),get_comment_author_link()); if($comment->comment_approved == '0'){ ?>
    $depth, 'max_depth' => $args['max_depth'] ))); ?>

    '; // $defaults['id_form'] = 'comment-form'; // $defaults['id_submit'] = 'comment-submit'; $defaults['class_submit'] = 'uk-button uk-width-1-1 uk-button-primary submit'; // $defaults['title_reply_before'] = '
    '; // $defaults['title_reply_after'] = '
    '; // $defaults['submit_field'] = '

    %1$s %2$s

    '; return $defaults; }// Method endif; add_filter('comment_reply_link','__hook_comment_reply_link'); /** @since 1.0.1 Filters the comment reply link. @link https://developer.wordpress.org/reference/hooks/comment_reply_link/ */ if(function_exists('__hook_comment_reply_link') === FALSE) : function __hook_comment_reply_link($html) { $html = preg_replace('~"~','

    ',$html); return $html; }// Method endif; add_filter('cancel_comment_reply_link','__hook_cancel_comment_reply_link',10,3); /** @since 1.0.1 Filters the cancel comment reply link HTML. @param (string) $formatted_link The HTML-formatted cancel comment reply link. @param (string) $link Cancel comment reply link URL. @param (string) $text Cancel comment reply link text. @return (string) */ if(function_exists('__hook_cancel_comment_reply_link') === FALSE) : function __hook_cancel_comment_reply_link($formatted_link,$link,$text) { $style = isset($_GET['replytocom']) ? '' : 'display: none;'; // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification -- Used to determine inline style. // Automatically escaped. $formatted_link = ''; $formatted_link .= $text; $formatted_link .= ''; return $formatted_link; }// Method endif;