', ], [ 'class="comment-body well"', 'comment-reply-link btn btn-default btn-xs', 'class="comment-metadata small text-right"', 'class="comment-edit-link btn btn-danger btn-xs"', 'class="reply text-right"', sprintf( '
\n\s+<\/a>/s", '', $output ); echo $output; // WPCS XSS OK. } /** * Same as Walker_Comment::ping() plus some Bootstrap classes and style locked on `div`. * * @param WP_Comment $comment The comment object. * @param int $depth Depth of the current comment. * @param array $args An array of arguments. */ protected function ping( $comment, $depth, $args ) { ob_start(); parent::ping( $comment, $depth, array_merge( $args, [ 'style' => 'div', ] ) ); echo str_replace( // WPCS XSS OK. [ 'class="comment-body"', ], [ 'class="comment-body well well-sm"', ], ob_get_clean() ); } }