@@ -52,7 +52,9 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function render() |
54 | 54 | { |
55 | - if( empty( $this->args['media'] ))return; |
|
55 | + if( empty( $this->args['media'] )) { |
|
56 | + return; |
|
57 | + } |
|
56 | 58 | $images = array_reduce( $this->gallery->posts, function( $images, $attachment ) { |
57 | 59 | return $images . $this->renderImage( $attachment ); |
58 | 60 | }); |
@@ -69,7 +71,9 @@ discard block |
||
69 | 71 | { |
70 | 72 | $image = $this->image->get( $attachment->ID )->image; |
71 | 73 | |
72 | - if( !$image )return; |
|
74 | + if( !$image ) { |
|
75 | + return; |
|
76 | + } |
|
73 | 77 | return sprintf( |
74 | 78 | '<figure class="gallery-image" data-w="%s" data-h="%s" data-ps=\'%s\' itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">' . |
75 | 79 | '%s<figcaption itemprop="caption description">' . |
@@ -90,7 +94,9 @@ discard block |
||
90 | 94 | */ |
91 | 95 | public function renderPagination() |
92 | 96 | { |
93 | - if( !$this->args['pagination'] )return; |
|
97 | + if( !$this->args['pagination'] ) { |
|
98 | + return; |
|
99 | + } |
|
94 | 100 | return paginate_links([ |
95 | 101 | 'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'castor' ) . ' </span>', |
96 | 102 | 'current' => $this->gallery->query['paged'], |