Skip to content

Commit

Permalink
🎨 Swap the method order
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x authored and retlehs committed Jan 18, 2024
1 parent c7b9ce8 commit 87ae5b6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/View/Composers/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public function with()
return [
'title' => $this->title(),
'comments' => $this->comments(),
'next' => $this->next(),
'previous' => $this->previous(),
'next' => $this->next(),
'paginated' => $this->paginated(),
'closed' => $this->closed(),
];
Expand Down Expand Up @@ -65,34 +65,34 @@ public function comments()
}

/**
* The next comments link.
* The previous comments link.
*
* @return string
*/
public function next()
public function previous()
{
if (! get_next_comments_link()) {
if (! get_previous_comments_link()) {
return;
}

return get_next_comments_link(
__('Newer comments →', 'sage')
return get_previous_comments_link(
__('← Older comments', 'sage')
);
}

/**
* The previous comments link.
* The next comments link.
*
* @return string
*/
public function previous()
public function next()
{
if (! get_previous_comments_link()) {
if (! get_next_comments_link()) {
return;
}

return get_previous_comments_link(
__('← Older comments', 'sage')
return get_next_comments_link(
__('Newer comments →', 'sage')
);
}

Expand Down

0 comments on commit 87ae5b6

Please sign in to comment.