From 308cc20859960c2255c55e983bfc104279089a27 Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 2 Feb 2024 09:36:33 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20the=20comment=20list=20out?= =?UTF-8?q?put=20(#3184)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/View/Composers/Comments.php | 7 ++++--- resources/views/partials/comments.blade.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/View/Composers/Comments.php b/app/View/Composers/Comments.php index 9a41764455..748d3a3f8d 100644 --- a/app/View/Composers/Comments.php +++ b/app/View/Composers/Comments.php @@ -24,7 +24,7 @@ public function with() { return [ 'title' => $this->title(), - 'comments' => $this->comments(), + 'responses' => $this->responses(), 'previous' => $this->previous(), 'next' => $this->next(), 'paginated' => $this->paginated(), @@ -43,7 +43,7 @@ public function title() /* translators: %1$s is replaced with the number of comments and %2$s with the post title */ _nx('%1$s response to “%2$s”', '%1$s responses to “%2$s”', get_comments_number(), 'comments title', 'sage'), get_comments_number() === 1 ? _x('One', 'comments title', 'sage') : number_format_i18n(get_comments_number()), - ''.get_the_title().'' + get_the_title() ); } @@ -52,7 +52,7 @@ public function title() * * @return string */ - public function comments() + public function responses() { if (! have_comments()) { return; @@ -61,6 +61,7 @@ public function comments() return wp_list_comments([ 'style' => 'ol', 'short_ping' => true, + 'echo' => false, ]); } diff --git a/resources/views/partials/comments.blade.php b/resources/views/partials/comments.blade.php index 4a30f54a2a..4ab83bdc52 100644 --- a/resources/views/partials/comments.blade.php +++ b/resources/views/partials/comments.blade.php @@ -1,12 +1,12 @@ @if (! post_password_required())
- @if ($comments) + @if ($responses)

{!! $title !!}

    - @php($comments) + {!! $responses !!}
@if ($paginated)