Improvements

Use URLify, add pager number, new variable etc.
This commit is contained in:
Danang Probo Sayekti 2015-11-22 22:36:06 +07:00
commit 56485a27db
21 changed files with 618 additions and 22 deletions

View file

@ -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
);
}