Skip to content

Commit

Permalink
/Pagination/show()
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzyCzech committed Oct 14, 2016
1 parent b7c43f1 commit f109613
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<? get_template_part('content', get_post_format()); ?>
<? endwhile; ?>
</section>
<?= \blank\Pagination::show() ?>
<?= \Pagination\show() ?>
<? else : ?>
<? get_template_part('content', 'none'); ?>
<? endif; ?>
Expand Down
10 changes: 4 additions & 6 deletions src/Pagination.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<?php
namespace blank;
/**
* @author Roman Ozana <[email protected]>
*/
class Pagination {
namespace Pagination {

/**
* @param null $query
* @param string $args
* @return string
*/
public static function show($query = null, $args = '') {
function show($query = null, $args = '') {
global $wp_query;
$query = $query ? $query : $wp_query;

Expand Down Expand Up @@ -111,4 +107,6 @@ public static function show($query = null, $args = '') {
$r .= "</ul>$after_pagination";
return $r;
}

}

0 comments on commit f109613

Please sign in to comment.