function ff_comments_list_callback($comment, $args, $depth) { global $ff_global_comment_depth; $ff_global_comment_depth++; $query = ffTemporaryQueryHolder::getQuery('comments-list'); if ($query->queryExists('comments-list')) { $query = $query->get('comments-list'); } $postMetaGetter = ffContainer()->getThemeFrameworkFactory()->getPostMetaGetter(); $commentDateFormat = $query->get('one-comment date-format'); // <LI> tag is ended in the another callback ?> <li id="<?php echo esc_attr($postMetaGetter->getPostCommentsId()); ?> " class="comment even thread-even depth-1"> <div class="comment-body"> <div class="comment-meta"> <div class="comment-author vcard"> <?php echo $postMetaGetter->getCommentAuthorImage(80); ?> <a class="fn" href="<?php echo esc_url($postMetaGetter->getCommentAuthorUrl()); ?> "><?php echo ff_wp_kses($postMetaGetter->getCommentAuthorName()); ?> </a> </div><!-- comment-author vcard --> <?php if ($query->get('one-comment show-date')) { ?> <div class="comment-metadata"> <a href="#"><?php echo ff_wp_kses($postMetaGetter->getCommentDate($commentDateFormat)); ?> </a> </div><!-- comment-metadata --> <?php } ?> </div><!-- comment-meta --> <div class="comment-content"> <?php if ('0' == $comment->comment_approved) { echo '<em class="comment-awaiting-moderation">'; echo ff_wp_kses($query->get('one-comment trans-moderation')); echo '</em>'; echo '</br>'; echo '</br>'; } echo ff_wp_kses(get_comment_text()); ?> </div><!-- comment-content --> <div class="reply"> <?php echo $postMetaGetter->getCommentReplyLink($query->get('one-comment trans-reply'), $args, $depth); ?> </div><!-- replay --> </div><!-- comment-body --> <?php }
<?php /////////////////////////////////////////////////////////////////////////////////////////////////// // Add wrappers to comment input fields /////////////////////////////////////////////////////////////////////////////////////////////////// $query = ffTemporaryQueryHolder::getQuery('comments-form'); if ($query->queryExists('comments-form')) { $query = $query->get('comments-form'); } $commentFormPrinter = ffContainer()->getThemeFrameworkFactory()->getCommentsFormPrinter(); if ($commentFormPrinter->commentsOpen()) { $commentFormPrinter->addFieldAuthorLine('<p>'); $commentFormPrinter->addFieldAuthorLine('<label for="name">' . ff_wp_kses($query->get('name')) . ' <span class="required">*</span></label>'); $commentFormPrinter->addFieldAuthorLine('<input class="ff-field-author" id="name" name="author" type="text" placeholder="' . esc_attr($query->get('name')) . '">'); $commentFormPrinter->addFieldAuthorLine('</p>'); $commentFormPrinter->addFieldEmailLine('<p>'); $commentFormPrinter->addFieldEmailLine('<label for="email">' . ff_wp_kses($query->get('email')) . ' <span class="required">*</span></label>'); $commentFormPrinter->addFieldEmailLine('<input class="ff-field-email" id="email" name="email" type="text" placeholder="' . esc_attr($query->get('email')) . '">'); $commentFormPrinter->addFieldEmailLine('</p>'); $commentFormPrinter->addFieldWebsiteLine('<p>'); $commentFormPrinter->addFieldWebsiteLine('<label for="url">' . ff_wp_kses($query->get('website')) . ' </label>'); $commentFormPrinter->addFieldWebsiteLine('<input class="ff-field-url" id="url" name="url" type="text" placeholder="' . esc_attr($query->get('website')) . '">'); $commentFormPrinter->addFieldWebsiteLine('</p>'); $commentFormPrinter->addFieldCommentLine('<p>'); $commentFormPrinter->addFieldCommentLine('<label for="comment">' . ff_wp_kses($query->get('comment-form')) . ' </label>'); $commentFormPrinter->addFieldCommentLine('<textarea class="ff-field-comment" id="comment" name="comment" rows="8" cols="25" placeholder="' . esc_attr($query->get('comment-form')) . '"></textarea>'); $commentFormPrinter->addFieldCommentLine('</p>'); $commentFormPrinter->setClassSubmitButton('btn btn-default'); $commentFormPrinter->addFieldLoggedInLine('<p class="col-1 logged-in-as">'); $commentFormPrinter->addFieldLoggedInLine($query->get('logged-in')); $commentFormPrinter->addFieldLoggedInLine('</p>');