>


post_excerpt != "") { $image_caption = get_post(get_post_thumbnail_id())->post_excerpt; } // If the image is portrait show as it is.. if($image_data['height'] > $image_data['width']){ echo '
'; $is_portrait = true; }else{ echo '
'; $is_portrait = false; } echo '
'; echo ''; if($is_portrait){ $cropped_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'portfolio-single_portrait2'); echo ""; }else{ $cropped_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'portfolio-single_landscape'); echo ""; }//if portrait echo ''; $ql_img_info = array(); if ($image_data['image_meta']['aperture']) { array_push( $ql_img_info, '
  • ƒ/'. esc_html( $image_data['image_meta']['aperture'] ).'
  • ' ); } if ($image_data['image_meta']['focal_length']) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['focal_length'] ).' mm
  • ' ); } if ($image_data['image_meta']['iso']) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['iso'] ).'
  • ' ); } if ($image_data['image_meta']['shutter_speed']) { if ($image_data['image_meta']['shutter_speed'] < 1) { $shutter_speed = 1 / $image_data['image_meta']['shutter_speed']; array_push( $ql_img_info, '
  • 1/'.$shutter_speed.'
  • ' ); }else{ array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['shutter_speed'] ).' s
  • ' ); } } if ($image_data['image_meta']['camera']) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['camera'] ).'
  • ' ); } if ($ql_img_info) { echo '
    '; echo ''; echo '
      '; foreach ($ql_img_info as $key => $value) { echo $value ; } echo '
    '; echo "
    "; } echo "
    "; if ($image_caption) { echo '
    '. esc_html( $image_caption ) .'
    '; } echo "
    "; }//if thumbnail $post_content = get_the_content(); $array_id = array(); preg_match( '/\[gallery.*ids=.(.*).\]/', $post_content, $ids ); if ( $ids ) { $array_id = explode(",", $ids[1]); } if ( count( $array_id ) > 1 ) { foreach ( $array_id as $image_id ) { $image_data = wp_get_attachment_metadata( $image_id ); $image_full_src = wp_get_attachment_image_src( $image_id, 'full' ); // If the image is portrait show as it is.. if($image_data['height'] > $image_data['width']){ echo '
    '; $is_portrait = true; }else{ echo '
    '; $is_portrait = false; } echo '
    '; echo ''; if($is_portrait){ $cropped_image = wp_get_attachment_image_src($image_id, 'portfolio-single_portrait2'); echo ""; }else{ $cropped_image = wp_get_attachment_image_src($image_id, 'portfolio-single_landscape'); echo ""; }//if portrait echo ''; $ql_img_info = array(); if ( $image_data['image_meta']['aperture'] ) { array_push( $ql_img_info, '
  • ƒ/'. esc_html( $image_data['image_meta']['aperture'] ) .'
  • ' ); } if ( $image_data['image_meta']['focal_length'] ) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['focal_length'] ) .' mm
  • ' ); } if ( $image_data['image_meta']['iso'] ) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['iso'] ) .'
  • '); } if ( $image_data['image_meta']['shutter_speed'] ) { if ( $image_data['image_meta']['shutter_speed'] < 1 ) { $shutter_speed = 1 / $image_data['image_meta']['shutter_speed']; array_push( $ql_img_info, '
  • 1/'. esc_html( $shutter_speed ) .'
  • '); }else{ array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['shutter_speed'] ) .' s
  • ' ); } } if ( $image_data['image_meta']['camera'] ) { array_push( $ql_img_info, '
  • '. esc_html( $image_data['image_meta']['camera'] ) .'
  • ' ); } if ( $ql_img_info ) { echo '
    '; echo ''; echo '
      '; foreach ($ql_img_info as $key => $value) { echo $value; } echo '
    '; echo "
    "; } echo "
    "; if( get_post( $image_id )->post_excerpt != "" ){ echo "

    ". get_post( $image_id )->post_excerpt ."

    "; } echo "
    "; } }//if $portfolio_images if( count( $array_id ) > 2 ) { ?>