@@ -13,14 +13,18 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function build( array $args = [] ) |
| 15 | 15 | { |
| 16 | - if( $args['total'] < 2 )return; |
|
| 16 | + if( $args['total'] < 2 ) { |
|
| 17 | + return; |
|
| 18 | + } |
|
| 17 | 19 | $paged = glsr( QueryBuilder::class )->getPaged(); |
| 18 | 20 | $links = $this->buildLinksForDeprecatedThemes( $args['total'], $paged ); |
| 19 | 21 | if( empty( $links )) { |
| 20 | 22 | $links = $this->buildLinks( $args['total'], $paged ); |
| 21 | 23 | } |
| 22 | 24 | $links = apply_filters( 'site-reviews/reviews/navigation_links', $links, $paged, $args['total'] ); |
| 23 | - if( empty( $links ))return; |
|
| 25 | + if( empty( $links )) { |
|
| 26 | + return; |
|
| 27 | + } |
|
| 24 | 28 | return $this->buildTemplate( $links ); |
| 25 | 29 | } |
| 26 | 30 | |
@@ -54,7 +58,9 @@ discard block |
||
| 54 | 58 | protected function buildLinksForDeprecatedThemes( $totalPages, $paged ) |
| 55 | 59 | { |
| 56 | 60 | $theme = wp_get_theme()->get( 'TextDomain' ); |
| 57 | - if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] ))return; |
|
| 61 | + if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] )) { |
|
| 62 | + return; |
|
| 63 | + } |
|
| 58 | 64 | $links = ''; |
| 59 | 65 | if( $paged > 1 ) { |
| 60 | 66 | $links.= sprintf( '<div class="nav-previous"><a href="%s"><span class="meta-nav">←</span> %s</a></div>', |