Skip to content

Commit

Permalink
minor polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Dec 3, 2015
1 parent 9773e69 commit e3cd109
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions includes/paginations/Carbon_Pagination_Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public function get_pagination_posts() {
* @return string $url The URL to the page number.
*/
public function get_page_url( $page_number, $old_url = '' ) {
$pages = $this->get_pages();
$posts = $this->get_pages();
$page = 0;

if ( isset( $pages[ $page_number ] ) ) {
$page = $pages[ $page_number ];
if ( isset( $posts[ $page_number ] ) ) {
$page = $posts[ $page_number ];
}

$url = get_permalink( $page );
Expand Down
4 changes: 1 addition & 3 deletions includes/paginations/Carbon_Pagination_Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ public function __construct( $args = array() ) {
public function get_page_url( $page_number, $old_url = '' ) {
$pages = $this->get_pages();
$page = isset( $pages[ $page_number ] ) ? $pages[ $page_number ] : 0;
$url = get_pagenum_link( $page );

return $url;
return get_pagenum_link( $page );
}

}

0 comments on commit e3cd109

Please sign in to comment.