mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 20:46:26 +05:30
Improvements
Use URLify, add pager number, new variable etc.
This commit is contained in:
parent
d81933f002
commit
56485a27db
21 changed files with 618 additions and 22 deletions
|
|
@ -1346,9 +1346,12 @@ function has_pagination($total, $perpage, $page = 1)
|
|||
if (!$total) {
|
||||
$total = count(get_post_unsorted());
|
||||
}
|
||||
$totalPage = ceil($total / $perpage);
|
||||
$number = 'Page '. $page . ' of ' . $totalPage;
|
||||
return array(
|
||||
'prev' => $page > 1,
|
||||
'next' => $total > $page * $perpage
|
||||
'next' => $total > $page * $perpage,
|
||||
'number' => $number
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue