2
0
Fork 0
mirror of https://github.com/discourse/wp-discourse.git synced 2025-10-03 08:59:21 +08:00

Use parameter to add odd/even class

This commit is contained in:
scossar 2018-05-29 16:40:59 -07:00
parent 3ed42c5c2b
commit 465a8c0455

View file

@ -154,10 +154,10 @@ class HTMLTemplates {
* @static * @static
* @return mixed|void * @return mixed|void
*/ */
public static function comment_html() { public static function comment_html( $even = true ) {
ob_start(); ob_start();
?> ?>
<li class="comment even thread-even depth-1"> <li class="comment <?php echo $even ? 'even' : 'odd'; ?> depth-1">
<article class="comment-body"> <article class="comment-body">
<footer class="comment-meta"> <footer class="comment-meta">
<div class="comment-author vcard"> <div class="comment-author vcard">