mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Reverse the order comments are displayed in
This commit is contained in:
parent
27c8037506
commit
adc6b93f6d
3 changed files with 9 additions and 3 deletions
|
@ -2394,7 +2394,10 @@ function render_comments($comments_data, $depth = 0)
|
|||
|
||||
$result = "<div class='comments-list" . ($depth > 0 ? " nested" : "") . "' data-depth='$depth'>";
|
||||
|
||||
foreach($comments_data as $comment) {
|
||||
//$comments_data = array_reverse($comments_data);
|
||||
for($i = count($comments_data) - 1; $i >= 0; $i--) {
|
||||
$comment = $comments_data[$i];
|
||||
|
||||
$result .= "\t<div class='comment' id='comment-$comment->id' data-comment-id='$comment->id'>\n";
|
||||
$result .= "\t<p class='comment-header'><span class='name'>$comment->username</span> said:</p>";
|
||||
$result .= "\t<div class='comment-body'>\n";
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds threaded comments to the bottom of every page.",
|
||||
"id": "feature-comments",
|
||||
"lastupdate": 1495479470,
|
||||
"lastupdate": 1495481379,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -307,7 +307,10 @@ function render_comments($comments_data, $depth = 0)
|
|||
|
||||
$result = "<div class='comments-list" . ($depth > 0 ? " nested" : "") . "' data-depth='$depth'>";
|
||||
|
||||
foreach($comments_data as $comment) {
|
||||
//$comments_data = array_reverse($comments_data);
|
||||
for($i = count($comments_data) - 1; $i >= 0; $i--) {
|
||||
$comment = $comments_data[$i];
|
||||
|
||||
$result .= "\t<div class='comment' id='comment-$comment->id' data-comment-id='$comment->id'>\n";
|
||||
$result .= "\t<p class='comment-header'><span class='name'>$comment->username</span> said:</p>";
|
||||
$result .= "\t<div class='comment-body'>\n";
|
||||
|
|
Loading…
Reference in a new issue