1) ? 'wpmfslick_multiplecolumns' : 'wpmf-gg-one-columns'); $class_default[] = 'ratio_' . $aspect_ratio; $crop = (isset($crop_image)) ? $crop_image : 1; if ((int)$columns === 1) { $crop = 0; } $class_default[] = 'wpmf-slick-crop-' . $crop; $shadow = 0; $style = ''; if ($img_shadow !== '') { if ((int)$columns > 1) { $style .= '#' . $selector . ' .wpmf-gallery-item .wpmf-gallery-icon:hover {box-shadow: ' . $img_shadow . ' !important; transition: all 200ms ease;}'; $shadow = 1; } } if ((int)$gutterwidth === 0) { $shadow = 0; } if ($border_style !== 'none') { if ((int)$columns === 1) { $style .= '#' . $selector . ' .wpmf-gallery-item img:not(.glrsocial_image) {border: ' . $border_color . ' ' . $border_width . 'px ' . $border_style . ';}'; } else { $style .= '#' . $selector . ' .wpmf-gallery-item .wpmf-gallery-icon {border: ' . $border_color . ' ' . $border_width . 'px ' . $border_style . ';}'; } } else { $border_width = 0; } $galleryStyle = ''; if ($align === 'alignleft' || $align === 'alignright' || $align === 'aligncenter') { $galleryStyle = 'style="width: 100%; max-width: 620px!important;"'; } elseif ($align === 'none') { $align = ''; } wp_add_inline_style('wpmf-gallery-style', $style); $output = ''; if (!empty($is_divi)) { $output .= ''; } $items = array(); foreach ($gallery_items as $item_id => $attachment) { $post_title = (!empty($caption_lightbox) && $attachment->post_excerpt !== '') ? $attachment->post_excerpt : $attachment->post_title; $remote_video = get_post_meta($attachment->ID, 'wpmf_remote_video_link', true); $item_urls = wp_get_attachment_image_url($attachment->ID, $targetsize); $url = (!empty($remote_video)) ? $remote_video : $item_urls; if (!empty($remote_video)) { $lightbox_urls = $this->getLightboxUrl($attachment->ID, $targetsize); $url = $lightbox_urls['url']; $items[] = array('src' => $url, 'title' => $post_title, 'type' => 'iframe'); } else { $url = $item_urls; $items[] = array('src' => $url, 'title' => $post_title, 'type' => 'image'); } } $output .= '