@@ -25,7 +25,9 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function get( $attachment ) |
| 27 | 27 | { |
| 28 | - if( !( $attachment = $this->normalize( $attachment )))return; |
|
| 28 | + if( !( $attachment = $this->normalize( $attachment ))) { |
|
| 29 | + return; |
|
| 30 | + } |
|
| 29 | 31 | if( $thumbnail = wp_get_attachment_image_src( $attachment, 'thumbnail' )) { |
| 30 | 32 | $medium = $this->normalizeSrc( wp_get_attachment_image_src( $attachment, 'medium' ), $thumbnail ); |
| 31 | 33 | $large = $this->normalizeSrc( wp_get_attachment_image_src( $attachment, 'large' ), $medium ); |
@@ -59,7 +61,9 @@ discard block |
||
| 59 | 61 | |
| 60 | 62 | $attachment = get_post( $attachmentId ); |
| 61 | 63 | |
| 62 | - if( is_null( $attachment ) || $attachment->post_type != 'attachment' )return; |
|
| 64 | + if( is_null( $attachment ) || $attachment->post_type != 'attachment' ) { |
|
| 65 | + return; |
|
| 66 | + } |
|
| 63 | 67 | |
| 64 | 68 | return $attachment->ID; |
| 65 | 69 | } |