@@ -22,7 +22,9 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $thumbnail = wp_get_attachment_image_src( $attachmentId, 'thumbnail' ); |
| 24 | 24 | |
| 25 | - if( !$thumbnail )return; |
|
| 25 | + if( !$thumbnail ) { |
|
| 26 | + return; |
|
| 27 | + } |
|
| 26 | 28 | |
| 27 | 29 | $medium = $this->normalizeSrc( wp_get_attachment_image_src( $attachmentId, 'medium' ), $thumbnail ); |
| 28 | 30 | $large = $this->normalizeSrc( wp_get_attachment_image_src( $attachmentId, 'large' ), $medium ); |
@@ -61,7 +61,9 @@ discard block |
||
| 61 | 61 | public function renderImage( WP_Post $attachment ) |
| 62 | 62 | { |
| 63 | 63 | $image = $this->image->get( $attachment->ID ); |
| 64 | - if( !$image )return; |
|
| 64 | + if( !$image ) { |
|
| 65 | + return; |
|
| 66 | + } |
|
| 65 | 67 | return sprintf( |
| 66 | 68 | '<figure class="gallery-image" data-w="%s" data-h="%s" data-ps=\'%s\' itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">' . |
| 67 | 69 | '%s<figcaption itemprop="caption description">' . |
@@ -82,7 +84,9 @@ discard block |
||
| 82 | 84 | */ |
| 83 | 85 | public function renderPagination( WP_Query $query ) |
| 84 | 86 | { |
| 85 | - if( !$this->args['pagination'] )return; |
|
| 87 | + if( !$this->args['pagination'] ) { |
|
| 88 | + return; |
|
| 89 | + } |
|
| 86 | 90 | return paginate_links([ |
| 87 | 91 | 'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'castor' ) . ' </span>', |
| 88 | 92 | 'current' => $query->query['paged'], |
@@ -27,7 +27,9 @@ discard block |
||
| 27 | 27 | $tag = 'blockquote'; |
| 28 | 28 | $value = $this->postmeta->get( $metaKey ); |
| 29 | 29 | |
| 30 | - if( !$value )return; |
|
| 30 | + if( !$value ) { |
|
| 31 | + return; |
|
| 32 | + } |
|
| 31 | 33 | |
| 32 | 34 | $this->utility->printTag( $tag, wp_strip_all_tags( $value ), $attributes ); |
| 33 | 35 | } |
@@ -36,7 +38,9 @@ discard block |
||
| 36 | 38 | { |
| 37 | 39 | $post = get_post( $postId ); |
| 38 | 40 | |
| 39 | - if( !$post )return; |
|
| 41 | + if( !$post ) { |
|
| 42 | + return; |
|
| 43 | + } |
|
| 40 | 44 | if( !$title ) { |
| 41 | 45 | $title = $post->post_title; |
| 42 | 46 | } |
@@ -77,7 +81,9 @@ discard block |
||
| 77 | 81 | ? $this->postmeta->get( $metaKey ) |
| 78 | 82 | : $this->theme->pageTitle(); |
| 79 | 83 | |
| 80 | - if( !$value )return; |
|
| 84 | + if( !$value ) { |
|
| 85 | + return; |
|
| 86 | + } |
|
| 81 | 87 | |
| 82 | 88 | $this->utility->printTag( $tag, wp_strip_all_tags( $value ), $attributes ); |
| 83 | 89 | } |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | printf( '<div class="print__r"><pre>%s</pre></div>', |
| 44 | 44 | htmlspecialchars( print_r( func_get_arg(0), true ), ENT_QUOTES, 'UTF-8' ) |
| 45 | 45 | ); |
| 46 | - } |
|
| 47 | - else if( $args > 1 ) { |
|
| 46 | + } else if( $args > 1 ) { |
|
| 48 | 47 | echo '<div class="print__r_group">'; |
| 49 | 48 | foreach( func_get_args() as $value ) { |
| 50 | 49 | $this->print( $value ); |
@@ -56,7 +55,9 @@ discard block |
||
| 56 | 55 | public function printFiltersFor( $hook = '' ) |
| 57 | 56 | { |
| 58 | 57 | global $wp_filter; |
| 59 | - if( empty( $hook ) || !isset( $wp_filter[$hook] ))return; |
|
| 58 | + if( empty( $hook ) || !isset( $wp_filter[$hook] )) { |
|
| 59 | + return; |
|
| 60 | + } |
|
| 60 | 61 | $this->print( $wp_filter[ $hook ] ); |
| 61 | 62 | } |
| 62 | 63 | |