♻️ Check wp_link_pages before rendering in content-single.blade.php (#3157)
Co-authored-by: Brandon <brandon@tendency.me>
This commit is contained in:
@@ -26,11 +26,12 @@ class Post extends Composer
|
||||
{
|
||||
return [
|
||||
'title' => $this->title(),
|
||||
'pagination' => $this->pagination(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the post title.
|
||||
* Retrieve the post title.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -66,4 +67,18 @@ class Post extends Composer
|
||||
|
||||
return get_the_title();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the pagination links.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function pagination()
|
||||
{
|
||||
return wp_link_pages([
|
||||
'echo' => 0,
|
||||
'before' => '<p>' . __('Pages:', 'sage'),
|
||||
'after' => '</p>',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user