Skip to content

Commit 20e5712

Browse files
author
shin
committed
fix: single post crop image
1 parent b989ca0 commit 20e5712

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

public/includes/classes/class-cherry-portfolio-data.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,6 @@ public function build_single_post_page( $post_id, $format ) {
754754
}
755755
$slider_html .= '</section>';
756756
break;
757-
758757
case 'justified':
759758
$slider_html .= '<section class="gallery-list justified-list">';
760759
if( !empty($attachments_ids_array) ){
@@ -781,6 +780,10 @@ public function build_single_post_page( $post_id, $format ) {
781780

782781
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id) , 'full', false );
783782

783+
if( 'post-format-image' === $format && 'true' === $post_meta['portfolio-image-format-crop-image'] ){
784+
$image = $this->get_crop_image( $full_image_url[0], get_post_thumbnail_id( $post_id), $post_meta['portfolio-image-format-crop-width'], $post_meta['portfolio-image-format-crop-height'] );
785+
}
786+
784787
$audio_ids = explode(',', $audio_id);
785788
$audioplayer = '';
786789
foreach ($audio_ids as $value) {

0 commit comments

Comments
 (0)